why isn't my CPU working?

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

why isn't my CPU working?

smcbot
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: why isn't my CPU working?

cadet1620
Administrator
The HDL as posted fails to load.  It is missing a "," in "Or (a=Ainst b=instruction..."
After I added the "," it fails in line 61, as you reported.

Look at the line that failed to compare. The instruction that is failing is
    1110001100000001
Search in the CPU.tst file for this instruction and you'll see it is
    D;JGT
       
The value that failed to compare is the PC. The compare file PC just increments but the output file PC is set to 1000 which is the A register value, so this command jumped when it should not have.

The D register value is 0, which is not greater than 0, so the jump should not have occurred.

Look at the internal pins when the test fails and see if you can figure out why PC's load = 1.

Fix this problem and your CPU will pass the test.


When you get your CPU working, please edit you post to remove the HDL.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: why isn't my CPU working?

smcbot
Thank you so much . I found the problem and fixed it. All test cases passed.
Reply | Threaded
Open this post in threaded view
|

Re: why isn't my CPU working?

theratulz
Commenting to save the post.