Constructs an 8-bit long value from two 4-bit long input values. The following listing shows the VDHL description of the MOV8 operation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
entity MOV8 is Port ( InputA : in BIT_VECTOR(7 downto 0); -- 1st 8-bit input value InputB : in BIT_VECTOR(7 downto 0); -- 2nd 8-bit input value Output : out BIT_VECTOR(7 downto 0) -- 8-bit output value ); end MOV8; architecture Behavioral of MOV8 is component SHL8Bit is Port ( Input : in BIT_VECTOR(7 downto 0); -- 8-bit input value Output : out BIT_VECTOR(7 downto 0); -- 8-bit output value Cout : out BIT -- Carry-out flag ); end component SHL8Bit; signal OutputSHL1 : BIT_VECTOR(7 downto 0); signal OutputSHL2 : BIT_VECTOR(7 downto 0); signal OutputSHL3 : BIT_VECTOR(7 downto 0); signal OutputSHL4 : BIT_VECTOR(7 downto 0); begin -- Shift InputA 4 bits to the left SHL_Impl1: SHL8Bit port map(InputA, OutputSHL1); SHL_Impl2: SHL8Bit port map(OutputSHL1, OutputSHL2); SHL_Impl3: SHL8Bit port map(OutputSHL2, OutputSHL3); SHL_Impl4: SHL8Bit port map(OutputSHL3, OutputSHL4); Output <= OutputSHL4 or InputB; end Behavioral; |