Kintex-7: Hardware Co-simulation and Design Using Simulink and Sysgen

Similar documents
Tutorial - Using Xilinx System Generator 14.6 for Co-Simulation on Digilent NEXYS3 (Spartan-6) Board

SATA Storage Duplicator Instruction on KC705 Rev Sep-13

FPGA Co-Simulation of Gaussian Filter Algorithm Application Note

Spartan -6 LX150T Development Kit Hardware Co-Simulation Reference Design Tutorial

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

Spartan -6 LX150T Development Kit Hardware Co-Simulation Reference Design User Guide

ibob ADC Tutorial CASPER Reference Design

KC705 Si570 Programming

Tutorial: Image Filtering, System Generator Matlab/Simulink

Tutorial. CASPER Reference Design

ECT 224: Digital Computer Fundamentals Using Xilinx StateCAD

Using the ChipScope Pro for Testing HDL Designs on FPGAs

Creating the AVS6LX9MBHP211 MicroBlaze Hardware Platform for the Spartan-6 LX9 MicroBoard Version

ISim Hardware Co-Simulation Tutorial: Accelerating Floating Point FFT Simulation

KC705 Ethernet Design Creation October 2012

EE 367 Logic Design Lab #1 Introduction to Xilinx ISE and the ML40X Eval Board Date: 1/21/09 Due: 1/28/09

KC705 PCIe Design Creation with Vivado August 2012

First Start with Vivado

KC705 Si5324 Design October 2012

Hardware Demonstration Design

Adding the ILA Core to an Existing Design Lab

Avnet Zynq Mini Module Plus Embedded Design

Using ChipScope. Overview. Detailed Instructions: Step 1 Creating a new Project

VCU110 GT IBERT Design Creation

Pico ChipScope Documentation

Vivado Design Suite User Guide

DSP Builder User Guide

ISim Hardware Co-Simulation Tutorial: Accelerating Floating Point Fast Fourier Transform Simulation

Agenda. Introduction FPGA DSP platforms Design challenges New programming models for FPGAs

Avnet S6LX16 Evaluation Board and Maxim DAC/ADC FMC Module Reference Design

ECE 491 Laboratory 1 Introducing FPGA Design with Verilog September 6, 2004

Vivado Design Suite Tutorial. Model-Based DSP Design using System Generator

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

System Ace Tutorial 03/11/2008

Feaser

Application Note for EVP

ML410 VxWorks BSP and System Image Creation for the BSB DDR2 Design Using EDK 8.2i SP1. April

Xilinx Platform Studio tutorial

Avnet Speedway Design Workshop

Lab 1: Introduction to Verilog HDL and the Xilinx ISE

Supporting Custom Boards with DSP Builder

ML410 BSB DDR2 Design Creation Using 8.2i SP1 EDK Base System Builder (BSB) April

Vivado Fpga Xilinx. Xilinx Vivado Vs Ise - S2i xilinx vivado vs ise user comparison of the fpga development tools 3/6 vivado 2013.

SATA-IP Device Demo Instruction on AC701 Rev Apr-14

ISim Hardware Co-Simulation Tutorial: Accelerating Floating Point FFT Simulation

QSPI Flash Memory Bootloading In Standard SPI Mode with KC705 Platform

Xilinx ISE8.1 and Spartan-3 Tutorial EE3810

ChipScope Inserter flow. To see the Chipscope added from XPS flow, please skip to page 21. For ChipScope within Planahead, please skip to page 23.

Getting Started with PetaLinux SDK

Building an Embedded Processor System on a Xilinx Zync FPGA (Profiling): A Tutorial

SP601 Standalone Applications

Simulate the Design using the XSim Simulator

Pico Computing M501 PSP User Guide Linux Version 1.0.1

EEC180B DIGITAL SYSTEMS Spring University of California, Davis. Department of Electrical and Computer Engineering

Xilinx ChipScope ICON/VIO/ILA Tutorial

AC701 Built-In Self Test Flash Application April 2015

Integrating a Video Frame Buffer Controller (VFBC) in System Generator Author: Douang Phanthavong and Jingzhao Ou

MicroBlaze Tutorial on EDK 10.1 using Sparatan III E Behavioural Simulation of MicroBlaze System

ROCCC 2.0 Pico Port Generation - Revision 0.7.4

KC705 GTX IBERT Design Creation October 2012

