summaryrefslogtreecommitdiffstats
path: root/src/vhd2vl.y
diff options
context:
space:
mode:
authorRodrigo Alejandro Melo <rmelo@inti.gob.ar>2017-11-17 11:00:24 -0300
committerRodrigo Alejandro Melo <rmelo@inti.gob.ar>2017-11-17 11:00:24 -0300
commit14a8e0c13b3e45d087ac21861e871d0a7ffcd8a0 (patch)
treed2e118382b94c274779ab65136539b8be725fbbc /src/vhd2vl.y
parent4071e9bfbe2248d7b663d2e5c1b192855fb29585 (diff)
downloadvhdl2vl-14a8e0c13b3e45d087ac21861e871d0a7ffcd8a0.tar.gz
vhdl2vl-14a8e0c13b3e45d087ac21861e871d0a7ffcd8a0.zip
Used addnest function to replace code for BITVECT
Diffstat (limited to 'src/vhd2vl.y')
-rw-r--r--src/vhd2vl.y11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/vhd2vl.y b/src/vhd2vl.y
index e192058..ced7af5 100644
--- a/src/vhd2vl.y
+++ b/src/vhd2vl.y
@@ -2149,15 +2149,8 @@ expr : signal {
| expr XOR expr {$$=addexpr($1,'^'," ^ ",$3);}
| expr XNOR expr {$$=addexpr(NULL,'~'," ~",addexpr($1,'^'," ^ ",$3));}
| BITVECT '(' expr ')' {
- /* single argument type conversion function e.g. std_ulogic_vector(x) */
- expdata *e;
- e=xmalloc(sizeof(expdata));
- if ($3->op == 'c') {
- e->sl=addwrap("{",$3->sl,"}");
- } else {
- e->sl=addwrap("(",$3->sl,")");
- }
- $$=e;
+ /* single argument type conversion function e.g. std_logic_vector(x) */
+ $$ = addnest($3);
}
| CONVFUNC_2 '(' expr ',' NATURAL ')' {
/* two argument type conversion e.g. to_unsigned(x, 3) */
OpenPOWER on IntegriCloud