olofk / serv

SERV - The SErial RISC-V CPU
ISC License
1.36k stars 178 forks source link

Adding support for the iceFUN board #129

Open ej159 opened 2 months ago

ej159 commented 2 months ago

I'm working to get a servant running on an iceFUN board.

The changes I have made here allow me to run the following command without errors to give code I can upload to my device.

fusesoc run --target=icefun --tool=icestorm servant --pnr=next

I have noticed that icestick and icebreaker also give similar errors relating to PLLs.

It would be nice to expand this so that a simple example (e.g. zephyr_phil) can be run on the board easily in one line as a demo.

olofk commented 2 months ago

Thank you for the new port. First of all, what is the PLL error you are seeing? I didn't see anything when I ran it myself.

Anyway, the code looks good but FYI you can simplify your command-line to just fusesoc run --target=icefun servant since you have set the default_tool to icestorm already and nextpnr is the default pnr tool for this tool backend.

One change I would like to see is to use the new Flow API instead of the old Tool API since the Tool API will eventually be deprecated. In this case the change is very easy. Replace default_tool: icestorm with flow: icestorm to use the new API. Then you need to replace the tools section with a flow_options section that contains nextpnr_options: [--hx8k, --package, cb132 --freq, 16]. You can look at the tinyfpga_bx target if you are unsure about the syntax.