SlideShare une entreprise Scribd logo
1  sur  17
VHDL 360© by: Amr Ali
Copyrights Copyright © 2010 to authors. All rights reserved All content in this presentation, including charts, data, artwork and logos (from here on, "the Content"), is the property of Amr Ali or the corresponding owners, depending on the circumstances of publication, and is protected by national and international copyright laws. Authors are not personally liable for your usage of the Content that entailed casual or indirect destruction of anything or actions entailed to information profit loss or other losses. Users are granted to access, display, download and print portions of this presentation, solely for their own personal non-commercial use, provided that all proprietary notices are kept intact.  Product names and trademarks mentioned in this presentation belong to their respective owners. VHDL 360 © 2
Objective Using ModelSim to compile and simulate a given design unit Skills gained: Identify basic Simulator commands VHDL 360 © 3
Outline Command Line Simulation Compile and Simulate Add Signals to Wave Applying Inputs Interactive Simulation VHDL 360 © 4
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 VHDL 360 © 5
Command Line Simulation Create VHDL file Edit the file my_demo1.vhd Insert the text and save VHDL 360 © 6 LIBRARYieee; USEieee.std_logic_1164.all; ENTITYandgateIS port(a, b:instd_logic_vector(2downto0);       c:outstd_logic_vector(2downto0)); ENDENTITY; ARCHITECTUREbehavOFandgateIS BEGIN    c <= a and b; ENDARCHITECTURE;
Compile and Simulate vlib work vcom <VHDL files>  vsim <top level> VHDL 360 © 7 ,[object Object]
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,[object Object]
Applying Inputs RMB on input port  force VHDL 360 © 9 ,[object Object]
Apply inputs to other inputs,[object Object]
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 VHDL 360 © 11
Interactive Simulation File  new project Insert project name and location; leave other fields with defaults VHDL 360 © 12
Interactive Simulation In “Add items to the project” window choose “Create new file” Insert file name Make sure to select VHDL VHDL 360 © 13
Interactive Simulation Create VHDL file Edit the file my_demo1.vhd Insert the text and save VHDL 360 © 14 LIBRARYieee; USEieee.std_logic_1164.all; ENTITYandgateIS port(a, b:instd_logic_vector(2downto0);       c:outstd_logic_vector(2downto0)); ENDENTITY; ARCHITECTUREbehavOFandgateIS BEGIN    c <= a and b; ENDARCHITECTURE;
Compile VHDL files Select the file  RMB  compile selected VHDL 360 © 15
Simulation Simulate menu  Start Simulation Expand work library and select andgateOK VHDL 360 © 16

Contenu connexe

En vedette

Modelsim Tuttranslate
Modelsim TuttranslateModelsim Tuttranslate
Modelsim Tuttranslateguest2d20022
 
ModelSim 기초 매뉴얼
ModelSim 기초 매뉴얼ModelSim 기초 매뉴얼
ModelSim 기초 매뉴얼Jihyun Lee
 

En vedette (19)

Modelsim Tuttranslate
Modelsim TuttranslateModelsim Tuttranslate
Modelsim Tuttranslate
 
FreeRTOS Course - Queue Management
FreeRTOS Course - Queue ManagementFreeRTOS Course - Queue Management
FreeRTOS Course - Queue Management
 
Android Booting Scenarios
Android Booting ScenariosAndroid Booting Scenarios
Android Booting Scenarios
 
Free FreeRTOS Course-Task Management
Free FreeRTOS Course-Task ManagementFree FreeRTOS Course-Task Management
Free FreeRTOS Course-Task Management
 
Introduction to Embedded Systems a Practical Approach
Introduction to Embedded Systems a Practical ApproachIntroduction to Embedded Systems a Practical Approach
Introduction to Embedded Systems a Practical Approach
 
FreeRTOS Course - Semaphore/Mutex Management
FreeRTOS Course - Semaphore/Mutex ManagementFreeRTOS Course - Semaphore/Mutex Management
FreeRTOS Course - Semaphore/Mutex Management
 
ModelSim 기초 매뉴얼
ModelSim 기초 매뉴얼ModelSim 기초 매뉴얼
ModelSim 기초 매뉴얼
 
Data Flow Modeling
Data Flow ModelingData Flow Modeling
Data Flow Modeling
 
Introduction to stm32-part2
Introduction to stm32-part2Introduction to stm32-part2
Introduction to stm32-part2
 
