Presentation is loading. Please wait.

Presentation is loading. Please wait.

The transaction problem.

Similar presentations


Presentation on theme: "The transaction problem."— Presentation transcript:

1 The transaction problem.
AU 2013 HDL Exam review The transaction problem. 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

2 Copyright 2006 - Joanne DeGroat, ECE, OSU
Initial values This is the default value unless it is explicitly set at time 0. Initial values on signal/signal drivers X – explicitly set to ‘0’ Y – resolved signal – driver p2 – ‘U’ – driver p3 ‘U’ Y – resolved value (value user sees) – ‘U’ 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

3 Value after initialization
During initialization each process runs until it suspends. p1 will run and a transaction x(‘1’,10ns, 10ns) p2 will run and immediate suspends until x=‘1’ This will occur at 10ns when the transaction above posts p3 will run, generate the transaction y-p3(‘Z’, d ns, d ns), and then suspend until 8 ns. There are no transactions to post so the values are the same as initial values. 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

4 Copyright 2006 - Joanne DeGroat, ECE, OSU
Advance time The next time at which something occurs is +1 d ns when the p3 driver of y has a transaction posting the value ‘Z’. For the signal y, resolution of a ‘Z’ and a ‘U’ results in a ‘U’. Nothing else changes. 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

5 Advance time – p3 resumes
At 8 ns p3 resumes. A transaction of y-p3 (‘0’,8 ns, d ,8ns+ d ) is generated. Process then suspend until 15 ns. 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

6 Copyright 2006 - Joanne DeGroat, ECE, OSU
At 8 ns + d have Post value and have the following 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

7 Copyright 2006 - Joanne DeGroat, ECE, OSU
Advance time till 10ns At 10 ns transaction on X posts Causes p1 to rerun and generate x(‘0’,10,20) Also, x is now ‘1’ so p2 is run and generate a transaction y-p2(‘1’, d,10+ d). P2 then suspends until x = ‘0’ which occurs at 20 ns. 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

8 Copyright 2006 - Joanne DeGroat, ECE, OSU
At 10 + d Transaction on p2 of y posts Y-p2 now have value ‘1’ and resolved value is ‘X’ 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

9 Copyright 2006 - Joanne DeGroat, ECE, OSU
OR This method can be followed but is error prone. 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

10 Copyright 2006 - Joanne DeGroat, ECE, OSU
OR A possible better method  1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

11 Copyright 2006 - Joanne DeGroat, ECE, OSU
Another Approach Work out each signal and build final result p1: x <= NOT x AFTER 10 ns; During initialization– tx x(‘1’,0ns,10ns,10ns) At 10 post ‘1’ – gen tx (‘0’,10ns,10ns,20ns) At 20 post ‘0’ – gen tx (‘1’,20ns,10ns,30ns) At 30 post ‘1’ – gen tx (‘0’,30ns,10ns,40ns) 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

12 Copyright 2006 - Joanne DeGroat, ECE, OSU
And do waveform for X It looks like 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

13 Copyright 2006 - Joanne DeGroat, ECE, OSU
Next do the p3 driver of y This driver is only dependent on time. At init tx y-p3(‘Z’,0,d,d) - sus til 8ns At d post tx and at 0+1d y-p3 driver – ‘Z’ Res at 8ns - tx y-p3(‘0’,8,d,8+1d) - sus til 15ns At 8+1d post tx and at 8+1d y-p3 driver – ‘0’ Res at 15ns - tx y-p3(‘Z’,15,d,15+1d) - sus til 23ns At 15+1d post tx and at 15+1d y-p3 driver – ‘Z’ Res at 23ns - tx y-p3(‘0’,23,d,23+1d) - sus til 30ns At 23+1d post tx and at 23+1d y-p3 driver – ‘0’ Res at 30ns - tx y-p3(‘Z’,30,d,30+1d) - sus til 38ns At 30+1d post tx and at 30+1d y-p3 driver – ‘Z’ 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

14 Waveform when y-p3 added
The p3 driver of y 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

15 Copyright 2006 - Joanne DeGroat, ECE, OSU
Now do the p2 driver of y Initialaztion – process suspends – y init val ‘U’ At x=‘1’(10ns) resumes, generates tx y-p2(‘1’,10,d,10+1d) then sus til x=‘0’ At 10+1d post – p2 driver of y – ‘1’ At x=‘0’(20ns) resumes- tx y-p2(‘H’,20,d,20+1d) and tx y-p2(‘Z’,20,5,25) then sus til x=‘1’ At 20+1d post – p2 driver of y – ‘H’ At 25 post – p2 driver of y – ‘Z’ A x=‘1’ (30ns) resumes, generates tx y-p2(‘1’,30,d,30+1d) then sus til x=‘0’ 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

16 Copyright 2006 - Joanne DeGroat, ECE, OSU
Waveform Now including p2 driver of y 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU

17 Generate resolved value
Can use the driver values to generate the resolved signal y 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU


Download ppt "The transaction problem."

Similar presentations


Ads by Google