From 534ea839c08fc035ef235b63392570e292dc0baf Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Wed, 23 May 2018 13:04:31 -0400 Subject: [PATCH] Revised the verilog parser to correctly identify and parse parameters passed to instances, so that these can match critical parameters in the SPICE netlist being compared against. --- base/verilog.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/base/verilog.c b/base/verilog.c index 6c224f4..c78fc37 100644 --- a/base/verilog.c +++ b/base/verilog.c @@ -884,6 +884,7 @@ skip_endmodule: while (nexttok != NULL) { char *paramname; + SkipTok(VLOG_DELIMITERS2); while (match(nexttok, "//")) { SkipNewLine(VLOG_DELIMITERS); @@ -896,14 +897,7 @@ skip_endmodule: // We need to look for parameters of the type ".name(value)" - SkipTok(VLOG_DELIMITERS2); - while (match(nexttok, "//")) { - SkipNewLine(VLOG_DELIMITERS); - SkipTok(VLOG_DELIMITERS2); - } - if (nexttok[0] != '.') { - Printf("Badly formed subcircuit parameter line at \"%s\"\n", nexttok); - } + if (nexttok[0] != '.') break; else { paramname = strsave(nexttok + 1); SkipTok(VLOG_DELIMITERS2);