Add more UDP edge types, and finish up compile
and run-time support. (Stephan Boettcher)
This commit is contained in:
parent
e418625457
commit
e40efec4bd
17
lexor.lex
17
lexor.lex
|
|
@ -19,7 +19,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#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
|
#endif
|
||||||
|
|
||||||
//# define YYSTYPE lexval
|
//# define YYSTYPE lexval
|
||||||
|
|
@ -157,18 +157,23 @@ W [ \t\b\f\r]+
|
||||||
<UDPTABLE>\(\?[xX]\) { return '%'; }
|
<UDPTABLE>\(\?[xX]\) { return '%'; }
|
||||||
<UDPTABLE>\(\?\?\) { return '*'; }
|
<UDPTABLE>\(\?\?\) { return '*'; }
|
||||||
<UDPTABLE>\(01\) { return 'r'; }
|
<UDPTABLE>\(01\) { return 'r'; }
|
||||||
<UDPTABLE>\(0[xX]\) { return 'P'; }
|
<UDPTABLE>\(0[xX]\) { return 'Q'; }
|
||||||
<UDPTABLE>\(0\?\) { return 'p'; }
|
<UDPTABLE>\(0\?\) { return 'P'; }
|
||||||
<UDPTABLE>\(10\) { return 'f'; }
|
<UDPTABLE>\(10\) { return 'f'; }
|
||||||
<UDPTABLE>\(1[xX]\) { return 'N'; }
|
<UDPTABLE>\(1[xX]\) { return 'M'; }
|
||||||
<UDPTABLE>\(1\?\) { return 'n'; }
|
<UDPTABLE>\(1\?\) { return 'N'; }
|
||||||
<UDPTABLE>\([xX]0\) { return 'F'; }
|
<UDPTABLE>\([xX]0\) { return 'F'; }
|
||||||
<UDPTABLE>\([xX]1\) { return 'R'; }
|
<UDPTABLE>\([xX]1\) { return 'R'; }
|
||||||
|
<UDPTABLE>\([xX]\?\) { return 'B'; }
|
||||||
<UDPTABLE>[bB] { return 'b'; }
|
<UDPTABLE>[bB] { return 'b'; }
|
||||||
|
<UDPTABLE>[lL] { return 'l'; /* IVL extension */ }
|
||||||
|
<UDPTABLE>[hH] { return 'h'; /* IVL extension */ }
|
||||||
<UDPTABLE>[fF] { return 'f'; }
|
<UDPTABLE>[fF] { return 'f'; }
|
||||||
<UDPTABLE>[rR] { return 'r'; }
|
<UDPTABLE>[rR] { return 'r'; }
|
||||||
<UDPTABLE>[xX] { return 'x'; }
|
<UDPTABLE>[xX] { return 'x'; }
|
||||||
<UDPTABLE>[pPnN01\?\*\-] { return yytext[0]; }
|
<UDPTABLE>[nN] { return 'n'; }
|
||||||
|
<UDPTABLE>[pP] { return 'p'; }
|
||||||
|
<UDPTABLE>[01\?\*\-] { return yytext[0]; }
|
||||||
|
|
||||||
[a-zA-Z_][a-zA-Z0-9$_]* {
|
[a-zA-Z_][a-zA-Z0-9$_]* {
|
||||||
int rc = lexor_keyword_code(yytext, yyleng);
|
int rc = lexor_keyword_code(yytext, yyleng);
|
||||||
|
|
|
||||||
7
parse.y
7
parse.y
|
|
@ -19,7 +19,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#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
|
#endif
|
||||||
|
|
||||||
# include "parse_misc.h"
|
# include "parse_misc.h"
|
||||||
|
|
@ -2363,12 +2363,17 @@ udp_input_sym
|
||||||
| '%' { $$ = '%'; }
|
| '%' { $$ = '%'; }
|
||||||
| 'f' { $$ = 'f'; }
|
| 'f' { $$ = 'f'; }
|
||||||
| 'F' { $$ = 'F'; }
|
| 'F' { $$ = 'F'; }
|
||||||
|
| 'l' { $$ = 'l'; }
|
||||||
|
| 'h' { $$ = 'H'; }
|
||||||
|
| 'B' { $$ = 'B'; }
|
||||||
| 'r' { $$ = 'r'; }
|
| 'r' { $$ = 'r'; }
|
||||||
| 'R' { $$ = 'R'; }
|
| 'R' { $$ = 'R'; }
|
||||||
|
| 'M' { $$ = 'M'; }
|
||||||
| 'n' { $$ = 'n'; }
|
| 'n' { $$ = 'n'; }
|
||||||
| 'N' { $$ = 'N'; }
|
| 'N' { $$ = 'N'; }
|
||||||
| 'p' { $$ = 'p'; }
|
| 'p' { $$ = 'p'; }
|
||||||
| 'P' { $$ = 'P'; }
|
| 'P' { $$ = 'P'; }
|
||||||
|
| 'Q' { $$ = 'Q'; }
|
||||||
| '_' { $$ = '_'; }
|
| '_' { $$ = '_'; }
|
||||||
| '+' { $$ = '+'; }
|
| '+' { $$ = '+'; }
|
||||||
;
|
;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#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
|
#endif
|
||||||
|
|
||||||
# include "vvm_gates.h"
|
# include "vvm_gates.h"
|
||||||
|
|
@ -80,12 +80,15 @@ void vvm_udp_comb::take_value(unsigned key, vpip_bit_t val)
|
||||||
unsigned idx;
|
unsigned idx;
|
||||||
for (idx = 0 ; idx < width_ ; idx += 1)
|
for (idx = 0 ; idx < width_ ; idx += 1)
|
||||||
{
|
{
|
||||||
|
char new_bit = ibits_[idx];
|
||||||
if (row[idx] != 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)
|
if (idx == key)
|
||||||
{
|
{
|
||||||
char new_bit = ibits_[idx];
|
|
||||||
switch (row[idx])
|
switch (row[idx])
|
||||||
{
|
{
|
||||||
case '*':
|
case '*':
|
||||||
|
|
@ -102,6 +105,10 @@ void vvm_udp_comb::take_value(unsigned key, vpip_bit_t val)
|
||||||
if (new_bit == 'x')
|
if (new_bit == 'x')
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
|
case 'B':
|
||||||
|
if (old_bit == 'x')
|
||||||
|
continue;
|
||||||
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
if (old_bit=='0' && new_bit=='1')
|
if (old_bit=='0' && new_bit=='1')
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -118,19 +125,27 @@ void vvm_udp_comb::take_value(unsigned key, vpip_bit_t val)
|
||||||
if (old_bit=='x' && new_bit=='0')
|
if (old_bit=='x' && new_bit=='0')
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'P':
|
||||||
if (old_bit=='0')
|
if (old_bit=='0')
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'p':
|
||||||
if (old_bit=='1')
|
if (old_bit=='0' || new_bit=='1')
|
||||||
continue;
|
|
||||||
break;
|
|
||||||
case 'P':
|
|
||||||
if (old_bit=='0' && new_bit=='x')
|
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
case 'N':
|
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')
|
if (old_bit=='1' && new_bit=='x')
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
|
|
@ -177,6 +192,10 @@ void vvm_udp_comb::take_value(unsigned key, vpip_bit_t val)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: vvm_udp.cc,v $
|
* $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
|
* Revision 1.3 2001/04/22 23:09:46 steve
|
||||||
* More UDP consolidation from Stephan Boettcher.
|
* More UDP consolidation from Stephan Boettcher.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Stephen Williams (steve@icarus.com)
|
* 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
|
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:
|
replaced by an edge specification. Valid edges are:
|
||||||
|
|
||||||
"*": (??) "_": (?0) "+": (?1) "%": (?x)
|
"*": (??) "_": (?0) "+": (?1) "%": (?x)
|
||||||
"p": (0?) "r": (01) "P": (0x)
|
"P": (0?) "r": (01) "Q": (0x)
|
||||||
"n": (1?) "f": (10) "N": (1x)
|
"N": (1?) "f": (10) "M": (1x)
|
||||||
"B": (x?) "F": (x0) "R": (x1)
|
"B": (x?) "F": (x0) "R": (x1)
|
||||||
|
|
||||||
|
"n": (1?) | (?0)
|
||||||
|
"p": (0?) | (?1)
|
||||||
|
|
||||||
A combinatorial UDP is defined like this:
|
A combinatorial UDP is defined like this:
|
||||||
|
|
||||||
<type> .udp/comb "<name>", <number>, "<row0>", "<row1>", ... ;
|
<type> .udp/comb "<name>", <number>, "<row0>", "<row1>", ... ;
|
||||||
|
|
|
||||||
28
vvp/udp.cc
28
vvp/udp.cc
|
|
@ -18,7 +18,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT)
|
#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
|
#endif
|
||||||
|
|
||||||
#include "udp.h"
|
#include "udp.h"
|
||||||
|
|
@ -169,19 +169,27 @@ unsigned char vvp_udp_s::propagate_(vvp_ipoint_t uix)
|
||||||
if (old_bit=='x' && new_bit=='0')
|
if (old_bit=='x' && new_bit=='0')
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'P':
|
||||||
if (old_bit=='0')
|
if (old_bit=='0')
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'p':
|
||||||
if (old_bit=='1')
|
if (old_bit=='0' || new_bit=='1')
|
||||||
continue;
|
|
||||||
break;
|
|
||||||
case 'P':
|
|
||||||
if (old_bit=='0' && new_bit=='x')
|
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
case 'N':
|
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')
|
if (old_bit=='1' && new_bit=='x')
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
|
|
@ -223,6 +231,10 @@ unsigned char vvp_udp_s::propagate_(vvp_ipoint_t uix)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: udp.cc,v $
|
* $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
|
* Revision 1.5 2001/05/31 04:12:43 steve
|
||||||
* Make the bufif0 and bufif1 gates strength aware,
|
* Make the bufif0 and bufif1 gates strength aware,
|
||||||
* and accurately propagate strengths of outputs.
|
* and accurately propagate strengths of outputs.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue