On-chip photonic integrated circuit structures for millimeter and terahertz wave signal generation