vhd2vl icon indicating copy to clipboard operation
vhd2vl copied to clipboard

vhd2vl doesn't handle "don't care" constants

Open roboknight opened this issue 4 years ago • 0 comments

I had what appeared to be a simple assignment of the form:

wire <= '-';

Which appears to be something like: wire <= 1'bx;

It has been a VERY long time since I've done anything with flex or bison, so I think I might see where the string '-' isn't handled:

on line 167 it appears to only handle 0, 1, x, and z, between single quotes. At any rate, it returns the STRING (which I'd guess is 0, 1, x, or z at this point). Presumably it converts the string later in the Bison code. I think I saw that somewhere. It currently looks like a simple "copy" to translate it to verilog, but maybe there could be a check for the - and convert it to the verilog "don't care"? This seems like it COULD occur pretty often. But maybe it doesn't, so it never got handled? Don't know if this is really a bug (I suppose so if VHDL uses this for the "don't care" syntax and vhd2vl doesn't support it) or a feature request, but it appears to be more of a bug.

roboknight avatar Nov 28 '20 03:11 roboknight