【正文】
16。, q = rddata)。 u3 : adram port map (data = rds, wraddress = wraddr, rdaddress = rdaddr, wren = 39。begin u1 : control port map (addata = addata, status = status, clk = clk, cs = cs, ce = ce, a0 = a0, rc = rc, k12_8 = k12_8, clkinc = clkinc, rddata = rds)。 signal clkinc : std_logic。 END ponent。139。 寫入地址 rdaddress: IN STD_LOGIC_VECTOR (9 DOWNTO 0)。 ponent adram IS PORT ( data : IN STD_LOGIC_VECTOR (11 DOWNTO 0)。 wraddr : out std_logic_vector (9 downto 0) )。 end ponent。 cs, ce, a0, rc, k12_8, clkinc : out std_logic。architecture one of daco is ponent control is port ( addata : in std_logic_vector (11 downto 0)。 rddata : out std_logic_vector (11 downto 0) )。 rdaddr : in std_logic_vector (9 downto 0)。entity daco is port ( clk, tclr, status : in std_logic。 試用例化語句,對整個FPGA采集控制模塊進行VHDL描述library ieee。 寫使能 q : OUT STD_LOGIC_VECTOR (11 DOWNTO 0) 讀出數(shù)據(jù) )。 讀地址 wren : IN STD_LOGIC := 39。 寫入數(shù)據(jù) wraddress: IN STD_LOGIC_VECTOR (9 DOWNTO 0)。 (或者為NOT LOCK,延后半個時鐘)end behav。 rddata = reg12。 end if。 and lock39。 LOCKP : process (lock) begin if lock = 39。 end case。 nst = s0。 lock = 39。 when s4 = rc = 39。139。139。039。139。 end if。139。 nst = s2。 lock = 39。 when s1 = rc = 39。039。139。 end process。 then cst = nst。event and clk = 39。039。139。139。039。 signal reg12 : std_logic_vector (11 downto 0)。 signal cst, nst : con_st。end control。 cs, ce, a0, rc, k12_8, clkinc : out std_logic。entity control is port ( addata : in std_logic_vector (11 downto 0)。use 。end one。 end process。 end if。)。 then tmp = (others = 39。 then if tclr = 39。event and clkinc = 39。architecture one of addr_t is signal tmp : std_logic_vector (9 downto 0)。 wraddr : out std_logic_vector (9 downto 0) )。use 。試分別回答問題下面列出了AD574的控制方式和控制時序圖AD574邏輯控制真值表(X表示任意)CECSRCK12_8A0工 作 狀 態(tài)0XXXX禁止X1XXX禁止100X0啟動12位轉換100X1啟動8位轉換1011X12位并行輸出有效10100高8位并行輸出有效10101低4位加上尾隨4個0有效AD574工作時序:1. 要求AD574工作在12位轉換模式,K12_A0在control中如何設置K12_8為‘1’,A0為‘0’2. 試畫出control的狀態(tài)機的狀態(tài)圖類似書上圖843. 對地址計數(shù)器模塊進行VHDL描述輸入端口:clkinc 計數(shù)脈沖 tclr 計數(shù)器清零輸出端口:rdaddr RAM讀出地址,位寬10位library ieee??刂破鳎╟ontrol)是一個狀態(tài)機,完成AD574的控制,和adram的寫入操作。END BEHAV。 END IF。Z39。Z39。 THEN B = Y。ARCHITECTURE BEHAV OF TRI_STATE ISBEGIN PROCESS (E, A, Y) BEGIN IF E = 39。 B : OUT STD_LOGIC)。ENTITY TRI_STATE IS PORT ( E, A : IN STD_LOGIC。2. 看下面原理圖,寫出相應VHDL描述LIBRARY IEEE。 END PROCESS。 END IF。 END IF。139。 THEN Q1 := DATA。EVENT THEN IF