icefm is a basic proof of concept FM transmitter written in SpinalHDL and targetting the Lattice iCEstick. Any other Lattice FPGAs which have PLLs should be easy to support.
The iCEstick has one PLL on board. The icepll
program from the amazing icestorm software package can generate Verilog modules which instantiate the PLL.
SpinalHDL has a facility for importing arbitrary Verilog - the BlackBox component.
This project simply bridges these two technologies. The result is a routing of the PLL output frequency to a GPIO pin.
Example Verilog files are included which target 109.5MHz.
The scripts assume the following are present:
- sbt
- yosys
- nextpnr-ice40
- icepack
- Generate
PLL.v
- Run
gen-pll.sh
or otherwise runicepll
to generate the PLL module with the expected name ofPLL.v
- Run
- Generate PLLSoc.v
- Load the project in IDEA and run the PLLVerilog target in PLL class.
- Alternatively, run
sbt "runMain icefm.PLLVerilog"
- Synthesize and route by running
synth.sh
or your process of choice.