User Guide Gennum GN4124 to Wishbone bridge

Similar documents
BRIDGE PIF / WISHBONE

External Parallel Port to Internal Wishbone Interface

ICTP Latin-American Advanced Course on FPGADesign for Scientific Instrumentation. 19 November - 7 December, 2012

Why a new kit Introduction to OH OH products Gateware architecture New tools Future work & conclusions. CERN s FMC kit

Spartan-6 & Virtex-6 FPGA Connectivity Kit FAQ

MDIO Master and Slave Controllers

MachXO2 Low Power Control Demo User s Guide

White-Rabbit NIC Gateware

AN OPEN-SOURCE VHDL IP LIBRARY WITH PLUG&PLAY CONFIGURATION

Designing with ALTERA SoC Hardware

Creating PCI Express Links in Intel FPGAs

Digital Design LU. Lab Exercise 1

SD Card Controller IP Specification

Timing Analysis in Xilinx ISE

WB_UART8 Serial Communications Port

SOLVING VENDOR LOCK-IN IN VME SINGLE BOARD COMPUTERS THROUGH OPEN-SOURCING OF THE PCIE-VME64X BRIDGE

Data Side OCM Bus v1.0 (v2.00b)

LogiCORE IP AXI Master Lite (axi_master_lite) (v1.00a)

WB_INTERFACE Custom Wishbone Interface

Wishbone SoC Reference Design for EFM-02

WB_INTERFACE - Configuring Item Types

PCI Express Basic Demo Verilog Source Code User s Guide

Tutorial on FPGA Design Flow based on Xilinx ISE Webpack and ModelSim. ver. 1.5

LogiCORE IP AXI DMA v6.01.a

Simply RISC S1 Core Specification. - version 0.1 -

WISHBONE System-on-Chip (SoC) Interconnection Architecture for Portable IP Cores

Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 11/01/17

TEST REPORT POWER SUPPLY AND THERMAL V2

Designing Embedded Processors in FPGAs

LogiCORE IP AXI DataMover v3.00a

Advanced module: Video en/decoder on Virtex 5

WISHBONE System-oOn-Chip (SoC) Interconnection Architecture for Portable IP Cores. Preliminary

Introduction to Programmable. Logic

Tutorial on FPGA Design Flow based on Xilinx ISE Webpack and ModelSim. ver. 1.3

ADM-PCIE-9H7 Support & Development Kit Release: 0.1.1

LogiCORE IP AXI Video Direct Memory Access v5.00.a

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

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

Accelerating System Designs Requiring High-Bandwidth Connectivity with Targeted Reference Designs

WB_SDHC - Wishbone SDHC Controller

Block Diagram. mast_sel. mast_inst. mast_data. mast_val mast_rdy. clk. slv_sel. slv_inst. slv_data. slv_val slv_rdy. rfifo_depth_log2.

GPIO IP Core Specification

LogiCORE IP AXI Video Direct Memory Access v4.00.a

SMT166-FMC User Guide

Pico Computing M501 PSP User Guide Linux Version 1.0.1

Parallella Linux - quickstart guide. Antmicro Ltd

Tutorial StellarIP Interface To AXI Interface

The Veloce Emulator and its Use for Verification and System Integration of Complex Multi-node SOC Computing System

ESA Contract 18533/04/NL/JD

Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 10/25/16

S2C K7 Prodigy Logic Module Series

PCI to SH-3 AN Hitachi SH3 to PCI bus

FPGA memory performance

Project 1a: Hello World!

LogiCORE IP AXI DMA v6.02a

Spartan-6 and Virtex-6 FPGA Embedded Kit FAQ

PCI Express Agent_SW. VME64X Agent_SW. NoC M/S BACK-END. Port_a. Port_k. NoC M/S BACK-END. USER Agent_SW. IO Specific. Overview

Using Synplify Pro, ISE and ModelSim

Xilinx Answer Generating Quick Test Cases for Xilinx Integrated PCI Express Block and Serial RapidIO Cores Verilog Simulation

