Comparison Failure

classic Classic list List threaded Threaded
5 messages Options
._.
Reply | Threaded
Open this post in threaded view
|

Comparison Failure

._.
Why "comparison failure" showed up when comparing with test scripts while the output in correct while i test it manually?
Reply | Threaded
Open this post in threaded view
|

Re: Comparison Failure

WBahn
Administrator
Not much to go on here. How did you test it manually? Did you use the exact values that the test script used? Did you make all of the tests that the test script made.

It would be very helpful to pick one of the parts that is not comparing and show what your output contains and, for convenience, what the script and comparison files contain.
._.
Reply | Threaded
Open this post in threaded view
|

Re: Comparison Failure

._.
For example, this is my hdl for NOT gate:
CHIP OurNot{
IN a;
OUT finalOutput;

PARTS:
OurChip(input1=a, input2=a, result=finalOutput);

}

When i type the input manually, eg. 1, the output is 0 and 1 for in, out is 0, which is correct.
But when i load the testscript, “Comparison failure at line 2” shows up.
And this happens to my other gates too.
Reply | Threaded
Open this post in threaded view
|

Re: Comparison Failure

WBahn
Administrator
What test script are you running? The Not.tst? Are you modifying it to use the file name that you have chosen to use instead of the file name you are supposed to?

What is the part OurChip? Is that another part that you've defined to behave like a Nand gate?

Why not use the names that you are supposed to?

Reply | Threaded
Open this post in threaded view
|

Re: Comparison Failure

Lozminda
In reply to this post by ._.
Hi

Further to WBahn's comments: the course at the beginning is very simple in it's demands (trust me it gets much more complicated quite quickly). It "wants" you to just implement the chips how it does, in the order that they recommend (is it Nand, Not, And, then Or ?).
It seemed to me that the course was "asking" more, I thought I had to edit the test files and all kinds of nonsense. Just be boring for now, do as it says with no variation, trust me it'll get more complex and you can be more creative in a few chapters.

(Folks have been able to do some interesting stuff at this early stage, if I can find the link/posts, I'll put it here)
Interesting stuff maybe..

(As a guess the course is keeping it simple for the first few steps, so that you can get used to the API (CPU, Hardware and other Simulators/Emulators which are all fairly similar)

Lozminda