Fix yosys read command for SystemVerilog sources

This commit is contained in:
Simon Thornington 2021-04-05 10:37:17 -04:00
parent 080ecad522
commit 4b0a359675
3 changed files with 10 additions and 1 deletions

View File

@ -56,6 +56,9 @@ def _yosys_import_sources(platform):
for path in platform.verilog_include_paths: for path in platform.verilog_include_paths:
includes += " -I" + path includes += " -I" + path
for filename, language, library in platform.sources: for filename, language, library in platform.sources:
# yosys has no such function read_systemverilog
if language == "systemverilog":
language = "verilog -sv"
reads.append("read_{}{} {}".format( reads.append("read_{}{} {}".format(
language, includes, filename)) language, includes, filename))
return "\n".join(reads) return "\n".join(reads)

View File

@ -37,6 +37,9 @@ def _yosys_import_sources(platform):
for path in platform.verilog_include_paths: for path in platform.verilog_include_paths:
includes += " -I" + path includes += " -I" + path
for filename, language, library in platform.sources: for filename, language, library in platform.sources:
# yosys has no such function read_systemverilog
if language == "systemverilog":
language = "verilog -sv"
reads.append("read_{}{} {}".format( reads.append("read_{}{} {}".format(
language, includes, filename)) language, includes, filename))
return "\n".join(reads) return "\n".join(reads)

View File

@ -67,6 +67,9 @@ def _yosys_import_sources(platform):
for path in platform.verilog_include_paths: for path in platform.verilog_include_paths:
includes += " -I" + path includes += " -I" + path
for filename, language, library in platform.sources: for filename, language, library in platform.sources:
# yosys has no such function read_systemverilog
if language == "systemverilog":
language = "verilog -sv"
reads.append("read_{}{} {}".format( reads.append("read_{}{} {}".format(
language, includes, filename)) language, includes, filename))
return "\n".join(reads) return "\n".join(reads)