Discussion:
Using Constants in our Testing Suite
(too old to reply)
[Instr] Albert Chae
2008-07-29 14:50:38 UTC
Permalink
Constants are legal even in your ALU circuit itself, so they are
certainly legal for the testing suite. Your idea is fine, although
I think it might get annoying setting up all the constants you want.

Albert
Is it alright to use constants when testing? What I mean is to have certain
important values (edge cases, etc.) simply stored in our testing suite, then
storing corresponding answers, then simply churning through them using a clock
(and most likely using the same equals circuit we already wrote for the ALU to
verify the results). I imagine it's not illegal, but I was wondering if anyone
came up with a better alternative.
Jeremy Cowles
2008-07-30 21:36:38 UTC
Permalink
I did something similar, but used ROMs for test values instead of constants.
I created a sub-circuit with banks of 3 ROMS per opcode for A, B, and
Expected output values. I also created a second ALU build only from the
"forbidden" libs and used that as a reference implementation. So each
operation was tested two ways, by comparing each result to the reference ALU
and to the expected values that were hard coded into the ROMs.
Is it alright to use constants when testing? What I mean is to have
certain
important values (edge cases, etc.) simply stored in our testing suite,
then
storing corresponding answers, then simply churning through them using a
clock
(and most likely using the same equals circuit we already wrote for the
ALU to
verify the results). I imagine it's not illegal, but I was wondering if
anyone
came up with a better alternative.
Loading...