nickcollins3
07-21-2009, 06:50 PM
This seems like it should be possible. Inside my interface, I have this code for multiple clocking blocks...
interface the_if;
localparam NUM = 16;
logic [NUM-1:0] targ_clk;
logic [NUM-1:0] targ_rst_n;
logic [NUM-1:0] targ_sig;
generate
for (genvar N = 0; N < NUM; N++) begin : CB_GEN
clocking targ_cb @(posedge targ_clk[N]);
default input #1step output #2ps;
output targ_rst_n = targ_rst_n[N];
inout targ_sig = targ_sig[N];
endclocking
end
endgenerate
Then in my driver that is connected to this virtual interface, I have:
the_if.CB_GEN[id].targ_cb.targ_rst_n <= 1'b0;
Here, "id" is an integer in the class and is within range. I don't understand why VCS chokes and says it cannot find CB_GEN for the line above. Could this be a VCS issue?
interface the_if;
localparam NUM = 16;
logic [NUM-1:0] targ_clk;
logic [NUM-1:0] targ_rst_n;
logic [NUM-1:0] targ_sig;
generate
for (genvar N = 0; N < NUM; N++) begin : CB_GEN
clocking targ_cb @(posedge targ_clk[N]);
default input #1step output #2ps;
output targ_rst_n = targ_rst_n[N];
inout targ_sig = targ_sig[N];
endclocking
end
endgenerate
Then in my driver that is connected to this virtual interface, I have:
the_if.CB_GEN[id].targ_cb.targ_rst_n <= 1'b0;
Here, "id" is an integer in the class and is within range. I don't understand why VCS chokes and says it cannot find CB_GEN for the line above. Could this be a VCS issue?