Synthesis Using ISE
Synthesis Using ISESynthesis Using ISE
Synthesis Using ISE
 
ISTQB Foundation Agile Tester 2014 Training, Agile SW Development
ISTQB Foundation Agile Tester 2014 Training, Agile SW DevelopmentISTQB Foundation Agile Tester 2014 Training, Agile SW Development
ISTQB Foundation Agile Tester 2014 Training, Agile SW Development
 
Simulation Using Isim
Simulation Using Isim Simulation Using Isim
Simulation Using Isim
 
Introduction to stm32-part1
Introduction to stm32-part1Introduction to stm32-part1
Introduction to stm32-part1
 
Fpga programming
Fpga programmingFpga programming
Fpga programming
 
ISTQB Technical Test Analyst 2012 Training - The Technical Test Analyst's Tas...
ISTQB Technical Test Analyst 2012 Training - The Technical Test Analyst's Tas...ISTQB Technical Test Analyst 2012 Training - The Technical Test Analyst's Tas...
ISTQB Technical Test Analyst 2012 Training - The Technical Test Analyst's Tas...
 
Introduction to Software Test Automation
Introduction to Software Test AutomationIntroduction to Software Test Automation
Introduction to Software Test Automation
 
ISTQB Advanced Test Manager Training 2012 - Testing Process
ISTQB Advanced Test Manager Training 2012 - Testing Process ISTQB Advanced Test Manager Training 2012 - Testing Process
ISTQB Advanced Test Manager Training 2012 - Testing Process
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
Introduction to embedded systems
Introduction to embedded systemsIntroduction to embedded systems
Introduction to embedded systems
 

Similaire à VHDL Simulation Guide

