diff --git a/litex/build/lattice/icestorm.py b/litex/build/lattice/icestorm.py index 1336acb20..55b46692e 100644 --- a/litex/build/lattice/icestorm.py +++ b/litex/build/lattice/icestorm.py @@ -56,6 +56,9 @@ def _yosys_import_sources(platform): for path in platform.verilog_include_paths: includes += " -I" + path for filename, language, library in platform.sources: + # yosys has no such function read_systemverilog + if language == "systemverilog": + language = "verilog -sv" reads.append("read_{}{} {}".format( language, includes, filename)) return "\n".join(reads) @@ -235,4 +238,4 @@ def icestorm_argdict(args): "timingstrict": args.nextpnr_timingstrict, "ignoreloops": args.nextpnr_ignoreloops, "seed": args.nextpnr_seed, - } \ No newline at end of file + } diff --git a/litex/build/lattice/oxide.py b/litex/build/lattice/oxide.py index 145eca7d2..3c9a8cfb5 100644 --- a/litex/build/lattice/oxide.py +++ b/litex/build/lattice/oxide.py @@ -37,6 +37,9 @@ def _yosys_import_sources(platform): for path in platform.verilog_include_paths: includes += " -I" + path for filename, language, library in platform.sources: + # yosys has no such function read_systemverilog + if language == "systemverilog": + language = "verilog -sv" reads.append("read_{}{} {}".format( language, includes, filename)) return "\n".join(reads) diff --git a/litex/build/lattice/trellis.py b/litex/build/lattice/trellis.py index a3e5f9265..a239d774b 100644 --- a/litex/build/lattice/trellis.py +++ b/litex/build/lattice/trellis.py @@ -67,6 +67,9 @@ def _yosys_import_sources(platform): for path in platform.verilog_include_paths: includes += " -I" + path for filename, language, library in platform.sources: + # yosys has no such function read_systemverilog + if language == "systemverilog": + language = "verilog -sv" reads.append("read_{}{} {}".format( language, includes, filename)) return "\n".join(reads)