Instructions to build HIBI_PE_DMA testing system (SOPC+NIOS II Eclipse) Lasse Lehtonen Last modification: 29.3.2011.

Slides:



Advertisements
Similar presentations
Xilinx 6.3 Tutorial Integrated Software Environment (ISE) Set up basic environment Select Gates or Modules to Be simulated (Insert Program Code) Run Waveform.
Advertisements

Chapter 2 How Hardware and Software Work Together.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 3
Creating and Editing a Web Page Using Inline Styles
Slide 1CPU Emulator Tutorial This program is part of the software suite that accompanies the book The Digital Core, by Noam Nisan and Shimon Schocken 2003,
Internal Logic Analyzer Final presentation-part B
Avalon Switch Fabric. 2 Proprietary interconnect specification used with Nios II Principal design goals – Low resource utilization for bus logic – Simplicity.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 3: Input/output and co-processors dr.ir. A.C. Verschueren.
The CPU. Parts of the CPU Control Unit Arithmetic & Logic Unit Registers.
A NoC Generation and Evaluation Framework
Presenter : Chien-Hung Chen Tsung-Cheng Lin Kuan-Fu Kuo EICE team Open On-Chip Debugger Ch6. Design and Architecture.
Interrupts What is an interrupt? What does an interrupt do to the “flow of control” Interrupts used to overlap computation & I/O – Examples would be console.
NIOS II Ethernet Communication Final Presentation
Infineon Technologies Corp. June 99 1 HOT167-1 Version 2.0 F PWMmax = x 50ns = 78 kHz Pulse Width Modulation Unit (PWM) (20 MHz)  4 independent.
Technion – Israel Institute of Technology Department of Electrical Engineering High Speed Digital Systems Lab Project performed by: Naor Huri Idan Shmuel.
Students:Gilad Goldman Lior Kamran Supervisor:Mony Orbach Part A Presentation Network Sniffer.
Using PDG with e2studio: Example
ECE Department: University of Massachusetts, Amherst Lab 1: Introduction to NIOS II Hardware Development.
CSCE 313: Embedded Systems Multiprocessor Systems
Performed by:Gidi Getter, Shir Borenstein Supervised by:Ina Rivkin Final Presentation 21/07/2008 המעבדה למערכות ספרתיות מהירות High speed digital systems.
PCI-Express Network Sniffer Characterization Presentation Project Period : 2 semesters Students: Neria Wodage Aviel Tubul Advisor: Mony Orbach 17/12/2007.
System Resources INFO1119 (Fall 2012).
By: Nadav Haklai & Noam Rabinovici Supervisors: Mike Sumszyk & Roni Lavi Semester:Spring 2010.
How Hardware and Software Work Together
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
Computer System Laboratory
8253 TIMER. Engr 4862 Microprocessors 8253 / 8254 Timer A.k.a. PIT (programmable Interval Timer), used to bring down the frequency to the desired level.
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Project Management November.
Project Goals 1.Get to know Quartus SoPC builder environment 2.Stream 2.Stream Video 3.Build 3.Build foundation for part B - Tracking system.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
ECE Department: University of Massachusetts, Amherst Using Altera CAD tools for NIOS Development.
Interrupts and DMA CSCI The Role of the Operating System in Performing I/O Two main jobs of a computer are: –Processing –Performing I/O manage and.
Mail merge I: Use mail merge for mass mailings Perform a complete mail merge Now you’ll walk through the process of performing a mail merge by using the.
Top Level View of Computer Function and Interconnection.
© 2005 Altera Corporation SOPC Builder: a Design Tool for Rapid System Prototyping on FPGAs Kerry Veenstra Workshop on Architecture Research using FPGA.
Stanford µSequencer December Motivation Control, initialization, and constant maintenance of Avalon peripherals –Perfectly deterministic Microprocessor.
Lab 10 Department of Computer Science and Information Engineering National Taiwan University Lab10 – Debugging II 2014/12/2 1 /16.
Interrupts By Ryan Morris. Overview ● I/O Paradigm ● Synchronization ● Polling ● Control and Status Registers ● Interrupt Driven I/O ● Importance of Interrupts.
NIOS II Ethernet Communication Final Presentation
The FPX KCPSM Module Exercise 1 Henry Fu The FPX KCPSM Module Exercise: Network Data Encryption / Decryption Using ROT13 Algorithm Henry Fu Washington.
Fall 08, Oct 31ELEC Lecture 8 (Updated) 1 Lecture 8: Design, Simulation Synthesis and Test Tools ELEC 2200: Digital Logic Circuits Nitin Yogi
NAND Flash Failure Behavior Sponsored By Micron Technology Inc.
Altera’s Excalibur Development System Tyson Hall School of Electrical and Computer Engineering Georgia Institute of Technology.
© 2003 Xilinx, Inc. All Rights Reserved System Simulation.
Network On Chip Platform
Lab 2 Parallel processing using NIOS II processors
A Skeleton NIOS II Project for the DE1 board :
Additional Hardware Optimization m Yumiko Kimezawa October 25, 20121RPS.
Ethernet Bomber Ethernet Packet Generator for network analysis
Programming - Motion Intro to Robotics. Motors and Sensors Setup The first thing we need to do is tell ROBOTC that we have motors on our robot. Choose.
Hands-On Microsoft Windows Server 2008 Chapter 5 Configuring Windows Server 2008 Printing.
Asymmetric FPGA-loaded hardware accelerators for FPGA- enhanced CPU systems with Linux Performed by:Avi Werner William Backshi Instructor:Evgeny Fiksman.
Amdahl’s Law & I/O Control Method 1. Amdahl’s Law The overall performance of a system is a result of the interaction of all of its components. System.
Perform a complete mail merge Lesson 14 By the end of this lesson you will be able to complete the following: Use the Mail Merge Wizard to perform a basic.
Lab 1: Using NIOS II processor for code execution on FPGA
Chapter Objectives In this chapter, you will learn:
HIBI_PE_DMA Example.
PRU-ICSS Programming with CCS
HIBI_PE_DMA ver author: Ari Kulmala documentation: Juha Arvio Modified: Lasse Lehtonen Last modification:
Avalon Switch Fabric.
Download and Installation of code::blocks
Scripts In Matlab.
Computer System Laboratory
Computer System Laboratory
Review of Previous Lesson
Øyvind Hagen Senior Hardware Developer
ECE 3567 Microcontrollers Lab
Presentation transcript:

