Skip to content

Commit

Permalink
[Yosys+Odin]: passing all circuit names at once to Yosys frontend to …
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
sdamghan committed Aug 15, 2022
1 parent 17337fe commit b9c201d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
13 changes: 7 additions & 6 deletions ODIN_II/SRC/YYosys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,22 +265,24 @@ void YYosys::execute() {
} else {
// Read the hardware decription Verilog circuits
// FOR loop enables include feature for Yosys+Odin (multiple Verilog input files)
for (auto circuit : this->verilog_circuits) {
std::string aggregated_circuits;
for (auto circuit : this->verilog_circuits)
aggregated_circuits += circuit + " ";
// Read Verilog/SystemVerilog/UHDM files based on their type, considering the SystemVerilog/UHDM plugins
# ifdef YOSYS_SV_UHDM_PLUGIN
/* Load SystemVerilog/UHDM plugins in the Yosys frontend */
switch (configuration.input_file_type) {
case (file_type_e::_VERILOG): // fallthrough
case (file_type_e::_VERILOG_HEADER): {
run_pass(std::string("read_verilog -sv -nolatches " + circuit));
run_pass(std::string("read_verilog -sv -nolatches " + aggregated_circuits));
break;
}
case (file_type_e::_SYSTEM_VERILOG): {
run_pass(std::string("read_systemverilog -debug" + circuit));
run_pass(std::string("read_systemverilog -debug " + aggregated_circuits));
break;
}
case (file_type_e::_UHDM): {
run_pass(std::string("read_uhdm -debug" + circuit));
run_pass(std::string("read_uhdm -debug " + aggregated_circuits));
break;
}
default: {
Expand All @@ -289,9 +291,8 @@ void YYosys::execute() {
}
}
# else
run_pass(std::string("read_verilog -sv -nolatches " + circuit));
run_pass(std::string("read_verilog -sv -nolatches " + aggregated_circuits));
# endif
}
// Check whether cells match libraries and find top module
if (global_args.top_level_module_name.provenance() == argparse::Provenance::SPECIFIED) {
run_pass(std::string("hierarchy -check -top " + global_args.top_level_module_name.value() + " -purge_lib"));
Expand Down
6 changes: 2 additions & 4 deletions libs/EXTERNAL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ if(${ODIN_USE_YOSYS} OR ${WITH_YOSYS})
LOG_CONFIGURE ON
LOG_OUTPUT_ON_FAILURE ON

# usefull flags
ALWAYS TRUE
# dependency
DEPENDS yosys
)

Expand Down Expand Up @@ -98,8 +97,7 @@ if(${ODIN_USE_YOSYS} OR ${WITH_YOSYS})
LOG_CONFIGURE ON
LOG_OUTPUT_ON_FAILURE ON

# usefull flags
ALWAYS TRUE
# dependency
DEPENDS surelog yosys
)
endif()
Expand Down
6 changes: 3 additions & 3 deletions vtr_flow/scripts/python_libs/vtr/odin/odin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
# supported input file type by Odin
FILE_TYPES = {
".v": "verilog",
".vh": "verilog",
".sv": "verilog",
".svh": "verilog",
".vh": "verilog_header",
".sv": "systemverilog",
".svh": "systemverilog_header",
".blif": "blif",
}

Expand Down

0 comments on commit b9c201d

Please sign in to comment.