附 录
32
附录
附录2 动态扫描模块程序
library ieee;
use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; entity seltime is
port(disclk,conv:in std_logic;
m0,m1,f0,f1,s0,s1,r0,r1,y0,y1,n0,n1,n2,n3:in std_logic_vector(3 downto 0); dataout:out std_logic_vector(3 downto 0); wsel:out std_logic_vector(3 downto 0)); end seltime;
architecture st of seltime is
signal count:std_logic_vector(3 downto 0); begin
wsel<=count;
process(disclk,conv) begin
if disclk'event and disclk='1' then if count>=\ count<=\ else
count<=count+1; end if; end if; if conv='1' then case count is
when\ when\ when\ when\ when\ when\ when others =>dataout<=\ end case; else
case count is
when\ when\ when\ when\ when\ when\ when\ when\
when others =>dataout<=\ end case; end if; end process; end st;
33
附 录
34