From e269a2f23c353b53be472f6c3eef0d55175db064 Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 14 Apr 2010 15:45:44 -0700 Subject: [PATCH] A `timescale takes precedence over a SV timeunit/precision. A `timescale directive is defined to take precedence over either a timeunit or timeprecision even if they are after the directive. --- pform.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pform.cc b/pform.cc index c01a9cfd3..b3051c26f 100644 --- a/pform.cc +++ b/pform.cc @@ -580,6 +580,8 @@ void pform_set_timeunit(const char*txt, bool in_module, bool only_check) } } else { + /* Skip a global timeunit when `timescale is defined. */ + if (pform_timescale_file) return; tu_global_flag = true; pform_time_unit = val; } @@ -607,6 +609,8 @@ void pform_set_timeprecision(const char*txt, bool in_module, bool only_check) return; } } else { + /* Skip a global timeprecision when `timescale is defined. */ + if (pform_timescale_file) return; pform_time_prec = val; tp_global_flag=true; }