krutarth
Newbie level 1
I have a VHDL code for a system that implements clock recovery. Right now, we are using an FPGA and want to replace it by a microcontroller. The code includes various processes. A process in VHDL is like a function but consists of a sensitivity list that contains parameters which decide when the process is executed. eg.
process A (para 1, para 2)
{
code1
}
process B (para 3, para 4)
{
code2
}
So, only when the parameters (para 1 or para 2) change their state, will the code1 be executed. And similarly for process B. The execution of code1 and code2 is independent. That is, if while executing code1, para 3 or para 4 change their state,OR if para 1(or 2) = para 3(or 4), code2 is executed concurrently with code1. There is no sequential execution in VHDL. I am trying to find a way to get concurrency in the C code. Is there any way to do that?
Some might say interrupts. However, can I call an interrupt within an interrupt? If so, wont the flow of the ISR (which is calling the second ISR) stop? The timing is really important while conversion and interrupt would just mess with it. Hence, I feel concurrency will the best option. But I have no idea if we can implement it in C as it is a sequential language.
Please help.
process A (para 1, para 2)
{
code1
}
process B (para 3, para 4)
{
code2
}
So, only when the parameters (para 1 or para 2) change their state, will the code1 be executed. And similarly for process B. The execution of code1 and code2 is independent. That is, if while executing code1, para 3 or para 4 change their state,OR if para 1(or 2) = para 3(or 4), code2 is executed concurrently with code1. There is no sequential execution in VHDL. I am trying to find a way to get concurrency in the C code. Is there any way to do that?
Some might say interrupts. However, can I call an interrupt within an interrupt? If so, wont the flow of the ISR (which is calling the second ISR) stop? The timing is really important while conversion and interrupt would just mess with it. Hence, I feel concurrency will the best option. But I have no idea if we can implement it in C as it is a sequential language.
Please help.