Xilinx ISE8.1 and Spartan-3 Tutorial (Prepared by Kahraman Akdemir based on Professor Duckworth's Tutorials updated September 2006)

CSE 591: Advanced Hardware Design and Verification (2012 Spring) LAB #0

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

Configuring the Xilinx Spartan-6 LX9 MicroBoard

SP605 Standalone Applications

MATLAB AND MODELSIM LINKING

Vivado Design Suite Tutorial

Xilinx ISE Synthesis Tutorial

Vivado Design Suite Tutorial. Designing IP Subsystems Using IP Integrator

Tutorial on FPGA Design Flow based on Aldec Active HDL. Ver 1.5

SATA-IP Host Demo Instruction on SP605 Rev Jan-10

ML410 VxWorks BSP and System Image Creation for the BSB Design Using EDK 8.2i SP1. April

ML605 PCIe x8 Gen1 Design Creation

ModeChanger

Fresno (MAXREFDES11#) ZedBoard Quick Start Guide

Spartan-6 LX9 MicroBoard Embedded Tutorial. Tutorial 1 Creating an AXI-based Embedded System

Vivado Design Suite Tutorial. Designing IP Subsystems Using IP Integrator

Introduction to DSP/FPGA Programming Using MATLAB Simulink

2IN35 VLSI Programming Lab Work Assignment 1: Hardware design using Verilog

Sundance Multiprocessor Technology Limited. Capture Demo For Intech Unit / Module Number: C Hong. EVP6472 Intech Demo. Abstract

ISim In-Depth Tutorial. UG682 (v13.4) January 18, 2012

Xilinx Answer Xilinx PCI Express Windows DMA Drivers and Software Guide

EITF35 - Introduction to Structured VLSI Design (Fall 2017) Course projects

NVMe-IP by AB17 Demo Instruction Rev1.0 4-May-18

Vivado Design Suite Tutorial. Designing IP Subsystems Using IP Integrator

ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University

Nexys 2/3 board tutorial (Decoder, ISE 13.2) Jim Duckworth, August 2011, WPI. (updated March 2012 to include Nexys2 board)

VHDL introduction Notes

Sundance Multiprocessor Technology Limited. Capture Demo For Intech Unit / Module Number: C Hong. EVP6472 Intech Demo. Abstract

Reference System: Determining the Optimal DCM Phase Shift for the DDR Feedback Clock for Spartan-3E Author: Ed Hallett

Tutorial StellarIP Interface To AXI Interface

Impulse Embedded Processing Video Lab

Basic HLS Tutorial. using C++ language and Vivado Design Suite to design two frequencies PWM. modulator system

Carmel (MAXREFDES18#) LX9 MicroBoard Quick Start Guide

ML410 BSB Design Adding the PLB TEMAC with RGMII Using EDK 8.2i SP1. April

ISim Hardware Co-Simulation Tutorial: Processing Live Ethernet Traffic through Virtex-5 Embedded Ethernet MAC

Revision: January 28, Henley Court Pullman, WA (509) Voice and Fax

Evaluation board for NXP LPC2103. User Guide. Preliminary Version updated 27 th Aug TechToys Company All Rights Reserved

ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University. Laboratory Exercise #1 Using the Vivado

PSIM Tutorial. How to Use SimCoder with TI F28335 Target Powersim Inc.

Transcription:

Kintex-7: Hardware Co-simulation and Design Using Simulink and Sysgen Version 1.2 April 19, 2013

Revision History Version Date Author Comments Version Date Author(s) Comments on Versions No Completed 1.0 4/15/2013 Richard Document created. 1.1 4/18/2013 Richard Fixed and added links in Other Resources. 1.2 4/19/2013 Richard Added info on cable drivers. Formatting. 2

Table of Contents Revision History... 2 Table of Contents... 3 1 Starting Simulink with Sysgen... 4 2 Creating a Simulink Model for Co-simulation... 5 3 Accessing Shared Memories from MATLAB... 9 4 Other Resources...11 3

1 Starting Simulink with Sysgen You will need to copy the cable driver plugin to your home directory before you can program and communicate with the Kintex-7 eval board (KC705): cp -r /home/rdorrance/.cse/. To run System Generator for ISE 14.3 with Simulink in MATLAB R2011a, you first need to source the Xilinx toolset: source /opt/xilinx/14.3/ise_ds/settings64.sh To launch System Generator type: sysgen This will launch MATLAB and run the necessary startup files. Once finished you should see: Installed System Generator dynamically. Using ISE enable System Generator. To launch Simulink from MATLAB: simulink 4

2 Creating a Simulink Model for Co-simulation First create a new Simulink model file (.mdl): File New Model (Ctrl + N) Save the file to a folder called tutorial and name it tut1.mdl. Next add the System Generator block to the model file from the library browser: Xilinx Blockset Basic Elements System Generator 5

Next double click the system generator block to open up the configuration menu. In the Compilation menu select: Compilation Hardware Co-Simulation KC705 JTAG Click the settings tab for the Compilation menu and change the clock frequency to 100MHz. 6

Now create the following model using Xilinx blocks. List of blocks used: Gateway In: This block is used to define the inputs to the Xilinx block system. It converts MATLAB doubles into either fixed or floating point values for a specified bit width. Gateway Out: This block is used to define the outputs of the Xilinx block system to Simulink. Shared Memory: A shared BRAM whose memory space is accessible by the host computer. You can specify the data type, memory size, latency, and read/write functionality of block. From Register: This is a shared software addressable register that is accessible by the host computer. Use this to specify data from the host computer to the FPGA. To Register: This is a shared software addressable register that is accessible by the host computer. Use this to specify data from the FPGA to the host computer. Constant: There are both Xilinx and MATLAB Simulink version of this block. This is used to specify a numerical constant. Terminator: Connect this block to unused output ports to prevent simulation/compilation errors. 7

For this demo, change the name of the shared memory to bram0 and the depth to 1024 under the Basic menu. Also check Specify explicit output type and select Floating-point in the Output menu. Change the name of the From Register to reg0 and its output type to Floating-point as well. Similarly, change the To Register s name to reg1 and the type to Floating-point. Next change addr to a fixed-point 10-bit unsigned number, din_bram to floating-point (single precision), and we to Boolean. Save and click the generate button in the System Generator block. This will generate a bit file (tut1_cw.bit), a simulink block for hardware co-simulation (tut1_hwcosim_lib.mdl shown below), and a hardware co-simulation configuration file (tut1_cw.hwc). 8

3 Accessing Shared Memories from MATLAB An example of how to use the MATLAB interface to run hardware con-simulations in shown in tut1_matlab_interface.m. % Specifies a hardware co-simulation project file. prj = 'netlist/tut1_cw.hwc'; % Configure the co-simulation interface. Note: This needs only to be % done once, since the configuration is stored back into the hwc file % This will launch a configuration GUI. xlhwcosimconfig(prj, true); % Creates a hardware co-simulation instance from the project. h = Hwcosim(prj); % Opens and configures the hardware co-simulation interface. open(h); Select Free running for the Clock source and click OK. This will configure the FPGA and start the hardware co-simulation. 9

You can create shared memory objects in MATLAB that you can treat just like arrays. % Creates a shared memory instance 'bram0'. It connects the % corresponding shared memory running in hardware. bram0 = Shmem('bram0'); % Creates a shared memory instance 'reg0'. It connects the % corresponding shared memory running in hardware. reg0 = Shmem('reg0'); % Creates a shared memory instance 'reg1'. It connects the % corresponding shared memory running in hardware. reg1 = Shmem('reg1'); You can only write double-precision integer values into a shared memory (up to 32 bits per word). % Writes random numbers to memory address 0 to 49 of bram0. test_values_in_bram = round(rand(1, 50)*(2^32)); bram0(0:49) = test_values_in_bram; % Read the values from memory address 0 to 49 of bram0. test_values_out_bram = bram0(0:49); % Check for errors bram_errors = sum((test_values_out_bram - test_values_in_bram) ~= 0) To read and write to a register, you must always specify address 0. % Writes a random number to reg0. test_value_in_reg = round(rand*(2^32)); reg0(0) = test_value_in_reg; % Read the value from from reg0. test_value_out_reg = reg1(0); % Check for errors reg_errors = sum((test_value_out_reg - test_value_in_reg) ~= 0) 10

When you are finished you must remember to release the shared memories and the hardware co-simulation. If you forget this step, the device will be locked and the computer/fpga will need to be reset. % Releases the shared memory instances. release(bram0); release(reg0); release(reg1); % Releases the hardware co-simulation instance. release(h); 4 Other Resources M-Code Access to Hardware Co-Simulation Supporting New Boards through JTAG Hardware Co-Simulation Kintex-7 FPGA Embedded Kit on the Wiki 11