HDL built-in variables

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

HDL built-in variables

vanjazeric
Hello,

I am working on NandToTetris projects these days, and I found something interesting, that I would like to know. In some projects, I needed to use '1' or '0' as input at some gates (or 16-bit '11..111' or '00..000') and I used to make it using some logic gates such as NOT and OR gates to get the behavior. I know we should use as least as possible gates, so I am wondering if there are variables, such as bool in C/C++ (true/false) to represent '1' or '0' in order to reduce the number of gates.

Best regards,
Vanja.
Reply | Threaded
Open this post in threaded view
|

Re: HDL built-in variables

WBahn
Administrator
Look at the documentation for the HDL language in Appendix A. Specifically, Section A.5.2.
Reply | Threaded
Open this post in threaded view
|

Re: HDL built-in variables

vanjazeric
Thank you. I found exactly what I wanted.