Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help required to translate a code from VHDL to embedded C

Status
Not open for further replies.

krutarth

Newbie level 1
Joined
Apr 2, 2013
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,293
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.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top