1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.

Slides:



Advertisements
Similar presentations
CT213 – Computing system Organization
Advertisements

Device Drivers. Linux Device Drivers Linux supports three types of hardware device: character, block and network –character devices: R/W without buffering.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
I/O Unit.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 3: Input/output and co-processors dr.ir. A.C. Verschueren.
Interfacing. This Week In DIG II  Basic communications terminology  Communications protocols  Microprocessor interfacing: I/O addressing  Port and.
Outline  Examine some of the H/W supplied with a typical PC and consider the software required to control it.  Introduce Commkit, a software tool that.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
04/16/2010CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying an earlier edition.
Chapter 7 Interupts DMA Channels Context Switching.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 7 Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats.
CHAPTER 9: Input / Output
1 I/O Management in Representative Operating Systems.
Group 7 Jhonathan Briceño Reginal Etienne Christian Kruger Felix Martinez Dane Minott Immer S Rivera Ander Sahonero.
1 Computer System Overview Chapter 1 Review of basic hardware concepts.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Hardware Overview Net+ARM – Well Suited for Embedded Ethernet
Multicore Navigator: Queue Manager Subsystem (QMSS)
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Chapter 7 Input/Output Luisa Botero Santiago Del Portillo Ivan Vega.
Introduction to Embedded Systems
System Calls 1.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
The DMA Controller Definition and Advantages Hardware Modes Port A Special Function.
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.
Volume. 1-the idea of the program is to increase, decrease the volume. 2-the program does the following: A-PF8:decrease the volume B-Pf9:increase the.
1 Lecture 20: I/O n I/O hardware n I/O structure n communication with controllers n device interrupts n device drivers n streams.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
2007 Oct 18SYSC2001* - Dept. Systems and Computer Engineering, Carleton University Fall SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices.
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.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
Top Level View of Computer Function and Interconnection.
Interrupts By Ryan Morris. Overview ● I/O Paradigm ● Synchronization ● Polling ● Control and Status Registers ● Interrupt Driven I/O ● Importance of Interrupts.
2009 Sep 10SYSC Dept. Systems and Computer Engineering, Carleton University F09. SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices 7.2.
Modes of transfer in computer
CH10 Input/Output DDDData Transfer EEEExternal Devices IIII/O Modules PPPProgrammed I/O IIIInterrupt-Driven I/O DDDDirect Memory.
Fall 2000M.B. Ibáñez Lecture 25 I/O Systems. Fall 2000M.B. Ibáñez Categories of I/O Devices Human readable –used to communicate with the user –video display.
Embedded Network Interface (ENI). What is ENI? Embedded Network Interface Originally called DPO (Digital Product Option) card Printer without network.
1 ARM University Program Copyright © ARM Ltd 2013 Using Direct Memory Access to Improve Performance.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 2: Computer-System Structures Computer System Architecture and Operation.
NS Training Hardware Traffic Flow Note: Traffic direction in the 1284 is classified as either forward or reverse. The forward direction is.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
IT3002 Computer Architecture
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
DSP C5000 Chapter 10 Understanding and Programming the Host Port Interface (EHPI) Copyright © 2003 Texas Instruments. All rights reserved.
Device Driver Concepts Digital UNIX Internals II Device Driver Concepts Chapter 13.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 2, 2005 I/O through system calls Protection.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
Chapter 3 System Buses.  Hardwired systems are inflexible  General purpose hardware can do different tasks, given correct control signals  Instead.
Lecture Overview Shift Register Buffering Direct Memory Access.
Part IVI/O Systems Chapter 13: I/O Systems. I/O Hardware a typical PCI bus structure 2.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Introduction to Operating Systems Concepts
CS501 Advanced Computer Architecture
CSI 400/500 Operating Systems Spring 2009
CSCI 315 Operating Systems Design
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s

1-2 Embedded Network Interface (ENI) Allows sharing of NET+ARM’s memory system Useful for dual processor system Second Processor must push / pull data –NET+ARM is a slave in ENI mode Can use either FIFO mode or Shared Ram mode –FIFO is fast, but have less control over data –Shared RAM is slower, but have more control –ENI must become BUS Master to use Shared RAM ENI is muxed with Parallel Ports (one or the other)

1-3 ENI Concept NetARM (Slave) host ENI Port Data + Addr Bus RAM External uP System (Master) client Data + Addr Bus

1-4 Shared RAM Mode Allow external device (client) to random access external memory which is controlled by the the NET+ARM (host) 8/16-bit interface Size of Shared RAM is can be one of the following –4K, 8K, , or 64K Location of RAM must be a multiple of the size selected –E.g. ram size of 8k must on located on a 8k boundary

1-5 FIFO Mode Data-streaming interface between the NET+ARM and the external device 8/16-bit interface Two 32-byte FIFOs used to transmit and receive data DMA 3 is used to transfer receive data from FIFO to external memory DMA 4 is used to transfer transmit data from external memory to FIFO DMA buffers must start and end on a 32-bit boundary Data must be padded to conform to buffer requirement 8K of shared memory can be accessed

1-6 ENI Driver DMA Driver Module ENI Driver Application ENI Hardware Module

