Mixed-signal Modeling Using Simulink based-c

Similar documents
Connecting MATLAB & Simulink with your SystemVerilog Workflow for Functional Verification

Modeling and Verifying Mixed-Signal Designs with MATLAB and Simulink

Model-Based Design for Video/Image Processing Applications

What's new in MATLAB and Simulink for Model-Based Design

Parag Choudhary Engineering Architect

Design and Verify Embedded Signal Processing Systems Using MATLAB and Simulink

MATLAB/Simulink 기반의프로그래머블 SoC 설계및검증

Harmony-AMS Analog/Mixed-Signal Simulator

Making the Most of your MATLAB Models to Improve Verification

Bibliography. Measuring Software Reuse, Jeffrey S. Poulin, Addison-Wesley, Practical Software Reuse, Donald J. Reifer, Wiley, 1997.

Mixed Signal Verification Transistor to SoC

ASIC world. Start Specification Design Verification Layout Validation Finish

Short Course On Phase-Locked Loops and Their Applications Day 3, PM Lecture. Behavioral Simulation Exercises

Digital System Design Lecture 2: Design. Amir Masoud Gharehbaghi

[Sub Track 1-3] FPGA/ASIC 을타겟으로한알고리즘의효율적인생성방법및신기능소개

HDL Interoperability & IP-based System Verification

CO SIMULATION OF GENERIC POWER CONVERTER USING MATLAB/SIMULINK AND MODELSIM

An introduction to CoCentric

Optimize DSP Designs and Code using Fixed-Point Designer

Model-Based Design for effective HW/SW Co-Design Alexander Schreiber Senior Application Engineer MathWorks, Germany

ECE 459/559 Secure & Trustworthy Computer Hardware Design

Design and Verify Embedded Signal Processing Systems Using MATLAB and Simulink

What s New with the MATLAB and Simulink Product Families. Marta Wilczkowiak & Coorous Mohtadi Application Engineering Group

Cover TBD. intel Quartus prime Design software

Intro to System Generator. Objectives. After completing this module, you will be able to:

Cover TBD. intel Quartus prime Design software

Moving MATLAB Algorithms into Complete Designs with Fixed-Point Simulation and Code Generation

Modelling and Simulation Made Easy with Simulink Tiffany Liang Application Engineer MathWorks

Hardware-Software Co-Design and Prototyping on SoC FPGAs Puneet Kumar Prateek Sikka Application Engineering Team

EEM870 Embedded System and Experiment Lecture 4: SoC Design Flow and Tools

101-1 Under-Graduate Project Digital IC Design Flow

Hardware and Software Co-Design for Motor Control Applications

Integrated Workflow to Implement Embedded Software and FPGA Designs on the Xilinx Zynq Platform Puneet Kumar Senior Team Lead - SPC

DSP Builder Handbook Volume 1: Introduction to DSP Builder

Hardware Synthesis. References

1 Design Process HOME CONTENTS INDEX. For further assistance, or call your local support center

Introduction to Microchip-SIMULINK Blocksets and MATLAB Plug-in for MPLAB IDE

REAL VALUE MODELING FOR IMPROVING THE VERIFICATION PERFORMANCE

DSP Builder Handbook Volume 1: Introduction to DSP Builder

RTL Coding General Concepts

Hardware Implementation and Verification by Model-Based Design Workflow - Communication Models to FPGA-based Radio

FPGA briefing Part II FPGA development DMW: FPGA development DMW:

Efficient Modeling and Verification of Analog/Mixed-Signal Circuits

Will Silicon Proof Stay the Only Way to Verify Analog Circuits?

Operating in a Mixed-language Environment Using HDL, C/C++, SystemC and SystemVerilog

Mixed Signal Verification of an FPGA-Embedded DDR3 SDRAM Memory Controller using ADMS

SoC Verification Methodology. Prof. Chien-Nan Liu TEL: ext:

Chapter 2 Getting Hands on Altera Quartus II Software

8. Best Practices for Incremental Compilation Partitions and Floorplan Assignments

Design and Verification of FPGA and ASIC Applications Graham Reith MathWorks

DSP Builder User Guide

Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification

Designing and Prototyping Digital Systems on SoC FPGA The MathWorks, Inc. 1

VCS AMS. Mixed-Signal Verification Solution. Overview. testing with transistor-level accuracy. Introduction. Performance. Multicore Technology

Hardware Design Environments. Dr. Mahdi Abbasi Computer Engineering Department Bu-Ali Sina University

MATLAB AND MODELSIM LINKING

Board-Data Processing. VHDL Exercises. Exercise 1: Basics of VHDL Programming. Stages of the Development process using FPGA s in Xilinx ISE.

