I have an interface with multiple ports, 2 of the ports are structures:
I want to be able to use any structure that I need with my interface, is there any option in SystemVerilog which allows this?
I searched for generic structures but couldn't find any results.
this is an example of my interface:
interface My_Interface;
typedef struct {
logic something;
} str1;
typedef struct {
logic something;
} str2;
logic [15:0] data;
logic [3:0] data2;
logic wr_str1;
logic wr_str2;
str1 str1_r;
str2 str2_r;
endinterface:My_Interface
I have something like 30 structures, I want to be able to use whatever structure I want from these, the structures are different. they have different fields.
typedefsin a package to be able to share them. But your str1 and str2 are undifferentiated. How do you expect to reference them?