Quantcast
Channel: Altera Forums
Viewing all articles
Browse latest Browse all 19390

way to use NOT() or ! operator in ADHL to switch between VCC and GND?

$
0
0
I inherited a AHDL code in Quartus II, that I have been able to modify, but I'm not proficient. Is there anyway to negate a variable that is set to either VCC or GND? I've seen that ! works in VHDL, but it doesn't appear to work in AHDL. And neither does NOT(). I'm basically looking for a way to switch between two states on every run. Hopefully the example (and purely illustrative) code makes this clearer.

skip = VCC;
ccd_state = state1;

some kind of loop
{
IF (skip == VCC) THEN
ccd_state = state1;
skip = !skip;
ELSIF (some other condition) THEN
ccd_state = state2;
skip = !skip;
ELSE
Something else
}

Thanks,
Elliot

Viewing all articles
Browse latest Browse all 19390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>