aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2017-03-28 12:13:58 +0200
committerClifford Wolf <clifford@clifford.at>2017-03-28 12:13:58 +0200
commitb8d7f57f61fb45b4b227e399561bf8bcce3db550 (patch)
tree3af5a8636464762776956cdfbe43697d993295cf
parent58ee8e3b8a8157164f89045ef62b7fcefc963144 (diff)
downloadyosys-b8d7f57f61fb45b4b227e399561bf8bcce3db550.tar.gz
yosys-b8d7f57f61fb45b4b227e399561bf8bcce3db550.tar.bz2
yosys-b8d7f57f61fb45b4b227e399561bf8bcce3db550.zip
Add front-end detection for *.tcl files
-rw-r--r--kernel/yosys.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/yosys.cc b/kernel/yosys.cc
index 3d0aca78e..fd5a3504a 100644
--- a/kernel/yosys.cc
+++ b/kernel/yosys.cc
@@ -796,6 +796,8 @@ 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")
+ command = "tcl";
else if (filename == "-")
command = "script";
else
@@ -875,7 +877,10 @@ void run_frontend(std::string filename, std::string command, std::string *backen
log("\n-- Parsing `%s' using frontend `%s' --\n", filename.c_str(), command.c_str());
}
- Frontend::frontend_call(design, NULL, filename, command);
+ if (command == "tcl")
+ Pass::call(design, vector<string>({command, filename}));
+ else
+ Frontend::frontend_call(design, NULL, filename, command);
}
void run_frontend(std::string filename, std::string command, RTLIL::Design *design)
n107' href='#n107'>107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171