Hi all!
I am somehow confused about the IsTriggered function available in the okHostCalls.v file.
The function (just cut and paste from the above mentioned file) is
function IsTriggered (
input [7:0] ep,
input [15:0] mask
);
begin
if ((Triggered[ep - 8’h60] & mask) >= 0) begin
if ((Triggered[ep - 8’h60] & mask) == 0) begin
IsTriggered = 0;
end else begin
IsTriggered = 1;
end
end else begin
$display("***FRONTPANEL ERROR: IsTriggered mask 0x%04h covers unused Triggers", mask);
IsTriggered = 0;
end
end
endfunction
I noticed that the $display statement is always executed. This looks strange to me.
In the testbench I used the calling:
k = IsTriggered(8’h60, 16’h0002);
in order to check bit [1] of the endpoint.
Where is my mistake?
Thanks for the help
Francesco