Add more default net types
Previously Icarus only supported a default net type of wire or none. This patch adds the rest of the supported net types (all except uwire and trireg) to the `default_nettype directive. It also fixes make_implicit_net_() to use the default_nettype instead of always using implicit (the same as wire).
This commit is contained in:
parent
6297422427
commit
364cf99a67
|
|
@ -179,7 +179,7 @@ NetNet* PEIdent::make_implicit_net_(Design*des, NetScope*scope) const
|
|||
assert(nettype != NetNet::NONE);
|
||||
|
||||
NetNet*sig = new NetNet(scope, peek_tail_name(path_),
|
||||
NetNet::IMPLICIT, 1);
|
||||
nettype, 1);
|
||||
sig->set_line(*this);
|
||||
/* Implicit nets are always scalar logic. */
|
||||
sig->data_type(IVL_VT_LOGIC);
|
||||
|
|
|
|||
23
lexor.lex
23
lexor.lex
|
|
@ -485,13 +485,34 @@ S [afpnumkKMGT]
|
|||
if (strcmp(yytext,"wire") == 0) {
|
||||
net_type = NetNet::WIRE;
|
||||
|
||||
} else if (strcmp(yytext,"tri") == 0) {
|
||||
net_type = NetNet::TRI;
|
||||
|
||||
} else if (strcmp(yytext,"tri0") == 0) {
|
||||
net_type = NetNet::TRI0;
|
||||
|
||||
} else if (strcmp(yytext,"tri1") == 0) {
|
||||
net_type = NetNet::TRI1;
|
||||
|
||||
} else if (strcmp(yytext,"wand") == 0) {
|
||||
net_type = NetNet::WAND;
|
||||
|
||||
} else if (strcmp(yytext,"triand") == 0) {
|
||||
net_type = NetNet::TRIAND;
|
||||
|
||||
} else if (strcmp(yytext,"wor") == 0) {
|
||||
net_type = NetNet::WOR;
|
||||
|
||||
} else if (strcmp(yytext,"trior") == 0) {
|
||||
net_type = NetNet::TRIOR;
|
||||
|
||||
} else if (strcmp(yytext,"none") == 0) {
|
||||
net_type = NetNet::NONE;
|
||||
|
||||
} else {
|
||||
cerr << yylloc.text << ":" << yylloc.first_line
|
||||
<< ": error: Net type " << yytext
|
||||
<< " is not a valid (and supported)"
|
||||
<< " is not a valid (or supported)"
|
||||
<< " default net type." << endl;
|
||||
net_type = NetNet::WIRE;
|
||||
error_count += 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue