From: Clifford Wolf Date: Tue, 8 Jan 2019 19:16:36 +0000 (+0100) Subject: Improve igloo2 example X-Git-Tag: yosys-0.9~333 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a2e0a4722ded7628b71f436b94a06aebd57bb62;p=yosys.git Improve igloo2 example Signed-off-by: Clifford Wolf --- diff --git a/examples/igloo2/.gitignore b/examples/igloo2/.gitignore index ae86e69cc..fa3c3d7ed 100644 --- a/examples/igloo2/.gitignore +++ b/examples/igloo2/.gitignore @@ -1,2 +1,3 @@ -/example.edn +/netlist.edn +/netlist.v /work diff --git a/examples/igloo2/example.ys b/examples/igloo2/example.ys index 75a305d86..872f97b99 100644 --- a/examples/igloo2/example.ys +++ b/examples/igloo2/example.ys @@ -1,2 +1,3 @@ read_verilog example.v -synth_sf2 -top top -edif example.edn +synth_sf2 -top top -edif netlist.edn +write_verilog netlist.v diff --git a/examples/igloo2/libero.sh b/examples/igloo2/libero.sh deleted file mode 100644 index 582f6ccb9..000000000 --- a/examples/igloo2/libero.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -set -ex -rm -rf work -LM_LICENSE_FILE=1702@`hostname` /opt/microsemi/Libero_SoC_v11.9/Libero/bin/libero SCRIPT:libero.tcl diff --git a/examples/igloo2/libero.tcl b/examples/igloo2/libero.tcl index cc1ab2403..9f6d3b792 100644 --- a/examples/igloo2/libero.tcl +++ b/examples/igloo2/libero.tcl @@ -9,6 +9,27 @@ new_project \ -speed -1 \ -hdl VERILOG -import_files -edif {example.edn} -run_tool –name {COMPILE} -run_tool –name {PLACEROUTEN} +# import_files -edif "[pwd]/netlist.edn" + +import_files -hdl_source "[pwd]/netlist.v" +set_root top + +save_project + +puts "**> SYNTHESIZE" +run_tool -name {SYNTHESIZE} +puts "<** SYNTHESIZE" + +puts "**> COMPILE" +run_tool -name {COMPILE} +puts "<** COMPILE" + +puts "**> PLACEROUTE" +run_tool -name {PLACEROUTE} +puts "<** PLACEROUTE" + +# puts "**> export_bitstream" +# export_bitstream_file -trusted_facility_file 1 -trusted_facility_file_components {FABRIC} +# puts "<** export_bitstream" + +exit 0 diff --git a/examples/igloo2/runme.sh b/examples/igloo2/runme.sh new file mode 100644 index 000000000..4edfb5409 --- /dev/null +++ b/examples/igloo2/runme.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -ex +rm -rf work +yosys example.ys +LM_LICENSE_FILE=1702@`hostname` /opt/microsemi/Libero_SoC_v11.9/Libero/bin/libero SCRIPT:libero.tcl