SlideShare uma empresa Scribd logo
1 de 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!

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Destaque (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
 

Semelhante a 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
 
Simple Scalar Simulator of ACD Familiariation Labratory Manual
Simple Scalar Simulator of ACD Familiariation Labratory ManualSimple Scalar Simulator of ACD Familiariation Labratory Manual
Simple Scalar Simulator of ACD Familiariation Labratory Manualzelalem2022
 
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
 

Semelhante a 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
 
Simple Scalar Simulator of ACD Familiariation Labratory Manual
Simple Scalar Simulator of ACD Familiariation Labratory ManualSimple Scalar Simulator of ACD Familiariation Labratory Manual
Simple Scalar Simulator of ACD Familiariation Labratory Manual
 
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
 

Último

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 

Último (20)

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 

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

Notas do Editor

  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.