Lecture 9 Lecture 9: The OPB Bus and IPIF Interface Cores ECE 412: Microcomputer Laboratory.

Slides:



Advertisements
Similar presentations
Computer Architecture and Organization
Advertisements

Bus Specification Embedded Systems Design and Implementation Witawas Srisa-an.
Homework Reading Machine Projects Labs
Computer Architecture
8259 Programmable Interrupt Controller
Lecture 101 Lecture 10: Kernel Modules and Device Drivers ECE 412: Microcomputer Laboratory.
Creating and Adding Custom IP
EXTERNAL COMMUNICATIONS DESIGNING AN EXTERNAL 3 BYTE INTERFACE Mark Neil - Microprocessor Course 1 External Memory & I/O.
Datorteknik BusInterfacing bild 1 Bus Interfacing Processor-Memory Bus –High speed memory bus Backplane Bus –Processor-Interface bus –This is what we usually.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Processor support devices Part 1:Interrupts and shared memory dr.ir. A.C. Verschueren.
9/20/6Lecture 3 - Instruction Set - Al1 The Hardware Interface.
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis 1 A simple bus bus structure ProcessorMemory rd'/wr enable addr[0-11]
I/O Unit.
Lecture 8 Lecture 8: CoreConnect and The PLB Bus ECE 412: Microcomputer Laboratory.
Interfacing. This Week In DIG II  Basic communications terminology  Communications protocols  Microprocessor interfacing: I/O addressing  Port and.
COMP3221: Microprocessors and Embedded Systems Lecture 15: Interrupts I Lecturer: Hui Wu Session 1, 2005.
Reliable Data Storage using Reed Solomon Code Supervised by: Isaschar (Zigi) Walter Performed by: Ilan Rosenfeld, Moshe Karl Spring 2004 Part A Final Presentation.
Introduction An interrupt is an event which informs the CPU that its service (action) is needed. Sources of interrupts: internal fault (e.g.. divide by.
University College Cork IRELAND Hardware Concepts An understanding of computer hardware is a vital prerequisite for the study of operating systems.
Students:Gilad Goldman Lior Kamran Supervisor:Mony Orbach Mid-Semester Presentation Spring 2005 Network Sniffer.
TECH CH03 System Buses Computer Components Computer Function
Reliable Data Storage using Reed Solomon Code Supervised by: Isaschar (Zigi) Walter Performed by: Ilan Rosenfeld, Moshe Karl Spring 2004 Midterm Presentation.
680XX Hardware Interface Outline Goal Reading
Lecture 7 Lecture 7: Hardware/Software Systems on the XUP Board ECE 412: Microcomputer Laboratory.
CS-334: Computer Architecture
Computer Architecture Lecture 08 Fasih ur Rehman.
Digital System Bus A bus in a digital system is a collection of (usually unbroken) signal lines that carry module-to-module communications. The signals.
CPU BASICS, THE BUS, CLOCKS, I/O SUBSYSTEM Philip Chan.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
MICROPROCESSOR INPUT/OUTPUT
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
I/O Example: Disk Drives To access data: — seek: position head over the proper track (8 to 20 ms. avg.) — rotational latency: wait for desired sector (.5.
Top Level View of Computer Function and Interconnection.
© 2007 Xilinx, Inc. All Rights Reserved This material exempt per Department of Commerce license exception TSU Hardware Design INF3430 MicroBlaze 7.1.
Interrupts, Buses Chapter 6.2.5, Introduction to Interrupts Interrupts are a mechanism by which other modules (e.g. I/O) may interrupt normal.
August 1, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 9: I/O Devices and Communication Buses * Jeremy R. Johnson Wednesday,
COMPUTER ORGANIZATIONS CSNB123. COMPUTER ORGANIZATIONS CSNB123 Expected Course Outcome #Course OutcomeCoverage 1Explain the concepts that underlie modern.
EEE440 Computer Architecture
Part A Presentation Implementation of DSP Algorithm on SoC Student : Einat Tevel Supervisor : Isaschar Walter Accompanying engineer : Emilia Burlak The.
ECEG-3202 Computer Architecture and Organization Chapter 3 Top Level View of Computer Function and Interconnection.
12/16/  List the elements of 8255A Programmable Peripheral Interface (PPI)  Explain its various operating modes  Develop a simple program to.
EFLAG Register of The The only new flag bit is the AC alignment check, used to indicate that the microprocessor has accessed a word at an odd.
Dr Mohamed Menacer College of Computer Science and Engineering, Taibah University CE-321: Computer.
Programmable Interrupt Controller (PIC)
بسم الله الرحمن الرحيم MEMORY AND I/O.
 The Programmable Interrupt Controller (PlC) functions as an overall manager in an Interrupt-Driven system. It accepts requests from the peripheral equipment,
Mohamed Younis CMCS 411, Computer Architecture 1 CMCS Computer Architecture Lecture 26 Bus Interconnect May 7,
Chapter 3 System Buses.  Hardwired systems are inflexible  General purpose hardware can do different tasks, given correct control signals  Instead.
Chapter 6 Input/Output Organization
Microprocessor Systems Design I
Presentation On 8259 Made by Md Shabbir Hasan.
Programmable Interrupt Controller 8259
8259 Chip The Intel 8259 is a family of Programmable Interrupt Controllers (PIC) designed and developed for use with the Intel 8085 and Intel 8086 microprocessors.
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Overview of Computer Architecture and Organization
8259 Programmable Interrupt Controller
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
COMP3221: Microprocessors and Embedded Systems
William Stallings Computer Organization and Architecture
Presentation transcript:

Lecture 9 Lecture 9: The OPB Bus and IPIF Interface Cores ECE 412: Microcomputer Laboratory

Lecture 9 Outline The OPB Bus Bus arbitration Using the IPIF core generators to build logic to interface your hardware to the PLB/OPB busses.

Lecture 9 Review Questions What is time-multiplexed data transfer? –Share a single set of wires for multiple pieces of data –Saves wires at expense of time What are the two basic bus control protocols? What is the difference between them? –Strobe: Servant puts data on bus within time t access –Handshake: Servant puts data on bus and asserts ack How do the REQUEST, ADDRACK, RDACK, and WRDACK signals interact to control transfers over the PLB bus? –REQUEST starts a transaction, ADRACK acknowledges that the slave device has accepted the transaction, and RDDACK/WRDACK signal when data are received.

Lecture 9 Multilevel Bus Architectures Revisit Processor-local bus –High speed, wide, most frequent communication –Connects microprocessor, cache, memory controllers, etc. Peripheral bus –Lower speed, narrower, less frequent communication –Typically industry standard bus (ISA, PCI) for portability Processor-local bus Micro- processor CacheMemory controller DMA controller BridgePeripheral Peripheral bus Dont want one bus for all communication –Peripherals would need high-speed, processor-specific bus interface excess gates, power consumption, and cost; less portable –Too many peripherals slow down bus

Lecture 9 The OPB Bus On-Chip Peripheral Bus Standard developed by IBM for connecting logic cores to microprocessors/other cores Not implemented in hardware by either the PowerPCs or the FPGA portion of the Virtex II Pro –Use Xilinx cores to build PLB-OPB bridge and interfaces –Use OPB because its enough of a standard that IP cores are designed to be compatible with it Ex: the UART, SystemACE cores

Lecture 9 OPB Bus Two components: Arbiter and Interconnect –Interconnect implemented as OR of output bits from each master

Lecture 9 OPB Bus Specification supports up to 16 bus masters, arbitrary number of slaves –Number of slaves affects how many resources the OPB bus core uses –Xilinx recommends you use at most 16 slaves 32-bit bus protocol Signaling conventions similar to PLB –Xilinx core supports either combinational or registered control signals Combinational allows responses in same cycle as requests Registered generally allows higher clock rate on bus

Lecture 9 Arbitration: Priority Arbiter Consider the situation where multiple peripherals request service from single resource (e.g., the OPB bus) simultaneously - which gets serviced first? Priority arbiter –Peripherals make requests to arbiter, arbiter makes requests to resource Micro- processor Priority arbiter Peripheral1 System bus Int Inta Peripheral2 Ireq1 Iack2 Iack1 Ireq2 22 6

Lecture 9 Arbitration Using a Priority Arbiter 1. Microprocessor is executing its program. 2. Peripheral1 needs servicing so asserts Ireq1. Peripheral2 also needs servicing so asserts Ireq2. 3. Priority arbiter sees at least one Ireq input asserted, so asserts Int. 4. Microprocessor stops executing its program and stores its state. 5. Microprocessor asserts Inta. 6. Priority arbiter asserts Iack1 to acknowledge Peripheral1. 7. Peripheral1 puts its interrupt address vector on the system bus 8. Microprocessor jumps to the address of ISR read from data bus, ISR executes and returns (and completes handshake with arbiter). 9. Microprocessor resumes executing its program. Micro- processor Priority arbiter Peripheral1 System bus Int Inta Peripheral2 Ireq1 Iack2 Iack1 Ireq2 22 6

Lecture 9 Arbitration: Priority Arbiter Types of priority –Fixed priority each peripheral has unique rank highest rank chosen first with simultaneous requests preferred when clear difference in rank between peripherals –Rotating priority (round-robin) priority changed based on history of servicing better distribution of servicing especially among peripherals with similar priority demands

Lecture 9 OPB Bus Arbitration Two modes –Dynamic gives priority to the LRU requester –Fixed defines a priority order for bus masters, gives bus to the highest-priority requester Set of registers define priority order for fixed mode –Can be programmed before or during operation Xilinx implementation of this is somewhat different than IBM spec in order to allow variable # of masters –User responsibility to make sure that every master has a slot in the table

Lecture 9 OPB Bus Modes of Operation Standard: Masters do individual requests for each transaction –Simple, but requires request-reply delay on each transaction –OPB bus does allow requests to overlap with transactions Locked: Master can assert its lock signal to retain control of the bus for multiple transactions –Improves bandwidth, has potential for starvation if master doesnt release bus Parked: Master retains control of the bus as long as no other master requests it –Good bandwidth, no starvation, but masters need to watch for other requests

Lecture 9 Interfacing Logic to the OPB/PLB Busses A number of challenges PLB/OPB bus spec is somewhat complex Each slave needs to detect whether the address of a request falls in its assigned range PLB/OPB bus width may not match your logic Many user cores require functions that arent built into the OPB/PLB bus spec –Bursts –DMA access PowerPC handles interrupts and PLB with separate hardware

Lecture 9 One Approach: Xilinx IPIF Cores EDK includes a core generator that creates VHDL/Verilog for modules that act as the interface between user logic and the PLB or OPB busses Core is parameterizable so that user can include just the functions that a given piece of logic needs EDK provides a graphical interface to generate cores with most options –Refer to back-up slides

Lecture 9 User Logic IPIF IP Interconnect (IPIC) OPB or PLB Bus IPIF Functional Overview

Lecture 9 IPIF Functionality Handles address range checking Implements user-defined registers Byte Steering lets devices connect to PLB/OPB busses that are wider than they are Interrupt handling with collection/latching Supports fixed length burst transfers Read or Write FIFOs DMA engine

Lecture 9 IPIF Block Diagram

Lecture 9 Things you can do with IPIF Create a set of control registers for your logic so that you dont have to deal with the PLB bus –We use this trick in MP2.1 Instantiate a DMA engine to move data between a buffer (like a BlockRAM) and another device on the PLB bus (like, say, the SDRAM controller) –Using DMA engine simplifies your logic –Lets you ignore timing of the SDRAM –DMA controller can be configured to do scatter/gather to non-contiguous locations, making dealing with data structures much easier

Lecture 9 More Things to do with the IPIF Create input or output FIFOs –FIFOs are great for decoupling modules so that they dont have to operate in lockstep –Also good for cases where your logic operates on blocks of data -- lets you think about transferring blocks instead of individual words Issue reset operations to the processor –Doubt youll need that for this course, but useful in a number of real applications

Lecture 9 Still more things to do with the IPIF Manage interrupts –IPIF controller generates interrupts for DMA, FIFO overflow, etc. –Need to merge user interrupts with IPIF controller interrupts –IP cores may implement interrupts differently than PowerPC Different timing, hold requirements, etc. IFIP provides up to 32-bit bus of interrupt inputs –Some bits reserved for IFIPs interrupts –If you need more interrupt signals than this, you need to build a second device or an interrupt hierarchy.

Lecture 9 Interrupts in the IPIF IPIF provides two sets of interrupt registers: Device and IP –IP registers handle interrupts from user logic –Device registers are the interrupt information presented to the processor (merged user + IPIF interrupts) –Device registers always 32-bit, IP registers vary depending on number of interrupts defined Interrupt Status Register is a bit vector of which interrupts are asserted IPISR has three modes (defined per bit) –Pass-through (no latching) –Sample and hold (samples on clock edge and holds until cleared) –Registered edge detect (detect 0->1 transitions and hold) –Can also invert interrupt signals

Lecture 9 Interrupts in the IPIF (cont) DISR merges IP and IPIF interrupt signals, is always pass-through Device Interrupt Enable Register lets you enable or disable individual interrupts –Can also globally disable all interrupts –IP Interrupt Enable Register masks interrupts at the IP logic side Device Interrupt Pending Register is bitwise and of DISR and DIER Device Interrupt ID register contains ID of interrupt currently being sent to processor –IPIF interrupt logic selects highest-priority interrupt out of the ones asserted at any time

Lecture 9 Using IPIF in MP2 Core is provided to you in CP1 –V:\ece412\edk_user_repository\MyProcessorIPLib\pcores –Need to import existing core using Create and Import Peripheral Wizard Need to create new core in CP2 –Design a median filter attached to OPB or PLB bus

Lecture 9 Topology of Instantiated Modules for MP2 CP1 Mp2_checkpoint1 (mp2_checkpoint1.vhd) OPB_IPIF_I * User_logic (user_logic.vhd) Student_logic (student_logic.vhd: where your code will be written) My_logic (my_logic.vhd: simplified version of the DIO2 code we used in MP1 CP3) * Part of the EDK, not your project

Lecture 9 BACKUP Slides for Creating the IPIF Core

Lecture 9 Bus Interface

Lecture 9 IPIF Services

Lecture 9 Interrupt Service

Lecture 9 User S/W Register

Lecture 9 IPIC

Lecture 9 Peripheral Simulation Support

Lecture 9 Peripheral Implementation Support

Lecture 9 You are done!

Lecture 9 Next Time Device drivers in Linux