【正文】
分析: ( 1) 經(jīng)測試,完全符合要求。采用 Altera 新一代的 MAXⅡ器件 EPM570T100C5。 end behave。 end case。 when OTHERS = y=yyi0。 when 10 = y=yyi1。 when 01 = y=yjia0。 architecture behave of dongtaixianshi2 is begin process(a) begin case a is when 00 = y=yjia1。 pianxuan: out std_logic_vector(3 downto 0) )。 yjia1,yjia0,yyi1,yyi0: in STD_LOGIC_VECTOR(6 downto 0)。 use 。 library ieee。 end process。 end if。) then if(y=11) then y=00。event and clk=39。 end dongtaixianshi1。 entity dongtaixianshi1 is port ( clk: IN STD_LOGIC。 use 。 end behave。 end if。 else y=y+1。139。 動態(tài)顯示模塊: dongtaixianshi1 的 VHDL 語言: begin process(clk) begin if(clk39。 end yanshi。 entity yanshi is port ( clk: in std_logic。 use 。 END dchufaqi_architecture。 end if。) then q=d。event and clk=39。因此需要降低頻 率后在接到加減計數(shù)模塊的 clk 端。 END dchufaqi。 clk : IN STD_LOGIC。 use 。 aq1q2qxuanzeinst5LIBRARY ieee。 end process。 else q=q1。139。 END xuanze。 q2: in std_logic。 ENTITY xuanze IS PORT ( a : IN STD_LOGIC。 USE 。 END jishu2_architecture。 end if。 else q=q+1。139。 ARCHITECTURE jishu2_architecture OF jishu2 IS BEGIN process(clk) begin if(clk39。 q : buffer STD_LOGIC_VECTOR(1 downto 0) )。 use 。 控制模塊 與譯碼模塊和加減計數(shù)模塊的 連接: 部分控制模塊中 VHDL 語言及圖形: jishu2 LIBRARY ieee。 END yima_architecture。 end case。 when 1000 = y=0100000000。 when 0110 = y=0001000000。 when 0100 = y=0000010000。 when 0010 = y=0000000100。 ARCHITECTURE yima_architecture OF yima IS BEGIN process(a) begin case a is when 0000 = y=0000000001。 y : OUT STD_LOGIC_VECTOR(9 downto 0) )。 use 。 LIBRARY ieee。 設置撿球信號 reset1,通過加減計數(shù)模塊的異步置數(shù)端實現(xiàn)撿球,當甲方擁有發(fā)球權時,撿球信號將球放到 Y1;乙方擁有發(fā)球權時,撿球信號將球放到 Y8。 a[3..0] y[9..0]yimainst3現(xiàn)代電子與系統(tǒng)設計總結報告 9 VHDL 語言: 控制模塊 設置甲乙兩方擊球脈沖信號 in in2,甲方擊球信號使得加減計數(shù)器加法計數(shù),乙方擊球信號使得加減計數(shù)器減法計數(shù),譯碼模塊輸出端 Y1Y8 接 LED 模擬乒乓球的軌跡, Y0、Y9 為球掉出桌外信號,控制模塊實現(xiàn)移位方向的控制。 end process。 end if。 else q=q。 現(xiàn)代電子與系統(tǒng)設計總結報告 8 譯碼模塊 通過加減計數(shù)得到譯碼器輸出。 else q=q+1。 end if。) then if(q=0000) then q=1001。) then if(ud=39。event and clk=39。) then q=q。 else if(s=39。 q(1)=d1。) then q(3)=d3。 ARCHITECTURE jishu_architecture OF jishu IS BEGIN process(ud,s,reset,clk) begin if(reset=39。 q : buffer STD_LOGIC_VECTOR(3 downto 0) )。 d3,d2,d1,d0 : IN std_logic。 s : IN STD_LOGIC。 use 。 udsresetd3d2d1d0clkq[3..0]jishuinst2現(xiàn)代電子與系統(tǒng)設計總結報告 7 VHDL 語言 : LIBRARY ieee。 a[3..0] y1[6..0]y0[6..0]xianshiinst1現(xiàn)代電子與系統(tǒng)設計總結報告 6 甲乙方得分顯示模塊圖形輸入為: 加減計數(shù)模塊 通過 DU/ 的取值 實現(xiàn)加或者減的計數(shù) 。 end process。y0=0110000。y0=1111110。y0=1111011。y0=1111111。y0=1110000。y0=1011111。y0=1011011。y0=0110011。y0=1111001。y0=1101101。y0=0110000。y0=1111110。 END xianshi。 y1 : OUT STD_LOGIC_VECTOR(6 downto 0)。 use 。 resetclkq[3..0]jifeninst現(xiàn)代電子與系統(tǒng)設計總結報告