comparison failures

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

comparison failures

drnealaggarwal
If the .cmp file spacings in the results expected are not EXACTLY what the chip outputs I get a comparison error. Putting in extra spacing (three spaces around each result) solved this issue. Thought to post this as someone else out there might be getting just as frustrated as I was trying to get the test script on the Xor chip to run through to 'Comparison ended successfully' without stopping at each script command terminator (;) with a 'comparison failure message.'
Reply | Threaded
Open this post in threaded view
|

Re: comparison failures

cadet1620
Administrator
Please tell us exactly which file is wrong.  There are Xor.tst and .cmp files in the project\00 and project\01 directories and they all appear to be correct as of 9 Oct 2012.

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

Re: comparison failures

drnealaggarwal
Mark

I think I've managed to hunt this down. The confusion for me lay in the code given in Figure 1.6 in the book where the test script output-list command is

output-list a, b, out;

while the file in projects/01/Xor.tst has that output line as

output-list a%B3.1.3 b%B3.1.3 out%B3.1.3;

I think the formatting specification caused the problems I experienced. I created my own Xor.hdl and Xor.tst but must have copied the .out file from projects/01. The simulator would halt at every 'output;' line with a reported error '... comparison failure.'

Perhaps resolution notes for this belong (if not already there) in the errata for the book or maybe a note to say the examples in the book are not meant to be keyed in and serve for discussion only?

Hope this makes sense and helps.

Neal