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:
Stephen Williams 2016-08-31 14:05:09 -07:00
parent 41075a45e6
commit d44c814bab
6 changed files with 2 additions and 43 deletions

View File

@ -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,

View File

@ -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

View File

@ -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);

View File

@ -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; }

View File

@ -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. */

View File

@ -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);
}