Connecting MATLAB and Simulink To SystemVerilog
Connecting MATLAB and Simulink To SystemVerilog
Corey Mathis
Industry Marketing Manager – Communications, Electronics, and Semiconductors
MathWorks
2
System Design & Simulation in Simulink
Unique advantages
Model continuous-time and
discrete-time components
together
3
ASIC/SoC Design Flow
Model-Based Design Integration
RESEARCH REQUIREMENTS
ALGORITHM DESIGN
Algorithms
RF
C/C++ HDL Analog
SystemC SystemVerilog
MCU DSP FPGA ASIC Transistor
ALGORITHM INTEGRATION
ASIC/SoC-LEVEL INTEGRATION
4
Design Gap
How to bridge MathWorks tools and EDA tools?
5
Co-simulation with Simulink
Cosimulation
Refined model
7
System Verilog DPI-C Component Generation
Reuse of models in SystemVerilog Testbench
Develop
– System components (IP and test
Data Component
Source Model benches) in Simulink and MATLAB
– Model, Simulate, and Verify
Algorithm
Environment
Model
Export
– Components as C code with
Analysis
Component SystemVerilog wrappers
Model
Verify
DPI-C DPI-C DPI-C DPI-C – Verification of the complete system
design!
SystemVerilog Testbench Environment
Embedded Coder
HDL Verifier 8
Using C Code Generation and the DPI-C Interface
2. SystemVerilog wrapper
Simulink
3. Cadence
1. C Code 9
Benefits of C Code Generation and DPI-C Export
Simulink
Cadence
10
Some Details …
11
Mixed-Signal ADC Model
Analog Digital
Low Pass Filter Decimator Filter
12
Export of Mixed-Signal Models
13
From Variable to Fixed Time Step Solver
14
Clocks in SystemVerilog Determine the
Scheduling of the Execution
Simulink handles multi-rate systems automatically
Simulink supports model generation for hierarchical subsystems or individual
components
Need to define multi-rate clocks to schedule the SystemVerilog execution
when different rate components are generated
15
Model Analog Circuits with Simscape
16
Digital Workflow
HDL Coder
– Used to generate synthesible RTL
HDL for design models
Data Component
Source Model
SystemVerilog DPI-C
Algorithm
HDL Coder
17
Digital Workflow Example
http://www.mathworks.com/company/newsletters/articles/a-next-generation-workflow-for-system-level-design-of-mixed-signal-integrated-circuits.html
22
SystemVerilog Workflow Summary
23
Q/A
24