A collection of SCons tools for building bitstreams and testing designs.
You can specific tools with the following names:
yosys
provides https://github.com/YosysHQ/yosysnextpnr
provides https://github.com/YosysHQ/nextpnrtrellis
provides https://github.com/YosysHQ/prjtrellisicarus
provides https://github.com/steveicarus/iverilog
- For each tool you want add
<tool>.py
into your SCons tools (i.e.site_scons/site_tools/
).
or
Add this repo as a submodule to your repo and add its path totoolpath
in your environment. - Include the tools in your environment and configure flags. See the tool files for construction variable names.
env = Environment(tools = ['yosys', 'nextpnr.py', 'trellis.py', 'icarus', ...], ...)
- Build a bitstream!
ast = env.YosysScript("synth_soc.ys")
textcfg = env.Ecp5Pnr(ast)
bitstream = env.Ecp5Bitstream(textcfg)
I'm not very happy with how this works atm. It will likely change.