Verilog Design Entry, Synthesis, and Behavioral Simulation

SimXMD Simulation-based HW/SW Co-debugging for field-programmable Systems-on-Chip

Tutorial on FPGA Design Flow based on Xilinx ISE WebPack and ModelSim. ver. 2.0

Test and Verification Solutions. ARM Based SOC Design and Verification

Copyright 2014 Xilinx

System-On-Chip Design with the Leon CPU The SOCKS Hardware/Software Environment

Connect Tech Inc. Александр Баковкин Инженер отдела сервисов SWD Software

4K Format Conversion Reference Design

Designing with Nios II Processor for Hardware Engineers

Final Presentation. Network on Chip (NoC) for Many-Core System on Chip in Space Applications. December 13, 2017

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

Introduction to the Qsys System Integration Tool

SimXMD: Simulation-based HW/SW Co-Debugging for FPGA Embedded Systems

SimXMD Co-Debugging Software and Hardware in FPGA Embedded Systems

High Bandwidth Memory (HBM2) Interface Intel FPGA IP Design Example User Guide

Utility Bus Split (v1.00a)

Building Combinatorial Circuit Using Behavioral Modeling Lab

ADM-PCIE-KU3 Support & Development Kit Release: 2.0.0

Bus AMBA. Advanced Microcontroller Bus Architecture (AMBA)

Virtual Input/Output v3.0

Microblaze for Linux Howto

FMC TDC 1 ns 5 channels gateware guide. for SPEC SVEC carriers

VXS-610 Dual FPGA and PowerPC VXS Multiprocessor

AMBA PCI Bridge Quick Start

HyperBus Memory Controller (HBMC) Tutorial

Generic Serial Flash Interface Intel FPGA IP Core User Guide

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

LogiCORE IP AXI Video Direct Memory Access (axi_vdma) (v3.01.a)

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

Vivado Walkthrough ECGR Fall 2015

Turbo Encoder Co-processor Reference Design

AHB-Lite Multilayer Interconnect IP. AHB-Lite Multilayer Interconnect IP User Guide Roa Logic, All rights reserved

AccelDSP tutorial 2 (Matlab.m to HDL for Xilinx) Ronak Gandhi Syracuse University Fall

Designing with ALTERA SoC

AL8259 Core Application Note

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

A Hardware Filesystem Implementation for High-Speed Secondary Storage

Application Note for EVP

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

Getting Started Guide with AXM-A30

Xilinx ChipScope ICON/VIO/ILA Tutorial

Transcription:

ORGANISATION EUROPÉENNE POUR LA RECHERCHE NUCLÉAIRE EUROPEAN ORGANIZATION FOR NUCLEAR RESEARCH CERN BE-CO-HT User Guide Gennum GN4124 to Wishbone bridge May 2010 Edited by: Simon Deprez Checked by: Erik van der Bij Abstract Gennum is providing an IP core that can be used for hardware designs with the PCI express chip interface GN412x. This document describes how to extend the functionality to implement a simple wishbone master and shows its use in a simple test application.

Revision History Version Date Notes 0.1 10-03-2010 Created 0.2 01-03-2010 First draft 0.2 14-04-2010 Add Wishbone master description 0.4 27-04-2010 Add Wishbone slave description 0.5 04-05-2010 More about Wishbone master 0.6 18-05-2010 Add linux informations and review Contents Introduction 3 1 Gennum IP core 3 1.1 Gennum documentation.................................... 3 1.2 Gennum ISE project..................................... 4 1.3 Linux Gendiag compilation.................................. 4 2 Wishbone master 4 2.1 Application Attachment layer modifications......................... 4 2.1.1 Arbiter........................................ 5 2.1.2 Packet decoder.................................... 5 2.2 Wishbone master module................................... 5 2.2.1 Wishbone master limitations............................. 6 2.2.2 Write request..................................... 6 2.2.3 Read request..................................... 7 2.2.4 Wishbone datasheet.................................. 7 2.3 Wishbone slave........................................ 8 3 DMA controller 9 3.1 Gennum Pinto project..................................... 9 4 Gennum Simulation Testbench 9 4.1 Some issues.......................................... 9 4.1.1 Path error....................................... 9 4.1.2 Error with address in BFM scripting using C.................... 9 4.1.3 Testbench with Linux................................. 9 4.2 Makefile............................................ 9 4.3 BFM script.......................................... 10 4.4 Simulation........................................... 10 Summary 10 List of Figures 1 Gennum core with Wishbone master............................. 5 2 Write request......................................... 6 3 Read request.......................................... 7 CERN BE-CO-HT Page 2 of 10

