Remove .alias records from vvp generated code.
Net arrays can be handled by nets directly, instead of creating .alias records.
This commit is contained in:
parent
41075a45e6
commit
d44c814bab
|
|
@ -706,7 +706,7 @@ static void draw_net_in_scope(ivl_signal_t sig)
|
|||
swapped ? last : first );
|
||||
}
|
||||
|
||||
fprintf(vvp_out, "v%p_%u .alias%s v%p %u, %d %d, "
|
||||
fprintf(vvp_out, "v%p_%u .net%s v%p %u, %d %d, "
|
||||
"v%p_%u; Alias to %s\n", sig, iword,
|
||||
datatype_flag, sig, iword, msb, lsb,
|
||||
nex_data->net, nex_data->net_word,
|
||||
|
|
|
|||
|
|
@ -350,7 +350,6 @@ exactly the same as the .var statement:
|
|||
<label> .net8 "name", <msb>, <lsb>, <symbol>;
|
||||
<label> .net8/s "name", <msb>, <lsb>, <symbol>;
|
||||
<label> .net/real "name", <msb>, <lsb>, <symbol>;
|
||||
<label> .alias "name", <msb>, <lsb>, <symbol>;
|
||||
|
||||
|
||||
Like a .var statement, the .net statement creates a VPI object with
|
||||
|
|
|
|||
|
|
@ -543,9 +543,6 @@ extern void compile_netw_real(char*label, char*array_symbol,
|
|||
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);
|
||||
|
||||
extern void compile_island(char*label, char*type);
|
||||
extern void compile_island_port(char*label, char*island, char*src);
|
||||
|
|
|
|||
|
|
@ -102,8 +102,6 @@ static char* strdupnew(char const *str)
|
|||
|
||||
|
||||
/* These are some keywords that are recognized. */
|
||||
".alias" { return K_ALIAS; }
|
||||
".alias/real" { return K_ALIAS_R; }
|
||||
".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
|
|
@ -72,7 +72,7 @@ static struct __vpiModPath*modpath_dst = 0;
|
|||
int vpi_enum;
|
||||
};
|
||||
|
||||
%token K_A K_ALIAS K_ALIAS_R K_APV
|
||||
%token K_A K_APV
|
||||
%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
|
||||
|
|
@ -820,18 +820,6 @@ statement
|
|||
symbols_net ';'
|
||||
{ compile_netw_real($1, $3, $4, $6, $7, $9.cnt, $9.vect); }
|
||||
|
||||
/* Array word versions of alias directives. */
|
||||
|
||||
| T_LABEL K_ALIAS T_SYMBOL T_NUMBER ','
|
||||
signed_t_number signed_t_number ','
|
||||
symbols_net ';'
|
||||
{ compile_aliasw($1, $3, $4, $6, $7, $9.cnt, $9.vect); }
|
||||
|
||||
| T_LABEL K_ALIAS_R T_SYMBOL T_NUMBER ','
|
||||
signed_t_number signed_t_number ','
|
||||
symbols_net ';'
|
||||
{ compile_aliasw($1, $3, $4, $6, $7, $9.cnt, $9.vect); }
|
||||
|
||||
/* Parameter statements come in a few simple forms. The most basic
|
||||
is the string parameter. */
|
||||
|
||||
|
|
|
|||
23
vvp/words.cc
23
vvp/words.cc
|
|
@ -567,26 +567,3 @@ void compile_netw_real(char*label, char*array_label, unsigned long array_addr,
|
|||
__compile_real(label, 0, array_label, array_addr,
|
||||
msb, lsb, false, argc, argv);
|
||||
}
|
||||
|
||||
void compile_aliasw(char*label, char*array_label, unsigned long array_addr,
|
||||
int msb, int lsb, unsigned argc, struct symb_s*argv)
|
||||
{
|
||||
vvp_array_t array = array_find(array_label);
|
||||
assert(array);
|
||||
|
||||
assert(argc == 1);
|
||||
vvp_net_t*node = vvp_net_lookup(argv[0].text);
|
||||
|
||||
/* Add the label into the functor symbol table. */
|
||||
assert(node);
|
||||
define_functor_symbol(label, node);
|
||||
|
||||
vpiHandle obj = vvp_lookup_handle(argv[0].text);
|
||||
assert(obj);
|
||||
array->alias_word(array_addr, obj, msb, lsb);
|
||||
|
||||
free(label);
|
||||
free(array_label);
|
||||
free(argv[0].text);
|
||||
free(argv);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue