全自动洗衣机的设计 Verilog程序(精品资料).doc
《全自动洗衣机的设计 Verilog程序(精品资料).doc》由会员分享,可在线阅读,更多相关《全自动洗衣机的设计 Verilog程序(精品资料).doc(7页珍藏版)》请在三一办公上搜索。
1、数字逻辑课程设计报告姓 名: 学 号: 选课号: 103 班 号: A201 设计题目全自动洗衣机的设计设计要求设计全自动洗衣机控制器,为不同的洗衣阶段设置不同的时间。(洗衣阶段和时间自己定义)设计过程 设计方案:全自动洗衣机有9个工作状态:空闲(idle),第一次加水(water1),洗涤(wash),第一次排水(drain1),第二次加水(water2),漂洗(rinse),第二次排水(drein2),甩干(dry),响起音乐(music)。状态转移条件有以下2个:开始(start),复位(reset)。状态转移图: 注:方框内上方为状态机的状态,下方为状态机的输出。当按下reset键时,
2、洗衣机复位到初始状态,m=0,w=0,d=0,mu=0。当按下start按钮时,则进入water1状态,w=1,加水,历时5s。然后转移到下一个状态-洗涤,停止加水w=0,电机运转m=1,历时10s。再转移到下一个状态排水,电机停止运转m=0,开始排水d=1,历时5s直到甩干结束后,整个洗衣过程完成。然后洗衣机放出音乐,历时7s,提示用户洗衣完成。洗衣机回到初始状态。整个过程经历45s。源程序:module wash_machine(count,clk,reset,start,w,m,d,mu,state);input clk,reset,start;output w,m,d,mu,state
3、;output 3:0count;reg3:0 count;parameter idle=0,water1=1,wash=2,drain1=3,water2=4,rinse=5,drain2=6,dry=7,music=8;reg w,m,d,mu;reg 3:0 state;always (posedge clk) begin if(reset) begin w=0;m=0;d=0;mu=0; state=idle; end case(state) idle: if(start) begin w=1;m=0;d=0;mu=0; state=water1; end water1: if(cou
4、nt=4) /the time of water is 5s begin count=1d0; w=0;m=1;d=0;mu=0; state=wash; end else begin count=count+1; endwash: if(count=9) /the time of wash is 10s begin count=1d0; w=0;m=0;d=1;mu=0; state=drain1; end else begin count=count+1; end drain1: if(count=4) /the time of drain is 5s begin count=1d0; w
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 全自动洗衣机的设计 Verilog程序精品资料 全自动 洗衣机 设计 Verilog 程序 精品 资料

链接地址:https://www.31ppt.com/p-4144482.html