acasimpsonz wrote
Maybe I took the book's advice too literally when I created a chip that simply zeroed and then negated a 16-bit input based on "z" and "n" in order to help with the ALU. However, I am coming up with an error message "unexpected end of file" when I try to load it.
Can anyone tell me if there is a problem with the syntax or if I am even allowed to create a new chip like this without other structural changes?
I did the same thing when I implemented the ALU, creating a chip to handle the zero/negate. Read carefully, by the way -- should you be doing a numerical negation or a logical negation -- the language tripped me up the first time through.
As for the unexpected end of file, whenever a compiler tells me this I look for mismatched (), {}, etc.
Mux16 is a really cool part by the way. I figured out how to use them to get the zero/negate down to just a couple of lines of HDL so I moved it back into my ALU and did away with the sub-chip.
Read the section about buses in Appendix A. Very useful, especially how true and false work with them.
--Mark