ghdl / ghdl-yosys-plugin

VHDL synthesis (based on ghdl)
GNU General Public License v3.0
296 stars 32 forks source link

Improve examples for Lattice iCEstick #105

Closed aimylios closed 4 years ago

aimylios commented 4 years ago

I was going through the examples for the Lattice iCEstick and found some typos in the README.md file.

While I was at it, I reorganised the examples a bit. Since there was already a subfolder uart, I moved all variations of the leds example to its own subfolder as well, added a simple Makefile based on the one from Project Icestorm, added the *.json files generated by Yosys to .gitignore (this could be restricted to the examples directory in case there are plans to use JSON anywhere else in the repository), and updated README.md accordingly.

tgingold commented 4 years ago

Thanks!

eine commented 4 years ago

I moved all variations of the leds example to its own subfolder as well

The subsection about Docker should have been updated accordingly...

added a simple Makefile based on the one from Project Icestorm

It looks very similar to the existing examples/icezum/Makefile. Perhaps, both of them should be merged. Furthermore, the more complete alternative contributed by hackfin (https://github.com/ghdl/ghdl-yosys-plugin/blob/master/examples/ecp5_versa/Makefile#L34-L35) could be reused.

aimylios commented 4 years ago

The subsection about Docker should have been updated accordingly...

Indeed, I missed the example in the Docker section, sorry for that. But I see you fixed it already. Thanks!

It looks very similar to the existing examples/icezum/Makefile. Perhaps, both of them should be merged. Furthermore, the more complete alternative contributed by hackfin (https://github.com/ghdl/ghdl-yosys-plugin/blob/master/examples/ecp5_versa/Makefile#L34-L35) could be reused.

Currently the build helpers for the examples are a mixture of various Makefiles and Shell scripts. The one I wrote was for my own experiments, and I created this PR because I thought it could be useful for others as well (even if it doesn't work out of the box on every system and might need some manual tweaking). If someone wants to replace all of this with a unified and more powerful Makefile infrastructure, then I'd of course not be opposed to that.