From 2a2e0a4722ded7628b71f436b94a06aebd57bb62 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 8 Jan 2019 20:16:36 +0100 Subject: [PATCH] Improve igloo2 example Signed-off-by: Clifford Wolf --- examples/igloo2/.gitignore | 3 ++- examples/igloo2/example.ys | 3 ++- examples/igloo2/libero.tcl | 27 ++++++++++++++++++++++--- examples/igloo2/{libero.sh => runme.sh} | 1 + 4 files changed, 29 insertions(+), 5 deletions(-) rename examples/igloo2/{libero.sh => runme.sh} (88%) 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.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/libero.sh b/examples/igloo2/runme.sh similarity index 88% rename from examples/igloo2/libero.sh rename to examples/igloo2/runme.sh index 582f6ccb9..4edfb5409 100644 --- a/examples/igloo2/libero.sh +++ b/examples/igloo2/runme.sh @@ -1,4 +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 -- 2.30.2