From c7414f79b017d2623b991d0db73a930d2157106b Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 30 Oct 2009 19:16:42 -0700 Subject: [PATCH] Add a waring that timing check delayed signals will not be driven. The $setuphold and $recrem timing checks can create delayed signals that are needed to get a model to work correctly when negative timing check values are used. Since we do not support timing checks and just ignore them this can create simulation problems when a user tries to use these delayed signals since they are not driven. This patch adds a waring when the circuit is being compiled that these delayed signals will not be driven. This will be needed until we get time to add the real timing checks are mimic the delayed properties of the timing check. (cherry picked from commit a5060b8adc73cbc33ef3d79ac89e2cc962c04874) --- parse.y | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/parse.y b/parse.y index 44f09da35..635016280 100644 --- a/parse.y +++ b/parse.y @@ -55,6 +55,13 @@ static PTask* current_task = 0; static PFunction* current_function = 0; static stack current_block_stack; +/* This is used to keep track of the extra arguments after the notifier + * in the $setuphold and $recrem timing checks. This allows us to print + * a warning message that the delayed signals will not be created. We + * need to do this since not driving these signals creates real + * simulation issues. */ +static unsigned args_after_notifier; + /* Later version of bison (including 1.35) will not compile in stack extension if the output is compiled with C++ and either the YYSTYPE or YYLTYPE are provided by the source code. However, I can get the @@ -3526,15 +3533,22 @@ spec_notifier_opt ; spec_notifier : ',' - { } + { args_after_notifier = 0; } | ',' hierarchy_identifier - { delete $2; } + { args_after_notifier = 0; delete $2; } | spec_notifier ',' - { } + { args_after_notifier += 1; } | spec_notifier ',' hierarchy_identifier - { delete $3; } + { args_after_notifier += 1; + if (args_after_notifier >= 3) { + cerr << @3 << ": warning: timing checks are not supported " + "and delayed signal \"" << *$3 + << "\" will not be driven." << endl; + } + delete $3; } + /* How do we match this path? */ | IDENTIFIER - { delete[]$1; } + { args_after_notifier = 0; delete[]$1; } ;