Verilog Library Announcement
I like to learn by doing, by trying things out and experimenting. However, this is hard with FPGAs; there’s a significant lack of practical Verilog designs online. The Project F Library is the latest part of my attempt to make things a little better for FPGA hackers and beginners. Over the last couple of years, I’ve built up a small collection of handy Verilog modules. The Library brings these modules together with documentation and test benches to make them more accessible. Just bear in mind that I’m an enthusiastic amateur; my designs are unlikely to pass muster with language lawyers.
There is now a dedicated Verilog Library page with the latest designs and blog posts.
Get in touch with @WillFlux, or join me on Project F Discussions or 1BitSquared Discord.
- Clock - clock generation (PLL) and domain crossing
- Display - display timings, framebuffer, DVI/HDMI output
- Essential - handy modules for many designs
- Graphics - drawing lines and shapes
- Maths - divide, LFSR, square root, sine…
- Memory - ROM and RAM designs, including BRAM and SPRAM
Project F tests these designs in simulation and on real hardware.
- Synthesized with Yosys and Vivado
- Include test benches (currently for Vivado but Verilator will be added soon)
- Tested on Arty (Xilinx 7 Series) and iCEBreaker (Lattice iCE40) boards
- Linted with Verilator
We use a few simple features of SystemVerilog to make Verilog more pleasant:
logictype is safer and less work than using
always_ffto make intent clear and catch mistakes
$clog2to calculate vector widths (e.g. for addresses)
enumto make finite state machines simpler to work with
- Matching names in module instances:
I believe these features are helpful, especially for beginners. All the SystemVerilog features used are compatible with recent versions of Verilator, Yosys, and Xilinx Vivado. However, if you need to use an older Verilog standard, you can adapt these designs without too much trouble.
Sponsor My Work
If you like what I do, consider sponsoring me on GitHub.
I love FPGAs and want to help more people discover and use them in their projects.
My hardware designs are open source, and my blog is advert free.
PS. The library photo used in the social media card for this post comes from Stewart Butterfield and is licensed under a Creative Commons licence.