diff options
author | Jim Lawson <ucbjrl@berkeley.edu> | 2018-12-18 14:08:20 -0800 |
---|---|---|
committer | Jim Lawson <ucbjrl@berkeley.edu> | 2018-12-18 14:08:20 -0800 |
commit | f4d500f98e0e298a98099ec2177b43571e9cda61 (patch) | |
tree | e39952065ae50763d5ef47ec1495ad234eaca59e /kernel/yosys.cc | |
parent | 3bb9288d65f547085b79fbaffb7046f336ff7f59 (diff) | |
parent | 2d73e1b60a43f2a621b387768134b83054f59e89 (diff) | |
download | yosys-f4d500f98e0e298a98099ec2177b43571e9cda61.tar.gz yosys-f4d500f98e0e298a98099ec2177b43571e9cda61.tar.bz2 yosys-f4d500f98e0e298a98099ec2177b43571e9cda61.zip |
Merge remote-tracking branch 'upstream/master'
# Conflicts:
# CHANGELOG
# frontends/verific/verific.cc
# frontends/verilog/verilog_parser.y
Diffstat (limited to 'kernel/yosys.cc')
-rw-r--r-- | kernel/yosys.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/yosys.cc b/kernel/yosys.cc index ad032899c..f002955ad 100644 --- a/kernel/yosys.cc +++ b/kernel/yosys.cc @@ -799,7 +799,7 @@ static void handle_label(std::string &command, bool &from_to_active, const std:: while (pos < GetSize(command) && command[pos] != ' ' && command[pos] != '\t' && command[pos] != '\r' && command[pos] != '\n') label += command[pos++]; - if (label.back() == ':' && GetSize(label) > 1) + if (GetSize(label) > 1 && label.back() == ':') { label = label.substr(0, GetSize(label)-1); command = command.substr(pos); @@ -821,7 +821,7 @@ void run_frontend(std::string filename, std::string command, std::string *backen command = "verilog"; else if (filename.size() > 2 && filename.substr(filename.size()-3) == ".sv") command = "verilog -sv"; - else if (filename.size() > 2 && filename.substr(filename.size()-4) == ".vhd") + else if (filename.size() > 3 && filename.substr(filename.size()-4) == ".vhd") command = "vhdl"; else if (filename.size() > 4 && filename.substr(filename.size()-5) == ".blif") command = "blif"; @@ -833,7 +833,7 @@ void run_frontend(std::string filename, std::string command, std::string *backen command = "ilang"; else if (filename.size() > 3 && filename.substr(filename.size()-3) == ".ys") command = "script"; - else if (filename.size() > 2 && filename.substr(filename.size()-4) == ".tcl") + else if (filename.size() > 3 && filename.substr(filename.size()-4) == ".tcl") command = "tcl"; else if (filename == "-") command = "script"; |