
VHDL—Examples of Modeling of Adder, Counter, FF, FSM, Multiplexer, and Demultiplexer 18.3
Sum_N <= YSum_N (n − 1 downto 0); -- only n elements, n − 1 downto 0 are
; -- the result of addition, sum_N
CY_Out <= YSum_N (n); -- n
th
element is the carry result after the sum
end RTLBehaviourNbit_Adder;
Use of Concatenation operator, & and addition operator + can be understood as follows:
Concatenation operator, &
Assume Signal A elements from n − 1 downto 0 are ‘0’, ‘1’, ‘0’, ‘0’, ‘0’, ‘1’, ‘0’,
‘0’ for the binary number = 01000100 (decimal number 68). n = 8. Assume that
concatenation operator, & is used for Signal YA as follows:
Signal YA: in ...