Skip to content

Cocotb test bench for checking SB_MAC16 inference

License

Notifications You must be signed in to change notification settings

xobs/ice40-multest

Repository files navigation

ICE40 MUL tester

Test that the ICE40 multiplier is being correctly inferred by Yosys.

Usage

Install cocotb and yosys, then run:

$ make

This will use Yosys to generate dspmul.v which contains inferred SB_MAC16 blocks. If these are not present, then your version of Yosys does not do DSP inference.

It will then generate 256 random 32-bit pairs and run them through this inferred block, as well as through a standard Verilog * operator. For good measure, it also does a simple Python *.

Sim Libraries

This repo comes with the Yosys simulation files for the ICE40. You can use other simulation libraries, such as sb_ice_syn.v from Lattice. To do this, run:

$ make ICE40_CELLS=sb_ice_syn.v

About

Cocotb test bench for checking SB_MAC16 inference

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published