Introduction This project aims to provide a Wishbone master generic interface for FMC 1 projects controlled by a PCI express access. The PCIe FMC carrier 2 will be associated with several FMC mezzanines. This file explains how to start with the GN4124 IP core. It describes the testbench environment provided by Gennum (Beta version) to simulate the IP. The Wishbone master is written as simple as possible 1 Gennum IP core 1.1 Gennum documentation Gennum documentation files can be obtained from the following url: http://my.gennum.com/mygennum/view.php/gn4124-gullwing A registration is required. The registration must be validated. The reader is required to be acquainted with the following documentation: GN412x PCI Express family Reference Manual (52624-0): Overview (p 11 12), Timing diagrams (p 41, 52 55), DMA core diagram (p 84); GN412x FPGA IP Hardware Design Guide (51860-2): Overview (p 7), DMA sequencer limitations (p 9), DMA core diagram (p 22), Project register map (p 50); GN412x RDK Software Design Guide (51859-1): Describes the software furnished with the development kit; GN412x Simulation Test Bench User Guide (53716): Tutorial for the simulation environment; GN412x BFM Reference Manual: Describes the Bus Functional Model used for the Testbench. The testbench zip archive (GN412x_TestBench_ModelSim(Beta_0.2.0).zip) contains the last two documents. 1 See http://www.vita.com/fmc. 2 See http://www.ohwr.org/projects/fmc-pci-carrier. CERN BE-CO-HT Page 3 of 10

1.2 Gennum ISE project The Xilinx ISE project name is Lambo. The project must be migrated to a new version of Xilinx ISE. The project files can be obtained from the following url (a registration is required): http://my.gennum.com/mygennum/view.php/gn4124-gullwing. Select GN412x FPGA IP Xilinx Version 2009-05-26. After synthesis, the bitstream can be downloaded on the Gennum development kit with the gendiag program. The gendiag program can be downloaded from the Gennum web site. Select GN412x RDK SW 1.3 Windows. A linux version is existing. Edit the file C:\Program Files\GN412x_RDK\GenDiag\gendiag.ini. The last lines contains the path of the Xilinx bitstream file : <path>\lambo.bit Run gendiag. 1.3 Linux Gendiag compilation Read the file./readme. In the file./src/kdrv/linux/uio.c, add the folowing line (with Ubuntu): #include <linux/sched.h> 2 Wishbone master This project is based on the Gennum FlexDMA IP core. Gennum IP provides a CSR interface similar to Wishbone but not totally compatible. There is no acknowledge that permit to slave to indicates normal termination of a bus cycle. There is no master signal that indicates a cycle. The DMA sequencer is driven with the original target controller interface. A modification of this interface implies the modification of the sequencer. The wishbone master is a new module. The original target controller module is kept and used to control the DMA sequencer. 2.1 Application Attachment layer modifications The Application attachment layer is the main part of the Gennum core. See Figure 1. It contains DMA masters and the target controller. A Wishbone master interface is added. This new interface transforms PCIe write into Wishbone write and a PCIe read into a Wishbone delayed read. The./fpga_project/lambo/design/rtl/ folder in the testbench environment contains all the Gennum IP files. CERN BE-CO-HT Page 4 of 10

