Trying to write a test for CheckZero16 chip

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

Trying to write a test for CheckZero16 chip

tansaku
I've got a CheckZero16 chip of my own devising working (I think), and I thought I had correctly formatted a tst file to run tests on it:

https://gist.github.com/tansaku/8764610

Here's the Chip:

https://gist.github.com/tansaku/8764639

and here's the cmp file:

https://gist.github.com/tansaku/8764645

and here's the current output:

https://gist.github.com/tansaku/d77b8c83a17f378f97a3

However when I run in the hardware simulator I get "comparison failure at line 1".  Am I missing something obvious - or is there something such as a character limit on the outputs, e.g. have to be max three chars?

Is the tst file format documented anywhere?

Many thanks in advance
CHEERS> SAM

Sam Joseph, Ph.D.
Associate Professor
Department of Computer Science
Hawaii Pacific University
Reply | Threaded
Open this post in threaded view
|

Re: Trying to write a test for CheckZero16 chip

cadet1620
Administrator
The test file format is documented in Appendix B of the book.

The .cmp file and the .out file need to be an exact match, except for '*' in the .cmp file that matches any individual character. The best way to generate a .bmp file is to comment out the compare-to in the .tst file and run the test. After verifying that the .out file shows correct operation of the chip, rename the .out file to .cmp.

See this post for more info on output formatting.

You need wider margins on your zero and nonzero columns.

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

Re: Trying to write a test for CheckZero16 chip

tansaku
Thanks - You are right in particular about generating the out file and then using that as the basis for the cmp file - I couldn't get it to work without doing that.

Many thanks again
Sam Joseph, Ph.D.
Associate Professor
Department of Computer Science
Hawaii Pacific University