Function to check if I/O status is forced.
Syntax |
i32 is_forced (what [, i16|i32|u16|u32 sts=NULL [, i32|u32 mask=NULL]]) |
||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
what |
I/O to be controlled. It can be:
|
||||||||||||||
sts |
The function will write to sts the state of forcing of the word bits: •the X bit of sts is 0 if the X bit of the word is forced to FALSE or unforced •the X bit of sts is 1 if the X bit of the word is forced to TRUE NOTE: Using sts as i32 for a word that is considered i16, sign extension will be done on the 32 bits. (optional, default NULL) |
||||||||||||||
mask |
The function will write the mask of the forced word bits into mask: •the X bit of mask is 0 if the X bit of the word is not forced •the X bit of mask is 1 if the X bit of the word is forced (either to TRUE or FALSE). Must be u32 if sts is i32 or u32, or u16 if sts is i16 or u16. (optional, default NULL) |
||||||||||||||
Result |
Returns:
|
||||||||||||||
Validity |
Rule, Task |
||||||||||||||
Note |
It should be remembered that: •forcing an input means that sw will see the state of the forced input, regardless of the actual state of the physical input •forcing an output means that the physical output will take the forced value regardless of the desired value imposed by sw |
Example of use:
Example of use:
|