Altera s Avalon Communication Fabric

Similar documents
Altera s Avalon Communication Fabric

CSEE W4840 Embedded System Design Lab 3

Laboratory Exercise 5

The On-Chip Peripheral Bus

Making Qsys Components. 1 Introduction. For Quartus II 13.0

Embedded Systems. "System On Programmable Chip" Design Methodology using QuartusII and SOPC Builder tools. René Beuchat LAP - EPFL

2. System Interconnect Fabric for Memory-Mapped Interfaces

Embedded Systems. "System On Programmable Chip" Design Methodology using QuartusII and SOPC Builder tools. René Beuchat LAP - EPFL

Avalon Interface Specifications

In our case Dr. Johnson is setting the best practices

Embedded Systems. "System On Programmable Chip" NIOS II Avalon Bus. René Beuchat. Laboratoire d'architecture des Processeurs.

Simulation with ModelSim Altera from Quartus II

Simulation with ModelSim Altera from Quartus II

White Paper AHB to Avalon & Avalon to AHB Bridges

Avalon Interface. Avalon Interfaces. Open Standard. 7 Interfaces. Streaming Memory Mapped Conduit Tri-state Conduit Interrupt Clock Reset

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents

Design of Embedded Hardware and Firmware

VHDL in 1h. Martin Schöberl

Digital Systems Design

[VARIABLE declaration] BEGIN. sequential statements

ENGG3380: Computer Organization and Design Lab4: Buses and Peripheral Devices

Sequential Statement

Constructing VHDL Models with CSA

Avalon Interface Specifications

CSEE W4840 Embedded System Design Lab 1

The CPU Bus : Structure 0

Avalon Bus Specification

SISTEMI EMBEDDED AA 2013/2014

Problem Set 10 Solutions

Summary of FPGA & VHDL

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6

Avalon Interface Specifications

COVER SHEET: Total: Regrade Info: 5 (5 points) 2 (8 points) 6 (10 points) 7b (13 points) 7c (13 points) 7d (13 points)

EITF35: Introduction to Structured VLSI Design

NIOS Character. Last updated 7/16/18

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6

Nios II Custom Instruction User Guide Preliminary Information

ECE 545 Lecture 6. Behavioral Modeling of Sequential-Circuit Building Blocks. George Mason University

9. PIO Core. Core Overview. Functional Description

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1. Your name 2/13/2014

Inferring Storage Elements

Sequential Logic - Module 5

CSEE W4840 Embedded System Design Lab 1

Assignment. Last time. Last time. ECE 4514 Digital Design II. Back to the big picture. Back to the big picture

Today. Comments about assignment Max 1/T (skew = 0) Max clock skew? Comments about assignment 3 ASICs and Programmable logic Others courses

Qsys and IP Core Integration

VHDL And Synthesis Review

EECE 353: Digital Systems Design Lecture 10: Datapath Circuits

Introduction to VHDL #3

Field Programmable Gate Array

Generic Serial Flash Interface Intel FPGA IP Core User Guide

Codec. WM8731 Audio Codec

COVER SHEET: Total: Regrade Info: 5 (14 points) 7 (15 points) Midterm 1 Spring 2012 VERSION 1 UFID:

VHDL simulation and synthesis

Lecture 12 VHDL Synthesis

Bresenham s Line Algorithm in Hardware

Hardware Description Languages. Modeling Complex Systems

Digital Design with SystemVerilog

CSEE W4840 Embedded System Design Lab 1

COVER SHEET: Total: Regrade Info: 2 (6 points) 3 (8 points) 4 (10 points) 8 (12 points) 6 (6 points) 7 (6 points) 9 (30 points) 10 (4 points)

COVER SHEET: Total: Regrade Info: Problem#: Points. 7 (14 points) 6 (7 points) 9 (6 points) 10 (21 points) 11 (4 points)

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

EITF35: Introduction to Structured VLSI Design

Timing in synchronous systems

Fundamental Design Concepts. Fundamental Concepts. Modeling Domains. Basic Definitions. New terminology and overloaded use of common words

Writing VHDL for RTL Synthesis

VHDL: Code Structure. 1

Quartus Counter Example. Last updated 9/6/18

Instantiating the Core in SOPC Builder on page 2 2 Device Support on page 2 3 Software Programming Model on page 2 3

SEQUENTIAL STATEMENTS

Basic Language Concepts

NIOS CPU Based Embedded Computer System on Programmable Chip

The University of Alabama in Huntsville Electrical and Computer Engineering CPE/EE 422/522 Spring 2005 Homework #6 Solution

SPI 3-Wire Master (VHDL)

FFT MegaCore Function

Lab 3. Advanced VHDL

Document Version: 0.6 Document Date: 15 April 2011 Prepared by: Y. Ermoline for ATLAS Level-1Calorimeter Trigger

Nanosistemų programavimo kalbos 5 paskaita. Sekvencinių schemų projektavimas

Schedule. ECE U530 Digital Hardware Synthesis. Rest of Semester. Midterm Question 1a

ECE 448 Lecture 4. Sequential-Circuit Building Blocks. Mixing Description Styles

Lecture 7. Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits. Hardware Description Language)

9. Functional Description Example Designs

EENG 2910 Project III: Digital System Design. Due: 04/30/2014. Team Members: University of North Texas Department of Electrical Engineering

TKT-1212 Digitaalijärjestelmien toteutus. Lecture 7: VHDL Testbenches Ari Kulmala, Erno Salminen 2008

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

CSC / EE Digital Systems Design. Summer Sample Project Proposal 01

EEL 4712 Digital Design Test 2 Spring Semester 2008

ECE 459/559 Secure & Trustworthy Computer Hardware Design

