The .alias for nets is no longer useful.
In the olden days, the .alias was necessary to create a net name that is an alias to an existing net in the netlist. But now that the .net no longer creates a node in the netlist, ALL .net objects are aliases of a sort, so this (mis)feature gets in the way.
This commit is contained in:
parent
02ca7fe7fc
commit
8247d3ef45
|
|
@ -544,14 +544,22 @@ static void draw_net_in_scope(ivl_signal_t sig)
|
|||
/* Finally, we may have an alias that is a word
|
||||
connected to another word. Again, this is a
|
||||
case of port collapsing. */
|
||||
int strength_aware_flag = 0;
|
||||
const char*vec8 = "";
|
||||
if (nex_data->flags&VVP_NEXUS_DATA_STR)
|
||||
strength_aware_flag = 1;
|
||||
if (nex_data->drivers_count > 1)
|
||||
vec8 = "8";
|
||||
if (strength_aware_flag)
|
||||
vec8 = "8";
|
||||
|
||||
/* For the alias, create a different kind of node
|
||||
that refers to the alias source data instead of
|
||||
holding our own data. */
|
||||
fprintf(vvp_out, "v%p_%u .alias%s \"%s\", %d %d, v%p_%u;\n",
|
||||
sig, iword, datatype_flag,
|
||||
vvp_mangle_name(ivl_signal_basename(sig)),
|
||||
msb, lsb, nex_data->net, nex_data->net_word);
|
||||
fprintf(vvp_out, "v%p_%u .net%s%s %s\"%s\", %d %d, %s;"
|
||||
" alias, %u drivers%s\n",
|
||||
sig, iword, vec8, datatype_flag, local_flag,
|
||||
vvp_mangle_name(ivl_signal_basename(sig)),
|
||||
msb, lsb, driver,
|
||||
nex_data->drivers_count,
|
||||
strength_aware_flag?", strength-aware":"");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -451,12 +451,6 @@ extern void compile_netw_real(char*label, char*array_symbol,
|
|||
int msb, int lsb,
|
||||
unsigned argc, struct symb_s*argv);
|
||||
|
||||
extern void compile_alias(char*label, char*name,
|
||||
int msb, int lsb, bool signed_flag,
|
||||
unsigned argc, struct symb_s*argv);
|
||||
extern void compile_alias_real(char*label, char*name,
|
||||
int msb, int lsb,
|
||||
unsigned argc, struct symb_s*argv);
|
||||
extern void compile_aliasw(char*label, char*array_symbol,
|
||||
unsigned long array_addr, int msb, int lsb,
|
||||
unsigned argc, struct symb_s*argv);
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ static char* strdupnew(char const *str)
|
|||
/* These are some keywords that are recognized. */
|
||||
".alias" { return K_ALIAS; }
|
||||
".alias/real" { return K_ALIAS_R; }
|
||||
".alias/s" { return K_ALIAS_S; }
|
||||
".abs" { return K_ARITH_ABS; }
|
||||
".arith/div" { return K_ARITH_DIV; }
|
||||
".arith/div.r" { return K_ARITH_DIV_R; }
|
||||
|
|
|
|||
14
vvp/parse.y
14
vvp/parse.y
|
|
@ -65,7 +65,7 @@ static struct __vpiModPath*modpath_dst = 0;
|
|||
vvp_delay_t*cdelay;
|
||||
};
|
||||
|
||||
%token K_A K_ALIAS K_ALIAS_S K_ALIAS_R
|
||||
%token K_A K_ALIAS K_ALIAS_R
|
||||
%token K_ARITH_ABS K_ARITH_DIV K_ARITH_DIV_R K_ARITH_DIV_S K_ARITH_MOD
|
||||
%token K_ARITH_MOD_R K_ARITH_MOD_S
|
||||
%token K_ARITH_MULT K_ARITH_MULT_R K_ARITH_SUB K_ARITH_SUB_R
|
||||
|
|
@ -661,18 +661,6 @@ statement
|
|||
',' symbols_net ';'
|
||||
{ compile_net_real($1, $4, $6, $7, $3, $9.cnt, $9.vect); }
|
||||
|
||||
| T_LABEL K_ALIAS T_STRING ',' signed_t_number signed_t_number
|
||||
',' symbols_net ';'
|
||||
{ compile_alias($1, $3, $5, $6, false, $8.cnt, $8.vect); }
|
||||
|
||||
| T_LABEL K_ALIAS_S T_STRING ',' signed_t_number signed_t_number
|
||||
',' symbols_net ';'
|
||||
{ compile_alias($1, $3, $5, $6, true, $8.cnt, $8.vect); }
|
||||
|
||||
| T_LABEL K_ALIAS_R T_STRING ',' signed_t_number signed_t_number
|
||||
',' symbols_net ';'
|
||||
{ compile_alias_real($1, $3, $5, $6, $8.cnt, $8.vect); }
|
||||
|
||||
/* Arrayed versions of net directives. */
|
||||
|
||||
| T_LABEL K_NET T_SYMBOL T_NUMBER ','
|
||||
|
|
|
|||
17
vvp/words.cc
17
vvp/words.cc
|
|
@ -485,20 +485,3 @@ void compile_aliasw(char*label, char*array_label, unsigned long array_addr,
|
|||
free(argv[0].text);
|
||||
free(argv);
|
||||
}
|
||||
|
||||
/*
|
||||
* The .alias is practically identical to a .net. We create all the
|
||||
* VPI stuff for the new name (and put it in the local scope) but
|
||||
* reference the node in the net.
|
||||
*/
|
||||
void compile_alias(char*label, char*name, int msb, int lsb, bool signed_flag,
|
||||
unsigned argc, struct symb_s*argv)
|
||||
{
|
||||
__compile_net(label, name, 0, 0, msb, lsb, signed_flag, false, false, argc, argv);
|
||||
}
|
||||
|
||||
void compile_alias_real(char*label, char*name, int msb, int lsb,
|
||||
unsigned argc, struct symb_s*argv)
|
||||
{
|
||||
__compile_real(label, name, 0, 0, msb, lsb, false, argc, argv);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue