Skip to content

Commit b9c201d

Browse files
committed
[Yosys+Odin]: passing all circuit names at once to Yosys frontend to avoid deleting submodules
[Infra]: avoid Surelog and Yosys-F4PGA-Plugins to be compiled with every make call Signed-off-by: Seyed Alireza Damghani <[email protected]>
1 parent 17337fe commit b9c201d

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

ODIN_II/SRC/YYosys.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,22 +265,24 @@ void YYosys::execute() {
265265
} else {
266266
// Read the hardware decription Verilog circuits
267267
// FOR loop enables include feature for Yosys+Odin (multiple Verilog input files)
268-
for (auto circuit : this->verilog_circuits) {
268+
std::string aggregated_circuits;
269+
for (auto circuit : this->verilog_circuits)
270+
aggregated_circuits += circuit + " ";
269271
// Read Verilog/SystemVerilog/UHDM files based on their type, considering the SystemVerilog/UHDM plugins
270272
# ifdef YOSYS_SV_UHDM_PLUGIN
271273
/* Load SystemVerilog/UHDM plugins in the Yosys frontend */
272274
switch (configuration.input_file_type) {
273275
case (file_type_e::_VERILOG): // fallthrough
274276
case (file_type_e::_VERILOG_HEADER): {
275-
run_pass(std::string("read_verilog -sv -nolatches " + circuit));
277+
run_pass(std::string("read_verilog -sv -nolatches " + aggregated_circuits));
276278
break;
277279
}
278280
case (file_type_e::_SYSTEM_VERILOG): {
279-
run_pass(std::string("read_systemverilog -debug" + circuit));
281+
run_pass(std::string("read_systemverilog -debug " + aggregated_circuits));
280282
break;
281283
}
282284
case (file_type_e::_UHDM): {
283-
run_pass(std::string("read_uhdm -debug" + circuit));
285+
run_pass(std::string("read_uhdm -debug " + aggregated_circuits));
284286
break;
285287
}
286288
default: {
@@ -289,9 +291,8 @@ void YYosys::execute() {
289291
}
290292
}
291293
# else
292-
run_pass(std::string("read_verilog -sv -nolatches " + circuit));
294+
run_pass(std::string("read_verilog -sv -nolatches " + aggregated_circuits));
293295
# endif
294-
}
295296
// Check whether cells match libraries and find top module
296297
if (global_args.top_level_module_name.provenance() == argparse::Provenance::SPECIFIED) {
297298
run_pass(std::string("hierarchy -check -top " + global_args.top_level_module_name.value() + " -purge_lib"));

libs/EXTERNAL/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ if(${ODIN_USE_YOSYS} OR ${WITH_YOSYS})
6565
LOG_CONFIGURE ON
6666
LOG_OUTPUT_ON_FAILURE ON
6767

68-
# usefull flags
69-
ALWAYS TRUE
68+
# dependency
7069
DEPENDS yosys
7170
)
7271

@@ -98,8 +97,7 @@ if(${ODIN_USE_YOSYS} OR ${WITH_YOSYS})
9897
LOG_CONFIGURE ON
9998
LOG_OUTPUT_ON_FAILURE ON
10099

101-
# usefull flags
102-
ALWAYS TRUE
100+
# dependency
103101
DEPENDS surelog yosys
104102
)
105103
endif()

vtr_flow/scripts/python_libs/vtr/odin/odin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
# supported input file type by Odin
1212
FILE_TYPES = {
1313
".v": "verilog",
14-
".vh": "verilog",
15-
".sv": "verilog",
16-
".svh": "verilog",
14+
".vh": "verilog_header",
15+
".sv": "systemverilog",
16+
".svh": "systemverilog_header",
1717
".blif": "blif",
1818
}
1919

0 commit comments

Comments
 (0)