Embedded Design without an OS. By Peter de Ruiter D&E September 21 st, Transfer BV

CMPT 250: Computer Architecture. Using LogicWorks 5. Tutorial Part 1. Somsubhra Sharangi

Boolean Logic CS.352.F12

Using DDR for Fusion Devices

SYSTEMS ON CHIP (SOC) FOR EMBEDDED APPLICATIONS

Accelerating FPGA/ASIC Design and Verification

Lecture-50 Intel 8255A: Programming and Operating Modes

Floating-Point to Field-Tests: A Unified Development Environment for Algorithm Research

Accelerate FPGA Prototyping with

ANALOG IP WITH INTELLIGENT IP FROM SYSTEM TO SILICON

Lab 6 : Introduction to Simulink, Link for CCS & Real-Time Workshop

Experiment 3. Getting Start with Simulink

Model-Based Embedded System Design

Glossary. AHDL A Hardware Description Language, such as Verilog-A, SpectreHDL, or VHDL-A, used to describe analog designs.

MAX 10 - ADC. Last updated 8/12/18

EE 330 Laboratory Experiment Number 11

HDL Cosimulation September 2002

Outline. CPE/EE 422/522 Advanced Logic Design L05. Review: General Model of Moore Sequential Machine. Review: Mealy Sequential Networks.

C-Based Hardware Design

Introduction to the Altera Qsys System Integration Tool. 1 Introduction. For Quartus Prime 15.1

AMS Behavioral Modeling

Overview of Digital Design with Verilog HDL 1

Using Mentor Questa for Pre-silicon Validation of IEEE based Silicon Instruments by CJ Clark & Craig Stephan, Intellitech Corporation

DSP Flow for SmartFusion2 and IGLOO2 Devices - Libero SoC v11.6 TU0312 Quickstart and Design Tutorial

Advanced Design System HDL Cosimulation

Basic Xilinx Design Capture. Objectives. After completing this module, you will be able to:

Design and Verification of FPGA Applications

ISE Design Suite Software Manuals and Help

HDL Cosimulation May 2007

Functional Verification of the SiCortex Multiprocessor System-on-a-Chip. Oleg Petlin, Wilson Snyder

Lecture 1: Introduction Course arrangements Recap of basic digital design concepts EDA tool demonstration

Simulink Matlab To Vhdl Route For Full Custom Fpga Rapid

Advanced module: Video en/decoder on Virtex 5

Evolution of CAD Tools & Verilog HDL Definition

Tutorial on Simulation using Aldec Active-HDL Ver 1.0

An Introduction to Programmable Logic

EITF35: Introduction to Structured VLSI Design

FPGA PROTOTYPING BY VERILOG EXAMPLES XILINX SPARTAN 3 VERSION

Digital System Design

EE 330 Laboratory Experiment Number 11 Design and Simulation of Digital Circuits using Hardware Description Languages

Introduction to ARDUINO/SIMULINK

Modeling a 4G LTE System in MATLAB

Universal Asynchronous Receiver/Transmitter Core

Transcription:

Mixed-signal Modeling Using Simulink based-c Shoufeng Mu, Michael Laisne 1

Agenda Objectives of Mixed-signal (MS) modeling Advantages of Simulink based MS modeling Simulink based MS modeling flow 1) Build a simulink model 2) Convert the Simulink model to C code 3) Integrate C model with HDL 4) HDL wrappers Automation scripts Integration and Simulation Summary 2

Objectives of Mixed-signal modeling Provide a behavioral model for the analog/mixed-signal block before the design is ready More often the mixed-signal/analog block is the bottleneck. Provide a solution for a unified chip/system level mixed-signal verification (SOC or SIP) Verify the digital and mixed-signal design in the same environment Verify the mixed-signal interface between digital and analog dies Initiate verification and debug processes earlier to find out design/testability issues before tape-out Enable efficient post silicon mixed-signal test pattern development and verification Can provide a robust environment for the mixed-signal pattern development Test pattern verification before 1 st Silicon arrival ATE timing verification 3

Simulink Based MS Model Development System Spec & Analog Design Analog/MS transistor level design Simulink Model Development Simulink Model Verification C-Models Generation HDL and C-Models Integration (HDL wrapper) Model Certification SIMULINK Real Time Workshop ModelSim/ ADMS 4

Traditional Mixed signal modeling and verification Traditional mixed-signal verification Separate simulation environments Partition the ASIC by Analog-Digital boundary Leave holes in the signal interact between analog and digital blocks Mixed-signal behavioral model C model VHDL-AMS/Verilog-AMS Verilog-A 5

