diff --git a/lexor.lex b/lexor.lex index 1cc287d71..dd9c41e9a 100644 --- a/lexor.lex +++ b/lexor.lex @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: lexor.lex,v 1.57 2001/04/28 18:43:18 steve Exp $" +#ident "$Id: lexor.lex,v 1.58 2001/06/18 00:51:23 steve Exp $" #endif //# define YYSTYPE lexval @@ -157,18 +157,23 @@ W [ \t\b\f\r]+ \(\?[xX]\) { return '%'; } \(\?\?\) { return '*'; } \(01\) { return 'r'; } -\(0[xX]\) { return 'P'; } -\(0\?\) { return 'p'; } +\(0[xX]\) { return 'Q'; } +\(0\?\) { return 'P'; } \(10\) { return 'f'; } -\(1[xX]\) { return 'N'; } -\(1\?\) { return 'n'; } +\(1[xX]\) { return 'M'; } +\(1\?\) { return 'N'; } \([xX]0\) { return 'F'; } \([xX]1\) { return 'R'; } +\([xX]\?\) { return 'B'; } [bB] { return 'b'; } +[lL] { return 'l'; /* IVL extension */ } +[hH] { return 'h'; /* IVL extension */ } [fF] { return 'f'; } [rR] { return 'r'; } [xX] { return 'x'; } -[pPnN01\?\*\-] { return yytext[0]; } +[nN] { return 'n'; } +[pP] { return 'p'; } +[01\?\*\-] { return yytext[0]; } [a-zA-Z_][a-zA-Z0-9$_]* { int rc = lexor_keyword_code(yytext, yyleng); diff --git a/parse.y b/parse.y index 18880dfed..93f78a8f4 100644 --- a/parse.y +++ b/parse.y @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: parse.y,v 1.121 2001/04/29 20:18:34 steve Exp $" +#ident "$Id: parse.y,v 1.122 2001/06/18 00:51:23 steve Exp $" #endif # include "parse_misc.h" @@ -2363,12 +2363,17 @@ udp_input_sym | '%' { $$ = '%'; } | 'f' { $$ = 'f'; } | 'F' { $$ = 'F'; } + | 'l' { $$ = 'l'; } + | 'h' { $$ = 'H'; } + | 'B' { $$ = 'B'; } | 'r' { $$ = 'r'; } | 'R' { $$ = 'R'; } + | 'M' { $$ = 'M'; } | 'n' { $$ = 'n'; } | 'N' { $$ = 'N'; } | 'p' { $$ = 'p'; } | 'P' { $$ = 'P'; } + | 'Q' { $$ = 'Q'; } | '_' { $$ = '_'; } | '+' { $$ = '+'; } ; diff --git a/vvm/vvm_udp.cc b/vvm/vvm_udp.cc index a5667adfa..fa86cea88 100644 --- a/vvm/vvm_udp.cc +++ b/vvm/vvm_udp.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vvm_udp.cc,v 1.3 2001/04/22 23:09:46 steve Exp $" +#ident "$Id: vvm_udp.cc,v 1.4 2001/06/18 00:51:23 steve Exp $" #endif # include "vvm_gates.h" @@ -80,12 +80,15 @@ void vvm_udp_comb::take_value(unsigned key, vpip_bit_t val) unsigned idx; for (idx = 0 ; idx < width_ ; idx += 1) { + char new_bit = ibits_[idx]; if (row[idx] != ibits_[idx] - && row[idx] != '?') + && row[idx] != '?' + && (row[idx] != 'b' || new_bit == 'x') + && (row[idx] != 'l' || new_bit == '1') + && (row[idx] != 'h' || new_bit == '0') ) { if (idx == key) { - char new_bit = ibits_[idx]; switch (row[idx]) { case '*': @@ -102,6 +105,10 @@ void vvm_udp_comb::take_value(unsigned key, vpip_bit_t val) if (new_bit == 'x') continue; break; + case 'B': + if (old_bit == 'x') + continue; + break; case 'r': if (old_bit=='0' && new_bit=='1') continue; @@ -118,19 +125,27 @@ void vvm_udp_comb::take_value(unsigned key, vpip_bit_t val) if (old_bit=='x' && new_bit=='0') continue; break; - case 'p': + case 'P': if (old_bit=='0') continue; break; - case 'n': - if (old_bit=='1') - continue; - break; - case 'P': - if (old_bit=='0' && new_bit=='x') + case 'p': + if (old_bit=='0' || new_bit=='1') continue; break; case 'N': + if (old_bit=='1') + continue; + break; + case 'n': + if (old_bit=='1' || new_bit=='0') + continue; + break; + case 'Q': + if (old_bit=='0' && new_bit=='x') + continue; + break; + case 'M': if (old_bit=='1' && new_bit=='x') continue; break; @@ -177,6 +192,10 @@ void vvm_udp_comb::take_value(unsigned key, vpip_bit_t val) /* * $Log: vvm_udp.cc,v $ + * Revision 1.4 2001/06/18 00:51:23 steve + * Add more UDP edge types, and finish up compile + * and run-time support. (Stephan Boettcher) + * * Revision 1.3 2001/04/22 23:09:46 steve * More UDP consolidation from Stephan Boettcher. * diff --git a/vvp/README.txt b/vvp/README.txt index 14678a924..7ee92ef02 100644 --- a/vvp/README.txt +++ b/vvp/README.txt @@ -1,7 +1,7 @@ /* * Copyright (c) 2001 Stephen Williams (steve@icarus.com) * - * $Id: README.txt,v 1.30 2001/06/16 23:45:05 steve Exp $ + * $Id: README.txt,v 1.31 2001/06/18 00:51:23 steve Exp $ */ VVP SIMULATION ENGINE @@ -149,10 +149,13 @@ For Sequential UDPs, at most one input state specification may be replaced by an edge specification. Valid edges are: "*": (??) "_": (?0) "+": (?1) "%": (?x) - "p": (0?) "r": (01) "P": (0x) - "n": (1?) "f": (10) "N": (1x) + "P": (0?) "r": (01) "Q": (0x) + "N": (1?) "f": (10) "M": (1x) "B": (x?) "F": (x0) "R": (x1) + "n": (1?) | (?0) + "p": (0?) | (?1) + A combinatorial UDP is defined like this: .udp/comb "", , "", "", ... ; diff --git a/vvp/udp.cc b/vvp/udp.cc index 85c12129b..a401f3763 100644 --- a/vvp/udp.cc +++ b/vvp/udp.cc @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: udp.cc,v 1.5 2001/05/31 04:12:43 steve Exp $" +#ident "$Id: udp.cc,v 1.6 2001/06/18 00:51:23 steve Exp $" #endif #include "udp.h" @@ -169,19 +169,27 @@ unsigned char vvp_udp_s::propagate_(vvp_ipoint_t uix) if (old_bit=='x' && new_bit=='0') continue; break; - case 'p': + case 'P': if (old_bit=='0') continue; break; - case 'n': - if (old_bit=='1') - continue; - break; - case 'P': - if (old_bit=='0' && new_bit=='x') + case 'p': + if (old_bit=='0' || new_bit=='1') continue; break; case 'N': + if (old_bit=='1') + continue; + break; + case 'n': + if (old_bit=='1' || new_bit=='0') + continue; + break; + case 'Q': + if (old_bit=='0' && new_bit=='x') + continue; + break; + case 'M': if (old_bit=='1' && new_bit=='x') continue; break; @@ -223,6 +231,10 @@ unsigned char vvp_udp_s::propagate_(vvp_ipoint_t uix) /* * $Log: udp.cc,v $ + * Revision 1.6 2001/06/18 00:51:23 steve + * Add more UDP edge types, and finish up compile + * and run-time support. (Stephan Boettcher) + * * Revision 1.5 2001/05/31 04:12:43 steve * Make the bufif0 and bufif1 gates strength aware, * and accurately propagate strengths of outputs.