Altera_Forum
Honored Contributor
15 years agoVHDL Noob question- Recursion?
Hello,
I am studying VHDL and am at the topic of signal changes in dataflow and behavior style architectures. So I have two questions. 1) Will the "compiler" ever allow a scenrio where recursion is possible? Example: Say in a dataflow architecture signal 'G' is listed on the right side of a signal assignment and signal 'E' on the left. In addition, within the same package/file there is a behavior style architecture that has 'E' in its sensitivety list and when the 'E' changes the behavoiral process is called which updates 'G', which repeats the events noted above. Now my to architecture syntax maybe invalid, but I hope you get the point.architecture my_xor_dataflow of my_xor_fun is
begin
E <= A XOR G;
end my_xor_dataflow; architecture my_xor_behavioral of my_xor_fun is
begin
xor_proc: process(E,F)
begin
G <= E OR F;
end process xor_proc;
end my_xor_behavioral; Is such a thing possible? My guess is that a compile error will be raised and that recursion is not possible in VHDL, is that correct? 2) Could a case exist such that a signal is updated in one architecture which results in an event to be scheduled to update another signal in a different architecture? That is, say a signal in a process sensitivety list is changed and the subsequent logic updates another signal which triggers another architecture to re-evaluate a signal assignment. I take it that the compile allows this but ensure there is no circular references. is that correct? I read a lot of VHDL beginner tutorials but didn't find anything related to this topic. Any positive input would be appreciated. Thanks, Moe