I have a question on converting system verilog structure to logic.
For example below is my structure inside a class:
Class......
typedef struct {
logic sync_off = {1'b1};
logic block_instruction = {1'b0};
logic cfg0_0_reg [31:0] = {0,0,0,0,0,0,1,1,1,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1,1,0,0,0,1,1,0,0};
} instruction_set;
instruction_set in_bypass;
logic [$bits(in_bypass)-1:0] input_bypass;
endclass
I have one task inside the class which takes logic as an input argument.
I would like to pass my structure element there but I dont want to change argument type.
Is there a way where I can assign these structure data to logic. (Assume that all the elements inside the struct is logic)
assign input_bypass = in_bypass;
set_data_l(input_bypass); //Calling the task.
However I cannot make use of assign inside the class.
Please suggest a way…
Thanks in advance
Prashanth