1-7 ENI Library API sources are located in \netos\src\devices\eni –eni_mod.ccode to handle API –eni_host.ccode to run on host side (NET+ARM) –eni_client.ccode to run on client side (external device) –eni_reg.ccode contain table of ENI register information –eni_host.hlocal header file for host code –eni_client.hlocal header file for client code Header file is located in \netos\h\ –eni_api.hheader file to include in application to support API

1-8 ENI API’s eniLoadDriver () eniOpenChannel () eniCloseChannel () eniEnableFIFO () eniDisableFIFO () eniSupplyFIFO () eniReadFIFO () eniWriteFIFO () eniFlushFIFO () (*eniTransmitType)() (*eniReceiveType)() (*eniTriggerType)() eniTriggerInterrupt () eniEnableTrigger () eniDisableTrigger () eniGetSharedRAM ()

1-9 ENI API’s eniLoadDriver () –loads the ENI driver by initializing the ENI channel. eniOpenChannel () –opens a channel for the ENI peripheral; there is only one ENI channel supported. –shared RAM is configured and ENI interrupt handler is registered. –If selected, the FIFO channel is setup for receiving and transmitting messages to the external device. –The ENI driver will override one of the 4 ENI modes configured by hardware. –The channel cannot be opened if it is configured for IEEE1284 HOST PORT. eniCloseChannel () –Close the ENI channel. –Channel cannot be close if the ENI driver is still holding buffers owned by the application. –Channel must be flushed before it is permitted to close.

1-10 ENI API’s eniEnableFIFO () –Enable the FIFO channel. –Data activity in the channel will resume where it was left off before it was halted. eniDisableFIFO () –Disable the FIFO channel. –Data activity in the channel will be halted until the channel is enabled again. –Disable FIFO by clearing the erx or etx bit in General Control Register eniSupplyFIFO () –supply messages to the ENI driver used to store incoming data from the external device –buffer must be aligned on a 32-bit boundary. –buffer size must be a multiple of 4 bytes. –maximum number of messages queued will depend on the size of the receive queue configured

1-11 ENI API’s eniReadFIFO () –Retrieve data received from the FIFO channel. –If no message is pending, the application can specify the amount of time to poll for incoming data. –Data can be read from the FIFO channel if it is disabled. –This routine cannot be used to retrieve messages if the receive callback is defined. eniWriteFIFO () –transmit a message through the ENI peripheral. –a buffer must be 32-bit aligned;buffer size must be a multiple of 4 bytes.. –number of messages will handle depends on the transmit queue size configured –ENI driver owns the message until it has been transmitted. –Data cannot be written to the FIFO, if the channel is disabled. –A chained message is treat not as one message but as multiple messages. There must be enough space in the transmit queue for each message in the chain. Otherwise message will be rejected.

1-12 ENI API’s eniFlushFIFO () –flush any application buffers from the ENI driver –channel must be disabled before it can be flushed. – Messages pending in the transmit channel are release to the application by using the eniTransmiteRtn callback. –The allocated buffers supplied to the receive channels are returned automatically by using the eniReceiveRtn callback if defined. Otherwise the application is required to manually retrieve the buffers back by calling eniReadFIFO (). –Each message that has been abort will contain the ENI_DATA_FLUSHED in the message’s status field. –Channel must be disabled before it can be flushed eniTriggerInterrupt () –Trigger an ENI interrupt to the external device. –The interrupt is a way to synchronize information or communication between two processes. –Trigger interrupt to external device by enabling stsint in ENI Shared Register –Inactive if trigger callback is undefined

1-13 ENI API’s eniEnableTrigger () –Allow an external device to trigger an interrupt to the NET+ARM. –If no callback routine is defined, then this routine is inactive –Enable ENI interrupt by setting the eni_port3 in Interrupt Enable Register eniDisableTrigger () –Don’t allow an external device triggering an interrupt to the NET+ARM. –If no callback routine is defined, then this routine is inactive –Disable ENI interrupt by clearing the eni_port3 in Interrupt Enable Register eniGetSharedRam () –location and size of the ENI shared memory location configured.

1-14 ENI API’s (*eniTransmitType)() –This callback routine is provided by the application. It is used by the ENI driver to release the message after it has been transmitted. Once the ENI driver returns the it back, the application is able to reuse the buffer. –This routine is called within an ISR routine. Function calls, which require long execution time, cannot be used. This includes sleep time and waiting for semaphores. Return message back in free pool (* eniReceiveType)() –This callback routine is provided by the application to process incoming data. The ENI driver will calls this routine whenever it receives data from the FIFO channel. Since this routine is called within an interrupt, instructions that require extensive execution time cannot be used. –Upon return of this routine, the ENI driver no longer owns the message. It is the responsibility of the application to release the buffer after it is done with it. –If the application does not want to process incoming data immediately, it can delay processing by not defining this routine. The application can access pending data by calling eniReadFIFO () whenever it has time to process it. Must free the message when it is done with it

1-15 ENI API’s (* eniTriggerType)() –This callback routine is provided by the application. It is called whenever an ENI interrupt is received. –The interrupt is triggered by an external device to synchronize communication between the two processes. – The ENI interrupt is cleared and reset upon return of this routine. Function calls, which require long execution time, cannot be used.