diff options
author | clairexen <claire@symbioticeda.com> | 2020-07-16 18:28:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-16 18:28:24 +0200 |
commit | c49344b262b455bf03239a5bc7453f0706cc45d8 (patch) | |
tree | c628628470ee3862d4a12833de6f6c9a7e11d765 /kernel/yosys.cc | |
parent | 910f4213247a69e1214aac70a552eec0a21d4275 (diff) | |
parent | d9f680b2363aded426465fd189910e0072228fee (diff) | |
download | yosys-c49344b262b455bf03239a5bc7453f0706cc45d8.tar.gz yosys-c49344b262b455bf03239a5bc7453f0706cc45d8.tar.bz2 yosys-c49344b262b455bf03239a5bc7453f0706cc45d8.zip |
Merge pull request #2272 from whitequark/write-verilog-sv
verilog_backend: add `-sv` option, make `-o <filename>.sv` work
Diffstat (limited to 'kernel/yosys.cc')
-rw-r--r-- | kernel/yosys.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/yosys.cc b/kernel/yosys.cc index 7e9f320e0..8986c8091 100644 --- a/kernel/yosys.cc +++ b/kernel/yosys.cc @@ -1050,6 +1050,8 @@ void run_backend(std::string filename, std::string command, RTLIL::Design *desig if (command == "auto") { if (filename.size() > 2 && filename.compare(filename.size()-2, std::string::npos, ".v") == 0) command = "verilog"; + else if (filename.size() > 3 && filename.compare(filename.size()-3, std::string::npos, ".sv") == 0) + command = "verilog -sv"; else if (filename.size() > 3 && filename.compare(filename.size()-3, std::string::npos, ".il") == 0) command = "ilang"; else if (filename.size() > 3 && filename.compare(filename.size()-3, std::string::npos, ".cc") == 0) |