However, the problem I was having is that I needed to make a .tst and the .cmp files. I don't understand the .cmp, I am not sure what exactly it does. I also don't quite understand how the .tst file should be written with what syntax. Has anyone tired to make a custom chip? If you did make a custom chip did you have to write your own .tst file and .cmp file?
Some other questions I have is that, I was planning on building it up to 4bit multiplier, that said, would I need to implement it into the ALU and all of its .tst file and .cmp? Meaning would I need to update the truth table in .cmp file?
NOTE I CHANGED THE QUESTIONS A BIT TO MAKE IT MORE CLEAR WHAT I AM ASKING!
The .tst file is a script file that makes the simulator take certain actions. The script language is pretty rudimentary. Since it is not intended that students write their own test scripts, it isn't very well documented. But if you examine the existing test scripts, starting with the simple ones from early chapters, it's not too hard to figure out.
The test script produces an output file and then has it compared to the .cmp file.
The easiest way to generate the .cmp file is simply to run the test script on a known good design and then change the name of the output file to .cmp.
Of course, if you don't have a known good design, this isn't easy.
But you can also write the .cmp file manually (or you could write a program to do it) based on what inputs the test script is providing and what the outputs should be for those inputs.
I don't have time right now to go any deeper, but perhaps in a day or two after I get some other things done.
Thank you for the reply. I did see that in the .cmp files everything seems to be in a truth table format.
I also had the same idea of simply copying output of the file and then pasting it into the .cmp. However, this assumes as you pointed out that my design is accurate. As the HDL program will not know the difference. However, this brings back to the question, how do you make a .tst script based on HDL file? I was in the hope that there was a tool in hdl that runs through the file and generates the .tst for it. That way even if it runs without errors, I can see the output and know if the truth table seems accurate. I can do this by hand but it would save time by simply having the program doing for me. I know in general what the output should look like but I maybe doing something wrong in the HDL. Like connecting pins improperly.
I was hoping someone would take a look at my previous question HDL codes and tell me if I am doing something wrong?