EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will...

21
1 EE434 ASIC & Digital Systems Active-HDL Dae Hyun Kim [email protected]

Transcript of EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will...

Page 1: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

1

EE434 ASIC & Digital Systems

Active-HDL

Dae Hyun Kim [email protected]

Page 2: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

2

Download

• http://www.aldec.com – PRODUCTS → Active-HDL → Free Evaluation

• (requires registration)

Page 3: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

3

How to Run Active-HDL

• Run your Active-HDL and you will see the following screen.

Page 4: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

4

How to Run Active-HDL

• If you want to open an existing workspace, select it and click OK.

• If you want to create a new workspace, select “Create new workspace” and click OK.

Page 5: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

5

Create a New Workspace

• Type the workspace name.

• Turn on “Add New Design to Workspace.

• Click OK.

Page 6: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

6

Create a New Workspace

• In the “New Design Wizard” window, select “Create an Empty Design” and click Next.

• If you see a “Property Page” window, just click Next.

• In the “New Design Wizard” window, type a design name and click Next (see the next slide).

Page 7: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

7

Create a New Workspace

Page 8: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

8

Design Browser

• You will see a design browser window in the left.

Page 9: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

9

Add a New File to the Design

• Click File → New → VHDL Source. • Or double-click “Add New File” in the design browser to add a

new file to the existing design. • I am creating and adding “myInv.vhd” to my design.

Page 10: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

10

Add a New File to the Design

• I successfully created and added “myInv.vhd” to myLogic. • The ? Symbol in front of the file name means that it’s not been

compiled.

Page 11: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

11

Edit and Compile

• Add the following code to myinv.vhd.

• Save and compile. – To compile the design, click Design → Compile or click the

compile icon.

Page 12: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

12

System Messages

• In the bottom of the Active-HDL window, you will see an error message as follows:

• This means that something is wrong in the 12th line, 5th character.

• Double-click the error message to directly go to the problematic line.

Page 13: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

13

Debugging

• Fix the error as follows:

• Compile the design again.

• There is no error.

Page 14: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

14

Testbench

• Double-click “Add New File” to add one more file.

Page 15: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

15

Testbench

• Now, I am going to test the inverter I made. To test it, I need an entity. Type the following into myLogic_tb.vhd and compile it.

Page 16: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

16

Simulation

• First, you should choose the topmost-level module you want to run in the design browser.

• Select myTest in the design browser as follows.

• Initialize your simulation. – Click Simulation → Initialize Simulation.

Page 17: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

17

Simulation

• Now, you will see entities instead of files in the design browser as follows:

• A simple way to check the functionality of the inverter is to look at the waveform of the output.

• Open a waveform window. – Click the “New waveform” icon.

Page 18: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

18

Simulation

• Add the signals you want to see. – I want to check both the input and output. – Click “myTest” in the design browser and drag&drop the two

signals (g_in and g_out) into the waveform window.

Page 19: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

19

Simulation

• Simulate until 5ns. – Click the “Run Until” icon and type 5ns and click OK.

• The following shows my waveform window.

• Analysis – Initially, the input and output are unknown (U). Click

somewhere between 0 and 1ns and check their values.

– It is correct because we didn’t initialize the input.

Page 20: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

20

Simulation

• At 1ns, we set g_in to 0, so we get 1 at the output.

• At 2ns, we set g_in to 1, so we get 0 at the output.

Page 21: EE434 ASIC & Digital Systems - WSU · How to Run Active-HDL • Run your Active-HDL and you will see the following screen. 4 How to Run Active-HDL • If you want to open an existing

21

Simulation

• Finish your simulation. – Click the “End simulation” icon.