DerTrueForce wrote:
Does marking inputs as active-low work? I seem to recall that it doesn't. However, it would make sense to be able to, because then you wouldn't be mixing signal-thinking with logic-thinking.
Declaring an input as low-true will work. For example, the connection to the reset line in a 6502 machine could be
PIN 1 = !RWB. However, other logic in the design would have to account for the inverted meaning of pin 1. My practice is to not invert inputs, as oftentimes, logic will take care of it. So I would write
RESET = !RWB to make RESET go true when RWB goes (low-) true.
In the CUPL reference guide, the following is said about pin polarity declarations:
The concept of polarity can often be a confusing one. In any PLD design, the designer is primarily concerned with whether a signal is true or false. The designer should not have to care whether this means that the signal is high or low. For a variety of reasons, a board design may require a signal to be considered true when it is logic level 0 (low) and false when it is logic 1 (high). This signal is considered active-low since it is activated when it is low. This might also be called low-true. If a signal is changed from active-high to active low then the polarity has been changed.
For this reason, CUPL allows you to declare signal polarity in the pin definition and then you do not have to be concerned with it again. When writing equations in CUPL syntax, the designer should not be concerned with the polarity of the signal. The pin declarations declare a translation that will handle the signal polarity.
Emphasis added.
In general, pins that are low-true should be declared low true and all logic statements should be written solely with positive logic. There is nothing to be gained by going against the grain, so to speak, and creating a less efficient design.
Attachment:
File comment: CUPL Reference Manual
cupl_reference.pdf [814.53 KiB]
Downloaded 44 times