SlideShare a Scribd company logo
1 of 22
RTL Module Behavioral
Simulation within MATLAB
Environment
By: Mohamed Abdelsalam
Outlines
 C/C++ vs Verilog
 ISIM
 ISIM fuse command
 Running Simulation EXE
 Test-bench
 MATLAB/ISIM Link
 runverilogmodule Algorithm
 Creating module test bench
 Calling Verilog Modules
 MATLAB Wrapper Function
 Short Circuit Module Example
C/C++ vs Verilog
MATLAB
func1 func2 funcN
Main Func.
Mex Func
Main Module
Test-bench
module1 module2 moduleN
Microsoft Visual Studio
C/C++
MATLAB Mex func.
Microsoft Visual Studio
C/C++
MATLAB Mex func.
Xilinx IDE/
ISIM
MATLAB
runverilogmodule
func.
ISIM
 The Xilinx® ISE Simulator (ISim) is a Hardware
Description Language (HDL) simulator
 enables to perform functional and timing simulations
(VHDL, Verilog)
 This ISE Simulator environment is comprised of
the following key elements:
 Vhpcomp/ Vlogcomp VHDL/Verilog compiler
 fuse (HDL elaborator and linker) Simulation
Executable
 isimgui (ISim Graphical User Interface)  can be used
for debugging
ISIM fuse command
 The project file lists:
 Names of modules
 including test-bench file (.v)
 The used HW description language
(Verilog) of each module
 The stored library of each module.
 Fuse will parse the project file
 compile and link all the sources for the
design. Following completion of these
steps, a
 simulation executable will be created
 This exe is used to run a behavioral
simulation using standalone ISIM.
 The test bench defines the top design
unit, the input and the output, etc.
 Main sections of the test bench are shown
in a separate slide
fuse
Simulation EXE
Test bench
Project file
options
Modules
Dos Command
Running Simulation EXE
 The generated simulation EXE can be
called from within DOS command.
 In order to use DOS command, a
batch file is provided by Xilinx
(settings) should be used.
 The simulation exe calls the
standalone ISIM.
 ISIM applies behavioral simulation to
the design stated at the test bench
(TB).
 TB can specify input and output files
(vectors) for reading and writing,
respectively.
 TB Also specifies some other
