I am having this issues in the Cadence tool chain simulation when I try to connect the multidimensional user defined type in VHDL to SystemVerilog in a UVM environment. This is the VHDL output type definition:
TYPE loop_reg_ty IS RECORD
loop_index_value : std_logic_vector(REG_BITWIDTH-1 DOWNTO 0);
loop_counter : std_logic_vector(REG_BITWIDTH-1 DOWNTO 0);
loop_end_flag : std_logic;
END RECORD;
TYPE loop_array_ty is array (MAX_NO_OF_LOOPS-1 downto 0) of loop_reg_ty;
One of the VHDL output ports in my DUT is of type loop_array_ty
;
I am trying to define the SystemVerilog equivalent as:
typedef struct packed {
bit [REG_BITWIDTH-1:0] loop_index_value;
bit [REG_BITWIDTH-1:0] loop_counter;
bit loop_end_flag;
} raccu_loop_reg_ty;
typedef raccu_loop_reg_ty [MAX_NO_OF_RACCU_LOOPS-1:0] loop_array_ty;
When I use irun
, I get the error:
VHDL port type is not compatible with Verilog.
Please suggest the possible work around solution.
First, your problem is that you're not defining the
loop_array_ty
correctly. It should betypedef raccu_loop_reg_ty loop_array_ty[MAX_NO_OF_RACCU_LOOPS-1:0]
.I would suggest 2 things here:
First, try removing the
packed
qualifier from thestruct
definition. Connecting SV structs to VHDL records is something that is only available in newer Incisive versions. Make sure that the version you're using supports this.If you're using an older version of Incisive (like I was a year back), your only choice is to map the individual record members using
$nc_mirror
(not tested code, but enough to get you started):Also make sure that you're setting the
REG_BITWIDTH
constant appropriately in both languages, otherwise you'll also get a type mismatch.