Advantages of Simulink based MS modeling Simulink is a tool for system level modeling and simulation. Continuous, discrete and hybrid simulation Simulations are interactive, so you can change the parameters on the fly and immediately see the results. Integration with Matlab, Extension, Blocksets and Toolboxes. C code is automatically generated by using RTW Can be easily integrated with Verilog/VHDL digital simulation environment No special requirements on the simulator 6

Simulink Based MS Modeling Flow Build the Simulink model Convert Simulink model to c code using RTW Add FLI in C to interface with VHDL or PLI to interface with Verilog and generate exe Create VHDL /Verilog wrappers 7

Build the Simulink Model (1) Example of Simulink Model Build a simple one bit A2D converter using Simulink En_out Vin Rsh sample Csh Vref + - L_clk D-latch Dout Tristate buffer 8

Build the Simulink Model (2) A2d1bit Top Level 9

Build the Simulink Model (3) A2d1bit submodel 10

Build the Simulink Model (4) A2d1bit Sample hold model 11

Build the Simulink Model (5) Behavioral model of Mash22 SD Modulator 12

Build the Simulink Model (6) Behavioral model of Programmable RC Filter 13

Convert Simulink Model To C Code using RTW (Real Time Workshop) Procedures to generate C code using Real Time Workshop Stop time under the "solver" tab in the Simulation Parameter window should be "inf" for infinite The type of the solver options in the simulation Parameter window should be fixed-step Make sure the mode is set to single-tasking Under the Workspace IO tab, make sure everything is unchecked Under the Real-Time Workshop tab, select Target Configuration to be Generic Real-Time Target (grt.tlc) Verify that the "Generate Code is only" button is not selected, then save your model In the simulation Parameter window, under the "Real-Time Workshop" tab, press the "build button" 14

Using FLI To Link C With VHDL(1) library ieee; use ieee.std_logic_1164.all; entity a2d1bit_0_sub is port ( signal Vin : in signal Vref : in signal L_clk : in ); end a2d1bit_0_sub; real; real; real; signal Out_en : in real; signal sample : in real; signal Dout : out real architecture one of a2d1bit_0_sub is attribute foreign : string; attribute foreign of one : architecture is "a2d1bit_0init./a2d1bit_0.modelsim.so"; begin assert false report "Error: Foreign subprogram a2d1bit not called." severity error; end architecture one; 15

Using FLI to link C with VHDL(2) The following Figure illustrates partitioning of the C main function and VHDL entity and architecture C main file (grt_maim.c) architecture one of a2d1bit_0_sub is attribute foreign : string; attribute foreign of one : architecture is "a2d1bit_0init./a2d1bit_0.modelsim.so end architecture one; entity a2d1bit_0_sub is port ( signal Vin : in real; signal Vref : in real; signal L_clk : in real; signal Out_en : in real; signal Dout : out real ); end a2d1bit_0_sub; a2d1bit_0rt_onestep() { /*get the value from VHDL input ports /*execute functionality /*drives value onto VHDL output ports /*sensitize or wakeup call } a2d1bit_0init() { /*memory allocation /*connect to VHDL ports /*sensitize or wakeup call } 16

VHDL Wrappers (1) Vin(real) Vref(real) L_clk(std_logic) outer wrapper Inner wrapper Vin(real) Dout (std_logic) Vref(real) Dout (real) L_clk(real) Out_en(std_logic) Out_en(real) 17

VHDL Wrappers (2) There are two wrappers for the C model The inner wrapper has real inputs and outputs only, and its architecture calls the C library with a foreign attribute The outer wrapper takes care of the conversion of the data format, as well as separating the bits in a digital bus. The name and data type of input/output ports of the outer wrapper should exactly match the pin name of the analog schematic. The inner layer can have different number of output pins for debugging purpose. 18

Automation scripts C code generation, customization and writing VHDL wrappers can be automated by Perl/shell scripts Matlab automation script for C code generation Perl scripts to generate the compile scripts which support different platform Perl scripts to customize code Perl script to generate the VHDL wrappers 19

Integration and Simulation results Can be easily integrated with digital design (VHDL or Verilog) Can be simulated with digital or mixed-signal simulator we successfully integrated the Broad-receiver, Wide Band CODEC, House-keeping ADC, PLLs, TXDAC, etc into our digital simulation environment, and got reasonable simulation results. 20

Summary The Simulink based C models can be certified with transistor level designs With automation scripts, the development cycle of Simulink based C approach is short The Simulink based C models can be easily integrated with VHDL or Verilog design The Simulink based C models can be simulated with digital or mixed-signal simulator With Simulink based C models, we can achieve true chip level or system level mixed-signal verification. 21