Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Verilog Section 3.10. Outline Set Up the Environment Your First Verilog File Set Up the Test Bench Running the Simulation.

Similar presentations


Presentation on theme: "Introduction to Verilog Section 3.10. Outline Set Up the Environment Your First Verilog File Set Up the Test Bench Running the Simulation."— Presentation transcript:

1 Introduction to Verilog Section 3.10

2 Outline Set Up the Environment Your First Verilog File Set Up the Test Bench Running the Simulation

3 Set Up the Environment Set up the es210 library Create verilogSandBox directory

4 Add a New Library Pre-requisite step: 1. Start Redhat &Cadence as shown in the lab manual.

5 Create a verilogSandBox directory Open a terminal. Go to ~r2d2/design/cmrf7sf.V.1.9.2.ML/es210 – cd design – cd cmrf7sf.V.1.9.2.ML – cd es210 Create a directory called verilogSandBox – mkdir verilogSandBox

6 Your First Verilog Program module fig3p37 (A,B,C,D,E); output D,E; input A,B,C; wire w1; and G1(w1,A,B); not G2(E,C); or G3(D,w1,E); endmodule

7 module....endmodule module fig3p37 (A,B,C,D,E); output D,E; input A,B,C; wire w1; and G1(w1,A,B); not G2(E,C); or G3(D,w1,E); endmodule Always start the verilog program with the keyword pair module…endmodule The keyword module must always be terminated by the keyword endmodule.

8 Keywords module fig3p37 (A,B,C,D,E); output D,E; input A,B,C; wire w1; and G1(w1,A,B); not G2(E,C); or G3(D,w1,E); endmodule fig3p37 is the name of the module.

9 Semicolon module fig3p37 (A,B,C,D,E); output D,E; input A,B,C; wire w1; and G1(w1,A,B); not G2(E,C); or G3(D,w1,E); endmodule Each Statement is terminated with semicolon.

10 wire module fig3p37 (A,B,C,D,E); output D,E; input A,B,C; wire w1; and G1(w1,A,B); not G2(E,C); or G3(D,w1,E); endmodule Internal connection is declared with the keyword wire.

11 Your First Verilog Program module fig3p37 (A,B,C,D,E); output D,E; input A,B,C; wire w1; and G1(w1,A,B); not G2(E,C); or G3(D,w1,E); endmodule And, not or are primitive gates. The output of a primitive gate is always listed first. The inputs can be listed in any order. G1 is an instance of the and gate.

12 Set Up the Testbench

13 Test Bench Definition of the module fig3p37 is the module name. I1 is the instance of the module.

14 Declare A, B, C as Outputs

15 Test Bench (`) is a back quote. The first number specifies the unit of measurement for delays. The second number specifies the precision for which delays are rounded off.

16 Initial begin…end The initial keyword is used with a set of statements That begin executing when the simulation is initialized. begin….end The statements are executed in sequence from top to bottom.

17 Delay/Number Specification # specifies the delay in the number of time units A is one bit with a value of 1.

18 Running Simulation Execute the Verilog Simulation Display the waveforms Use Schematic Tracer

19 Execute Verilog Simulation

20 View Waveform Via SimVision 1: Select on fig3p37_tb 2. Ctrl+ Select Signals 3. Select waveform editor

21 Run Simulation 1. Click on the play button

22 Change the Units to ms

23 Zoom Out

24 Display Schematic 1. Select the signals with Ctrl. 2. Activate Schematic Tracer.

25 Move the Cursor and Observe Change in Node Values

26 Assignment Replace G3 with an XOR gate. Submit – A print-out of the Verilog file – A print-out (screen capture) of the SimVision Window


Download ppt "Introduction to Verilog Section 3.10. Outline Set Up the Environment Your First Verilog File Set Up the Test Bench Running the Simulation."

Similar presentations


Ads by Google