CPU and Memory pass all tests but Computer does not.

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

CPU and Memory pass all tests but Computer does not.

lewlking
Specifically the computer does not pass the rectangle and jump test. Idk why??? I must have done something wrong with CPU or Memory as those are the only other .hdl files in the folder.

CPU:
CPU.hdl
Memory:
Memory.hdl
Computer:
Computer.hdl

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

Re: CPU and Memory pass all tests but Computer does not.

cadet1620
Administrator
Your CPU,hdl has a problem with its jump logic.

The current Nand2Tetris distribution zip file has an ancient version of the CPU.tst in it.  Use these files to test your CPU to see and correct the error.

CPU.tst
CPU.cmp

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

Re: CPU and Memory pass all tests but Computer does not.

lewlking
Cool, Thanks!

Now I know where to look for my error.

Do you have other updated test files and what not I can download somewhere and use for future self-diagnosis?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CPU and Memory pass all tests but Computer does not.

cadet1620
Administrator
The latest test files are now in the .zip file on the Nand2Tetris web site.

In addition to the correct version of the CPU tests, there is an improved Memory.tst and improved project 7 StackArithmetic/StackTest files.

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

Re: CPU and Memory pass all tests but Computer does not.

lewlking
Thanks I noticed I didn't correctly address the jump thing because I counted zero as positive.

Also for other people to note:

The rect test draws 4 lines not 50: http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/rect-program-screenshot-inconsistency-td3649769.html#a4025098

Coolio On I Go
Loading...