From ca927fe587977cbf939accc918cf582566194a55 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 2 Feb 2012 10:26:45 -0500 Subject: [PATCH] Support snps directives --- Changes | 2 ++ bin/verilator | 6 +++--- src/V3PreProc.cpp | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 373fb6b8e..3acbead73 100644 --- a/Changes +++ b/Changes @@ -12,6 +12,8 @@ indicates the contributor was also the author of the fix; Thanks! *** Support arrayed SystemC I/O pins. [Christophe Joly] +**** Support "snps" directives. [Dan Katz] + **** Fix core dump with over 100 deep UNOPTFLAT, bug432. [Joe Eiler] diff --git a/bin/verilator b/bin/verilator index 9c657837f..4099ad2cb 100755 --- a/bin/verilator +++ b/bin/verilator @@ -1747,9 +1747,9 @@ assertion clocks. =head2 Synthesis Directive Assertion Support -With the --assert switch, Verilator reads any "//synopsys full_case" or "// -synopsys parallel_case" directives. The same applies to any "// ambit -synthesis", "//cadence" or "//pragma" directives of the same form. +With the --assert switch, Verilator reads any "//synopsys full_case" or +"//synopsys parallel_case" directives. The same applies to any "//snps", +"//ambit synthesis", "//cadence" or "//pragma" directives of the same form. When these synthesis directives are discovered, Verilator will either formally prove the directive to be true, or failing that, will insert the diff --git a/src/V3PreProc.cpp b/src/V3PreProc.cpp index 5f16fa362..51d698f92 100644 --- a/src/V3PreProc.cpp +++ b/src/V3PreProc.cpp @@ -394,6 +394,10 @@ void V3PreProcImp::comment(const string& text) { cp+=strlen("synopsys"); synth = true; if (*cp == '_') fileline()->v3error("Extra underscore in meta-comment; use /*synopsys {...}*/ not /*synopsys_{...}*/"); + } else if (0==(strncmp(cp,"snps",strlen("snps")))) { + cp+=strlen("snps"); + synth = true; + if (*cp == '_') fileline()->v3error("Extra underscore in meta-comment; use /*snps {...}*/ not /*snps_{...}*/"); } else if (0==(strncmp(cp,"cadence",strlen("cadence")))) { cp+=strlen("cadence"); synth = true;