【正文】
map (a(3),b,s(2),c(2),s(3), c(3),p(3))。 U5: ponent lower_row port map(s(3),c(3), p(7 downto 4))。process(p)variable temp:std_logic_vector(7 downto 0)。begin if p 1100_0111 then hun =0010。 temp:=p1100_1000。 elsif p0110_0011 then hun =0001。 temp:=p0110_0100。 else hun =0000。 temp:=p。 end if。 if temp0101_1001 then ten =1001。 temp:=temp0101_1010。 elsif temp0100_1111 then ten =1000。 temp:=temp1010_0000。 elsif temp0100_0101 then ten =0111。 temp:=temp0100_0110。 elsif temp0011_1011 then ten =0110。 temp:=temp0011_1100。 elsif temp0011_0001 then ten =0101。 temp:=temp0011_0010。 elsif temp0010_0111 then ten =0100。 temp:=temp0010_1000。 elsif temp0001_1101 then ten =0011。 temp:=temp0001_1110。 elsif temp0001_0011 then ten =0010。 temp:=temp0001_0100。 elsif temp0000_1001 then ten =0001。 temp:=temp0000_1010。 else ten =0000。 temp:=temp。 end if。 one =temp(3 downto 0)。end process。 end structural。四、 小結與體會通過本次實驗,我對包集和元件例化語句的使用有了更深刻的了解。