Skip to content

Commit 1ef410c

Browse files
committed
[Yosys+Odin]: Add "hierarchy -purge_lib" to the yosys script to remove unused bb definitions
Signed-off-by: Seyed Alireza Damghani <[email protected]>
1 parent d3d4a71 commit 1ef410c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ODIN_II/SRC/YYosys.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ void YYosys::execute() {
256256
run_pass(std::string("read_verilog -nomem2reg -nolatches " + verilog_circuit));
257257

258258
// Check whether cells match libraries and find top module
259-
run_pass(std::string("hierarchy -check -auto-top"));
259+
run_pass(std::string("hierarchy -check -auto-top -purge_lib"));
260260

261261
// Use a readable name convention
262262
run_pass(std::string("autoname"));
@@ -343,7 +343,7 @@ void YYosys::output_blif() {
343343

344344
// "-param" is to print non-standard cells parameters
345345
// "-impltf" is to not show the definition of primary netlist ports, i.e., VCC, GND and PAD, in the output.
346-
run_pass(std::string("write_blif -param -impltf " + this->coarse_grain_blif));
346+
run_pass(std::string("write_blif -blackbox -param -impltf " + this->coarse_grain_blif));
347347
#endif
348348
}
349349

ODIN_II/regression_test/tools/synth.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ yosys -import
66
# Read the hardware decription Verilog
77
read_verilog -nomem2reg -nolatches $env(TCL_CIRCUIT);
88
# Check that cells match libraries and find top module
9-
hierarchy -check -auto-top;
9+
hierarchy -check -auto-top -purge_lib;
1010

1111
# Make name convention more readable
1212
autoname;

0 commit comments

Comments
 (0)