Hi, all
I’m confused about how to use “IsTriggered” while I’m doing an HDL simulation of Opal Kelly frontpanel.
In top module(Framework)
assign ep61data[31:0] = fpga_to_asic_trig_out[31:0];
…
okTriggerOut fpga_to_asic_to(.okHE(okHE), .okEH(okEHx[ 5*65 +: 65 ]), .ep_addr(8’h61), .ep_clk(okClk), .ep_trigger(ep61data));
fpga_to_asic u_fpga_to_asic(
.clk ( okClk ),
.rstn ( rstn ),
.op_mode ( op_mode ),
.flag_op_start ( flag_op_start ),
.flag_meas_stop ( flag_meas_stop ),
.wr_data_from_pc ( wr_data_from_pc ),
.wr_row_addr_from_pc ( wr_row_addr_from_pc ),
.wr_col_addr_from_pc ( wr_col_addr_from_pc ),
.rd_row_addr_from_pc ( rd_row_addr_from_pc ),
.rd_col_addr_from_pc ( rd_col_addr_from_pc ),
.wl_from_pc ( wl_from_pc ),
.imc_row_addr_from_pc ( imc_row_addr_from_pc ),
.imc_col_addr_from_pc ( imc_col_addr_from_pc ),
.gp_in ( GP_IN ),
.op_code ( OP_CODE ),
.op_en ( OP_EN ),
.trigger_out ( fpga_to_asic_trig_out)
);
As above, I assigned wire properly passed and the triggerOut was instantiated.
In Test Fixture(Testbench)
wr_done = 0;
UpdateTriggerOuts;
while (wr_done==0) begin
UpdateTriggerOuts;
wr_done = IsTriggered(8’h61, 32’h0000_0000);
$display(“WR operation is not finished”);
end
I wanted to check that WR(write) operation has done with triggerout.
And I saw “trigger out [1]” raise on waveform after the WR operation has done, but why isn’t it working?
I have tried with various mask values like
“wr_done = IsTriggered(8’h61, 32’h0000_0000);”
“wr_done = IsTriggered(8’h61, 32’h0000_0001);”
“wr_done = IsTriggered(8’h61, 32’h0000_0002);”
“wr_done = IsTriggered(8’h61, 0);”
“wr_done = IsTriggered(8’h61, 1);”
“wr_done = IsTriggered(8’h61, 2);”
And all of those not working…
Please help. If need whole source HDL, I’ll send with emails.
Additional questions
- Does “IsTriggered(…, MASK)” mean if you put 32’h0000_0000 in MASK, you don’t use a mask?
- Should I use “IsTriggered (8’h61, 32’h0000_0002)” rather than “IsTriggered (8’h61, 32’h0000_0001)” to check “wire 8’h61 [1]”?