ActivateTriggerIn Simulation task

I’m using the USB3 behavioral simulation models to mimic FrontPanelAPI. I was having some trouble getting the particular trigger bit I wanted to toggle properly. Then I noticed a bit shift in the Verilog task ActivateTriggerIn.

If I want bit 4 of ep 0x40 to toggle, should the proper usage be:
ActivateTriggerIn (8’h40, 8’h10); ?

It seems instead I have to use:
ActivateTriggerIn (8’h40, 8’h04);

I just want to make sure I’m not misinterpreting something.

Thanks,
DanC

Just to answer my own question, I learned later that the parameter into ActivateTriggerIn() function specifies the trigger bit as a value. Whereas when triggers are coming out, such as in isTriggered(), the mask parameter specifies each trigger bitwise.

So if I want to send trigger bit 4 in, I would indeed call:
ActivateTriggerIn(0x40, 4);

And to monitor whether bit 4 has been triggered out, I would call:
isTriggered(0x60, 0x10);

which is the 4th bit has been set high. I suppose the rational is we only ever want to send one trigger in, but we may want to monitor multiple potential triggers out.