【正文】
inif fout039。 fout1: out std_logic)。end architecture one。fout=mid。 then if count=31 then count=0。139。end entity one。use 。end process。 else t20=39。event and clk=39。 then num=0。end if。139。beginprocess(clk,t20_en)begin if(t20_en=39。 t20_en :in std_logic。3) library ieee。end if。 then if(num=639) then t10=39。end process。elsif t10_en=39。 then if num=639 then num=0。139。 t10:out std_logic )。use 。end if。139。 else c_st=st4。t20_ena=39。p=00001010。t10_ena=39。139。 then c_st=st4。when st3= led=100。039。t10_ena=39。139。 end if。t20_ena=39。039。 if t20a=39。t10_ena=39。139。t20_ena=39。 p=00000000。139。signal c_st:states。 led: out std_logic_vector(2 downto 0)。 t20a :in std_logic。entity state isport(clk : in std_logic。 此模塊是為了實現(xiàn)洗衣機的正轉(zhuǎn)、暫停、反轉(zhuǎn)的功能,它由一個狀態(tài)控制模塊構(gòu)成,是典型的狀態(tài)機。when others= time=0。when 100 =time =5。architecture eight of order isbegin process(clk)begincase order iswhen 000 =time=1。entity order isport(clk :in std_logic。end。139。architecture nine of adder issignal add:std_logic_vector(2 downto 0)。use 。end 。 then finish=fini。end process 。else fini=39。039。139。elsif (t1a39。begin process(t1a,clk,start)variable num : std_logic_vector(7 downto 0):=11111111。 enter:in std_logic )。 start:in std_logic。減法計數(shù)器模塊countlibrary ieee。對FPGA芯片的編程采用模塊化的VHDL (硬件描述語言)進行設(shè)計,設(shè)計分為三層實現(xiàn),頂層實現(xiàn)整個芯片的功能。運行中間,剩余時間經(jīng)譯碼后在數(shù)碼管上進行顯示。實現(xiàn)定時的方法很多,比如采用單穩(wěn)電路實現(xiàn)定時,又如將定時初值預(yù)置到計數(shù)器中,使計數(shù)器運行在減計數(shù)狀態(tài),當(dāng)減到全零時,則定時時間到。設(shè)計工作量VHDL語言程序設(shè)計;波形仿真;在實驗裝置上進行硬件測試,并進行演示;提交一份完整的課程設(shè)計說明書,包括設(shè)計原理、程序設(shè)計、程序分析、仿真分析、硬件測試、調(diào)試過程,參考文獻、設(shè)計總結(jié)等。暫停10秒174。暫停10秒174。正轉(zhuǎn)20秒174。定時未到回到“正轉(zhuǎn)20秒174。(2)主要任務(wù):完成該系統(tǒng)的硬件和軟件的設(shè)計,并制作出實物裝置,調(diào)試好后并能實際運用(指導(dǎo)教師提供制作所需的器件),最后就課程設(shè)計本身提交一篇課程設(shè)計說明書。在此期間,若Z1=Z2=1,實現(xiàn)正轉(zhuǎn);若Z1=Z2=0,實現(xiàn)暫停;