delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
X-Recipient: | geda-user AT delorie DOT com |
X-Virus-Scanned: | by amavisd-new using ClamAV at gnubox.info |
To: | geda-user AT delorie DOT com |
From: | "Simon P (simon DOT git AT le-huit DOT fr) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com> |
Subject: | [geda-user] [vhd2vl] bug: array types, array init, '-', when others. |
X-Enigmail-Draft-Status: | N1110 |
Cc: | larry AT doolittle DOT boa DOT org |
Message-ID: | <56E5E13B.5080904@le-huit.fr> |
Date: | Sun, 13 Mar 2016 22:52:59 +0100 |
User-Agent: | Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 |
Icedove/38.6.0 | |
MIME-Version: | 1.0 |
Reply-To: | geda-user AT delorie DOT com |
Hi, I try to convert some vhdl and I identify bugs and few fixes in vhd2vl. I use vhd2vl 2.5 from github. Because I am not a lex/yacc or verilog developer: carefully get my fixes. More precisely I don't understand when returned values should be free in the yacc file. All declarations before an array type declarations are forgotten: fix proposition: https://www.le-huit.fr/dev/vhd2vl4augh/git/augh-output-compliant/adec9a083fdf4768045fc91638374547e35c97bb0/ vhd2vl does't support initialisation of memory at declaration. But it is possible to create "initial" verilog block for initialising arrays at declaration. fix proposition: https://www.le-huit.fr/dev/vhd2vl4augh/git/augh-output-compliant/e778db9403ad249d3cc3e5d33d5d2bad60a1b6a5/ I identify maybe another bug: In vhdl, a signal can have an initial value at the declaration. The generated initialisation for registers (bit vectors for example) is good. But wires with initial values in the vhdl code have also initial values in verilog. With the synthesis tool that I use (yosys), this initial value is considered like a driver and overwrite futur drive in the architecture body. I don't know if yosys badly interpret verilog or if this generated verilog is wrong. A bug fix could be: delete initial value of wires. But I think that if one bit of a bitvector has not driver in the architecture body, then the initial value of this bit becomes a driver. vhdl2vl doesn't support "when others=>" vhdl feature when it is mixed with others assignation, for example: a<=(1=>'0',6=>'0',when others=>'1'); vhd2vl doesn't support the '-' std_logic character. But I don't know if it exists a verilog equivalent. Maybe it is possible to treat it like a 'X'. vhd2vl doesn't support to have comments in the sensitivity list of a process. vhd2vl is a very useful tool. Thanks for it. Simon.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |