CPU.tst failed but CPU-external.tst success

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

CPU.tst failed but CPU-external.tst success

Afik
Please help me, I'm getting stuck on testing CPU for a few days now. I've tested with CPU.tst but comparison failed at line 5 and 11, when I compared the CPU.out and CPU.cmp there was no mistake, everything just fine.

Here's the result of CPU.out line 5
CPU.out

and this is CPU.cmp line 5
CPU.cmp

But then I tried using CPU-external.tst and it went successful. I used Aregister and Dregister built-in in my CPU.hdl, I suppose the problem is in my code but the result was right based on CPU.out and CPU.cmp.

I greatly appreciate your help

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: CPU.tst failed but CPU-external.tst success

WBahn
Administrator
This is odd, I'll agree.

One thing I noticed is that is says that the Chip Name is "Project05CPU(Clocked)".

Did you change the chip name and the test script?

If so, this is pretty risky.

Try naming the part (and the file) CPU like it is supposed to be and run the original CPU.tst script on it and see if you get any different behavior.
Reply | Threaded
Open this post in threaded view
|

Re: CPU.tst failed but CPU-external.tst success

Afik
Hi, thank you for the reply.

So I tried what you've suggested, rename the chip and .hdl file and .tst to the original name and I still got the same comparison error at line 5 and 11.

Here's my CPU.out
CPU.out


and here is my CPU.cmp
CPU.cmp


It works just fine in CPU-external.tst



this is my CPU.tst and CPU-external.tst file
CPU.tst
CPU-external.tst

Should I send my CPU.hdl to you?
Reply | Threaded
Open this post in threaded view
|

Re: CPU.tst failed but CPU-external.tst success

WBahn
Administrator
How do you know it also has a failure at line 11? Doesn't the script abort as soon as the error at line 5 happens?

Have you tried running the tests where the CPU is using all built-in parts (including the CPU itself)? If that passes, then start adding in your own parts one at a time, starting with just the CPU.hdl file, until it fails. That will let you identify which part is causing the problem.
Reply | Threaded
Open this post in threaded view
|

Re: CPU.tst failed but CPU-external.tst success

Afik
This post was updated on .
WBahn wrote
How do you know it also has a failure at line 11? Doesn't the script abort as soon as the error at line 5 happens?
When the comparison failure at line 5 I kept going the test using single step button until the end(so I guess the .tst file didn't abort?).
This image shows failure at line 11 and from that to the end there were no comparison error, so I've got error at line 5 and 11 only.


WBahn wrote
Have you tried running the tests where the CPU is using all built-in parts (including the CPU itself)? If that passes, then start adding in your own parts one at a time, starting with just the CPU.hdl file, until it fails. That will let you identify which part is causing the problem.
I don't think I used my own part, all part in my .hdl program are built-in parts.
Here's my code
https://pastebin.com/Cym9tuhp
Reply | Threaded
Open this post in threaded view
|

Re: CPU.tst failed but CPU-external.tst success

Afik
In reply to this post by WBahn
WBahn wrote
Have you tried running the tests where the CPU is using all built-in parts (including the CPU itself)?
I'm sorry I don't quite get what you mean by this, does the CPU have a built-in parts in tools/builtInChips/ folder?