电梯控制系统的设计与实现数字逻辑课程设计(编辑修改稿)内容摘要:
oorButton3 = ~outfloorButton3。 end always begin 25。 outfloorButton6 = ~outfloorButton6。 end always begin 华 中 科 技 大 学 课 程 设 计 报 告 22 35。 infloorButton8 = ~infloorButton8。 end initial begin // Initialize Inputs clk = 0。 powerButton = 1。 resetButton = 0。 openButton = 0。 closeButton = 0。 infloorButton1 = 0。 infloorButton3 = 0。 infloorButton6 = 0。 infloorButton8 = 0。 outfloorButton1 = 0。 outfloorButton3 = 0。 outfloorButton6 = 0。 outfloorButton8 = 0。 end endmodule 仿真结果: 电梯开关门模块仿真文件如下: 华 中 科 技 大 学 课 程 设 计 报 告 23 module test。 // Inputs reg clk。 reg powerButton。 reg resetButton。 reg openButton。 reg closeButton。 reg infloorButton1。 reg infloorButton3。 reg infloorButton6。 reg infloorButton8。 reg outfloorButton1。 reg outfloorButton3。 reg outfloorButton6。 reg outfloorButton8。 // Outputs wire [7:0] eightDecode。 wire flashLight。 wire doorLight。 wire upLight。 wire downLight。 wire floorLight1。 wire floorLight3。 wire floorLight6。 wire floorLight8。 wire sevenF。 wire sevenJ。 wire sevenM。 wire sevenK。 always begin 5。 华 中 科 技 大 学 课 程 设 计 报 告 24 clk = ~clk。 end always begin 8。 openButton = ~openButton。 end always 7 closeButton=~closeButton。 always 50 infloorButton8=~infloorButton8。 initial begin // Initialize Inputs clk = 0。 powerButton = 1。 resetButton = 0。 openButton = 0。 closeButton = 0。 infloorButton1 = 0。 infloorButton3 = 0。 infloorButton6 = 0。 infloorButton8 = 0。 outfloorButton1 = 0。 outfloorButton3 = 0。 outfloorButton6 = 0。 outfloorButton8 = 0。 // Wait 100 ns for global reset to finish // Add stimulus here end endmodule 仿真结果: 华 中 科 技 大 学 课 程 设 计 报 告 25 电梯升降模块仿真文件如下: module test。 // Inputs reg clk。 reg powerButton。 reg resetButton。 reg openButton。 reg closeButton。 reg infloorButton1。 reg infloorButton3。 reg infloorButton6。 reg infloorButton8。 reg outfloorButton1。 reg outfloorButton3。 reg outfloorButton6。 reg outfloorButton8。 // Outputs wire [7:0] eightDecode。 wire flashLight。 wire doorLight。 wire upLight。 wire downLight。 wire 华 中 科 技 大 学 课 程 设 计 报 告 26 floorLight1。 wire floorLight3。 wire floorLight6。 wire floorLight8。 wire sevenF。 wire sevenJ。 wire sevenM。 wire sevenK。 always begin 5。 clk = ~clk。 end always 10 infloorButton8=~infloorButton8。 always 100 infloorButton3=~infloorButton3。 initial begin // Initialize Inputs clk = 0。 powerButton = 1。 resetButton = 0。 openButton = 0。 closeButton = 0。 infloorButton1 = 0。 infloorButton3 = 0。 infloorButton6 = 0。 infloorButton8 = 0。 outfloorButton1 = 0。 outfloorButton3 = 0。 outfloorButton6 = 0。 outfloorButton8 = 0。 // Wait 100 ns for global reset to finish // Add stimulus here end endmodule 仿真结果: 华 中 科 技 大 学 课 程 设 计 报 告 27 电梯指示灯模块仿真文件如下: module test。 // Inputs reg clk。 reg powerButton。 reg resetButton。 reg openButton。 reg closeButton。 reg infloorButton1。 reg infloorButton3。 reg infloorButton6。 reg infloorButton8。 reg outfloorButton1。 reg outfloorButton3。 reg outfloorButton6。 reg outfloorButton8。 // Outputs wire [7:0] eightDecode。 wire flashLight。 wire doorLight。 wire upLight。 wire downLight。 wire floorLight1。 华 中 科 技 大 学 课 程 设 计 报 告 28 wire floorLight3。 wire floorLight6。 wire floorLight8。 wire sevenF。 wire sevenJ。 wire sevenM。 wire sevenK。 always begin 5。 clk = ~clk。 end always begin 20。 infloorButton3 = ~infloorButton3。 end always begin 40。 infloorButton6 = ~infloorButton6。 end always begin 80。 outfloorButton8 = ~outfloorButton8。 end initial begin // Initialize Inputs clk = 0。 powerButton = 1。 resetButton = 0。 openButton 华 中 科 技 大 学 课 程 设 计 报 告 29 = 0。 closeButton = 0。 infloorButton1 = 0。 infloorButton3 = 0。 infloorButton6 = 0。 infloorButton8 = 0。 outfloorButton1 = 0。 outfloorButton3 = 0。 outfloorButton6 = 0。 outfloorButton8 = 0。 // Wait 100 ns for global reset to finish // Add stimulus here end endmodule 仿真结果: 电梯数码管显示模块仿真文件如下: module test。 // Inputs reg clk。 reg powerButton。 reg resetButton。 reg 华 中 科 技 大 学 课 程 设 计 报 告 30 openButton。 reg closeButton。 reg infloorButton1。 reg infloorButton3。 reg infloorButton6。 reg infloorButton8。 reg outfloorButton1。 reg outfloorButton3。 reg outfloorButton6。 reg outfloorButton8。 // Outputs wire [7:0] eightDecode。 wire flashLight。 wire doorLight。 wire upLight。 wire downLight。 wire floorLight1。 wire floorLight3。 wire floorLight6。 wire floorLight8。 wire sevenF。 wire sevenJ。 wire sevenM。 wire sevenK。 always begin 5。 华 中 科 技 大 学 课 程 设 计 报 告 31 clk = ~clk。 end always 10 infloorButton6=~infloorButton6。 initial begin // Initialize Inputs clk = 0。 powerButton = 1。 resetButton = 0。 openButton = 0。 closeButton = 0。 infloorButton1 = 0。 infloorButton3 = 0。 infloorButton6 = 0。 infloorButton8 = 0。 outfloorButton1 = 0。 ou。电梯控制系统的设计与实现数字逻辑课程设计(编辑修改稿)
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。
用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。