Hey Everyone,
I have a design question based on the following scenario:
I have signals that are shared between several entities in the design. So,
Entity foo:
<port declarations>
architecture main of foo:
signal f: std_logic_vector
begin
portmap a : e1(f,...)
portmap b : e2(f,...)
portmap c : e3(f,...)
end main
Entity e1:
<port declaration including f>
architecture main of e1:
process:
some code that does f <= f + 1
end main
e2 and e3 are similar to e1.
The processes inside e1, e2, and e3 are not run in parallel. This is done using some state machine not shown here. So the assignments to f are never happening in more than 1 place. But, vhdl will probably not allow me to do this saying that f is written by multiple writers.
My question is: How do I implement this? How should f be declared since it is input and output to other entities. I know there is a state machine that will prevent multiple concurrent writes, but how can I make VHDL recognize this fact? Any help will greatly appreciated!
Thanks