SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Plus de 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
 

Plus de 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
 

Dernier

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
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Dernier (20)

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
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
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
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
 

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