Accelerating your application development with IBM BlueMix (Your dream devel...
Accelerating your application development with IBM BlueMix (Your dream devel...Accelerating your application development with IBM BlueMix (Your dream devel...
Accelerating your application development with IBM BlueMix (Your dream devel...Supal Chowdhury
 
Using Alf with Cameo Simulation Toolkit - Part 1: Basics
Using Alf with Cameo Simulation Toolkit - Part 1: BasicsUsing Alf with Cameo Simulation Toolkit - Part 1: Basics
Using Alf with Cameo Simulation Toolkit - Part 1: BasicsEd Seidewitz
 
Using Alf with Cameo Simulation Toolkit - Part 2: Modeling
Using Alf with Cameo Simulation Toolkit - Part 2: ModelingUsing Alf with Cameo Simulation Toolkit - Part 2: Modeling
Using Alf with Cameo Simulation Toolkit - Part 2: ModelingEd Seidewitz
 
20sim and student- the prince half blood
20sim and student- the prince half blood20sim and student- the prince half blood
20sim and student- the prince half bloodmohamedbanane
 
Codemotion rome 2015 bluemix lab tutorial -- Codemotion Rome 2015
Codemotion rome 2015   bluemix lab tutorial -- Codemotion Rome 2015Codemotion rome 2015   bluemix lab tutorial -- Codemotion Rome 2015
Codemotion rome 2015 bluemix lab tutorial -- Codemotion Rome 2015Codemotion
 
Setting up your virtual infrastructure using FI-LAB Cloud
Setting up your virtual infrastructure using FI-LAB CloudSetting up your virtual infrastructure using FI-LAB Cloud
Setting up your virtual infrastructure using FI-LAB CloudFIWARE
 
Setting up your virtual infrastructure using fi lab cloud
Setting up your virtual infrastructure using fi lab cloudSetting up your virtual infrastructure using fi lab cloud
Setting up your virtual infrastructure using fi lab cloudHenar Muñoz Frutos
 
Part 1 - Overview of Teamcenter Integration for SolidWorks | PLM Nordic
Part 1 - Overview of Teamcenter Integration for SolidWorks | PLM NordicPart 1 - Overview of Teamcenter Integration for SolidWorks | PLM Nordic
Part 1 - Overview of Teamcenter Integration for SolidWorks | PLM NordicPLM Nordic
 
Codemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab TutorialCodemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab Tutorialgjuljo
 
Distribute Your App and Engage Your Community with a Helm Repository
Distribute Your App and Engage Your Community with a Helm RepositoryDistribute Your App and Engage Your Community with a Helm Repository
Distribute Your App and Engage Your Community with a Helm RepositoryVMware Tanzu
 
Leveraging Alf for SysML, Part 1: Better Simulation Modeling
Leveraging Alf for SysML, Part 1: Better Simulation ModelingLeveraging Alf for SysML, Part 1: Better Simulation Modeling
Leveraging Alf for SysML, Part 1: Better Simulation ModelingEd Seidewitz
 
Using Edge Animate to Create a Reusable Component Set
Using Edge Animate to Create a Reusable Component SetUsing Edge Animate to Create a Reusable Component Set
Using Edge Animate to Create a Reusable Component SetJoseph Labrecque
 
building-a-fdm-application-for-a-hfm-target
 building-a-fdm-application-for-a-hfm-target building-a-fdm-application-for-a-hfm-target
building-a-fdm-application-for-a-hfm-targetSid Mehta
 
Using Bluemix and Node-RED for Fast Prototyping
Using Bluemix and Node-RED for Fast PrototypingUsing Bluemix and Node-RED for Fast Prototyping
Using Bluemix and Node-RED for Fast PrototypingPenn State EdTech Network
 
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0Haytham Ghandour
 
Rock the ActivityStream API
Rock the ActivityStream APIRock the ActivityStream API
Rock the ActivityStream APILetsConnect
 

Similaire à VHDL Simulation Guide (20)

Accelerating your application development with IBM BlueMix (Your dream devel...
Accelerating your application development with IBM BlueMix (Your dream devel...Accelerating your application development with IBM BlueMix (Your dream devel...
Accelerating your application development with IBM BlueMix (Your dream devel...
 
Added value of SimWare
Added value of SimWareAdded value of SimWare
Added value of SimWare
 
Using Alf with Cameo Simulation Toolkit - Part 1: Basics
Using Alf with Cameo Simulation Toolkit - Part 1: BasicsUsing Alf with Cameo Simulation Toolkit - Part 1: Basics
Using Alf with Cameo Simulation Toolkit - Part 1: Basics
 
Using Alf with Cameo Simulation Toolkit - Part 2: Modeling
Using Alf with Cameo Simulation Toolkit - Part 2: ModelingUsing Alf with Cameo Simulation Toolkit - Part 2: Modeling
Using Alf with Cameo Simulation Toolkit - Part 2: Modeling
 
20sim and student- the prince half blood
20sim and student- the prince half blood20sim and student- the prince half blood
20sim and student- the prince half blood
 
Simware in full
Simware in fullSimware in full
Simware in full
 
Codemotion rome 2015 bluemix lab tutorial -- Codemotion Rome 2015
Codemotion rome 2015   bluemix lab tutorial -- Codemotion Rome 2015Codemotion rome 2015   bluemix lab tutorial -- Codemotion Rome 2015
Codemotion rome 2015 bluemix lab tutorial -- Codemotion Rome 2015
 
Setting up your virtual infrastructure using FI-LAB Cloud
Setting up your virtual infrastructure using FI-LAB CloudSetting up your virtual infrastructure using FI-LAB Cloud
Setting up your virtual infrastructure using FI-LAB Cloud
 
Setting up your virtual infrastructure using fi lab cloud
Setting up your virtual infrastructure using fi lab cloudSetting up your virtual infrastructure using fi lab cloud
Setting up your virtual infrastructure using fi lab cloud
 
Part 1 - Overview of Teamcenter Integration for SolidWorks | PLM Nordic
Part 1 - Overview of Teamcenter Integration for SolidWorks | PLM NordicPart 1 - Overview of Teamcenter Integration for SolidWorks | PLM Nordic
Part 1 - Overview of Teamcenter Integration for SolidWorks | PLM Nordic
 
Codemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab TutorialCodemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab Tutorial
 
Vhdl design flow
Vhdl design flowVhdl design flow
Vhdl design flow
 
Distribute Your App and Engage Your Community with a Helm Repository
Distribute Your App and Engage Your Community with a Helm RepositoryDistribute Your App and Engage Your Community with a Helm Repository
Distribute Your App and Engage Your Community with a Helm Repository
 
Leveraging Alf for SysML, Part 1: Better Simulation Modeling
Leveraging Alf for SysML, Part 1: Better Simulation ModelingLeveraging Alf for SysML, Part 1: Better Simulation Modeling
Leveraging Alf for SysML, Part 1: Better Simulation Modeling
 
mBot
mBot mBot
mBot
 
Using Edge Animate to Create a Reusable Component Set
Using Edge Animate to Create a Reusable Component SetUsing Edge Animate to Create a Reusable Component Set
Using Edge Animate to Create a Reusable Component Set
 
building-a-fdm-application-for-a-hfm-target
 building-a-fdm-application-for-a-hfm-target building-a-fdm-application-for-a-hfm-target
building-a-fdm-application-for-a-hfm-target
 
Using Bluemix and Node-RED for Fast Prototyping
Using Bluemix and Node-RED for Fast PrototypingUsing Bluemix and Node-RED for Fast Prototyping
Using Bluemix and Node-RED for Fast Prototyping
 
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
 
Rock the ActivityStream API
Rock the ActivityStream APIRock the ActivityStream API
Rock the ActivityStream API
 

Plus de Amr Ali (ISTQB CTAL Full, CSM, ITIL Foundation) (6)

Introduction to state machines in Embedded Software Design
Introduction to state machines in Embedded Software DesignIntroduction to state machines in Embedded Software Design
Introduction to state machines in Embedded Software Design
 
Embedded SW Testing
Embedded SW TestingEmbedded SW Testing
Embedded SW Testing
 
Cracking the interview
Cracking the interviewCracking the interview
Cracking the interview
 
Embedded linux network device driver development
Embedded linux network device driver developmentEmbedded linux network device driver development
Embedded linux network device driver development
 
Embedded summer camps 2017
Embedded summer camps 2017Embedded summer camps 2017
Embedded summer camps 2017
 
ISTQB Technical Test Analyst 2012 Training - Structure-Based Testing
ISTQB Technical Test Analyst 2012 Training - Structure-Based TestingISTQB Technical Test Analyst 2012 Training - Structure-Based Testing
ISTQB Technical Test Analyst 2012 Training - Structure-Based Testing
 

VHDL Simulation Guide

  • 1. VHDL 360© by: Amr Ali
  • 2. Copyrights Copyright © 2010 to authors. All rights reserved All content in this presentation, including charts, data, artwork and logos (from here on, "the Content"), is the property of Amr Ali or the corresponding owners, depending on the circumstances of publication, and is protected by national and international copyright laws. Authors are not personally liable for your usage of the Content that entailed casual or indirect destruction of anything or actions entailed to information profit loss or other losses. Users are granted to access, display, download and print portions of this presentation, solely for their own personal non-commercial use, provided that all proprietary notices are kept intact. Product names and trademarks mentioned in this presentation belong to their respective owners. VHDL 360 © 2
  • 3. Objective Using ModelSim to compile and simulate a given design unit Skills gained: Identify basic Simulator commands VHDL 360 © 3
  • 4. Outline Command Line Simulation Compile and Simulate Add Signals to Wave Applying Inputs Interactive Simulation VHDL 360 © 4
  • 5. 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 VHDL 360 © 5
  • 6. Command Line Simulation Create VHDL file Edit the file my_demo1.vhd Insert the text and save VHDL 360 © 6 LIBRARYieee; USEieee.std_logic_1164.all; ENTITYandgateIS port(a, b:instd_logic_vector(2downto0); c:outstd_logic_vector(2downto0)); ENDENTITY; ARCHITECTUREbehavOFandgateIS BEGIN c <= a and b; ENDARCHITECTURE;
  • 7.
  • 8. vcom: compiles VHDL files, the files should be ordered in a hierarchal way [leaf level first then top]
  • 9.
  • 10.
  • 11.
  • 12. 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 VHDL 360 © 11
  • 13. Interactive Simulation File  new project Insert project name and location; leave other fields with defaults VHDL 360 © 12
  • 14. Interactive Simulation In “Add items to the project” window choose “Create new file” Insert file name Make sure to select VHDL VHDL 360 © 13
  • 15. Interactive Simulation Create VHDL file Edit the file my_demo1.vhd Insert the text and save VHDL 360 © 14 LIBRARYieee; USEieee.std_logic_1164.all; ENTITYandgateIS port(a, b:instd_logic_vector(2downto0); c:outstd_logic_vector(2downto0)); ENDENTITY; ARCHITECTUREbehavOFandgateIS BEGIN c <= a and b; ENDARCHITECTURE;
  • 16. Compile VHDL files Select the file  RMB  compile selected VHDL 360 © 15
  • 17. Simulation Simulate menu  Start Simulation Expand work library and select andgateOK VHDL 360 © 16
  • 18. Contacts You can contact us at: http://www.embedded-tips.blogspot.com/ VHDL 360 © 17