parameters which are described in the
next slide
DOS Command
ISIM
TB
Settings64
.bat
Input vectors
(.txt)
Output vectors
(.txt)
Sim EXE
Test-bench
I/O ports
)input registers, output wires(
Instantiate the Unit Under Test
)UUT(
Timescale/error
Clock Period
Initialization
)load input test vectors to memory(
Clock generation
Passing inputs to the module
Reading module outputs to o/p
vectors, finish after processing
the required length
MATLAB/ISIM Link
 Function interface
 I/P Set Cell:
 Specifies the name and fixed point formats
of each input to the module
 Example: {‘rx_ip’, ‘s2.1’;
‘ctr_sig’,’u1.0’}
 O/P Set Cell
 Specifies the name and fixed point format of
each output from the module
 Example: {‘rx_op’, ‘s1.3’;
‘status_sig’,’u1.0’}
 I/P Vector Cell
 Each row in this cell is corresponding to
input signal specified in the same row
number in the I/P Set Cell.
 Example: {[2.1, 3.6, 12.3, -3.7,..]T
;
[ 1, 1, 1, 1, 0, …]T}
 O/P Vector Cell
 Each row in this cell is corresponding to
output signal specified in the same row
number in the O/P Set Cell.
 Example: {[31.6, 46.1, 120.2, -39.5,..]T
;
[ 1, 1, 1, 1, 1, …]T}
runverilogmodule
Module
folder path
Module test-bench
name
I/P Set
Cell
O/P Set
Cell
I/P Vec
Cell
O/P Vec
Cell
Use
debug
option
runverilogmodule Algorithm
Note: the function will ask for
the path of Xilinx ISE at the
first time only
Need re-making?
Adjust format
Path name need
Adjustment?
Prepare required
Files and make
simulation exe
read the input into files
after applying the fixed
point processing as
specified in the input
Settings Cell
Run module sim. exe
read the output vectors
from files after applying
the fixed point
processing as specified
in the output Settings
Cell
start
Remove
intermediate
files and finish
Creating module test bench
 Right click on the top module and select
New Source  Select source type: Verilog
Test Fixture  and then enter file name
(test bench name) click next  select
the top module to associate with the test
bench  click Next and  then click
Finish.
Calling Verilog Modules
 Download “runverilogmodule.m” file and place it
@ MATLAP PATHwork folder.
 This is one of the default matlap paths
 Functions placed at the work folder are seen as built-in
functions.
 Inside the module folder make sure that all
modules and the test-bench .v files exist
 Write a wrapper matlab function to interface with
“runverilogmodule”.
 Call the wrapper function inside the model.
MATLAB Wrapper Function
 Provides the usual interface of any matlab
function
 input/output signals (variables/vectors/matrices)
 Preparing inputs
 Input vectors cell:
 Each row carries a vector corresponding to one of the
inputs
 Input settings cell:
 Each row carries two elements corresponding to the input
vector at the same row in the input vectors cell:
 Signal name
 Signal fixed point format
 Note: Input signal names should match file names inside
the test-bench
MATLAB Wrapper Function
(contd.)
 Preparing outputs
 Outputs vectors cell:
 Each row carries a vector corresponding to one of the
outputs
 Output settings cell:
 Each row carries two elements corresponding to the
output vector at the same row in the input vectors
cell:
 Signal name
 Signal fixed point format
 Note: output signal names should match file names
inside the test-bench
Short Circuit Module Example
 Test script
 SC_Module folder structure
Short Circuit Module Example
 sc module MATLAB wrapper function
Short Circuit Module Example
 sc module test-bench (.v)
Short Circuit Module Example
 sc module test-bench (.v) - continued
Short Circuit Module Example
 sc module test-bench (.v) - continued
Short Circuit Module Example
 sc module
Short Circuit Module Example
0 10 20 30 40 50 60 70 80 90 100
-2
-1.8
-1.6
-1.4
-1.2
-1
-0.8
-0.6
-0.4
-0.2
0
x 10
-3
•Output
Source Code/Example:
 Please visit
http://www.mathworks.com/matlabcentral/file
Thank
You!

More Related Content

What's hot

DUSK - Develop at Userland Install into Kernel
DUSK - Develop at Userland Install into KernelDUSK - Develop at Userland Install into Kernel
DUSK - Develop at Userland Install into KernelAlexey Smirnov
 
Command line arguments.21
Command line arguments.21Command line arguments.21
Command line arguments.21myrajendra
 
Peephole optimization techniques in compiler design
Peephole optimization techniques in compiler designPeephole optimization techniques in compiler design
Peephole optimization techniques in compiler designAnul Chaudhary
 
09 implementing+subprograms
09 implementing+subprograms09 implementing+subprograms
09 implementing+subprogramsbaran19901990
 
CS6270 Virtual Machines - Java Virtual Machine Architecture and APIs
CS6270 Virtual Machines - Java Virtual Machine Architecture and APIsCS6270 Virtual Machines - Java Virtual Machine Architecture and APIs
CS6270 Virtual Machines - Java Virtual Machine Architecture and APIsKwangshin Oh
 
L kernel-logging-apis-pdf
L kernel-logging-apis-pdfL kernel-logging-apis-pdf
L kernel-logging-apis-pdfSusant Sahani
 
A Brief Conceptual Introduction to Functional Java 8 and its API
A Brief Conceptual Introduction to Functional Java 8 and its APIA Brief Conceptual Introduction to Functional Java 8 and its API
A Brief Conceptual Introduction to Functional Java 8 and its APIJörn Guy Süß JGS
 
SystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummarySystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummaryAmal Khailtash
 
Refactoring Edit History of Source Code
Refactoring Edit History of Source CodeRefactoring Edit History of Source Code
Refactoring Edit History of Source CodeShinpei Hayashi
 
OpenMP Tutorial for Beginners
OpenMP Tutorial for BeginnersOpenMP Tutorial for Beginners
OpenMP Tutorial for BeginnersDhanashree Prasad
 
Intro to OpenMP
Intro to OpenMPIntro to OpenMP
Intro to OpenMPjbp4444
 
Basic information of function in cpu
Basic information of function in cpuBasic information of function in cpu
Basic information of function in cpuDhaval Jalalpara
 

What's hot (20)

DUSK - Develop at Userland Install into Kernel
DUSK - Develop at Userland Install into KernelDUSK - Develop at Userland Install into Kernel
DUSK - Develop at Userland Install into Kernel
 
Command line arguments.21
Command line arguments.21Command line arguments.21
Command line arguments.21
 
Peephole optimization techniques in compiler design
Peephole optimization techniques in compiler designPeephole optimization techniques in compiler design
Peephole optimization techniques in compiler design
 
Verilog Tasks and functions
Verilog Tasks and functionsVerilog Tasks and functions
Verilog Tasks and functions
 
Java 8 Feature Preview
Java 8 Feature PreviewJava 8 Feature Preview
Java 8 Feature Preview
 
09 implementing+subprograms
09 implementing+subprograms09 implementing+subprograms
09 implementing+subprograms
 
CS6270 Virtual Machines - Java Virtual Machine Architecture and APIs
CS6270 Virtual Machines - Java Virtual Machine Architecture and APIsCS6270 Virtual Machines - Java Virtual Machine Architecture and APIs
CS6270 Virtual Machines - Java Virtual Machine Architecture and APIs
 
L kernel-logging-apis-pdf
L kernel-logging-apis-pdfL kernel-logging-apis-pdf
L kernel-logging-apis-pdf
 
A Brief Conceptual Introduction to Functional Java 8 and its API
A Brief Conceptual Introduction to Functional Java 8 and its APIA Brief Conceptual Introduction to Functional Java 8 and its API
A Brief Conceptual Introduction to Functional Java 8 and its API
 
C- language Lecture 6
C- language Lecture 6C- language Lecture 6
C- language Lecture 6
 
SystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummarySystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features Summary
 
OpenMP And C++
OpenMP And C++OpenMP And C++
OpenMP And C++
 
Refactoring Edit History of Source Code
Refactoring Edit History of Source CodeRefactoring Edit History of Source Code
Refactoring Edit History of Source Code
 
Java 8 new features
Java 8 new featuresJava 8 new features
Java 8 new features
 
OpenMP Tutorial for Beginners
OpenMP Tutorial for BeginnersOpenMP Tutorial for Beginners
OpenMP Tutorial for Beginners
 
Intro to OpenMP
Intro to OpenMPIntro to OpenMP
Intro to OpenMP
 
openmp
openmpopenmp
openmp
 
Basic information of function in cpu
Basic information of function in cpuBasic information of function in cpu
Basic information of function in cpu
 
Introduction to OpenMP
Introduction to OpenMPIntroduction to OpenMP
Introduction to OpenMP
 
Introduction to MPI
Introduction to MPIIntroduction to MPI
Introduction to MPI
 

Viewers also liked (20)

Day2 Verilog HDL Basic
Day2 Verilog HDL BasicDay2 Verilog HDL Basic
Day2 Verilog HDL Basic
 
test generation
test generationtest generation
test generation
 
Verilog overview
Verilog overviewVerilog overview
Verilog overview
 
Menu corner 1 wrzesnia 2013 2
Menu corner 1 wrzesnia 2013 2Menu corner 1 wrzesnia 2013 2
Menu corner 1 wrzesnia 2013 2
 
Teruntuk sahabat ku yang menikah hari ini
Teruntuk sahabat ku yang menikah hari iniTeruntuk sahabat ku yang menikah hari ini
Teruntuk sahabat ku yang menikah hari ini
 
Carnivores
CarnivoresCarnivores
Carnivores
 
Boy or girl
Boy or girlBoy or girl
Boy or girl
 
14 Marketing Trends for 2014
14 Marketing Trends for 201414 Marketing Trends for 2014
14 Marketing Trends for 2014
 
Niall james horan gallagher
Niall james horan gallagherNiall james horan gallagher
Niall james horan gallagher
 
My body and head
My body and headMy body and head
My body and head
 
Socioeconomic Inequality in Brazil and South Africa
Socioeconomic Inequality in Brazil and South AfricaSocioeconomic Inequality in Brazil and South Africa
Socioeconomic Inequality in Brazil and South Africa
 
Play Pixies of the Forest - Kerching Casino
Play Pixies of the Forest - Kerching CasinoPlay Pixies of the Forest - Kerching Casino
Play Pixies of the Forest - Kerching Casino
 
When i was a child
When i was a childWhen i was a child
When i was a child
 
Makelar sedekah
Makelar sedekahMakelar sedekah
Makelar sedekah
 
School
SchoolSchool
School
 
Branding page images.
Branding page images. Branding page images.
Branding page images.
 
Taste
TasteTaste
Taste
 
Jobs
JobsJobs
Jobs
 
Match
MatchMatch
Match
 
Film Opening Presentation
Film Opening PresentationFilm Opening Presentation
Film Opening Presentation
 

Similar to Matlab isim link

Virtual platform
Virtual platformVirtual platform
Virtual platformsean chen
 
Creation vsm modelos componentes electronicos
Creation vsm   modelos componentes electronicosCreation vsm   modelos componentes electronicos
Creation vsm modelos componentes electronicosjeblanco81
 
systemverilog-interview-questions.docx
systemverilog-interview-questions.docxsystemverilog-interview-questions.docx
systemverilog-interview-questions.docxssuser1c8ca21
 
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningJava 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningCarol McDonald
 
Whats New in Visual Studio 2012 for C++ Developers
Whats New in Visual Studio 2012 for C++ DevelopersWhats New in Visual Studio 2012 for C++ Developers
Whats New in Visual Studio 2012 for C++ DevelopersRainer Stropek
 
New features and enhancement
New features and enhancementNew features and enhancement
New features and enhancementRakesh Madugula
 
System verilog important
System verilog importantSystem verilog important
System verilog importantelumalai7
 
RTI-CODES+ISSS-2012-Submission-1
RTI-CODES+ISSS-2012-Submission-1RTI-CODES+ISSS-2012-Submission-1
RTI-CODES+ISSS-2012-Submission-1Serge Amougou
 
Hardware Description Language
Hardware Description Language Hardware Description Language
Hardware Description Language Prachi Pandey
 
Lec 04 intro assembly
Lec 04 intro assemblyLec 04 intro assembly
Lec 04 intro assemblyAbdul Khan
 
The program reads data from two files, itemsList-0x.txt and .docx
The program reads data from two files, itemsList-0x.txt and .docxThe program reads data from two files, itemsList-0x.txt and .docx
The program reads data from two files, itemsList-0x.txt and .docxoscars29
 
Advanced procedures in assembly language Full chapter ppt
Advanced procedures in assembly language Full chapter pptAdvanced procedures in assembly language Full chapter ppt
Advanced procedures in assembly language Full chapter pptMuhammad Sikandar Mustafa
 
Java programming basics
Java programming basicsJava programming basics
Java programming basicsHamid Ghorbani
 
Module design pattern i.e. express js
Module design pattern i.e. express jsModule design pattern i.e. express js
Module design pattern i.e. express jsAhmed Assaf
 
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxCS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxfaithxdunce63732
 

Similar to Matlab isim link (20)

Virtual platform
Virtual platformVirtual platform
Virtual platform
 
Creation vsm modelos componentes electronicos
Creation vsm   modelos componentes electronicosCreation vsm   modelos componentes electronicos
Creation vsm modelos componentes electronicos
 
systemverilog-interview-questions.docx
systemverilog-interview-questions.docxsystemverilog-interview-questions.docx
systemverilog-interview-questions.docx
 
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningJava 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
 
Whats New in Visual Studio 2012 for C++ Developers
Whats New in Visual Studio 2012 for C++ DevelopersWhats New in Visual Studio 2012 for C++ Developers
Whats New in Visual Studio 2012 for C++ Developers
 
New features and enhancement
New features and enhancementNew features and enhancement
New features and enhancement
 
Ast transformation
Ast transformationAst transformation
Ast transformation
 
Matlab-3.pptx
Matlab-3.pptxMatlab-3.pptx
Matlab-3.pptx
 
System verilog important
System verilog importantSystem verilog important
System verilog important
 
RTI-CODES+ISSS-2012-Submission-1
RTI-CODES+ISSS-2012-Submission-1RTI-CODES+ISSS-2012-Submission-1
RTI-CODES+ISSS-2012-Submission-1
 
Hardware Description Language
Hardware Description Language Hardware Description Language
Hardware Description Language
 
Lec 04 intro assembly
Lec 04 intro assemblyLec 04 intro assembly
Lec 04 intro assembly
 
The program reads data from two files, itemsList-0x.txt and .docx
The program reads data from two files, itemsList-0x.txt and .docxThe program reads data from two files, itemsList-0x.txt and .docx
The program reads data from two files, itemsList-0x.txt and .docx
 
slide8.ppt
slide8.pptslide8.ppt
slide8.ppt
 
Advanced procedures in assembly language Full chapter ppt
Advanced procedures in assembly language Full chapter pptAdvanced procedures in assembly language Full chapter ppt
Advanced procedures in assembly language Full chapter ppt
 
Java programming basics
Java programming basicsJava programming basics
Java programming basics
 
Module design pattern i.e. express js
Module design pattern i.e. express jsModule design pattern i.e. express js
Module design pattern i.e. express js
 
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxCS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
 
Calfem34
Calfem34Calfem34
Calfem34
 
VLSI
VLSIVLSI
VLSI
 

Recently uploaded

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Recently uploaded (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

Matlab isim link

  • 1. RTL Module Behavioral Simulation within MATLAB Environment By: Mohamed Abdelsalam
  • 2. Outlines  C/C++ vs Verilog  ISIM  ISIM fuse command  Running Simulation EXE  Test-bench  MATLAB/ISIM Link  runverilogmodule Algorithm  Creating module test bench  Calling Verilog Modules  MATLAB Wrapper Function  Short Circuit Module Example
  • 3. C/C++ vs Verilog MATLAB func1 func2 funcN Main Func. Mex Func Main Module Test-bench module1 module2 moduleN Microsoft Visual Studio C/C++ MATLAB Mex func. Microsoft Visual Studio C/C++ MATLAB Mex func. Xilinx IDE/ ISIM MATLAB runverilogmodule func.
  • 4. ISIM  The Xilinx® ISE Simulator (ISim) is a Hardware Description Language (HDL) simulator  enables to perform functional and timing simulations (VHDL, Verilog)  This ISE Simulator environment is comprised of the following key elements:  Vhpcomp/ Vlogcomp VHDL/Verilog compiler  fuse (HDL elaborator and linker) Simulation Executable  isimgui (ISim Graphical User Interface)  can be used for debugging
  • 5. ISIM fuse command  The project file lists:  Names of modules  including test-bench file (.v)  The used HW description language (Verilog) of each module  The stored library of each module.  Fuse will parse the project file  compile and link all the sources for the design. Following completion of these steps, a  simulation executable will be created  This exe is used to run a behavioral simulation using standalone ISIM.  The test bench defines the top design unit, the input and the output, etc.  Main sections of the test bench are shown in a separate slide fuse Simulation EXE Test bench Project file options Modules Dos Command
  • 6. Running Simulation EXE  The generated simulation EXE can be called from within DOS command.  In order to use DOS command, a batch file is provided by Xilinx (settings) should be used.  The simulation exe calls the standalone ISIM.  ISIM applies behavioral simulation to the design stated at the test bench (TB).  TB can specify input and output files (vectors) for reading and writing, respectively.  TB Also specifies some other parameters which are described in the next slide DOS Command ISIM TB Settings64 .bat Input vectors (.txt) Output vectors (.txt) Sim EXE
  • 7. Test-bench I/O ports )input registers, output wires( Instantiate the Unit Under Test )UUT( Timescale/error Clock Period Initialization )load input test vectors to memory( Clock generation Passing inputs to the module Reading module outputs to o/p vectors, finish after processing the required length
  • 8. MATLAB/ISIM Link  Function interface  I/P Set Cell:  Specifies the name and fixed point formats of each input to the module  Example: {‘rx_ip’, ‘s2.1’; ‘ctr_sig’,’u1.0’}  O/P Set Cell  Specifies the name and fixed point format of each output from the module  Example: {‘rx_op’, ‘s1.3’; ‘status_sig’,’u1.0’}  I/P Vector Cell  Each row in this cell is corresponding to input signal specified in the same row number in the I/P Set Cell.  Example: {[2.1, 3.6, 12.3, -3.7,..]T ; [ 1, 1, 1, 1, 0, …]T}  O/P Vector Cell  Each row in this cell is corresponding to output signal specified in the same row number in the O/P Set Cell.  Example: {[31.6, 46.1, 120.2, -39.5,..]T ; [ 1, 1, 1, 1, 1, …]T} runverilogmodule Module folder path Module test-bench name I/P Set Cell O/P Set Cell I/P Vec Cell O/P Vec Cell Use debug option
  • 9. runverilogmodule Algorithm Note: the function will ask for the path of Xilinx ISE at the first time only Need re-making? Adjust format Path name need Adjustment? Prepare required Files and make simulation exe read the input into files after applying the fixed point processing as specified in the input Settings Cell Run module sim. exe read the output vectors from files after applying the fixed point processing as specified in the output Settings Cell start Remove intermediate files and finish
  • 10. Creating module test bench  Right click on the top module and select New Source  Select source type: Verilog Test Fixture  and then enter file name (test bench name) click next  select the top module to associate with the test bench  click Next and  then click Finish.
  • 11. Calling Verilog Modules  Download “runverilogmodule.m” file and place it @ MATLAP PATHwork folder.  This is one of the default matlap paths  Functions placed at the work folder are seen as built-in functions.  Inside the module folder make sure that all modules and the test-bench .v files exist  Write a wrapper matlab function to interface with “runverilogmodule”.  Call the wrapper function inside the model.
  • 12. MATLAB Wrapper Function  Provides the usual interface of any matlab function  input/output signals (variables/vectors/matrices)  Preparing inputs  Input vectors cell:  Each row carries a vector corresponding to one of the inputs  Input settings cell:  Each row carries two elements corresponding to the input vector at the same row in the input vectors cell:  Signal name  Signal fixed point format  Note: Input signal names should match file names inside the test-bench
  • 13. MATLAB Wrapper Function (contd.)  Preparing outputs  Outputs vectors cell:  Each row carries a vector corresponding to one of the outputs  Output settings cell:  Each row carries two elements corresponding to the output vector at the same row in the input vectors cell:  Signal name  Signal fixed point format  Note: output signal names should match file names inside the test-bench
  • 14. Short Circuit Module Example  Test script  SC_Module folder structure
  • 15. Short Circuit Module Example  sc module MATLAB wrapper function
  • 16. Short Circuit Module Example  sc module test-bench (.v)
  • 17. Short Circuit Module Example  sc module test-bench (.v) - continued
  • 18. Short Circuit Module Example  sc module test-bench (.v) - continued
  • 19. Short Circuit Module Example  sc module
  • 20. Short Circuit Module Example 0 10 20 30 40 50 60 70 80 90 100 -2 -1.8 -1.6 -1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 0 x 10 -3 •Output
  • 21. Source Code/Example:  Please visit http://www.mathworks.com/matlabcentral/file

Editor's Notes

  1. Test bench  top design unit framework ( Modules  design units
  2. Note: an ‘end’ marker is appended to the output files. They are used by the MATLAB-ISIM link function to detect the end of the vector.