Add PSL parser mode to verific front-end
authorClifford Wolf <clifford@clifford.at>
Wed, 8 Feb 2017 09:40:33 +0000 (10:40 +0100)
committerClifford Wolf <clifford@clifford.at>
Wed, 8 Feb 2017 09:40:33 +0000 (10:40 +0100)
frontends/verific/verific.cc

index f5efdea7efffce7c6a8f01530fd403fecab4bb25..f3b997dc566fcb4968ee7432e6ea53d2f666e0a7 100644 (file)
@@ -888,12 +888,12 @@ struct VerificPass : public Pass {
        {
                //   |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
                log("\n");
-               log("    verific {-vlog95|-vlog2k|-sv2005|-sv2009|-sv} <verilog-file>..\n");
+               log("    verific {-vlog95|-vlog2k|-sv2005|-sv2009|-sv|-vlpsl} <verilog-file>..\n");
                log("\n");
                log("Load the specified Verilog/SystemVerilog files into Verific.\n");
                log("\n");
                log("\n");
-               log("    verific {-vhdl87|-vhdl93|-vhdl2k|-vhdl2008} <vhdl-file>..\n");
+               log("    verific {-vhdl87|-vhdl93|-vhdl2k|-vhdl2008|-vhdpsl} <vhdl-file>..\n");
                log("\n");
                log("Load the specified VHDL files into Verific.\n");
                log("\n");
@@ -950,6 +950,13 @@ struct VerificPass : public Pass {
                        return;
                }
 
+               if (args.size() > 1 && args[1] == "-vlpsl") {
+                       for (size_t argidx = 2; argidx < args.size(); argidx++)
+                               if (!veri_file::Analyze(args[argidx].c_str(), veri_file::VERILOG_PSL))
+                                       log_cmd_error("Reading `%s' in VERILOG_PSL mode failed.\n", args[argidx].c_str());
+                       return;
+               }
+
                if (args.size() > 1 && args[1] == "-vhdl87") {
                        vhdl_file::SetDefaultLibraryPath((proc_share_dirname() + "verific/vhdl_vdbs_1987").c_str());
                        for (size_t argidx = 2; argidx < args.size(); argidx++)
@@ -982,6 +989,14 @@ struct VerificPass : public Pass {
                        return;
                }
 
+               if (args.size() > 1 && args[1] == "-vhdpsl") {
+                       vhdl_file::SetDefaultLibraryPath((proc_share_dirname() + "verific/vhdl_vdbs_2008").c_str());
+                       for (size_t argidx = 2; argidx < args.size(); argidx++)
+                               if (!vhdl_file::Analyze(args[argidx].c_str(), "work", vhdl_file::VHDL_PSL))
+                                       log_cmd_error("Reading `%s' in VHDL_PSL mode failed.\n", args[argidx].c_str());
+                       return;
+               }
+
                if (args.size() > 1 && args[1] == "-import")
                {
                        std::set<Netlist*> nl_todo, nl_done;