SlideShare a Scribd company logo
1 of 14
MODELSIM Training
in Phagwara
E2MATRIX
CALL: +91 9041262727, 9779363902
WEB: WWW.E2MATRIX.COM
EMAIL: 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

More from E2Matrix

Networking Training in Phagwara
Networking Training in PhagwaraNetworking Training in Phagwara
Networking Training in Phagwara
E2Matrix
 
Networking Training in Mohali
Networking Training in MohaliNetworking Training in Mohali
Networking Training in Mohali
E2Matrix
 
Networking Training in Ludhiana
Networking Training in LudhianaNetworking Training in Ludhiana
Networking Training in Ludhiana
E2Matrix
 
Networking Training in Jalandhar
Networking Training in JalandharNetworking Training in Jalandhar
Networking Training in Jalandhar
E2Matrix
 
Networking Training in Chandigarh
Networking Training in ChandigarhNetworking Training in Chandigarh
Networking Training in Chandigarh
E2Matrix
 
Networking Training in Amritsar
Networking Training in AmritsarNetworking Training in Amritsar
Networking Training in Amritsar
E2Matrix
 
Asp.net training in phagwara
Asp.net training in phagwaraAsp.net training in phagwara
Asp.net training in phagwara
E2Matrix
 
Asp.net training in mohali
Asp.net training in mohaliAsp.net training in mohali
Asp.net training in mohali
E2Matrix
 
Asp.net training in ludhiana
Asp.net training in ludhianaAsp.net training in ludhiana
Asp.net training in ludhiana
E2Matrix
 
Asp.net training in jalandhar
Asp.net training in jalandharAsp.net training in jalandhar
Asp.net training in jalandhar
E2Matrix
 
Asp.Net training in chandigarh
Asp.Net training in chandigarhAsp.Net training in chandigarh
Asp.Net training in chandigarh
E2Matrix
 
Asp.Net Training in Amritsar
Asp.Net Training in AmritsarAsp.Net Training in Amritsar
Asp.Net Training in Amritsar
E2Matrix
 

More from E2Matrix (20)

3D Printing Classes in Surrey BC
3D Printing Classes in Surrey BC3D Printing Classes in Surrey BC
3D Printing Classes in Surrey BC
 
Phd thesis help in digital image processing
Phd thesis help in digital image processingPhd thesis help in digital image processing
Phd thesis help in digital image processing
 
M tech ph d thesis help in digital image processing
M tech ph d thesis help in digital image processingM tech ph d thesis help in digital image processing
M tech ph d thesis help in digital image processing
 
Arduino Classes in Surrey BC | Training Classes For Kids
Arduino Classes in Surrey BC | Training Classes For KidsArduino Classes in Surrey BC | Training Classes For Kids
Arduino Classes in Surrey BC | Training Classes For Kids
 
SPSS Training in Phagwara
SPSS Training in PhagwaraSPSS Training in Phagwara
SPSS Training in Phagwara
 
SPSS Training in Mohali
SPSS Training in MohaliSPSS Training in Mohali
SPSS Training in Mohali
 
SPSS Training in Ludhiana
SPSS Training in LudhianaSPSS Training in Ludhiana
SPSS Training in Ludhiana
 
SPSS Training in Chandigarh
SPSS Training in ChandigarhSPSS Training in Chandigarh
SPSS Training in Chandigarh
 
Networking Training in Phagwara
Networking Training in PhagwaraNetworking Training in Phagwara
Networking Training in Phagwara
 
Networking Training in Mohali
Networking Training in MohaliNetworking Training in Mohali
Networking Training in Mohali
 
Networking Training in Ludhiana
Networking Training in LudhianaNetworking Training in Ludhiana
Networking Training in Ludhiana
 
Networking Training in Jalandhar
Networking Training in JalandharNetworking Training in Jalandhar
Networking Training in Jalandhar
 
Networking Training in Chandigarh
Networking Training in ChandigarhNetworking Training in Chandigarh
Networking Training in Chandigarh
 
Networking Training in Amritsar
Networking Training in AmritsarNetworking Training in Amritsar
Networking Training in Amritsar
 
Asp.net training in phagwara
Asp.net training in phagwaraAsp.net training in phagwara
Asp.net training in phagwara
 
Asp.net training in mohali
Asp.net training in mohaliAsp.net training in mohali
Asp.net training in mohali
 
Asp.net training in ludhiana
Asp.net training in ludhianaAsp.net training in ludhiana
Asp.net training in ludhiana
 
Asp.net training in jalandhar
Asp.net training in jalandharAsp.net training in jalandhar
Asp.net training in jalandhar
 
Asp.Net training in chandigarh
Asp.Net training in chandigarhAsp.Net training in chandigarh
Asp.Net training in chandigarh
 
Asp.Net Training in Amritsar
Asp.Net Training in AmritsarAsp.Net Training in Amritsar
Asp.Net Training in Amritsar
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 

Modelsim Training in Phagwara Jalandhar

  • 1. MODELSIM Training in Phagwara E2MATRIX CALL: +91 9041262727, 9779363902 WEB: WWW.E2MATRIX.COM EMAIL: 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