I wrote a hardware accelerator which communicates with a MicroBlaze over FSL. In the Microblaze C code I would like to use putfsl()
in a loop until the hardware accelerator signals the MicroBlaze that it should exit the loop:
while( <FSL_M_Control is not 1> )
{
putfsl(*foo, 0);
foo++;
}
Is it possible to get the value of FSL_M_Control
and use it to exit the loop? If it is how could I do that?
Best Answer
Just so we're clear, you mean
FSL_M_Control
of the IP, which isFSL_S_Control
on the microblaze, right? BecauseFSL_M_Control
is driven by the microblaze...The fast answer is "no".
However, the functions
cgetfsl
andgetfsl
will make a read and report FSL_S_Control through the carry bit, meaning they set the carry bit if FSL_S_Control = '0' when you usecgetfsl
and vice-versa. Keep in mind that the FSL transaction has to be valid, i.e. FSL_S_Exist must be driven otherwise these functions blocks. You can verify the carry bit with the macrofsl_isinvalid
.