YosysHQ/yosys
By EoptEditor 0
Xilinx Vivado Made Free Synthesis. En
Document your code;
Every project on GitHub comes with a version-controlled wiki to give
your documentation the high level of care it deserves. It’s easy to
create well-maintained, Markdown or rich text documentation alongside
your code.
Migrating from Vivado:
Aleks-Daniel Jakimenko-Aleksejev edited this page · 4
revisions
This page is WIP.
At this point it is not possible to work with Xilinx FPGAs by
using only free software. If you are looking for a full free software
toolchain for working with FPGAs, see Project
IceStorm. That being said, most of your workflow can still be
done using Yosys, Icarus Verilog and other free software tools. You
will have to use Vivado for place&route, bitstream generation and
writing your bit file onto your device. However, this can be done by
using tcl scripts, meaning that you will not have to open Vivado GUI
at all. This page will show how to get commonly used Vivado
functionality with Yosys.
Elaborated Design Schematic / RTL Schematic:
All you have to do is load your Verilog source files and run
prep
.
Then, use show
to see parts that are of any interest to you. You probably also want
to use -colors
and -stretch
flags to make
the graph a bit more readable. Therefore, the command you want to
use is: yosys -p 'prep; show -colors 42 -stretch show top' top.sv
foo.sv bar.sv / You can also export this graph directly to SVG file:
yosys -p 'prep; show -colors 42 -stretch -format svg -prefix mygraph
show top' top.sv foo.sv bar.svBitstream and Programming:
You can run Vivado in
batch
or tcl
modes. The difference is that in batch
mode it will run
the script and exit, while in tcl
you will be left with
the tcl shell. The problem with Vivado is that it has a very long
startup delay, therefore running it in batch
mode is
very likely not what you want (but you can still do it, if you wish).- place&route and bitstream generation. This script does not have
open_hw
command, so perhaps consider adding it (otherwise you will get an error message). - writing
the bitstream file to your device
The first one is where all of the magic happens. Feel free to add
a couple of other commands, for example
report_power
.
You may also want to modify the second file if you are working with
multiple devices at the same time. You will also need an .xdc
file (you are probably already aware of it). See this
example. You can use Vivado GUI to generate it, or you can just
write it by hand. The structure of the file is simple enough so there
should be no problem.
So, you can run it in
batch
mode: vivado -mode batch
-source run_vivado.tcl / Or, you can run it tcl
mode:
vivado -mode tcl
Once it is loaded, you will see the tcl shell. Write
source
run_vivado.tcl
to run your tcl script. The latter approach
might be slightly more preferable to you if you do not like the
startup delay of vivado. / Both examples assume that you have
vivado
binary in your PATH. If you don't, feel free to
substitute it with an actual path (e.g.
~/opt/Xilinx/Vivado/2016.2/bin/vivado
).
No comments:
Post a Comment