SlideShare a Scribd company logo
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 design
Anul Chaudhary
 
Verilog Tasks and functions
Verilog Tasks and functionsVerilog Tasks and functions
Verilog Tasks and functions
Vinchipsytm Vlsitraining
 
Java 8 Feature Preview
Java 8 Feature PreviewJava 8 Feature Preview
Java 8 Feature Preview
Jim Bethancourt
 
09 implementing+subprograms
09 implementing+subprograms09 implementing+subprograms
09 implementing+subprograms
baran19901990
 
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
Kwangshin 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 API
Jörn Guy Süß JGS
 
C- language Lecture 6
C- language Lecture 6C- language Lecture 6
C- language Lecture 6
Hatem Abd El-Salam
 
SystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummarySystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features Summary
Amal Khailtash
 
OpenMP And C++
OpenMP And C++OpenMP And C++
OpenMP And C++
Dragos Sbîrlea
 
Refactoring Edit History of Source Code
Refactoring Edit History of Source CodeRefactoring Edit History of Source Code
Refactoring Edit History of Source Code
Shinpei Hayashi
 
Java 8 new features
Java 8 new featuresJava 8 new features
Java 8 new features
Aniket Thakur
 
OpenMP Tutorial for Beginners
OpenMP Tutorial for BeginnersOpenMP Tutorial for Beginners
OpenMP Tutorial for Beginners
Dhanashree Prasad
 
Intro to OpenMP
Intro to OpenMPIntro to OpenMP
Intro to OpenMP
jbp4444
 
openmp
openmpopenmp
openmp
Neel Bhad
 
Basic information of function in cpu
Basic information of function in cpuBasic information of function in cpu
Basic information of function in cpu
Dhaval Jalalpara
 
Introduction to OpenMP
Introduction to OpenMPIntroduction to OpenMP
Introduction to OpenMP
Akhila Prabhakaran
 
Introduction to MPI
Introduction to MPIIntroduction to MPI
Introduction to MPI
Akhila Prabhakaran
 

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

Day2 Verilog HDL Basic
Day2 Verilog HDL BasicDay2 Verilog HDL Basic
Day2 Verilog HDL BasicRon Liu
 
test generation
test generationtest generation
test generation
dennis gookyi
 
Verilog overview
Verilog overviewVerilog overview
Verilog overview
posdege
 
Menu corner 1 wrzesnia 2013 2
Menu corner 1 wrzesnia 2013 2Menu corner 1 wrzesnia 2013 2
Menu corner 1 wrzesnia 2013 2Łukasz Chmura
 
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 iniTuty Soedarno
 
14 Marketing Trends for 2014
14 Marketing Trends for 201414 Marketing Trends for 2014
14 Marketing Trends for 2014
MPYAgency
 
Niall james horan gallagher
Niall james horan gallagherNiall james horan gallagher
Niall james horan gallagher
lau_de_horan
 
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
AshS1
 
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
Kerching_Casino
 
Branding page images.
Branding page images. Branding page images.
Branding page images. ankur645
 
Film Opening Presentation
Film Opening PresentationFilm Opening Presentation
Film Opening Presentation
haletheprice
 

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 electronicos
jeblanco81
 
systemverilog-interview-questions.docx
systemverilog-interview-questions.docxsystemverilog-interview-questions.docx
systemverilog-interview-questions.docx
ssuser1c8ca21
 
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++ Developers
Rainer Stropek
 
New features and enhancement
New features and enhancementNew features and enhancement
New features and enhancementRakesh Madugula
 
Ast transformation
Ast transformationAst transformation
Ast transformation
Gagan Agrawal
 
Matlab-3.pptx
Matlab-3.pptxMatlab-3.pptx
Matlab-3.pptx
aboma2hawi
 
System verilog important
System verilog importantSystem verilog important
System verilog important
elumalai7
 
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
zelalem2022
 
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
 
Automated Synthesis from HDL models Design Compiler (Synopsys)
Automated Synthesis from  HDL models Design Compiler (Synopsys)Automated Synthesis from  HDL models Design Compiler (Synopsys)
Automated Synthesis from HDL models Design Compiler (Synopsys)
ahmedalikhalaf98
 
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 .docx
oscars29
 
slide8.ppt
slide8.pptslide8.ppt
slide8.ppt
ssuserd3cf02
 
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
Muhammad Sikandar Mustafa
 
Java programming basics
Java programming basicsJava programming basics
Java programming basics
Hamid 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 js
Ahmed 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.docx
faithxdunce63732
 

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
 
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
 
Automated Synthesis from HDL models Design Compiler (Synopsys)
Automated Synthesis from  HDL models Design Compiler (Synopsys)Automated Synthesis from  HDL models Design Compiler (Synopsys)
Automated Synthesis from HDL models Design Compiler (Synopsys)
 
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
 

Recently uploaded

RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 

Recently uploaded (20)

RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 

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.