Add .sv support to "hierarchy -libdir"
authorClifford Wolf <clifford@clifford.at>
Mon, 26 Mar 2018 19:19:00 +0000 (21:19 +0200)
committerClifford Wolf <clifford@clifford.at>
Mon, 26 Mar 2018 19:19:00 +0000 (21:19 +0200)
passes/hierarchy/hierarchy.cc

index 898763c647c7a3c89d1f65187d2189d3a213e277..71b0cf6227da32d5ea2bc13bfd0326188142184d 100644 (file)
@@ -179,6 +179,12 @@ bool expand_module(RTLIL::Design *design, RTLIL::Module *module, bool flag_check
                                        goto loaded_module;
                                }
 
+                               filename = dir + "/" + RTLIL::unescape_id(cell->type) + ".sv";
+                               if (check_file_exists(filename)) {
+                                       Frontend::frontend_call(design, NULL, filename, "verilog -sv");
+                                       goto loaded_module;
+                               }
+
                                filename = dir + "/" + RTLIL::unescape_id(cell->type) + ".il";
                                if (check_file_exists(filename)) {
                                        Frontend::frontend_call(design, NULL, filename, "ilang");