From 4479471278322b12121f3dc1fe9b1449d3977885 Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 3 Jun 2009 15:02:32 -0700 Subject: [PATCH] Parse all the 1364-1995 and 1364-2001 timing checks. This patch adds code to parse and ignore the following timing checks: $nochange 1364-1995 $skew 1364-1995 $fullskew 1364-2001 $removal 1364-2001 $timeskew 1364-2001 The other checks were already supported. These have not been tested, but they use the same basic terms as the other checks. We can fully test these when we actually implement them. --- lexor.lex | 25 +++++++++++++++++++------ parse.y | 33 ++++++++++++++++++++++++++++----- 2 files changed, 47 insertions(+), 11 deletions(-) diff --git a/lexor.lex b/lexor.lex index 6f3aa2176..d62325d87 100644 --- a/lexor.lex +++ b/lexor.lex @@ -274,22 +274,35 @@ S [afpnumkKMGT] return IDENTIFIER; } \$([a-zA-Z0-9$_]+) { - if (strcmp(yytext,"$setuphold") == 0) - return K_Ssetuphold; - if (strcmp(yytext,"$attribute") == 0) - return KK_attribute; + /* The 1364-1995 timing checks. */ if (strcmp(yytext,"$hold") == 0) return K_Shold; + if (strcmp(yytext,"$nochange") == 0) + return K_Snochange; if (strcmp(yytext,"$period") == 0) return K_Speriod; if (strcmp(yytext,"$recovery") == 0) return K_Srecovery; - if (strcmp(yytext,"$recrem") == 0) - return K_Srecrem; if (strcmp(yytext,"$setup") == 0) return K_Ssetup; + if (strcmp(yytext,"$setuphold") == 0) + return K_Ssetuphold; + if (strcmp(yytext,"$skew") == 0) + return K_Sskew; if (strcmp(yytext,"$width") == 0) return K_Swidth; + /* The new 1364-2001 timing checks. */ + if (strcmp(yytext,"$fullskew") == 0) + return K_Sfullskew; + if (strcmp(yytext,"$recrem") == 0) + return K_Srecrem; + if (strcmp(yytext,"$removal") == 0) + return K_Sremoval; + if (strcmp(yytext,"$timeskew") == 0) + return K_Stimeskew; + + if (strcmp(yytext,"$attribute") == 0) + return KK_attribute; yylval.text = strdupnew(yytext); return SYSTEM_IDENTIFIER; } diff --git a/parse.y b/parse.y index c533b03ac..9ecf12849 100644 --- a/parse.y +++ b/parse.y @@ -248,7 +248,8 @@ static PECallFunction*make_call_function(perm_string tn, PExpr*arg1, PExpr*arg2) %token K_trireg K_vectored K_wait K_wand K_weak0 K_weak1 K_while K_wire %token K_wor K_xnor K_xor -%token K_Shold K_Speriod K_Srecovery K_Ssetup K_Swidth K_Ssetuphold +%token K_Shold K_Snochange K_Speriod K_Srecovery K_Ssetup K_Ssetuphold +%token K_Sskew K_Swidth /* Icarus specific tokens. */ %token KK_attribute K_bool K_logic @@ -258,7 +259,7 @@ static PECallFunction*make_call_function(perm_string tn, PExpr*arg1, PExpr*arg2) %token K_noshowcancelled K_pulsestyle_onevent K_pulsestyle_ondetect %token K_showcancelled K_signed K_unsigned -%token K_Srecrem +%token K_Sfullskew K_Srecrem K_Sremoval K_Stimeskew /* The 1364-2001 configuration tokens. */ %token K_cell K_config K_design K_endconfig K_incdir K_include K_instance @@ -3199,10 +3200,20 @@ specify_item } pform_module_specify_path(tmp); } + | K_Sfullskew '(' spec_reference_event ',' spec_reference_event + ',' delay_value ',' delay_value spec_notifier_opt ')' ';' + { delete $7; + delete $9; + } | K_Shold '(' spec_reference_event ',' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' { delete $7; } + | K_Snochange '(' spec_reference_event ',' spec_reference_event + ',' delay_value ',' delay_value spec_notifier_opt ')' ';' + { delete $7; + delete $9; + } | K_Speriod '(' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' { delete $5; @@ -3211,6 +3222,15 @@ specify_item ',' delay_value spec_notifier_opt ')' ';' { delete $7; } + | K_Srecrem '(' spec_reference_event ',' spec_reference_event + ',' delay_value ',' delay_value spec_notifier_opt ')' ';' + { delete $7; + delete $9; + } + | K_Sremoval '(' spec_reference_event ',' spec_reference_event + ',' delay_value spec_notifier_opt ')' ';' + { delete $7; + } | K_Ssetup '(' spec_reference_event ',' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' { delete $7; @@ -3220,10 +3240,13 @@ specify_item { delete $7; delete $9; } - | K_Srecrem '(' spec_reference_event ',' spec_reference_event - ',' delay_value ',' delay_value spec_notifier_opt ')' ';' + | K_Sskew '(' spec_reference_event ',' spec_reference_event + ',' delay_value spec_notifier_opt ')' ';' + { delete $7; + } + | K_Stimeskew '(' spec_reference_event ',' spec_reference_event + ',' delay_value spec_notifier_opt ')' ';' { delete $7; - delete $9; } | K_Swidth '(' spec_reference_event ',' delay_value ',' expression spec_notifier_opt ')' ';'