【正文】
在此也要特別感謝老師們的悉心教導(dǎo)。通過(guò)這次課程設(shè)計(jì)我對(duì)FPGA的編程更加熟悉,對(duì)定時(shí)器和計(jì)數(shù)器的設(shè)計(jì),讓我更加明白時(shí)序組合門電路設(shè)計(jì)思路和方法。3 課程設(shè)計(jì)結(jié)論及心得家電控制電路設(shè)計(jì)在一片F(xiàn)PGA芯片內(nèi),具有體積小、可靠性高、設(shè)計(jì)周期短,功能靈活的特點(diǎn)。 總電路仿真波形 洗衣機(jī)接通電源,按IN1設(shè)置洗滌時(shí)間按start、enter置為高電平洗衣機(jī)開始工作,當(dāng)時(shí)鐘第一個(gè)上升沿到達(dá)時(shí)q1(正轉(zhuǎn)功能)為高電平維持20s以后變?yōu)榈碗娖蕉鴔2(暫停功能)隨著時(shí)鐘上升沿的到來(lái)變?yōu)楦唠娖骄S持10s變?yōu)榈碗娖?,然后q3(反轉(zhuǎn)功能)開始隨著時(shí)鐘上升沿的到來(lái)變?yōu)楦唠娖焦ぷ骶S持20s后變?yōu)榈碗娖?,再停止q3置高,接下來(lái)電路一直重復(fù)上述工作,直到定時(shí)器計(jì)數(shù)結(jié)束。end process。039。 then warn=clk。architecture six of warming isbeginprocess(clk)beginif finishc=39。 warn:out std_logic )。entity warming isport(clk: in std_logic。use 。 圖9 warming仿真波形由上仿真波形可以看出,輸入一個(gè)脈沖信號(hào)clk,當(dāng)洗衣機(jī)工作狀態(tài)結(jié)束時(shí),warming輸出端會(huì)有一個(gè)輸出脈沖,此時(shí)洗衣機(jī)會(huì)發(fā)出鳴叫聲。end architecture one。end if。end if。 mid=not mid。139。beginprocess(fout0)beginif fout039。architecture one of freq_div1min is signal count:integer range 0 to 60。 fout1: out std_logic)。use 。end architecture one。end if。fout=mid。else count=count+1。 then if count=31 then count=0。event and clk=39。139。 signal mid:std_logic。end entity one。 fout:out std_logic。use 。、輸出模塊 根據(jù)課程設(shè)計(jì)要求,必須將洗衣機(jī)的工作狀態(tài)及工作時(shí)間在數(shù)碼管和指示燈上顯示出來(lái),此模塊是用來(lái)控制洗衣機(jī)的工作狀態(tài)及工作的頻率,并把工作狀態(tài)及工作時(shí)間顯示出來(lái)。end process。end if。 else t20=39。 then if(num=1279) then t20=39。event and clk=39。end process。 then num=0。if t20_en=39。end if。 else num=num+1。139。) then if clk39。beginprocess(clk,t20_en)begin if(t20_en=39。end entity twenty。 t20_en :in std_logic。use 。3) library ieee。end process。end if。 else t10=39。 then if(num=639) then t10=39。event and clk=39。end process。 then num=0。elsif t10_en=39。end if。 then if num=639 then num=0。event and clk=39。139。architecture three of ten issignal num : integer range 640 downto 0:=0。 t10:out std_logic )。entity ten isport(c