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.
This commit is contained in:
Cary R 2010-04-14 15:45:44 -07:00 committed by Stephen Williams
parent 23a1ec9f53
commit e269a2f23c
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}