Example:
architecture aa of ee is signal x, y, sum, cin, cout : bit; begin adder: process (x, y, cin) variable p, g; begin p := x xor y; g := x and y; sum <= cin xor p after tsum; cout <= cin and p or g after tcarry; end process;
Example: the N-input AND gate
lb0: process (x) variable result : bit ; begin result := '1'; for i in x'range loop if x(i) = '0' then result := '0'; exit; end if; end loop; end process;
By eliminating all AND gates with an input that is always '0', all AND inputs that are always '1', and all OR inputs that are always '0', we end up with the following circuit:
After collapsing inputs and balancing them, we can produce an N-input AND gate.
Suppose the loop boundaries are dynamic: Example: FOR i in vleft to vright LOOP
If the condition expression does not include sig'EVENT, it represents an enabling action for a register.
Rev. 9/6/95 B. Huey