《DL语言硬件设计》实验指导书 ☑1 odelSin SE PL0S6.0 File Edit View Format Compile Simulate Add Tools Window Help New 电危等通没道e「 Open Close 三出函 壁mp.y Jmport Statu:Type Orde Modified 1n# 上pat Veriog009/20/071 1 Veriog 1 09/20/071 include user mu Save 2 'timescale 1ns/ins Save As. 3 module muk tp: Repcrt. reg a,b,sel: Delete wire out; Change Directory. user mux mi (out,a, Use Source. 7 initial Source Drectory. 8 begin 9 a=1'h0:b=1'h0:3e Enyironment 10 #5ge1-1'b1: Add to Project New File. 11 #5a=1'b1:3e1=1'b Existing Fle. 12 #53e1=1'b1 Page Setup 0ptimization Confiquration. 13 #5a=1'b0:b=1'b1: Primt. 14 #5se1=1'b1: Prink Postscripl Simulation Configuration. 15 #5a=1'b1:b=1'b1: Folder. 16 #5ae1=1'b1: Recent Directories 17 end Recent Projects 18 initial $monitor ( Quit 19 endmodule 20 4 图Project Libraty hMUX4x1.v hkest_MUX4x1.v user Add file to Project ☒ -File Name E:/verilog sample/MUX4x1/mux_tp.v} Browse. Add file as type Folder default Top Level Reference from current location Copy to project directory OK Cancel 第6页共49页
《HDL 语言硬件设计》实验指导书 第 6 页 共 49 页
《DL语言硬件设计》实验指导书 M■odelSim SE PLUS6.0 File Edit View Format Compile Simulate Add Iools Window Help ☐它照雪基陷錙2二蜂县路 凿具道 Workspace 3+☒ mu以p,V Name Statu:Type Orde Modified 1n# 园MUX4x1.v /Verilog009/20071i 'incl mux_p.v Verilog 2 09/27071 'time test_MUX4x1. Verilog109/20/071 modul reg s 5 wire 6 user initi 8 begir 9 a=1'上 10 #5 se 11 # 2 #5 1 4 15 8 16 #5 se X相 user_mux.v Name Stetu Type Orde Modfied 1n# 是xpy Edit 6/070 1 6/07C module user mux (out,a,b,sel); user_muk.v 2 output out: Comple Comoie Selected ut a,b,sel: Add to Project Compile All (ac1,3el): Remove from Proiect Compie Dut-ofDate (al,a,sel) Close Project Compile Order. b,3e1): Comoie Rcoott (out,al,a2): Project Settings. Compie Summary. 5)、编译成功信息如图所示。 Transcript #7 Loading project counter #reading C:\Modeltech_6.0\win32/./modelsim.ini Loading project ee reading C:\Modeltech_6.0\win32/./modelsim.ini Loading project new_sim #Compile of mux_tp.v was successful. Compile of user_mux.v was successful. ModelSim> 6)、然后选择文件mux tp.v,点击仿真键进行仿真。 第7页共49页
《HDL 语言硬件设计》实验指导书 第 7 页 共 49 页 5)、编译成功信息如图所示。 6)、然后选择文件 mux_tp.v,点击仿真键进行仿真
《DL语言硬件设计》实验指导书 ModelSin SE PLUS 6.0 File Edit View Format Compile Simulate Add Tools Window He ☐它雪总电器2 Design Optimization. 得送 Start Simulation. Workspace Runtime Options. mux_tp.v Name Statu:Typ 园muxp.y Ver Run Break ·t v user_mux.v Ver End Simulation 2 0o1 rer 4 wi: u31 6 in 7)、在这一步,在wok名称下选择我们编译通过的设计实体。 Start Siaulation ☒ Design]VHDL Verilog Libraries SDF]Others Name Type Path 曰lwok Library E:/verilog sample/work mux tp Module E:/verilog sample/mux_tp.v L-通ser_muK Module E:/verilog sample/user_mux.v 田-1vta2000 Library $MODEL_TECH/./vital2000 田-ieee Library MODEL_TECH/./ieee 田-modelsim_.b Library $MODEL TECH/./modelsim lit 田std Library $MODEL_TECH/./std std_developerskit Library $MODEL_TECH/./std_develop m 4nA同44泰 thnDEl TECH//sunsus 4 Design Unitfs] Resolution work.mux_tp default Optimization 厂Enable optimization Optimization Options OK Cancel 8、点击un all按钮,进行仿真 第8页共49页
《HDL 语言硬件设计》实验指导书 第 8 页 共 49 页 7)、在这一步,在 work 名称下选择我们编译通过的设计实体。 8)、点击 run all 按钮,进行仿真
《DL语言硬件设计》实验指导书 ■odelSin SE PLUS6.0 File Edit View Format Compile Simulate Add Tools 置indow Help □2君昌盖输器2 Design Optimization. 穎道 个1手100ns分L Start Simulation. Workspace Runtime Options. cts 士函 Instance Design ur Value Run Bun 100 ns 白mKp mux tp Break Run All 由-m1 user_mux End Simulation Continue MPLICIT-WIRE(.mux_tp w Run -Next MPLICIT WIRE(.mux_tp Process S MPLICIT-WIRE(.mux_tp Step Process Step-Over mux tp Process NITIAL#17 mux_tp Process Restart. 9)、输出仿真结果 Piciec直utay段simFilesMem h]mux_tp.y西 Tar的cpt vsim work.mux_tp not have a'ltimescale drective in effect but prevous modules do VSIM 17>run-all -n h-0as-n out-n 棋林 -0 sel-0out=1 sel out-1 VSIM 18> Project new sin Nov:35 ns Delta:I sin:/ug5卫 10)、 显示输出波形,可以选择菜单wave->signals in design 菜单项目,如下图所示。 第9页共49页
《HDL 语言硬件设计》实验指导书 第 9 页 共 49 页 9)、输出仿真结果 10)、 显示输出波形,可以选择菜单 wave->signals in design 菜单项目,如下图所示
《DL语言硬件设计》实验指导书 ☑【ode15 im SE PLUS6.0 File Edit View Format Compile Simulate Add Tools Window Help ☐它太蹈继2哥 Wave Selected Signals 100 ns List Signals in Begion Workspace 一出函 Log Signals in Design 二出函然 Instance Design unit Desigr ivau Divider. 日test_MUX4x1 test MUX4x1 Module X Breakpoint 中-mym MUX4x1 Module #MPLICITWIRE[.test MUX4x1 Proces Bockmark. S Cursor #MPLICITWIRE(.test MUX4x1 Proce #IMPLICIT WIRE(.test_MUX4x1 Proces Window Pane #IMPLICIT-WIRE(.test_MUX4x1 Proces #IMPLICITWIRE(.test_MUX4x1 Proces Active Processes 二七函X #MPLICIT-WIRE(.test_MUX4x1 Proces <Readv>#MPLICIT-WIREI -○判NIT1aL#6 test_MUX4x1 Proces KReady>#IMPLICITWIRE[ <Ready>#IMPLICIT WIRE <Readv>#IMPLICIT-WIRE <Readu #IMPLICIT WIRE Locals 出函 Name 4 Project LibrarysimFiles 11)、出现如下窗口 用ave -default Pile Edit yive Insart Pormat Tools Yindow 含日色露吗路州川的幽扇1出9#脑然出益1低下回叫1@G 世-◇/Iest_MU41/ heMl4xi/et Now 0除 Cue】 0 0 ns to 854 ns Now:0 ns Delta:D 12)、点击un快捷按钮 输出仿真结果以及波形,如图 第10页共49页
《HDL 语言硬件设计》实验指导书 第 10 页 共 49 页 11)、出现如下窗口 12)、点击 run 快捷按钮 ,输出仿真结果以及波形,如图