Missed scenario in PC's tests

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Missed scenario in PC's tests

Tomer Even
Hello,
I tried implementing the PC chip in several ways, and finally I passed the comparison test.
I was surprised to find out that I passed it although I did not deal with a specific situation,
and therefor I got wrong output for it:

| time | in  | reset | load  | inc | out  |
|  t0   |  0  |   0     |   1    |  0  |  ?    |
|  t0+ |  0  |   0    |   1    |  0   |  0   |
|  t1   |  X  |   0    |   0    |  0   |  0   |
|  t1+ |  X  |   0    |   0    |  0   |  X   |
|  t2   |  Y  |   0    |   0     |  0  |  X   |
|  t2+ |  Y  |   0    |   0    |  0   |  Y   |
|  t3   |  Z  |   0    |   0    |  0   |  Y   |
|  t3+ |  Z  |   0    |   0    |  0   |  Z   |

Which is obviously right only when x=y=z=0.

The build-in chip does not behave this way, therefor I thought this scenario was missed.
Is that correct? or did I do something wrong?
Reply | Threaded
Open this post in threaded view
|

Re: Missed scenario in PC's tests

cadet1620
Administrator
| time | in  | reset | load | inc | out |
|  t0+ |  0  |   0   |   1  |  0  |  ?  | 
|  t1  |  X  |   0   |   0  |  0  |  0  |
|  t1+ |  X  |   0   |   0  |  0  |  X  |
|  t2  |  Y  |   0   |   0  |  0  |  X  |
|  t2+ |  Y  |   0   |   0  |  0  |  Y  |
|  t3  |  Z  |   0   |   0  |  0  |  Y  |
|  t3+ |  Z  |   0   |   0  |  0  |  Z  |
When load = 0, in is ignored. out will be set to 0 at t1, and will remain 0 for the remainder of this sequence.

[Formatting hint: put <raw> and </raw> tags around text you want to be displayed in fixed-pitch font.]

--Mark