AAL Application attachment Layer L2P DMA Controller Arbiter to GN4124 P2L DMA Controller wb_adr_o wb_dat_i wb_dat_o wb_cyc_o wb_sel_o wb_stb_o wb_we_o wb_ack_i... DMA sequencer Target controller Wishbone master wbcsr_arb_req arb_wbcsr_gnt wbcsr_data wbcsr_arb_valid wbcsr_arb_dframe... Packet decoder from GN4124 Wishbone interface (added) pd_csr_sel pd_data... Figure 1: Gennum core with Wishbone master 2.1.1 Arbiter Add an entry for wbmaster module. The file arb.v is modified to accept packets of the wbmaster module. The added signals are : wbm_arb_data : input; wbm_arb_valid : input; wbm_arb_dframe : input; wbm_arb_req : input; arb_wbm_gnt : output. 2.1.2 Packet decoder The packet decoder (packet_decoder.v) is not modified. 2.2 Wishbone master module A Wishbone master based on Gennum Target module (tar.v) is added. It supports single read and single write of 32 bit data. The Wishbone bus clock frequency is 100 MHz. The Gennum FlexDMA local clock is used. CERN BE-CO-HT Page 5 of 10

Addresses between 400h and 7FCh are routed to the wishbone master (see dma.v). On the Wishbone bus the address range is 100h 1FFh for 32 bit registers. This can be redefined in the file dma.v. Wishbone signals are added to the application attachment layer entity (dma.v) : wb_adr_o : output; wb_dat_i : input; wb_dat_o : output; wb_cyc_o : output; wb_sel_o : output; wb_stb_o : output; wb_we_o : output; wb_ack_i : input. This signals are also present in wbmaster module and replace the original target interface(see tar.v). 2.2.1 Wishbone master limitations Data transfers are limited to single writes and single reads. During a wishbone cycle, new requests are ignored. The Wishbone signal ERR_I is not used. PCI express signal acknowledge is emitted by the GN4124 chip. The user can t see if the cycle is really finished. 2.2.2 Write request When a single write packet is addressed to the wishbone master from the packet decoder, the module drives the wishbone bus signals (see figure 2). Then, the module waits for an acknowledge from a wishbone slave to terminate the cycle. During the wishbone cycle, the other PCIe requests are ignored. Wishbone cycles have a timeout of 7 clock cycles (see wbmaster.v). lclk pd_csr_sel pd_data [31:0] A0 H1 D1 pd_data [63:32] H0 D0 A1 wb_adr_o 0 A0 0 A1 0 wb_dat_o 0 D0 0 D1 0 wb_cyc_o wb_sel_o 0 F 0 F 0 wb_stb_o wb_we_o wb_ack_i Figure 2: Write request CERN BE-CO-HT Page 6 of 10

2.2.3 Read request The process is the same as for a write request but the write enable signal isn t asserted. When the wishbone cycle is terminated, a simple read completion packet is sent to the arbiter (see figure 3). lclk pd_csr_sel pd_data [31:0] pd_data [63:32] H0 A0 wb_adr_o 0 A0 0 wb_dat_i wb_cyc_o wb_sel_o 0 F 0 wb_stb_o wb_we_o wb_ack_i D0 csr_arb_req arb_csr_gnt csr_arb_data[31:0] 0 H0 0 csr_arb_data[63:32] 0 D0 0 csr_arb_valid 00 11 00 csr_arb_dframe 00 01 00 Figure 3: Read request 2.2.4 Wishbone datasheet WISHBONE DATASHEET for the 32-bit MASTER with 8-bit granularity Description General description Supported cycles Data port, size: Data port, granularity: Data port, maximum operand size Data transfer ordering: Clock frequency constraints: Supported signal list and cross reference to equivalent WISHBONE signals Specification Wishbone master controlled by PCI express MASTER, READ/WRITE 32-bit 8-bit 32-bit Big endian and/or little endian 100 MHz (Gennum IP local clock) Signal Name WISHBONE Equiv. CLK_O CLK_I CYC_O CYC_O STB_O STB_O ADR_O(10..0) ADR_O() DAT_I(31..0) DAT_I() DAT_O(31..0) DAT_O() WE_O WE_O ACK_I ACK_I CERN BE-CO-HT Page 7 of 10

