【正文】
end pr。HIGH)。 end loop。j end if。 end if。LENGTH)。 v_cy(j):=v_tmpda1(4)or v_cy(j)。 34 v_nxtcy:=v_tmpda1(4)。139。 v_tmpda1:=conv_unsigned(0,5)。 v_cy(i):=v_tmpda(8)or v_cy(i)。LENGTH)。139。 v_pvl(7i*4 downto 0):=v_tmpda(7 downto i*4)。039。 v_cy:=cy_i。 v_tmpda(8):=39。 variable v_pvl:unsigned(3 downto 0)。 variable v_tmpda:unsigned(8 downto 0)。 architecture rtl of adjust is begin process(data_i,cy_i) variable v_cy:std_logic_vector(1 downto 0)。 cy_o:out std_logic)。 cy_i:in std_logic_vector(1 downto 0)。 use 。 33 adjust library ieee。 end process p_divide。 rmndr_o=std_logic_vector(v_dffrnc)。 end loop。amp。 v_c(16 downto 7):=39。 end if。then v_d:=v_dout+v_c(16 downto 8)。 multiply:for i in 0 to 7 loop if mulb(i)=39。amp。 v_dout:=39。 variable v_c:std_logic_vector(16 downto 0)。 architecture rtl of mul is begin process(mula,mulb) variable v_dout:std_logic_vector(8 downto 0)。 product_o:out std_logic_vector(15 downto 0))。 entity mul is port (mula:in std_logic_vector(7 downto 0)。 use 。 end rtl。 rslt_o=s_c。 32 s_c:=p xor c(7 downto 0)。 cy_o=(not c(8))amp。 c(3):=g(3)or(p(3)and g(2))or(p(3)and p(2)and p(3)and p(2)and p(1) and c(0))。 c(1):=g(1)or(p(1)and c(0))。subtractor g:=opa_i and(not opb_i)。 s_c :=p xor c(7 downto 0)。 cy_o=c(8)amp。 c(8):=g(8)or(p(8)and g(7))or(p(8)and p(7)and g(6))or(p(8)and p(7) and p(6)and g(5))or(p(8)and p(7)and p(6)and p(5)and g(4))or(p(8)and p(7) and p(6)and p(5)and p(4)and g(3))or(p(8)and p(7)and p(6)and p(5)and p(4) and p(3)and g(2))or(p(8)and p(7)and p(6)and p(5)and p(4)and p(3)and p(2) and g(1))or(p(8)and p(7)and p(6)and p(5)and p(4)and p(3)and p(2)and p(1) and c(0))。 c(6):=g(6)or(p(6)and g(5))or(p(6)and p(5)and g(4))or(p(6)and p(5) and p(4)and g(3))or(p(6)and p(5)and p(4)and p(3)and g(2))or(p(6)and p(5) and p(4)and p(3)and p(2)and g(1))or(p(6)and p(5)and p(4)and p(3)and p(2) and p(1)and c(0))。 c(4):=g(4)or(p(4)and g(3))or(p(4)and p(3)and g(2))or(p(4)and p(3) and p(2)and g(1))or(p(4)and p(3)and p(2)and p(1)and c(0))。 c(2):=g(2)or(p(2)and g(1))or(p(2)and p(1)and c(0))。 c(0):=cy_i。then adder p:=opa_i xor opb_i。 begin if addsub_i=39。 variable g :std_logic_vector(8 downto 1)。 architecture rtl of addsub is begin process(opa_i,opb_i,cy_i,addsub_i) variable s_c :std_logic_vector(7 downto 0)。 cy_o : out std_logic_vector(1 downto 0))。 ov_o : out std_logic。 cy_i : in std_logic。 entity addsub is port (opa_i : in std_logic_vector(7 downto 0)。 ALU 模塊代碼 addsub library ieee。 end block c。 end if。 end case。 end if。139。 end if。 end if。 end if。then if countl1=conv_unsigned(255,8)then countl1=counth1。 else if t1_v=39。 else countl1=countl1+conv_unsigned(1,1)。039。139。then countl1=unsigned(load_i)。 mode 3 when11= if ec=01and ec_e=39。then counth1=unsigned(load_i)。 if ec=11and ec_e=39。 end if。 end if。 else countl1=countl1+conv_unsigned(1,1)。139。 end if。then if countl1=conv_unsigned(255,8)then countl1=counth1。then if c1=39。 else if tr11=39。139。 end if。 else null。 end if。 else tf1_o=39。)then if qb(7 downto 0)=conv_unsigned(255,8)then tf1_o=39。and c1=39。)or(t1_v=39。then if m=conv_unsigned(1,2)or 28 m=conv_unsigned(0,2)or m=conv_unsigned(2,2)then if(c1=39。 mode 2 when10= if tr11=39。 end if。 end if。 end if。then if qb=conv_unsigned(65535,16)then counth1=conv_unsigned(0,8)。 else if t1_v=39。 end if。then if qb=conv_unsigned(65535,16)then counth1=conv_unsigned(0,8)。then if c1=39。 else if tr11=39。139。 end if。 end if。 end if。then if qb=conv_unsigned(65535,16)then countl1=conv_unsigned(0,8)。 else if t1_v=39。 else countl1=countl1+conv_unsigned(1,1)。039。139。then countl1=unsigned(load_i)。 if ec=01and ec_e=39。 end if。 end if。039。139。139。139。039。139。 end if。 end if。 end if。 else if countl1=conv_unsigned(255,8)then counth1=counth1+conv_unsigned(1,1)。139。 end if。 else if countl1=conv_unsigned(255,8)then counth1=counth1+conv_unsigned(1,1)。039。139。then counth1=unsigned(load_i)。 if ec=11and ec_e=39。 end if。 end if。 else countl1=countl1+conv_unsigned(1,1)。139。 end if。then if qb=conv_unsigned(8191,16)then countl1=conv_unsigned(0,8)。then if c1=39。 else if tr11=39。139。 end if。 else null。 end if。 else tf1_o=39。)then if qb=conv_unsigned(8191,16)then tf1_o=39。and c1=39。)or(t1_v=39。then if m=conv_unsigned(1,2)or m=conv_unsigned(0,2)or m=conv_unsigned(2,2)then