SlideShare a Scribd company logo
1 of 14
MODELSIM Training
in Mohali
E2MATRIX
CALL: +91 9056051501,9915525860
WEB: WWW.E2MATRIX.COM
EMAIL:MOHALI. SUPPORT@E2MATRIX.COM
E2MATRIX
Outline
Command Line Simulation
◦ Compile and Simulate
◦ Add Signals to Wave
◦ Applying Inputs
Interactive Simulation
2
Command Line Simulation
Make sure Modelsim exists in the path by doing the
following
◦Windows:
◦ Start run -> cmd
◦ In cmd window:
vsim -version
◦Linux:
◦ In any shell:
vsim -version
3
Command Line Simulation
Create VHDL file
◦ Edit the file my_demo1.vhd
◦ Insert the text and save
4
LIBRARY ieee;
USE ieee.std_logic_1164.all;
ENTITY andgate IS
port (a, b: in std_logic_vector(2 downto 0);
c: out std_logic_vector(2 downto 0) );
END ENTITY;
ARCHITECTURE behav OF andgate IS
BEGIN
c <= a and b;
END ARCHITECTURE;
Compile and Simulate
vlib work
vcom <VHDL files>
vsim <top level>
5
• vlib: creates a library to compile
and simulate the code with
• vcom: compiles VHDL files, the
files should be ordered in a
hierarchal way [leaf level first
then top]
• vsim: starts the simulator to
simulate the top level module
Add signals to Wave
RMB on any signal in the
Objects window  Add 
to Wave  signals in
Region
Now start applying inputs
and monitor outputs
6
Applying Inputs
RMB on input port 
force
7
• In the “value” field,
insert an appropriate
value OK
• Apply inputs to other
inputs
Run Simulation
Press run button
Monitor the output
8
Make Files
On Unix:
If you changed the code you will have to recompile the design files again.
A make file is used to do repetitive compilation and simulation tasks; “Make”
knows which files have been edited and automatically compiles only changed
files.
ModelSim offers a simple way to automatically generate a Makefile for your
design hierarchy.
vmake work > Makefile
To recompile code at anytime just type
make
9
Interactive Simulation
File  new project
Insert project name and
location; leave other fields
with defaults
10
Interactive Simulation
In “Add items to the
project” window choose
“Create new file”
Insert file name
Make sure to select VHDL
11
Interactive Simulation
Create VHDL file
◦ Edit the file my_demo1.vhd
◦ Insert the text and save
12
LIBRARY ieee;
USE ieee.std_logic_1164.all;
ENTITY andgate IS
port (a, b: in std_logic_vector(2 downto 0);
c: out std_logic_vector(2 downto 0) );
END ENTITY;
ARCHITECTURE behav OF andgate IS
BEGIN
c <= a and b;
END ARCHITECTURE;
Compile VHDL files
Select the file 
RMB  compile
selected
13
Simulation
Simulate menu  Start
Simulation
Expand work library and
select andgate  OK
14

More Related Content

Recently uploaded

The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
heathfieldcps1
 
Liberal & Redical Feminism presentation.pptx
Liberal & Redical Feminism presentation.pptxLiberal & Redical Feminism presentation.pptx
Liberal & Redical Feminism presentation.pptx
Rizwan Abbas
 
Neurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeNeurulation and the formation of the neural tube
Neurulation and the formation of the neural tube
SaadHumayun7
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 

Recently uploaded (20)

The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
Liberal & Redical Feminism presentation.pptx
Liberal & Redical Feminism presentation.pptxLiberal & Redical Feminism presentation.pptx
Liberal & Redical Feminism presentation.pptx
 
Neurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeNeurulation and the formation of the neural tube
Neurulation and the formation of the neural tube
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17
 
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdf
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdfPost Exam Fun(da) Intra UEM General Quiz - Finals.pdf
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdf
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resources
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Morse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxMorse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptx
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
“O BEIJO” EM ARTE .
“O BEIJO” EM ARTE                       .“O BEIJO” EM ARTE                       .
“O BEIJO” EM ARTE .
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Modelsim Training In Mohali

  • 1. MODELSIM Training in Mohali E2MATRIX CALL: +91 9056051501,9915525860 WEB: WWW.E2MATRIX.COM EMAIL:MOHALI. SUPPORT@E2MATRIX.COM E2MATRIX
  • 2. Outline Command Line Simulation ◦ Compile and Simulate ◦ Add Signals to Wave ◦ Applying Inputs Interactive Simulation 2
  • 3. Command Line Simulation Make sure Modelsim exists in the path by doing the following ◦Windows: ◦ Start run -> cmd ◦ In cmd window: vsim -version ◦Linux: ◦ In any shell: vsim -version 3
  • 4. Command Line Simulation Create VHDL file ◦ Edit the file my_demo1.vhd ◦ Insert the text and save 4 LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY andgate IS port (a, b: in std_logic_vector(2 downto 0); c: out std_logic_vector(2 downto 0) ); END ENTITY; ARCHITECTURE behav OF andgate IS BEGIN c <= a and b; END ARCHITECTURE;
  • 5. Compile and Simulate vlib work vcom <VHDL files> vsim <top level> 5 • vlib: creates a library to compile and simulate the code with • vcom: compiles VHDL files, the files should be ordered in a hierarchal way [leaf level first then top] • vsim: starts the simulator to simulate the top level module
  • 6. Add signals to Wave RMB on any signal in the Objects window  Add  to Wave  signals in Region Now start applying inputs and monitor outputs 6
  • 7. Applying Inputs RMB on input port  force 7 • In the “value” field, insert an appropriate value OK • Apply inputs to other inputs
  • 8. Run Simulation Press run button Monitor the output 8
  • 9. Make Files On Unix: If you changed the code you will have to recompile the design files again. A make file is used to do repetitive compilation and simulation tasks; “Make” knows which files have been edited and automatically compiles only changed files. ModelSim offers a simple way to automatically generate a Makefile for your design hierarchy. vmake work > Makefile To recompile code at anytime just type make 9
  • 10. Interactive Simulation File  new project Insert project name and location; leave other fields with defaults 10
  • 11. Interactive Simulation In “Add items to the project” window choose “Create new file” Insert file name Make sure to select VHDL 11
  • 12. Interactive Simulation Create VHDL file ◦ Edit the file my_demo1.vhd ◦ Insert the text and save 12 LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY andgate IS port (a, b: in std_logic_vector(2 downto 0); c: out std_logic_vector(2 downto 0) ); END ENTITY; ARCHITECTURE behav OF andgate IS BEGIN c <= a and b; END ARCHITECTURE;
  • 13. Compile VHDL files Select the file  RMB  compile selected 13
  • 14. Simulation Simulate menu  Start Simulation Expand work library and select andgate  OK 14