Parse more UDP input edge descriptions.
This commit is contained in:
parent
4e2c0036aa
commit
2c1df3e6f7
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: lexor.lex,v 1.6 1998/12/09 04:02:47 steve Exp $"
|
||||
#ident "$Id: lexor.lex,v 1.7 1998/12/18 05:16:25 steve Exp $"
|
||||
#endif
|
||||
|
||||
//# define YYSTYPE lexval
|
||||
|
|
@ -83,9 +83,16 @@ static verinum*make_sized_hex(const char*txt);
|
|||
return STRING; }
|
||||
<CSTRING>. { yymore(); }
|
||||
|
||||
<UDPTABLE>\(\?0\) { return '_'; }
|
||||
<UDPTABLE>\(\?1\) { return '+'; }
|
||||
<UDPTABLE>\(\?x\) { return '%'; }
|
||||
<UDPTABLE>\(\?\?\) { return '*'; }
|
||||
<UDPTABLE>\(01\) { return 'r'; }
|
||||
<UDPTABLE>\(0x\) { return 'P'; }
|
||||
<UDPTABLE>\(10\) { return 'f'; }
|
||||
<UDPTABLE>\(1x\) { return 'N'; }
|
||||
<UDPTABLE>\(x0\) { return 'F'; }
|
||||
<UDPTABLE>\(x1\) { return 'R'; }
|
||||
<UDPTABLE>[bB] { return 'b'; }
|
||||
<UDPTABLE>[fF] { return 'f'; }
|
||||
<UDPTABLE>[rR] { return 'r'; }
|
||||
|
|
|
|||
39
netlist.cc
39
netlist.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: netlist.cc,v 1.13 1998/12/17 23:54:58 steve Exp $"
|
||||
#ident "$Id: netlist.cc,v 1.14 1998/12/18 05:16:25 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include <cassert>
|
||||
|
|
@ -499,16 +499,25 @@ bool NetUDP::set_sequ_(const string&input, char output)
|
|||
|
||||
switch (to[edge]) {
|
||||
case '0':
|
||||
// Notice that I might have caught this edge already
|
||||
if (sfrm->pins[edge].zer != sto) {
|
||||
assert(sfrm->pins[edge].zer == 0);
|
||||
sfrm->pins[edge].zer = sto;
|
||||
}
|
||||
break;
|
||||
case '1':
|
||||
// Notice that I might have caught this edge already
|
||||
if (sfrm->pins[edge].one != sto) {
|
||||
assert(sfrm->pins[edge].one == 0);
|
||||
sfrm->pins[edge].one = sto;
|
||||
}
|
||||
break;
|
||||
case 'x':
|
||||
// Notice that I might have caught this edge already
|
||||
if (sfrm->pins[edge].xxx != sto) {
|
||||
assert(sfrm->pins[edge].xxx == 0);
|
||||
sfrm->pins[edge].xxx = sto;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -539,6 +548,31 @@ bool NetUDP::sequ_glob_(string input, char output)
|
|||
sequ_glob_(input, output);
|
||||
return true;
|
||||
|
||||
case 'n': // Iterate over (n) edges
|
||||
input[idx] = 'f';
|
||||
sequ_glob_(input, output);
|
||||
input[idx] = 'F';
|
||||
sequ_glob_(input, output);
|
||||
input[idx] = 'N';
|
||||
sequ_glob_(input, output);
|
||||
return true;
|
||||
|
||||
case 'p': // Iterate over (p) edges
|
||||
input[idx] = 'r';
|
||||
sequ_glob_(input, output);
|
||||
input[idx] = 'R';
|
||||
sequ_glob_(input, output);
|
||||
input[idx] = 'P';
|
||||
sequ_glob_(input, output);
|
||||
return true;
|
||||
|
||||
case '_': // Iterate over (?0) edges
|
||||
input[idx] = 'f';
|
||||
sequ_glob_(input, output);
|
||||
input[idx] = 'F';
|
||||
sequ_glob_(input, output);
|
||||
return true;
|
||||
|
||||
case '*': // Iterate over all the edges
|
||||
input[idx] = 'r';
|
||||
sequ_glob_(input, output);
|
||||
|
|
@ -811,6 +845,9 @@ NetNet* Design::find_signal(bool (*func)(const NetNet*))
|
|||
|
||||
/*
|
||||
* $Log: netlist.cc,v $
|
||||
* Revision 1.14 1998/12/18 05:16:25 steve
|
||||
* Parse more UDP input edge descriptions.
|
||||
*
|
||||
* Revision 1.13 1998/12/17 23:54:58 steve
|
||||
* VVM support for small sequential UDP objects.
|
||||
*
|
||||
|
|
|
|||
17
netlist.h
17
netlist.h
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: netlist.h,v 1.13 1998/12/17 23:54:58 steve Exp $"
|
||||
#ident "$Id: netlist.h,v 1.14 1998/12/18 05:16:25 steve Exp $"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -352,6 +352,7 @@ class NetLogic : public NetNode {
|
|||
* edge.
|
||||
*
|
||||
* Set_table takes as input a string with one letter per pin. The
|
||||
* parser translates the written sequences to one of these. The
|
||||
* valid characters are:
|
||||
*
|
||||
* 0, 1, x -- The levels
|
||||
|
|
@ -362,6 +363,17 @@ class NetLogic : public NetNode {
|
|||
* P -- (0x)
|
||||
* N -- (1x)
|
||||
*
|
||||
* It also takes one of the following glob letters to represent more
|
||||
* then one item.
|
||||
*
|
||||
* p -- 01, 0x or x1
|
||||
* n -- 10, 1x or x0
|
||||
* ? -- 0, 1, or x
|
||||
* * -- any edge
|
||||
* + -- 01 or x1
|
||||
* _ -- 10 or x0 (Note that this is not the output '-'.)
|
||||
* % -- 0x or 1x
|
||||
*
|
||||
* COMBINATIONAL
|
||||
* The logic table is a map between the input levels and the
|
||||
* output. Each input pin can have the value 0, 1 or x and the output
|
||||
|
|
@ -894,6 +906,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
|
|||
|
||||
/*
|
||||
* $Log: netlist.h,v $
|
||||
* Revision 1.14 1998/12/18 05:16:25 steve
|
||||
* Parse more UDP input edge descriptions.
|
||||
*
|
||||
* Revision 1.13 1998/12/17 23:54:58 steve
|
||||
* VVM support for small sequential UDP objects.
|
||||
*
|
||||
|
|
|
|||
5
parse.y
5
parse.y
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: parse.y,v 1.9 1998/12/14 02:01:35 steve Exp $"
|
||||
#ident "$Id: parse.y,v 1.10 1998/12/18 05:16:25 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "parse_misc.h"
|
||||
|
|
@ -731,6 +731,9 @@ udp_input_sym
|
|||
| '*' { $$ = '*'; }
|
||||
| 'f' { $$ = 'f'; }
|
||||
| 'r' { $$ = 'r'; }
|
||||
| 'n' { $$ = 'n'; }
|
||||
| 'p' { $$ = 'p'; }
|
||||
| '_' { $$ = '_'; }
|
||||
;
|
||||
|
||||
udp_output_sym
|
||||
|
|
|
|||
Loading…
Reference in New Issue