CPU won`t pass test script

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

CPU won`t pass test script

perrothedog
Hello all,
I am fairly confused as to why my CPU is not passing the test script because as far as I can determine, my CPU behaves correctly when given the instructions in the test script, however it fails literally every single line of the test script with the error "comparison failed at line n." For example, the first command in the test script is @12345, and when given this instruction my CPU dutifully stores 12345 in the A register, visible in the A register`s GUI. However, I still receive the aforementioned error.
Any suggestions?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CPU won`t pass test script

cadet1620
Administrator
If I had to guess, there's something wrong with your jump logic or PC.  Does the "pc" value in the .out file match the .cmp file?

Email me your CPU.hdl file and I'll take a look at it for you.

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

Re: CPU won`t pass test script

perrothedog
Thanks for the response Mark,
I totally forgot to check the .out and .cmp files and you were absolutely correct my PC value did not increment correctly. For now, I would prefer to attempt to fix it myself however if I don`t figure it out then I will gladly email the HDL file to you.

Thank you,
     Luke
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CPU won`t pass test script

perrothedog
Well there were many, many more problems along the way but my CPU now passes the test script :)
Loading...