I want to write c code to generate a pulse, but can not, it seems, envelops the logic for its implementation. I come from Verilog’s strong background and know how to do it in verilog (look for state changes with xor and use this momentum, stretch it over time, if necessary, registering it several times)
How do I do this in C? I want to do something like
while(1)
{
switch(state)
case 0:
case 1:
case 2:
case 3:
usleep(1000)
}
conditionIt is modified by code running on the FPGA, therefore it changes depending on some logic.
This doesn't seem to be the way to do this. Some recommendations will be appreciated.
source
share