Professional Documents
Culture Documents
VLSI LABSHEET-1
Study of Basic Simulation Flow
The following diagram shows the basic steps for simulating a design in Questa
Basic Simulation Flow - Overview Lab
1
SCIENCE AND TECHNOLOGY
AVIONICS
Enter the following codes in two separate files and save with <filename>.vhd in a directory.
//For example here I have given the VHDL code for simple NAND Gate and its Test Bench
for your familiarization.
Library ieee;
use ieee.std_logic_1164.all;
entity logic_nand is
port
(a,b : in std_logic;
C : out std_logic);
end logic_nand;
architecture beh of logic_nand is
begin
c<=a nand b;
end beh;
Select File > Change Directory and change to the directory where your source files are save.
3. Create the working library.
a. Select File > New > Library.
This opens a dialog where you specify physical and logical names for the library. You can
create a new library or map to an existing library. Well be doing the former.
2
SCIENCE AND TECHNOLOGY
AVIONICS
b. Type work in the Library Name field (if it isnt already entered automatically).
c. Click OK.
Questa creates a directory called work (any other name typed in the Library name field) and
writes a specially-formatted file named_info into that directory. The _info file must remain in the
directory to distinguish it as a Questa library. Do not edit the folder contents from your operating
system; all changes should be made from within Questa.
3
SCIENCE AND TECHNOLOGY
AVIONICS
When you pressed OK in step 3c above, the following was printed to the Transcript window:
vlibwork
vmapworkwork
These two lines are the command-line equivalents of the menu selections you made. Many
command-line equivalents will echo their menu-driven functions in this fashion.
Compile the Design Units
With the working library created, you are ready to compile your source files.
You can compile by using the menus and dialogs of the graphic interface.
1. Compile <filename>.vhd
a. Select Compile > Compile. This opens the Compile Source Files dialog
If the Compile menu option is not available, you probably have a project open. If so,
close the project by making the Library window active and selecting File > Close from the menus.
b. Select <filename>.vhd module from the Compile Source Files dialog and click Compile. The
files are compiled into the work library.
c. When compile is finished, click Done.
Compile Source Files Dialog
4
SCIENCE AND TECHNOLOGY
AVIONICS
5
SCIENCE AND TECHNOLOGY
AVIONICS
6
SCIENCE AND TECHNOLOGY
AVIONICS
7
SCIENCE AND TECHNOLOGY
AVIONICS
8
SCIENCE AND TECHNOLOGY
AVIONICS
9
SCIENCE AND TECHNOLOGY