Project 5 - External tests

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Project 5 - External tests

WBahn
Administrator
The test files for the CPU and the three computer programs (Add, Max, and Rect) have two versions, one of which is appended with "-external". Several people have wondered about these test files, as they are not explicitly mentioned in the text (1st Edition, anyway).

The text recommends that students use the built-in components for the Chapter 5 projects. Namely, the RAM16K, the ARegister, the DRegister, and the PC. The reason, as mentioned in the text, is that these built-in parts include GUI elements that are useful for debugging. But using the internal parts also makes some additional variables visible to the test scripts, such as the contents of the A and D registers, that are not accessible if the normal Register part is used to implement them within the CPU.

So, the normal version of the test scripts assume that the HDL code uses the internal parts. But if you want to run your program using your parts, you can do that. However, the test files have to be modified so that they don't attempt to access variables that are no longer available. That is what the "-external" versions of the test scripts do.

To be clear, there is no requirement that you use the external tests. They are merely provided to give you the option of seeing how your computer runs with more of your components.