CPU's PC logic

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

CPU's PC logic

erwinleonardy
This post was updated on .

So, I need to verify the veracity of my PC's logic here. Please correct me if i am wrong. This is how I check if I should make the load bit to true or false.

At time 13:
zr = 0
ng = 0
pos = 1  // am i correct?
j1 = 1
j2 = 1
j3 = 1
j3 & pos = 1  // there should be a jump, right?

Albeit, CPU.cmp indicates that there is no jump, since the PC is incremented. Can anyone tell me which part goes wrong?

Thanks in advance
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CPU's PC logic

cadet1620
Administrator
Your logic for 'pos' is correct, and 'load is mostly correct.

Look at the instruction that is executing, 0000001111100111. What is this instruction? Should this instruction cause a jump?


After you've solved your problem, please edit your post to remove the implementation details. We want students to develop their own solutions.

--Mark
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CPU's PC logic

erwinleonardy
Oh blimey! It is an a-instruction! Thanks a lot!
Loading...