Mulptiple Driving in Processes, simulation problem.

A

Alex

Gentlemen,

I got stuck with what seems to be a simple problem of multiple driving.

I have to processes that update a common signal (it is for pure behaviour
simulations).
However during simulations in ModelSim 5.8SE the signal starts being
updated only after second process is activated
(see the example code below). Obviously if I split these processes into
different design units that will help, but what
am I missing to make it work (or simulated) properly in the way, as
follows???


ARCHITECTURE beh OF temp_test IS
signal x: std_logic;
BEGIN
set: process(s,x) is
begin
if s='1' then
x<='1' after 1 ps;
elsif (s='0' and x'event ) then
x<='Z' after 1 ps;
elsif (s='0' and x='X' ) then
x<='Z' after 1 ps;
end if;
end process;

reset: process(r,x) is
begin
if r='1' then
x<='0' after 1 ps;
elsif (r='0' and x'event ) then
x<='Z' after 1 ps;
elsif (r='0' and x='X' ) then
x<='Z' after 1 ps;
end if;
end process;
out<=x;

END ARCHITECTURE beh;

Thank you for help.
 
A

Alex

Problem solved. My mistake was that I didn't initialise the internal
signal, so
unactivated processes kept it as Undefined, and as a result of resolution
function
at the output was also Undefined.

Thanks.
Alex
 
M

Mike Treseler

Alex said:
I got stuck with what seems to be a simple problem of multiple driving.

I have to processes that update a common signal (it is for pure
behaviour simulations).

http://groups.google.com/groups/search?q=process+shorts+"outputs+together+"

For simulation I use one process that
drives read-only signals like clk,
and a second process that uses
synchronous waits like:

wait until rising_edge(clk_s);

to drive and read all the other testbench wires.
See the testbench example here:

http://home.comcast.net/~mike_treseler/

-- Mike Treseler
 
A

Alex

Mike,

Yes, for testbenches I do exactly like you have mentioned. As I have said,
it is a pure behavioural
module, simply to test an IC circuits (in this particular case it is
charge storing), and parallel
assignment is done on purpose in order to trace hazards in circuit
functioning. It is possible to
do it by tracing test vectors as well, but I have decided to
do both :).

Alex.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top