Instructions to build HIBI_PE_DMA testing system (SOPC+NIOS II Eclipse) Lasse Lehtonen Last modification:

Intro This document describes briefly how to build a SOPC and NIOS II Eclipse project to be used with the associated system level testbench and examples (..tb/system/*)

Abbreviations HPD = HIBI_PE_DMA

Test system to be created Nios dual-port RAM (on-chip) dual-port RAM (on-chip) HIBI_PE_DMA (DMA) HIBI_PE_DMA (DMA) HIBI wrapper instr.memory (on/off-chip) instr.memory (on/off-chip) Nios dual-port RAM (on-chip) dual-port RAM (on-chip) HIBI_PE_DMA (DMA) HIBI_PE_DMA (DMA) HIBI wrapper HIBI bus instr.memory (on/off-chip) instr.memory (on/off-chip) Nios dual-port RAM (on-chip) dual-port RAM (on-chip) HIBI_PE_DMA (DMA) HIBI_PE_DMA (DMA) HIBI wrapper instr.memory (on/off-chip) instr.memory (on/off-chip)

Design flow Used tools: Quartus, Sopc, eclipse, modelsim Quartus: base for SOPC project SOPC: define the HW platform Modelsim: simulate the whole system Eclipse: create SW platform

Building SOPC project Create Quartus II project and from there open SOPC builder. Create a system according to the picture on next page – You’ll find hpd’s tcl file from hpd’s vhd directory to add the component to the project Remember to set IP search path for it (tools->options) – Use same names – For this test set HIBI_PE_DMAs n_stream_chans_g to 0 and n_packet_chans_g to 8. – Make instruction memories large enough for software – Add reset ports to all CPUs – Other components should work with default settings – Use auto-assign for base addresses – Disconnect unnecessary IRQ connections Check create simulation files and generate

NIOS II Eclipse Create three “NIOS 2 Application and BSP template” projects named cpu0, cpu1 and cpu2 Copy all source/header files to all projects (from../tb/system/src_cpu#) Create BSP for all – Rigth click -> nios II -> bsp editor -> generate Compile all codes by selecting ”Build project” for each project

Create initialization files for memories

Modelsim simulation Navigate your modelsim to the simulation folder it created earlier Add hibi files to the compilation script – Add to setup_sim.do the contents of msim_includes.txt (change paths!) (tb/system/support) – Use hibiv3_r4 top level. Address ranges for cpus 0,1,2 are 0x000-0x1FF, 0x200-0x3FF, 0x400-0x5FF Tb/system/ contains one – Add hibi to the simulation top level Locate vhd file named after you SOPC project Scroll to the bottom of it Modify it to be similar to tb/system/support/hibi_add.vhd – Check DUT’s component name

Modelsim simulation In modelsim’s transcript window type ”do setup_sim.do” to setup things S: compiles hw files Jtag_*: commands to see what CPUs are printing in console windows, by default goes to transcript window It takes about 1ms before CPUs start executing main() and simulations take a lot of time Modify CPU1’s main.c to adjust the amount of packets that ping-pong between CPUs They do not stop automatically!

Next some examples how HPD should behave

Enabling HPD to interrupt // Enable interrupts on HPD side, set bit 1 high on register 4 IOWR(HIBI_PE_DMA_0_BASE, 4, (2 | (IORD(HIBI_PE_DMA_0_BASE,4)))); Read reg 4 Write back With bit 1 high Interrupts on

Channel rx configuration Just four writes // Set receive mem address for incoming data IOWR(HIBI_PE_DMA_0_BASE, (rx_channel << 4), HPD_REGISTERS_RX_BUFFER_START + rx_addr); // Set words to receive IOWR(HIBI_PE_DMA_CHAN_0_BASE, (rx_channel << 4) + 2, rx_amount); // Set hibi address to receive data IOWR(HIBI_PE_DMA_0_BASE, (rx_channel << 4) + 1, hibi_addr); // Initialize (enable) receiving IOWR(HIBI_PE_DMA_0_BASE, 5, 1 << rx_channel);

TX // Poll HPD, until it's not sending previous tx anymore while(((IORD(HIBI_PE_DMA_1_BASE, 4) >> 16) & 0x1) == 0) { } // Set data source address IOWR(HIBI_PE_DMA_1_BASE, 8, data_src_addr); // Set amount to send IOWR(HIBI_PE_DMA_1_BASE, 9, amount); // Set target hibi command IOWR(HIBI_PE_DMA_1_BASE, 10, 2); // Set target hibi address IOWR(HIBI_PE_DMA_1_BASE, 11, hibi_addr); // Start the transfer, set bit 0 high in register 4 IOWR(HIBI_PE_DMA_1_BASE, 4, (0x1 | (IORD(HIBI_PE_DMA_1_BASE,4)))); Data is written to hibi from shared memory

Preconfigured transfer receive Words are forwarded directly to shared memory until all words have been received When all have been received interrupt is raised Interrupt Forward to shared mem directly First packet Second packet

Unconfigured receive IRQ has been raised quite many cycles ago CPU reads the cause of IRQ And the unknown Incoming address Ack IRQ And later the same day (many many clock cycles): CPU configures some channel for receiving to address 0x11 and N2H interrupts again when all data has been received