aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs
diff options
context:
space:
mode:
authorTristan Gingold <tristan.gingold@cern.ch>2021-11-24 17:09:20 +0100
committerTristan Gingold <tristan.gingold@cern.ch>2022-08-31 08:40:44 +0200
commit1e0e3bd48e2f90399fe59ea3607ce68163891284 (patch)
treedac1543ea7825393310c83a879aec171e824d978 /techlibs
parent0f6cf8b8e4c3574aefae9f613161a5a5648fb04f (diff)
downloadyosys-1e0e3bd48e2f90399fe59ea3607ce68163891284.tar.gz
yosys-1e0e3bd48e2f90399fe59ea3607ce68163891284.tar.bz2
yosys-1e0e3bd48e2f90399fe59ea3607ce68163891284.zip
sf2: add NOTES about using yosys for smartfusion2 and igloo2
Diffstat (limited to 'techlibs')
-rw-r--r--techlibs/sf2/NOTES.txt84
1 files changed, 84 insertions, 0 deletions
diff --git a/techlibs/sf2/NOTES.txt b/techlibs/sf2/NOTES.txt
new file mode 100644
index 000000000..67784b546
--- /dev/null
+++ b/techlibs/sf2/NOTES.txt
@@ -0,0 +1,84 @@
+Using yosys with Libero Soc
+===========================
+
+Yosys does synthesis and therefore could be used instead of Synplify in
+the Libero workflow. You still have to use LiberoSoc for place, route,
+bitsteam generation, timing analysis...
+
+This is unfortunately not trivial, but this is also not too difficult.
+When you run the Synthesize step, three tools are executed one after the other.
+
+You'd better to write a simple script, like this one (assuming the top module
+is top):
+
+----------- run_yosys.sh --------------
+#!/bin/sh
+
+set -e
+
+yosys -p 'read_verilog hdl/top.v; synth_sf2; write_verilog -defparam synthesis/top_yosys.v'
+
+rwnetlist64 --script yosys/rwnetlist.tcl
+
+echo "##### run g4compile"
+
+g4compile --script yosys/run_compile.tcl
+
+libero SCRIPT:run_yosys.tcl
+------------------------------------
+
+Yosys will do the synthesis and write a netlist in verilog. Then you have
+to call microsemi tools to build the netlist for the P&R tools.
+
+The first one do a file format conversion. During the normal workflow, the
+tcl file is created in a temporary file. You can use this one:
+
+------------- tcl/rwnetlist.tcl ---------
+set_device -fam SmartFusion2
+read_verilog \
+ -file {../synthesis/top_yosys.v}
+write_adl -file {../designer/top/top.adl}
+----------------------------------------
+
+Probably, you will have to change the family for Igloo2.
+
+The second command link the netlists. The tcl script is generated by
+liberoSoc in designer/top/run_compile.tcl. You can use it as it.
+The "Source Files" value could be changed but it looks to have no effect.
+This commands create the .afl file.
+
+Then you can use the normal flow. This is done by the run_yosys.tcl:
+
+----------- run_yosys.tcl --------------
+open_project -file {./top.prjx}
+run_tool -name {PLACEROUTE}
+run_tool -name {PROGRAMDEVICE}
+-----------------------------------------
+
+
+Using MSS, HPMS or other IPs
+============================
+
+This works. You'd better to configure CCC (~ the PLL) and the MSS using
+liberoSoc as the configuration bits are not documented.
+Then you have to manually gather the HDL sources generated for the IPs.
+They are in the component subdirectory. Sometimes there are both a _syn and
+a _pre version of the same file. They are for symplify and precision.
+Use only once, the symplify version should be OK. For the MSS, these are the
+blackboxes, so you don't need them.
+
+SYSRESET and XTLOSC have one fake port. This is handled, provided you use
+the blackbox module declared by Yosys in cell_sim.v. This is OK by default
+too.
+
+
+What is missing
+===============
+
+Always flatten your design (this is the default). Hierarchical designs
+don't work.
+
+Constraints (SDC files) are not supported by Yosys. Furthermore, due to
+flattening and optimization, nets name may change.
+
+More testing...