【正文】
n 10=temp=01111111。127 when 11=temp=01111101。125 when 12=temp=01111000。 when 13=temp=01110001。 when 14=temp=01100110。 when 15=temp=01011001。 when 16=temp=01001010。 when 17=temp=00111001。 when 18=temp=00100111。 when 19=temp=00010011。 when 20=temp=00000000。 when 21=temp=11101101。237 when 22=temp=11011001。217 when 23=temp=11000111。199 when 24=temp=10110110。182 when 25=temp=10100111。167 when 26=temp=10011010。154 when 27=temp=10001111。143 when 28=temp=10001000。136 when 29=temp=10000011。131 when 30=temp=10000001。129 when 31=temp=10000011。 when 32=temp=10001000。 when 33=temp=10001111。 when 34=temp=10011010。 when 35=temp=10100111。 when 36=temp=10110110。 when 37=temp=11000111。 when 38=temp=11011001。 when 39=temp=11101101。 when 40=temp=00000000。 when others= p=0。temp=00000000。 end case。 end if。 end process。 end behav。 Fow Smmay: Conta 模塊: library ieee。 use 。 use 。 use 。 庫和程序包的調(diào)用 entity conta is 集線器,將輸入輸出集中到一個模塊上 ,同時給 adc0809 啟動信號 port(a_in : in std_logic_vector(7 downto 0)。 定義一個輸入端口 a 共 8 位 b_out : out std_logic_vector(7 downto 0)。 定義一個輸出端口 b 共 8 位 c_in:in std_logic。 定義一個輸入端口 c d_out:out std_logic。 定義一個輸出端口 d clk_in:in std_logic。 定義一個輸入時鐘端口 clk clk_out:out std_logic。 定義一個輸出時鐘端口 clk start_out:out std_logic)。 定義一個輸出的 start 端口 4MHz end conta。 實體 conta 描述結(jié)束 architecture behav of conta is 結(jié)構(gòu)體名為 conta signal q:std_logic_vector(4 downto 0):=00000。 定義一個標準邏輯矢量信號 q,共有 5 位, 并賦初值 00000 begin b_out=a_in。 clk_out=clk_in。 d_out=c_in。 process(clk_in) begin if (clk_in39。event and clk_in=39。139。) then if q11111 then q=q+1。 if q=00010 then start_out=39。139。 else start_out=39。039。 end if。 else q=00000。 end if。 end if。 end process。 end behav。 Flow Smmary: CONVERTER 模塊: library ieee。 use 。 use 。 use 。 庫和程序包的調(diào)用 enti