2.3 Wishbone slave A Wishbone slave module (wb_debug.vhd) was generated with the CERNwbgen2 3 script with 3 registers of 8 bits for tests. It was connected to debug leds and buttons of the gennum kit and to the wishbone master. The input description file for wbgen2 is wb_debug.wb : -- here comes our peripheral definition peripheral { -- short (human-readable) name for the peripheral. name = "Gennum card debug Wishbone slave core"; -- a longer description, if you want description = "An 8-bit output port"; -- name of the target VHDL entity to be generated hdl_entity = "wb_gpio_debug"; -- prefix for all the generated ports belonging to our peripheral prefix = "gpio"; -- Ouput register reg { name = "LED port"; description = "Output port"; prefix = "led"; field { name = "Port output value"; description = "Reflects the state of LEDs."; type = SLV; size = 8; access_bus = READ_WRITE; access_dev = READ_ONLY; reg { name = "DEBUG port"; description = "Input port"; prefix = "debug"; field { name = "Port input value"; description = "Reflects the state of the DEBUG switch."; type = SLV; size = 8; access_bus = READ_ONLY; access_dev = WRITE_ONLY; reg { name = "Test register"; description = "Test register"; prefix = "test"; field { name = "Test register"; description = "Test read and write register"; type = SLV; size = 8; access_bus = READ_WRITE; access_dev = READ_ONLY; 3 See Wishbone slave generator: http://www.ohwr.org/projects/wishbone-gen. CERN BE-CO-HT Page 8 of 10

3 DMA controller 3.1 Gennum Pinto project This project contains a Xilinx DDR2 ram controller used for DMA transfer. The project must be migrated to a new version of Xilinx ISE. If the file C:\pinto\pinto.xcf cannot be found by the synthesizer, change the path by click-right on Synthesize - XST and choose Process properties. Set the good path for the Synthesis Constraints File. 4 Gennum Simulation Testbench 4.1 Some issues 4.1.1 Path error The file modelsim.ini contain an absolute path reference to the file vlog.opt at line 256. Change the line to : OptionFile = vlog.opt 4.1.2 Error with address in BFM scripting using C The long long int variables make errors in the format string of printf commands when the MinGW (Windows) compiler is used. In the address placeholders of the format string, the length parameter ll must be replaced by I64. Replace %016llX by %016I64X in the file./test_builder/lib/model.c at lines 64, 73, 288 and 298. 4.1.3 Testbench with Linux The names of the UNISIM library files are containing capitals letters. The Makefile uses small letter for this files. In the.\unisims\ folder, run the command ; rename y/a-z/a-z/ * 4.2 Makefile Rules are added for both Wishbone master wbmaster.v (line 51-53) and wishbone slave wb_gpio.vhd (line 49-51). Dependencies are added in the top module (lambo.v, line 45) rule in the Makefile. CERN BE-CO-HT Page 9 of 10

4.3 BFM script Gennum provides a Testbench environment that emulates the local bus between the GN4124 chip and the FPGA. The Bus Functional Model is used to simulate PCI access for the FPGA system. The file wbmaster_test.c contains a script with read and write requests for the wishbone bus. 4.4 Simulation Read the GN412x Simulation Test Bench User Guide (53716). The file./test_builder/wbmaster_test.c is a simple BFM script used for the testbench with the wishbone master. Open a terminal and use the command : test wbmaster_test In Modelsim, run the simulation : do lambo.do Summary The modifications made to the files original from Gennum made possible to implement a Wishbone master that is simple and allows single read and single write cycles of 32 bit data. CERN BE-CO-HT Page 10 of 10