My problem is that I have to pass a generic
from a SystemVerilog module to a VHDL entity of type std_logic
, that will be directly used inside that entity in signal assignments.
entity foo is
generic( my_generic : std_logic);
port (...);
end foo;
architecture arc of foo is
...
begin
my_signal <= not(my_generic);
...
end arc;
However, my_signal
is always 'U'
, whatever type (integer
, std_logic
, bit
, reg
, wire
) is the parameter in SV. The tool I'm using is Modelsim 10.3b. There are some workarounds, like declare it as an integer in VHDL and then cast it to a std_logic_vector
of width 1, but I like to know if there is a smarter way. Am I missing something? Is it allowed to pass std_logic
as a parameter? Can this also cause problems during synthesis with Xilinx ISE?
Thanks in advance.