MAX 10. Memory Modules

Digital System Construction

ECE 545: Lecture 11. Programmable Logic Memories

ECE 545: Lecture 11. Programmable Logic Memories. Recommended reading. Memory Types. Memory Types. Memory Types specific to Xilinx FPGAs

Counters and Simple Design Example

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits

Modeling Complex Behavior

6.111 Lecture # 8. Topics for Today: (as time permits)

FSM Components. FSM Description. HDL Coding Methods. Chapter 7: HDL Coding Techniques

Nios DMA. General Description. Functional Description

Introduction to VHDL #1

Lattice VHDL Training

Transcription:

Altera s Avalon Communication Fabric Stephen A. Edwards Columbia University Spring 2012

Altera s Avalon Bus Something like PCI on a chip Described in Altera s Avalon Memory-Mapped Interface Specification document. Protocol defined between peripherals and the bus (actually a fairly complicated circuit).

Intended System Architecture Source: Altera

Masters and Slaves Most bus protocols draw a distinction between Masters: Can initiate a transaction, specify an address, etc. E.g., the Nios II processor Slaves: Respond to requests from masters, can generate return data. E.g., a video controller Most peripherals are slaves. Masters speak a more complex protocol Bus arbiter decides which master gains control

The Simplest Slave Peripheral Avalon-MM Peripheral writedata[15..0] D Q pio_out[15..0] Application- Specific Interface Avalon-MM Interface (Avalon-MM Slave Port) write chipselect clk CLK_EN > Basically, latch when I m selected and written to.

Naming Conventions Used by the SOPC Builder s New Component Wizard to match up VHDL entity ports with Avalon bus signals. type_interface_signal type is is typically avs for Avalon-MM Slave interface is the user-selected name of the interface, e.g., s1. signal is chipselect, address, etc. Thus, avs_s1_chipselect is the chip select signal for a slave port called s1.

Slave Signals For a 16-bit connection that spans 32 halfwords, Slave readdata[15:0] irq clk reset chipselect address[4:0] read Avalon write byteenable[1:0] writedata[15:0]

Avalon Slave Signals clk reset chipselect address[..] read write writedata[..] byteenable[..] readdata[..] irq Master clock Reset signal to peripheral Asserted when bus accesses peripheral Word address (data-width specific) Asserted during peripheral bus transfer Asserted during bus peripheral transfer Data from bus to peripheral Indicates active bytes in a transfer Data from peripheral to bus peripheral processor interrupt request All are optional, as are many others for, e.g., flow-control and burst transfers.

Bytes, Bits, and Words The Nios II and Avalon bus are little-endian: 31 is the most significant bit, 0 is the least Bytes and halfwords are right-justified: msb lsb Byte 3 2 1 0 Bit 31 24 23 16 15 8 7 0 Word 31 0 Halfword 15 0 Byte 7 0

In VHDL entity avalon_slave is port ( avs_s1_clk : in std_logic; avs_s1_reset_n : in std_logic; avs_s1_read : in std_logic; avs_s1_write : in std_logic; avs_s1_chipselect : in std_logic; avs_s1_address : in std_logic_vector(4 downto 0); avs_s1_readdata : out std_logic_vector(15 downto 0); avs_s1_writedata : in std_logic_vector(15 downto 0); ); end avalon_slave;

Basic Async. Slave Read Transfer Clk Address read chipselect readdata Bus cycle starts on rising clock edge. Data latched at next rising edge. Such a peripheral must be purely combinational.

Slave Read Transfer w/ 1 Wait State Clk Address read chipselect readdata Bus cycle starts on rising clock edge. Data latched two cycles later. Approach used for synchronous peripherals.

Basic Async. Slave Write Transfer Clk Address read chipselect writedata Bus cycle starts on rising clock edge. Data available by next rising edge. Peripheral may be synchronous, but must be fast.

Basic Async. Slave Write w/ 1 Wait State Clk Address read chipselect writedata Bus cycle starts on rising clock edge. Peripheral latches data two cycles later. For slower peripherals.

The LED Flasher Peripheral 32 16-bit word interface First 16 halfwords are data to be displayed on the LEDS. Halfwords 16 31 all write to a linger register that controls cycling rate. Red LEDs cycle through displaying memory contents.

Entity and Architecture Declaration library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity de2_led_flasher is port ( clk : in std_logic; reset_n : in std_logic; read : in std_logic; write : in std_logic; chipselect : in std_logic; address : in unsigned(4 downto 0); readdata : out unsigned(15 downto 0); writedata : in unsigned(15 downto 0); leds : out unsigned(15 downto 0) ); end de2_led_flasher; architecture rtl of de2_led_flasher is type ram_type is array(15 downto 0) of unsigned(15 downto 0); signal RAM : ram_type; signal ram_address, display_address : unsigned(3 downto 0); signal counter_delay : unsigned(15 downto 0); signal counter : unsigned(31 downto 0); begin ram_address <= address(3 downto 0);

Architecture (2) process (clk) begin if rising_edge(clk) then if reset_n = 0 then readdata <= (others=> 0 ); display_address <= (others=> 0 ); counter <= (others => 0 ); counter_delay <= (others=> 1 ); else if chipselect = 1 then if address(4) = 0 then -- read or write RAM if read = 1 then readdata <= RAM(to_integer(ram_address)); elsif write = 1 then RAM(to_integer(ram_address)) <= writedata; end if; else if write = 1 then -- Change delay counter_delay <= writedata; end if; end if; else -- No access to us: update display leds <= RAM(to_integer(display_address)); if counter = x"00000000" then counter <= counter_delay & x"0000"; display_address <= display_address + 1; else counter <= counter - 1; end if; end if; end if; end if; end process; end rtl;