Altera Embedded Peripherals IP Uživatelský manuál

Procházejte online nebo si stáhněte Uživatelský manuál pro Měřící nástroje Altera Embedded Peripherals IP. Altera Embedded Peripherals IP User Manual Uživatelská příručka

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 336
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků

Shrnutí obsahu

Strany 1 - San Jose, CA 95134

Embedded Peripheral IP User GuideSubscribeSend FeedbackUG-010852014.24.07101 Innovation DriveSan Jose, CA 95134www.altera.com

Strany 2 - Contents

Document Revision History...24-6Inte

Strany 3

Include: <altera_16550_uart.h>Parameters: context – device of the UARTReturns: noneDescription: Interrupt handler to process UART interrupts top

Strany 4

Figure 9-7:typedef enum stopbit {ONE =0,TWO } StopBit; typedef enum paritybit { ODD =0, EVEN, NOPARITY } ParityBit;typedef enum databit { CS_

Strany 5

Figure 9-8:typedef struct altera_16550_uart_state_s{ alt_dev dev; void* base; /* The base address of the device */

Strany 6

#include <unistd.h>#include <sys/time.h>#include <time.h>#include "system.h"#include "altera_16550_uart.h"#inclu

Strany 7

RXMessage[0], Match); } break; case 1: printf("Ping Pong Baud Rate Test: UART#1 to UART#

Strany 8

usleep(1000); if(ERROR== altera_16550_uart_read(uart_1, RXMessage, 1, 0)) return ERROR; if(TXMessage[0]

Strany 9

printf("Ping Pong FIFO Test: UART#1 to UART#0\n"); CharCounter=altera_16550_uart_write(uart_1, &TXMessage

Strany 10 - Altera Corporation

SPI Core102014.24.07UG-01085SubscribeSend FeedbackCore OverviewSPI is an industry-standard serial protocol commonly used in embedded systems to connec

Strany 11

Figure 10-1: SPI Core Block Diagram (Master Mode)clockcontrol control baud rate divisor*IRQsclkmosimisoss_n0ss_n1ss_n15 *Not present on SP

Strany 12

from 8 to 32. After a master peripheral writes a value to the txdata register, the value is copied to the shiftregister and then transmitted when the

Strany 13

altera_avalon_mailbox_post()... 27-6Document Revisio

Strany 14 - Introduction

for each active edge of sclk. The SPI core divides the Avalon-MM system clock using a clock divider togenerate the sclk signal.When the SPI core is co

Strany 15 - Device Support

Figure 10-3: SPI Core in a Multi-Slave Environment SPIMasterDevice sclk mosi misoss_n0ss_01sclk mosi miso ss_n0 SPI component(configured as slave

Strany 16 - Initial release. —

The actual frequency achieved will not be greater than the specified target value.Specify DelayTurning on this option causes the SPI master to add a t

Strany 17 - SDRAM Controller Core

Figure 10-5: Clock Polarity = 0, Clock Phase = 0Figure 10-6: Clock Polarity = 0, Clock Phase = 1Figure 10-7: Clock Polarity = 1, Clock Phase = 0Figure

Strany 18 - Off-Chip SDRAM Interface

alt_avalon_spi_command()Prototype: int alt_avalon_spi_command(alt_u32 base, alt_u32 slave, alt_u32 write_length,

Strany 19

Register MapAn Avalon-MM master peripheral controls and communicates with the SPI core via the six 32-bitregisters, shown in below in the Register Map

Strany 20

As an example, assume that the SPI core is idle (that is, the txdata register and transmit shift register areempty), when a CPU writes a data value in

Strany 21 - Memory Profile Page

Most bits (IROE, ITOE, ITRDY, IRRDY, and IE) in the control register control interrupts for statusconditions represented in the status register. For e

Strany 22 - Timing Page

Date andDocumentVersionChanges Made Summary of ChangesJuly 2010v10.0.0No change from previous release. —November2009v9.1.0Revised register width in tr

Strany 23 - SDRAM Memory Model

Optrex 16207 LCD Controller Core112014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe Optrex 16207 LCD controller core with Avalon® Interface (LC

Strany 24

Software Programming Model...31-3Softwar

Strany 25

Figure 11-1: LCD Controller Block DiagramaddressdatacontrolDB0 .. DB7R/WRSEOptrex 16207LCD ModuleLCDControllerAvalon-MM slaveinterface toon-chip logic

Strany 26 - Symptoms of an Untuned PLL

Sequence MeaningCR (\r) Moves the cursor to the start of the currentline.LF (\n) Moves the cursor to the start of the line andmove it down one lin

Strany 27 - Example Calculation

Document Revision HistoryTable 11-2: Document Revision HistoryDate andDocumentVersionChanges Made Summary of ChangesJuly 2014v14.0.0-Removed mention o

Strany 28 - Parameter Symbol Value (ns)

PIO Core122014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe parallel input/output (PIO) core with Avalon® interface provides a memory-mapped in

Strany 29

Figure 12-1: System Using Multiple PIO CoresSystem Interconnect FabricCPUPIO core(output only)Program and DataMemoryPIOcore (bidirectional)IRQ LEDsEdg

Strany 30

• Level-sensitive—The PIO core hardware can detect a high level. A NOT gate can be inserted external tothe core to provide negative sensitivity.• Edge

Strany 31 - Tri-State SDRAM

WidthThe width of the I/O ports can be set to any integer value between 1 and 32.DirectionYou can set the port direction to one of the options shown b

Strany 32 - Configuration Parameter

Edge Capture RegisterTurn on Synchronously capture to include the edge capture register, edgecapture, in the core. The edgecapture register allows the

Strany 33 - Interface

Table 12-2: Register Map for the PIO CoreOffset Register Name R/W (n-1) ... 2 1 00 dataread access R Data value currently on PIO inputswrite access W

Strany 34

After reset, all bits of direction are 0, so that all bidirectional I/O ports are configured as inputs. If thosePIO ports are connected to device pins

Strany 35

Overview...

Strany 36

Document Revision HistoryTable 12-3: Document Revision HistoryDate andDocumentVersionChanges Made Summary of ChangesJuly 2014v14.0.0-Removed mention o

Strany 37

Avalon-ST Serial Peripheral Interface Core132014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe Avalon® Streaming (Avalon-ST) Serial Peripheral I

Strany 38 - Architecture

Feature PropertyChannel Not supported.Error Not used.Packet Not supported.For more information about Avalon-ST interfaces, refer to the Avalon Interfa

Strany 39 - Block Level Usage Model

provided to remove false timing paths. The frequency of the SPI master’s clock must be equal to or lowerthan the frequency of the core’s clock.Limitat

Strany 40

Date andDocumentVersionChanges Made Summary of ChangesNovember2008v8.1.0Changed to 8-1/2 x 11 page size. No change to content. —May 2008v8.0.0Initial

Strany 41 - Compact Flash Core

PCI Lite Core142014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe PCI Lite core is a protocol interface that translates PCI transactions to Aval

Strany 42 - Required Connections

PCIDeviceModePCI Target PCI Master ALUTs (2) LogicRegisterM9K MemoryBlocksI/O PinsMax (1) Enabled Enabled 1,347 876 5 50Table 14-1 :1. Min = One BAR w

Strany 43

Figure 14-1: Generic PCI-Avalon Bridge Block DiagramPCI Lite CoreControl RegisterAccess Avalon SlaveControlStatus RegistersPCI PrefetchableBridgeLogic

Strany 44

This Avalon-MM master port is optimized for low latency access from PCI-to-Avalon-MM slaves. This isoptimal for providing PCI target access to simple

Strany 45

Table 14-3: Avalon-to-PCI Address Translation Table – Address Range: 0x1000-0x1FFFAddress Bit Name AccessModeDescription0x10001:0 A2P_ADDR_SPACE0 W Ad

Strany 46

Introduction12014.24.07UG-01085SubscribeSend FeedbackThis user guide describes the IP cores provided by Altera that are included in the Quartus® II de

Strany 47

All PCI read transactions are completed as delayed reads. However, only one delayed read is accepted andprocessed at a time.PCI-to-Avalon Address Tran

Strany 48

Each entry in the address translation table also has two address space indication bits, which specify thetype of address space being mapped. If the ty

Strany 49

Avalon-To-PCI Read and Write OperationThe PCI Bus Access Slave port is a burst-capable slave that attempts to create PCI bursts that match thebursts r

Strany 50

Termination condition Resulting ActionAvalon-to-PCI command/writedata buffer running out of dataNormal master-initiated termination on the PCI bus.Mas

Strany 51

• PMW—Posted memory write.• DRR—Delayed read request.• DWR—Delayed write request. DWRs are I/O or configuration write operation requests. The PCI-Aval

Strany 52

Parameters Legal Values DescriptionSize of Address Pages 12–27 The supported address size (in bits) that can beassigned to each map number entries.Pre

Strany 53

Parameters Legal Values DescriptionClass Code <register value> Class code register. This parameter is a 24-bit hexadec‐imal value that sets the

Strany 54 - Bit Description

#---------------- Do NOT change ------------------------------- ---- Change ----- array set map_user_pin_name_to_internal_pin_name {ad

Strany 55

The PCI testbench includes the following features:• Easy to use simulation environment for any standard Verilog HDL simulator• Open source Verilog HDL

Strany 56

USER COMMANDS SectionThe master transactor USER COMMANDS section contains the commands that initiate the PCI transac‐tions you want to run for your te

Strany 57

• PCI Lite Core• Mailbox CoreAltera recommends that you do not use these cores in new designs.For more information about Altera’s current IP offering,

Strany 58 - JTAG UART Core

1. Set the initialization parameters, which are defined in the master transactor model source code.These parameters control the address space reserved

Strany 59 - Host-Target Connection

MDIO Core152014.24.07UG-01085SubscribeSend FeedbackThe Altera Management Data Input/Output (MDIO) IP core is a two-wire standard managementinterface t

Strany 60

MDIO Frame Format (Clause 45)The MDIO core communicates with the external PHY device using frames. A complete frame is 64 bitslong and consists of 32-

Strany 61 - Simulation Settings

FieldNameDescriptionREGAD/DataThe register address (REGAD) or data field is 16 bits. For an address cycle, it contains theaddress of the register to b

Strany 62

1. Issue a write to the device register at address offset 0x21 to configure the device, port, and registeraddresses of the PHY.2. Issue a read to the

Strany 63

AddressOffsetBit(s) Name AccessModeDescriptionTable 15-3 :1. The byte address for this register is 0x84.2. The byte address for this register is 0x80.

Strany 64

On-Chip FIFO Memory Core162014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe on-chip FIFO memory core buffers data and provides flow control in

Strany 65

If Allow backpressure is turned on, the waitrequest signal is asserted whenever the data_in master triesto write to a full FIFO buffer. waitrequest is

Strany 66

per symbol, symbols per beat, and the width of the channel and error signals. The FIFO core performsthe endian conversion to conform to the output int

Strany 67

Offset Bits Field Description10 SOP The value of the startofpacket signal.1 EOP The value of the endofpacket signal.6:2 EMPTY The value of the empty s

Strany 68

Date andDocumentVersionChanges Made Summary of ChangesDecember2010v10.1.0Initial release. —UG-010852014.24.07Document Revision History1-3IntroductionA

Strany 69

is exactly the same as for the Avalon-MM to Avalon-ST FIFO core. See the for Memory Map table formore information.Figure 16-4: FIFO with Avalon-ST Inp

Strany 70 - UART Core

FIFO SettingsThe following sections outline the settings that pertain to the FIFO core as a whole.DepthDepth indicates the depth of the FIFO buffer, i

Strany 71 - Transmitter Logic

Avalon-ST Port SettingsThe following parameters allow you to specify the size and error handling of the Avalon-ST port or ports:• Bits per symbol• Sym

Strany 72 - Instantiating the Core

Function Name Descriptionaltera_avalon_fifo_read_ienable() Returns the value of the specified bit of theinterrupt enable register. To read all of the

Strany 73 - Data Bits, Stop Bits, Parity

base + 5 almostemptyThe table below outlines the use of the various fields of theTable 16-4: FIFO Status Field DescriptionsField Type Descriptionfill_

Strany 74 - Streaming Data (DMA) Control

Bit(s) Name Description5 UNDERFLOW Is set to 1 for 1 cycle every time the FIFO underflows. The FIFOunderflows when an Avalon read master reads from an

Strany 75

Macros to access all of the registers are defined in altera_avalon_fifo_regs.h. For example, this fileincludes the following macros to access the stat

Strany 76

void* input_fifo_wrclk_irq_event_ptr = (void*) &input_fifo_wrclk_irq_event;/* Enable all interrupts. *//* Clear event register, set enable all irq

Strany 77

Parameters: address—the base address of the FIFO control slavemask—masks the read value from the status registerReturns: Returns the masked bits of th

Strany 78

Description: Gets the value of the almostempty register.altera_avalon_fifo_read_event()Prototype: int altera_avalon_fifo_read_event(alt_u32 address, a

Strany 79 - Request Description

SDRAM Controller Core22014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe SDRAM controller core with Avalon® interface provides an Avalon Memory-

Strany 80

Returns: Returns 0 (ALTERA_AVALON_FIFO_OK) if successful, ALTERA_AVALON_FIFO_EVENT_CLEAR_ERROR if unsuccessful.Description: Clears the specified bits

Strany 81 - Bit Name Access Description

Include: <altera_avalon_fifo_regs.h>, <altera_avalon_fifo_utils.h>Parameters: address—the base address of the FIFO control slavedata—the v

Strany 82

Returns: Returns 0 (ALTERA_AVALON_FIFO_OK) if successful, ALTERA_AVALON_FIFO_FULLif unsuccessful.Description: Writes the packet status information to

Strany 83

Document Revision HistoryTable 16-8: Document Revision HistoryDate andDocumentVersionChanges Made Summary of ChangesJuly 2014v14.0.0-Removed mention o

Strany 84

Avalon-ST Multi-Channel Shared Memory FIFOCore172014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe Avalon® Streaming (Avalon-ST) Multi-Channel S

Strany 85

Table 17-1: Memory Utilization and Performance Data for Stratix II GX DevicesChannels ALUTsLogicRegistersMemory Blocks fMAX(MHz)M512 M4K M-RAM4 559 38

Strany 86 - May 2008

Functional DescriptionFigure 17-2: Avalon-ST Multi-Channel Shared Memory FIFO CoreAvalon-STStatus SourceAvalon-STStatus SourceMulti-Channel Shared FIF

Strany 87 - 16550 UART

Avalon-MM InterfacesThe core can have up to three Avalon-MM interfaces:• Avalon-MM control interface—Allows master peripherals to set and access almos

Strany 88 - Unsupported Features

Parameter Legal Values DescriptionError width 0–32 The width of the error signal on the Avalon-ST datainterfaces.FIFO depth 2–232The depth of each mem

Strany 89

Parameter Legal Values DescriptionUse almost-fullthreshold 1—Turn on these parameters to implement the optionalAvalon-ST almost-full and almost-empty

Strany 90 - Configuration Parameters

Figure 2-1: SDRAM Controller with Avalon Interface Block DiagramAvalon-MM slaveinterfaceto on-chiplogicSDRAM Controller Coredata, controlAvalon-MM Sla

Strany 91 - FPGA Resource Usage

Control Register InterfaceTable 17-6: Control Interface Register MapByteOffsetName Access ResetValueDescription0 ALMOST_FULL_THRESHOLD RW 0 Primary al

Strany 92 - Timing and Fmax

Table 17-7: Fill-level Interface Register MapByteOffsetName Access ResetValueDescription0 fill_level_0 RO 0Fill level for each channel. Each register

Strany 93 - Avalon-MM Slave

SPI Slave/JTAG to Avalon Master Bridge Cores182014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe SPI Slave to Avalon® Master Bridge and the JTAG

Strany 94 - Overrun/Underrun Conditions

Figure 18-2: System with a JTAG to Avalon Master Bridge CoreaF tcennocretnI metsySbcirRest of the SystemHostPCAltera FPGAJTAG to Transaction Bridgesrc

Strany 95 - Hardware Auto Flow-Control

When the transaction is complete, the bridges send a response to the host system using the same protocol.ParametersFor the SPI Slave to Avalon Master

Strany 96

Avalon-ST Bytes to Packets and Packets toBytes Converter Cores192014.24.07UG-01085SubscribeSend FeedbackThe Avalon® Streaming (Avalon-ST) Bytes to Pac

Strany 97

InterfacesTable 19-1: Properties of Avalon-ST InterfacesFeature PropertyBackpressure Ready latency = 0.Data Width Data width = 8 bits; Bits per symbol

Strany 98 - 16550 UART API

Operation—Avalon-ST Packets to Bytes Converter CoreThe Avalon-ST Packets to Bytes Converter core receives packetized data and transforms the packets t

Strany 99 - Private APIs

Avalon Packets to Transactions Converter Core202014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe Avalon® Packets to Transactions Converter core

Strany 100 - UART Device Structure

Feature PropertyData Width Data width = 8 bits; Bits per symbol = 8.Channel Not supported.Error Not used.Packet Supported.The Avalon-MM master interfa

Strany 101 - Figure 9-7:

standards, and therefore are capable of interfacing with a greater variety of SDRAM chips. For details,refer to the device handbook for the target dev

Strany 102 - Driver Examples

Table 20-3: Transaction SupportedTransactionCodeAvalon-MM Transaction Description0x00 Write, non-incrementingaddress.Writes data to the given address

Strany 103 - 2014.24.07

Document Revision HistoryTable 20-4: Document Revision HistoryDate andDocumentVersionChanges Made Summary of ChangesJuly 2014v14.0.0-Removed mention o

Strany 104

Scatter-Gather DMA Controller Core212014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe Scatter-Gather Direct Memory Access (SG-DMA) controller c

Strany 105

Figure 21-1: SG-DMA Controller Core with Streaming Peripheral and External MemoryAltera FPGA SOPC Builde r Syste mSSc atter Gather DMA Controller C

Strany 106 - Document Revision History

the estimated resource usage for a SG-DMA controller core used for memory to memory transfer. Thecore is configurable and the resource utilization var

Strany 107 - SPI Core

Descriptor ProcessorThe descriptor processor reads descriptors from the descriptor list via its Avalon® Memory-Mapped(MM) read master port and pushes

Strany 108 - txdata

Figure 21-3: Example of Memory-to-Memory ConfigurationMAva lon-MM Ma ste r P ortSAvalo n-MM S lave P ortAvalo n-ST So ur ce PortSRCAva lon-S T S in

Strany 109 - Master and Slave Modes

Figure 21-5: Example of Stream-to-Memory ConfigurationSRCSRCMAvalon-MM Master PortSAvalon-MM S lave P ortAvalon-ST So urce PortAvalon-ST S ink P ort

Strany 110 - Multi-Slave Environments

• In memory-to-memory configurations, the DMA read block receives the source address from itscommand FIFO and starts reading data to fill the FIFO on

Strany 111 - Configuration

The list below describes how the error signals in the SG-DMA core are implemented in the folowingconfigurations:• Memory-to-memory configurationNo err

Strany 112 - Timing Settings

ContentsIntroduction... 1-1Tool Support...

Strany 113 - Software Programming Model

Performance ConsiderationsUnder optimal conditions, the SDRAM controller core’s bandwidth approaches one word per clock cycle.However, because of the

Strany 114 - Software Files

ParametersTable 21-5: Configurable ParametersParameter Legal Values DescriptionTransfer mode Memory ToMemoryMemory ToStreamStream ToMemoryConfiguratio

Strany 115 - Register Map

Simulation ConsiderationsSignals for hardware simulation are automatically generated as part of the Nios II simulation processavailable in the Nios II

Strany 116 - # Name Description

32-bitWordOffsetRegister Name ResetValueDescriptionbase +1version 1 Indicate the hardware version number. Onlybeing used by software driver for softwa

Strany 117

Bit Bit Name Access Description5 RUN R/W Set this bit to 1 to start the descriptor processorblock which subsequently initiates DMA transac‐tions. Prio

Strany 118 - Document

Altera recommends that you read the status register only after the RUN bit in the control register iscleared.Table 21-8: Status Register Bit MapBit Bi

Strany 119 - Functional Description

Byte OffsetField Names31 2423 16 15 8 7 0base + 4 Reservedbase + 8 destinationbase +12Reservedbase +16next_desc_ptrbase +20Reservedbase +24Reserved

Strany 120

Table 21-11: DESC_CONTROL Bit MapBit (s) Field Name Access Description0 GENERATE_EOP W When this bit is set to 1,the DMA read block assertsthe EOP sig

Strany 121 - Interrupt Behavior

Programming with SG-DMA ControllerThis section describes the device and descriptor data structures, and the application programminginterface (API) for

Strany 122

Table 21-14: Descriptor Data Structuretypedef struct {alt_u32 *read_addr;alt_u32 read_addr_pad;alt_u32 *write_addr;alt_u32 write_addr_pad;alt_u32 *nex

Strany 123 - PIO Core

Name Descriptionalt_avalon_sgdma_register_callback() Associates a user-specific callback routine with theSG-DMA interrupt handler.alt_avalon_sgdma_sta

Strany 124 - IRQ Generation

controller core easily by selecting the appropriate preset value. The following preset configurations aredefined:• Micron MT8LSDT1664HG module• Four S

Strany 125 - Example Configurations

Thread-safe: No.Available fromISR:Not recommended.Include: <altera_avalon_sgdma.h>, <altera_avalon_sgdma_descriptor.h>, <altera_avalon_

Strany 126 - Input Options

Description: This function constructs a single SG-DMA descriptor in the memory specifiedin alt_avalon_sgdma_descriptor *desc for an Avalon-MM to Avalo

Strany 127

Description: This function constructs a single SG-DMA descriptor in the memory specified inalt_avalon_sgdma_descriptor *desc for an Avalon-ST to Avalo

Strany 128

Parameters: *desc—a pointer to the descriptor being constructed.*next—a pointer to the “next” descriptor. This does not need to be a complete orfuncti

Strany 129

Parameters: *desc—a pointer to the constructed descriptor to examine.Returns: Returns 0 if the descriptor is error-free, not owned by hardware, or a p

Strany 130

Parameters: *dev—a pointer to the SG-DMA device structure.Returns: voidDescription: Starts the DMA engine and processes the descriptor pointed to in t

Strany 131

Document Revision HistoryTable 21-16: Revision HistoryDate andDocumentVersionChanges Made Summary of ChangesJuly 2014v14.0.0Updated Register Maps tabl

Strany 132 - Operation

Altera Modular Scatter-Gather DMA222014.24.07UG-01085SubscribeSend FeedbackOverviewIn a processor subsystem, data transfers between two memory spaces

Strany 133

Figure 22-1: mSDGMA Module Configuration with support for Memory-Mapped Reads and Writes22-2Feature DescriptionUG-010852014.24.07Altera CorporationAlt

Strany 134

Figure 22-2: mSGDMA Module Configuration with Support for Memory-Mapped Streaming Reads tothe Avalon-ST data bus.UG-010852014.24.07Feature Description

Strany 135 - PCI Lite Core

Settings AllowedValuesDefaultValuesDescriptionInclude a functionalmemory model in thesystem testbenchOn, Off On When on, Qsys functional simulation mo

Strany 136

Figure 22-3: mSGDMA Module Configuration with Support for Avalon-ST Data Write Streaming to theMemory-Mapped Bus.Altera mSGDMA support 32-bit addressi

Strany 137 - Prefetchable Avalon-MM Master

The following paragraphs describe the behavior of the component interfaces.Descriptor Slave PortThe descriptor slave port is write only and configurab

Strany 138 - PCI Bus Access Slave

Parameter Name Description Allowable RangeMaximum Transfer Legth Maximum transfer length. With shorterlength width being configured, the fasterfrequen

Strany 139 - Master and Target Performance

mSGDMA DescriptorsThe descriptor slave port is 128 bits for standard descriptors and 256 bits for extended descriptors. Thetables below show acceptabl

Strany 140

Byte Lanes0xC Control[31:0]Table 22-2: Extended Descriptor FormatByte LanesOffset 3 2 1 00x0 Read Address[31:0]0x4 Write Address[31:0]0x8 Length[31:0]

Strany 141 - Description

program the length field with the largest possible value of 0xFFFFFFFF. This allows you to specify amaximum packet size for each descriptor that has p

Strany 142 - Avalon-to-PCI Write Request

The control field is available for both the standard and extended descriptor formats. This field can beprogrammed to configure parked descriptors, err

Strany 143 - Ordering of Requests

Bit Sub-Field Name Definition23:16 Transmit Error / ErrorIRQ EnableFor MM->ST transfers, this field isused to specify a transmit error.This field i

Strany 144

Bit Sub-Field Name Definition12 End on EOPEnd on end of packet allows the writemaster to continuously transfer dataduring ST->MM transfers withoutk

Strany 145 - Send Feedback

Byte Lanes0x18 N/A <reserved>10x1C N/A <reserved>1Status RegisterTable 22-5: Status Register Bit DefinitionBit Name Description31:10 <r

Strany 146 - PCI Timing Constraint Files

Settings AllowedValuesDefaultValueDescriptionWrite recoverytime (t_wr, Noauto precharge)— 14 ns Write recovery if explicit precharge commands areissue

Strany 147 - Simulation Considerations

Table 22-6: Control Register Bit DefinitionBit Name Description31:10 <reserved> N/A5 Stop Descriptors Setting this bit will stop the SGDMA dispa

Strany 148

The following list explains each of the fields:• Actual bytes transferred is used to determine how many bytes were transferred when the mSGDMAis confi

Strany 149 - Simulation Flow

DMA Controller Core232014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe direct memory access (DMA) controller core with Avalon® interface perfor

Strany 150

Figure 23-1: DMA Controller Block DiagramAvalon-MMSave PortAddr,data,controlIRQSeparateAvalon-MMMaster PortsRegister Filestatusreadaddresswriteaddress

Strany 151 - MDIO Core

length registered is programmed with 64 and the burst count port will be 16. If a 64-bit data width DMAis programmed for a doubleword transfer of 8 by

Strany 152 - MDIO Frame Format (Clause 45)

Transfer SizeThe parameter Width of the DMA Length Register specifies the minimum width of the DMA’s transac‐tion length register, which can be betwee

Strany 153 - Interfaces

Software Programming ModelThis section describes the programming model for the DMA controller, including the register map andsoftware declarations to

Strany 154 - Configuration Registers

Request MeaningTable 23-2 :1. These macro names changed in version 1.1 of the Nios II Embedded Design Suite (EDS). Theold names (ALT_DMA_TX_STREAM_ON,

Strany 155

Offset Register Name Read/Write 31 13 12 11 10 9 8 7 6 5 4 3 2 1 06 control RW (2) SOFTWARERESETQUADWORDDOUBLEWORDWCONRCONLEENWEENREENI_ENGO WORDHW

Strany 156 - On-Chip FIFO Memory Core

length RegisterThe length register specifies the number of bytes to be transferred from the read port to the write port.The length register is specifi

Strany 157

structured as a single, monolithic block of memory. For example, even for a system that combines twoSDRAM chips, the generic memory model is implement

Strany 158 - Offset Bits Field Description

BitNumberBit Name Read/Write/ClearDescription8 RCON RW Reads from a constant address. When RCON is 0, the readaddress increments after every data tran

Strany 159

Document Revision HistoryTable 23-6: Document Revision HistoryDate andDocumentVersionChanges Made Summary of ChangesJuly 2014v14.0.0-Removed mention o

Strany 160

Video Sync Generator and Pixel ConverterCores242014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe video sync generator core accepts a continuous

Strany 161 - Interface Parameters

Figure 24-2: Video Sync Generator Block Diagramclkresetdatareadyvalidsopeoprgb_outhdvddenVIDEO SYNC GENERATORYou can configure various aspects of the

Strany 162

Parameter Name DescriptionVertical Sync PulseLinesThe width of the v-sync pulse in number of lines.Vertical Front PorchLinesThe number of blanking lin

Strany 163 - Software Control

Signal Name Width (Bits) Direction Descriptionvalid 1 Input This signal is not used by the video sync generator corebecause the core always expects va

Strany 164 - Bit(s) Name Description

Figure 24-4: Horizontal Synchronization Timing—24 Bits DataWidth and 1 Beat Per Pixelclkhddenrgb_outRGBHorizontal synchronization pulseHorizontal blan

Strany 165

Signal Name Width (Bits) Direction Descriptionclk 1 InputNot in use.reset_n 1 InputAvalon-ST Signalsdata_in 32 Input Incoming pixel data. Contains fou

Strany 166 - Software Example

Date andDocumentVersionChanges Made Summary of ChangesDecember2010v10.1.0Removed the “Device Support”, “Instantiating the Corein SOPC Builder”, and “R

Strany 167 - On-Chip FIFO Memory API

Interval Timer Core252014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe Interval Timer core with Avalon® interface is an interval timer for Aval

Strany 168

The address, data, and control signals connect in parallel to the two chips. The chipselect bus (cs_n[1:0])determines which chip is selected. The resu

Strany 169

The intervanl timer core has two user-visible features:• The Avalon Memory-Mapped (Avalon-MM) interface that provides access to six 16-bit registers•

Strany 170

example, if the associated system clock has a frequency of 30 ns, and the specified Timeout Period valueis 1 µs, the true timeout period will be 1.020

Strany 171

Option DescriptionSystem reseton timeout(watchdog)When this option is on, the core’s Avalon-MM slave port includes the resetre-quest signal. This sign

Strany 172

this timer. The driver is interrupt-driven, and therefore must have its interrupt signal connected in thesystem hardware.The Nios II integrated develo

Strany 173

Table 25-3: Register Map—32-bit TimerOffset Name R/WDescription of Bits15 ... 4 3 2 1 00 status RW (1) RUN TO1 control RW (1) STOP START CONT ITO2 per

Strany 174

Table 25-5: status Register BitsBit Name R/W/C Description0 TO RC The TO (timeout) bit is set to 1 when the internal counter reaches zero.Once set by

Strany 175

period_n RegistersThe period_n registers together store the timeout period value. The internal counter is loaded with thevalue stored in these registe

Strany 176 - Multi-Channel Shared FIFO

Date andDocumentVersionChanges Made Summary of ChangesJuly 2010v10.0.0No change from previous release. —November2009v9.1.0Revised descriptions of regi

Strany 177 - Parameters

Mutex Core262014.24.07UG-01085SubscribeSend FeedbackCore OverviewMultiprocessor environments can use the mutex core with Avalon® interface to coordina

Strany 178 - Address Width

• When the VALUE field is 0x0000, the mutex is unlocked and available. Otherwise, the mutex is lockedand unavailable.• The mutex register is always re

Strany 179

• Timing parameters of the device and SDRAM I/O pins — I/O timing parameters vary based on devicefamily and speed grade.• Pin location on the device —

Strany 180 - Name Access Reset

Function Name Descriptionaltera_avalon_mutex_trylock() Tries to lock the mutex. Returns immediately if it fails tolock the mutex.altera_avalon_mutex_l

Strany 181

altera_avalon_mutex_first_lock()Prototype: int altera_avalon_mutex_first_lock(alt_mutex_dev* dev)Thread-safe: Yes.Available fromISR:No.Include: <al

Strany 182

altera_avalon_mutex_trylock()Prototype: int altera_avalon_mutex_trylock(alt_mutex_dev* dev, alt_u32value)Thread-safe: Yes.Available fromISR:No.Include

Strany 183

Date andDocumentVersionChanges Made Summary of ChangesDecember2010v10.1.0Removed the “Device Support”, “Instantiating theCore in SOPC Builder”, and “R

Strany 184

Mailbox Core272014.24.07UG-01085SubscribeSend FeedbackMultiprocessor environments can use the mailbox core with Avalon® interface to send messages bet

Strany 185 - Bytes Converter Cores

The mailbox component contains two mutexes: One to ensure unique write access to shared memory andone to ensure unique read access from shared memory.

Strany 186 - Feature Property

The mailbox software programming model has the following characteristics and assumes there aremultiple processors accessing a single mailbox core and

Strany 187

Table 27-3: Writing to and Reading from a Mailbox#include <stdio.h>#include "altera_avalon_mailbox.h"int main(){ alt_u32 message =

Strany 188

altera_avalon_mailbox_get()Prototype: alt_u32 altera_avalon_mailbox_get (alt_mailbox_dev* dev, int*err);Thread-safe: Yes.Available fromISR:No.Include:

Strany 189

altera_avalon_mailbox_post()Prototype: int altera_avalon_mailbox_post (alt_mailbox_dev* dev, alt_u32msg);Thread-safe: Yes.Available fromISR:No.Include

Strany 190 - Transaction

Figure 2-5: Calculating the Maximum SDRAM Clock LagFigure 2-6: Calculating the Maximum SDRAM Clock LeadExample CalculationThis section demonstrates a

Strany 191

Vectored Interrupt Controller Core282014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe vectored interrupt controller (VIC) core serves the follo

Strany 192

• One optional Avalon-ST interface input interface to receive the Avalon-ST output in systems withdaisy-chained VICsThe Sample System Layout Figure be

Strany 193

Functional DescriptionFigure 28-2: VIC Block DiagramControl Status Registerscsr_access(Avalon-MM slavefrom processor)InterruptRequestBlockinterrupt_co

Strany 194

The interrupt_controller_out and interrupt_controller_in interfaces have identical Avalon-STformats so you can daisy chain VICs together in SOPC Build

Strany 195

This block contains the majority of the VIC CSRs. The CSRs are accessed via the Avalon-MM slaveinterface.Optional output from another VIC core can als

Strany 196

Daisy Chaining VIC CoresYou can create a system with more than 32 interrupts by daisy chaining multiple VIC cores together. Thisis done by connecting

Strany 197 - DMA Descriptors

Table 28-6: Control Status RegistersOffset Register Name Access ResetValueDescription0 – 31 INT_CONFIG<n> R/W 0 There are 32 interrupt configura

Strany 198 - Error Conditions

Offset Register Name Access ResetValueDescription36 INT_RAW_STATUS R 0 The interrupt raw status register. INT_RAW_STATUS shows the unmasked state of t

Strany 199 - Signal Type Description

Offset Register Name Access ResetValueDescription43 VEC_TBL_ADDR R 0 The vector table address register. VEC_TBL_ADDRprovides the RHA for the IRQ value

Strany 200

Table 28-8: The VIC_CONFIG Register MapBits Field Name Access ResetValueDescription0:2 VEC_SIZE R/W 0 The vector size field. VEC_SIZE specifies the nu

Strany 201

Table 2-3: Timing Parameters for Micron MT48LC4M32B2 SDRAM DeviceParameter SymbolValue (ns) in -7 Speed GradeMin. Max.Access timefrom CLK(pos. edge)CL

Strany 202

ParametersGeneration-time parameters control the features present in the hardware.The table below lists anddescribes the parameters you can configure.

Strany 203

• altera_vic_regs.h—Defines the core’s register map, providing symbolic constants to access the low-levelhardware.• altera_vic_funnel.h, altera_vic_ir

Strany 204

Data StructureTable 28-11: Device Data Structure#define ALT_VIC_MAX_INTR_PORTS (32)typedef struct alt_vic_dev{void *base; /* Base address of VIC */alt

Strany 205

• alt_ic_isr_register ()• alt_ic_irq_enable()• alt_ic_irq_disable()• alt_ic_irq_enabled()These functions write to the register map to change the setti

Strany 206 - Timeouts

alt_vic_sw_interrupt_clear()Prototype: int alt_vic_sw_interrupt_clear(alt_u32 ic_id, alt_u32 irq)Thread-safe: NoAvailablefrom ISR:Yes; if interrupt pr

Strany 207 - Data Structure

Thread-safe: NoAvailablefrom ISR:NoInclude: altera_vic_irq.h, altera_vic_regs.hParameters: ic_id—the interrupt controller identification number asdefi

Strany 208 - SG-DMA API

VIC BSP SettingsThe VIC driver scripts provide settings to the BSP. The number and naming of these settings depends onyour hardware system's conf

Strany 209 - Name Description

Descrip‐tion:Enables interrupt preemption (nesting) if a higher priorityinterrupt is asserted while a lower priority ISR is executing, andthat higher

Strany 210

Descrip‐tion:Enables interrupt preemption (nesting) if a higher priorityinterrupt is asserted while a lower priority ISR is executing, forall interrup

Strany 211

Descrip‐tion:Specifies the linker section that each VIC's generated vector tableand each interrupt funnel link to. The memory device that thespec

Strany 212

Parameter Symbol Value (ns)Maximum clock-to-output time tCO_MAX2.477Maximum hold time after clock tH_MAX–5.607Maximum setup time before clock tSU_MAX5

Strany 213

Destina‐tion file:system.hDescrip‐tion:Specifies the RRS for the interrupt connected to thecorresponding port. Legal values are 1 to the number of sha

Strany 214

Default Settings for RRS and RILThe default assignment of RRS and RIL values for each interrupt assumes interrupt port 0 on the VICinstance attached t

Strany 215

• Each component’s interrupt interface in your system should only be connected to one VIC instanceper processor.• The number of shadow register sets f

Strany 216

Date andDocumentVersionChanges Made Summary of ChangesNovember2009v9.1.0Initial release. —28-24Document Revision HistoryUG-010852014.24.07Altera Corpo

Strany 217 - Feature Description

Avalon-ST JTAG Interface Core292014.24.07UG-01085SubscribeSend FeedbackFunctional DescriptionThe figure below shows a block diagram of the Avalon-ST J

Strany 218

Core BehaviorThe Avalon-ST JTAG Interface core is supported when used with the System Console; a Tcl console thatprovides access to IP cores instantia

Strany 219

For more information about the System Console and its commands, refer to Analyzing and DebuggingDesigns with the System Console in volume 3 of the Qua

Strany 220 - Component Interface

Date andDocumentVersionChanges Made Summary of ChangesNovember2008v8.1.0Changed to 8-1/2 x 11 page size. No change to content. —May 2008v8.0.0Initial

Strany 221 - Descriptor Slave Port

System ID Core302014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe system ID core with Avalon® interface is a simple read-only device that provi

Strany 222 - Component GUI

ConfigurationThe id and timestamp register values are determined at system generation time based on theconfiguration of the Qsys system and the curren

Strany 223 - Byte Lanes

Compact Flash Core... 4-1Core Overview...

Strany 224 - Length Field

Date andDocumentVersionChanges Made Summary of ChangesDecember2010v10.1.0Removed the “Device Support”, “Instantiating the Core inSOPC Builder”, and “R

Strany 225 - Control Field

Document Revision HistoryTable 30-2: Document Revision HistoryDate andDocumentVersionChanges Made Summary of ChangesJuly 2014v14.0.0-Removed mention o

Strany 226 - Bit Sub-Field Name Definition

Performance Counter Core312014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe performance counter core with Avalon® interface enables relatively

Strany 227

The performance counter core can have up to seven section counters.Global CounterThe global counter controls all section counters. The section counter

Strany 228 - Register Map of mSGDMA

Offset Register NameBit DescriptionRead Write31 ... 0 31 ... 1 0...4n + 0 T[n]losection n clock cycle counter [31:0] (1) 0 =STOP4n + 1 T[n

Strany 229 - Control Register

Software FilesAltera provides the following software files for Nios II systems. These files define the low-level access tothe hardware and provide con

Strany 230 - Offset Access 3 2 1 0

Name (1) MeaningPERFORMANCE_COUNTER_SPAN Number of hardware registersPERFORMANCE_COUNTER_HOW_MANY_SECTIONSNumber of section countersTable 31-3 :1. Exa

Strany 231 - Unsupported Feature

Table 31-5: Example 2:--Performance Counter Report--Total Time: 2.07711 seconds (103855534 clock-cycles)+-----------------+--------+-----------+------

Strany 232 - DMA Controller Core

Returns: —Description: Macro PERF_RESET() stops and disables all counters, resetting them to 0.PERF_START_MEASURING()Prototype: PERF_START_MEASURING(p

Strany 233 - Setting Up DMA Transactions

Parameters: p—performance counter core base address.n—counter section number. Section counter numbers start at 1. Do not refer tocounter 0 in this mac

Strany 234

Parameters: perf_base—Performance counter core base address.clock_freq_hertz—Clock frequency.num_sections—The number of section counters to display. T

Strany 235 - Advanced Options

Tri-State SDRAM32014.24.07UG-01085SubscribeSend FeedbackThe SDRAM controller core with Avalon® interface provides an Avalon Memory-Mapped (Avalon-MM)i

Strany 236

Description: Function perf_get_section_time() reads the raw time for a given section.This is the time, in clock cycles, that the section has been runn

Strany 237

Document Revision HistoryTable 31-6: Document Revision HistoryDate andDocumentVersionChanges Made Summary of ChangesJuly 2014v14.0.0-Removed mention o

Strany 238

PLL Cores322014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe PLL cores, Avalon ALTPLL and PLL, provide a means of accessing the dedicated on-ch

Strany 239

Functional DescriptionFigure 32-1: PLL Core Block DiagramStatusControlaresetpfdenapllenainclke1e0c1c0lockedPLL LockedAvalon-MMSlave InterfacePLL Reset

Strany 240

or control signals which are not mapped to registers are exported to the top-level module. For details,refer to the Instantiating the Avalon ALTPLL Co

Strany 241

For each advanced signal present on the ALTPLL megafunction, you can select one of the following accessmodes:• Export—Exports the signal to the top le

Strany 242 - Video Sync Generator

Hardware Simulation ConsiderationsThe HDL files generated by SOPC Builder for the PLL cores are suitable for both synthesis andsimulation. The PLL cor

Strany 243

Table 32-3: Status Register BitsBit Number Bit Name Value afterresetDescription0 locked(2)1 Connects to the locked signal onthe ALTPLL megafunction. T

Strany 244 - Parameter Name Description

Phase Reconfig Control RegisterEmbedded software can control the dynamic phase reconfiguration via the phase reconfig controlregister.Table 32-5: Phas

Strany 245 - Horizontal blank pixels

Document Revision HistoryTable 32-7: Document Revision HistoryDate andDocumentVersionChanges Made Summary of ChangesDecember2010v10.1.0Removed the “De

Strany 246 - Pixel Converter

Block DiagramFigure 3-1: Tri-State SDRAM Block Diagram altera _sdram_controllerInit FSMRequest BufferAvalon-MM InterfaceSDRAM InterfaceMainFSMSignal G

Strany 247

Altera MSI to GIC Generator332014.24.07UG-01085SubscribeSend FeedbackOverviewIn the PCI subsystem, Message Signaled Interrupts (MSI) is a feature that

Strany 248

The Altera MSI-to-GIC Generator provides storage for the MSI system-specified data value. It alsogenerates level interrupt output when there is an unr

Strany 249 - Interval Timer Core

When a new message data is written into Altera MSI-to-GIC Generator module, the storage wordassociated Status bit is set automatically and a level int

Strany 250

Error RegisterThe Error register bit is set automatically only when the associated message data word location thatcontains the write entry, indicating

Strany 251 - Hardware Options

Altera SMBus Core InterfaceThis diagram depicts the top level interfaces for the Altera SMBus Core.Figure 33-2: Altera SMBus Core Top Level Interfaces

Strany 252

Signal Width Direction Descriptionwrite 1 Input Avalon-MM writecontrolwritedata 32 Input Avalon-MM write databusreaddata 32 Output Avalon-MM read data

Strany 253

Component InterfaceThe Altera MSI-to-GIC Generator component consists of two Avalon-MM Slave interfaces, CSR and Datastorage. The component also provi

Strany 254

The configuration parameters of the Altera MSI-to-GIC Generator TCL component are listed, below:Table 33-10: Component parametersParameter Name Descri

Strany 255 - Bit Name R/W/C Description

Parameter Name Description Default value Allowable rangeDATA_ENTRY_DEPTHThis parameter affectsthe depth of FIFOimplemented at eachdata word address. T

Strany 256

Altera Interrupt Latency Counter342014.24.07UG-01085SubscribeSend FeedbackOverviewA processor running a program can be instructed to divert from its o

Strany 257

Table 3-2: Configuration Timing ParametersParameter GUI Legal Values Default Values UnitsCAS latency cycles 1, 2, 3 3 CyclesInitialization refresh cyc

Strany 258 - Mutex Core

Figure 34-1: Usage model of Interrupt Latency CalculatorProcessorInterrupt Latency CalculatorPeripheral DataMaster IRQ Receiver CSRSlave

Strany 259

instance to have only five counters, then only addressess 0x0 to 0x4 return a valid value when you try toread from it. When the IP user tries to read

Strany 260 - Mutex API

Counter Stop RegistersTable 34-4: Counter Stop RegistersField Name Counter Stop RegistersBit Location 31 0If the ILC is configured to support the puls

Strany 261

Interrupt DetectorThe interrupt detector can be customized to detect either signal edges or pulse using the Qsys interface.The interrupt detector gene

Strany 262

Parameter Name Description Default Value Allowable RangeINTR_TYPEValue 0: levelsensitive interruptinputValue 1: edge/pulseinterrupt input0 0,1IRQ_PORT

Strany 263

Implementation DetailsInterrupt Latency Counter ArchitectureFigure 34-2: Interrupt Latency Calculator ArchitectureThe interrupt latency calculator ope

Strany 264 - Mailbox Core

IP CaveatsThere are limitations in the Altera interrupt latency which the user needs to be aware of. This limitationarises due to the nature of state

Strany 265

Table 3-4: Avalon-MM Slave Interface SignalsSignal Width Direction Descriptionavs_read1 Input Avalon-MM read control.Asserted to indicate a readtransf

Strany 266

Table 3-5: Tristate Conduit Master / SDRAM Interface SignalsSignal Width Direction Descriptiontcm_grant1 Input When asserted, indicates thata tristate

Strany 267 - Mailbox API

Signal Width Direction Descriptiontcm_request1 Output The meaning of tcm_request depends on thestate of the tcm_grantsignal, as the following rulesdic

Strany 268

Signal Width Direction Descriptionsdram_dq_oen1 Output SDRAM data bus input.Valid only when pin-sharingmode is enabled.sdram_dq sdram_data_widthInput/

Strany 269

Signal Width Direction Descriptionsdram_cke1 Output SDRAM Clock Enable. TheSDRAM controller does notsupport clock-disable modes.The SDRAM controllerpe

Strany 270

Avalon-MM Slave Interface and CSRThe host processor perform data read and write operation to the external SDRAM devices through theAvalon-MM interface

Strany 271

HAL System Library Support...7-5Software Files..

Strany 272

Document Revision HistoryTable 3-6: Document Revision HistoryDate andDocumentVersionChanges Made Summary of ChangesJuly 2014v14.0- Initial Release3-10

Strany 273 - Functional Blocks

Compact Flash Core42014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe CompactFlash core allows you to connect systems built on Osys to CompactFl

Strany 274

The CompactFlash core maps the Avalon-MM bus signals to the CompactFlash device with propertiming, thus allowing Avalon-MM master peripherals to direc

Strany 275 - Register Maps

CompactFlash Interface SignalNamePin Type CompactFlash PinNumberdata[7] Input/Output 6data[8] Input/Output 47data[9] Input/Output 48data[10] Input/Out

Strany 276

• altera_avalon_cf_regs.h—The header file that defines the core's register maps.• altera_avalon_cf.h, altera_avalon_cf.c—The header and source co

Strany 277

Table 4-4: cfctl Register BitsBit Number Bit Name Read/Write Description0 DET RO Detect. This bit is set to 1 when the core detects aCompactFlash devi

Strany 278

Date andDocumentVersionChanges Made Summary of ChangesNovember2009v9.1.0No change from previous release. —March 2009v9.0.0No change from previous rele

Strany 279

Common Flash Interface Controller Core52014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe common flash interface controller core with Avalon® in

Strany 280

Functional DescriptionThe figure below shows a block diagram of the CFI controller in a typical system configuration. TheAvalon Memory-Mapped (Avalon-

Strany 281

The options provided are not intended to cover the wide range of flash devices available in the market. Ifthe flash chip on your target board does not

Strany 282

Document Revision History...9-20SPI

Strany 283

HAL System Library SupportThe Altera-provided driver implements a HAL flash device driver that integrates into the HAL systemlibrary for Nios II syste

Strany 284

Date andDocumentVersionChanges Made Summary of ChangesNovember2009v9.1.0Revised description of the timing page settings. —March 2009v9.0.0No change fr

Strany 285 - Board Support Package

EPCS Serial Flash Controller Core62014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe EPCS serial flash controller core with Avalon® interface al

Strany 286

Functional DescriptionAs shown below, the EPCS device's memory can be thought of as two separate regions:• FPGA configuration memory—FPGA configu

Strany 287

software, the EPCS serial flash controller core signals are routed automatically to the device pins for theEPCS device.You, however, have the option n

Strany 288

Offset(32-bit Word Address)Register Name R/WBit Description31:00x100 Read Data R0x101 Write Data W0x102 Status R/W0x103 Control R/W0x104 Reserved —0x1

Strany 289

The HAL API for programming flash, including C-code examples, is described in detail in the .Nios II Flash Programmer User GuideFor details about mana

Strany 290

Date andDocumentVersionChanges Made Summary of ChangesMay 2008v8.0.0Updated the boot rom size.Added additional steps to perform to connect outputpins

Strany 291 - VIC IRQ RRS RIL

JTAG UART Core72014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe JTAG UART core with Avalon® interface implements a method to communicate seria

Strany 292

Figure 7-1: JTAG UART Core Block DiagramAvalon-MM slaveinterfaceto on-chiplogicJTAG UART CoreRegistersJTAGHubInterfaceIRQBuilt-In Feature of Altera FP

Strany 293 - November

Interrupt Behavior...12-7Softwar

Strany 294 - Altera FPGA

Figure 7-2: Example System Using the JTAG UART CorePC InterfaceHost PCJTAGServerDownloadCableAlteraDownloDebuggerDebuggerCDebug DataPC InterfaceJTAGHo

Strany 295 - Core Behavior

Write FIFO SettingsThe write FIFO buffers data flowing from the Avalon interface to the host. The following settings areavailable:• Depth—The write FI

Strany 296

characters via a console, giving the appearance of a terminal session with the system executing inhardware. The following options are available:• Do n

Strany 297

For Nios II processor users, the HAL system library API provides complete access to the JTAG UARTcore's features. Nios II programs treat the JTAG

Strany 298 - System ID Core

Table 7-2: Example: Transmitting Characters to a JTAG UART Core/* A simple program that recognizes the characters 't' and 'v' */#i

Strany 299

Driver Options: Fast vs. Small ImplementationsTo accommodate the requirements of different types of systems, the JTAG UART driver has two variants,a f

Strany 300

• altera_avalon_jtag_uart_regs.h—This file defines the core's register map, providing symbolic constantsto access the low-level hardware. The sym

Strany 301 - Performance Counter Core

Bit(s) Name Access Description[32:16]RAVAIL R The number of characters remaining in the read FIFO (afterthe current read).A read from the data registe

Strany 302 - Global Counter

The JTAG UART core has two kinds of interrupts: write interrupts and read interrupts. The WE and REbits in the control register enable/disable the int

Strany 303

Date andDocumentVersionChanges Made Summary of ChangesNovember2008v8.1.0Changed to 8-1/2 x 11 page size. No change to content. —May 2008v8.0.0No chang

Strany 304 - Using the Performance Counter

Document Revision History...15-5On-C

Strany 305 - Name (1) Meaning

UART Core82014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe UART core with Avalon® interface implements a method to communicate serial characte

Strany 306 - Performance Counter API

Avalon-MM Slave Interface and RegistersThe UART core provides an Avalon-MM slave interface to the internal register file. The user interface tothe UAR

Strany 307 - PERF_BEGIN()

A master peripheral can monitor the receiver's status by reading the status register's read-ready (RRDY),receiver-overrun error (ROE), break

Strany 308 - PERF_END()

The baud rate value is used to calculate an appropriate clock divisor value to implement the desired baudrate. Baud rate and divisor values are relate

Strany 309

Setting Legal Values DescriptionParity None, Even,OddThis setting determines whether the UART core transmits characters withparity checking, and wheth

Strany 310

accept another character, and to read data only when the core has data available. The UART core can alsooptionally include the end-of-packet register.

Strany 311

speed, or roughly one character per 20 clock cycles. You can choose one of the following options for thesimulated transmitter baud rate:• Accelerated

Strany 312 - PLL Cores

Table 8-2: Example: Printing Characters to a UART Core as stdout#include <stdio.h>int main (){printf("Hello world.\n");return 0;}The f

Strany 313 - ALTPLL Megafunction

Table 8-3: Example: Sending and Receiving Characters/* A simple program that recognizes the characters 't' and 'v' */#include <

Strany 314 - Instantiating the PLL Core

The small driver is a polled implementation that waits for the UART hardware before sending andreceiving each character. There are two ways to enable

Strany 315

Document Revision History...17-8SPI

Strany 316

For details about the ioctl() function, refer to the Nios II Software Developer's Handbook.LimitationsThe HAL driver for the UART core does not s

Strany 317

Some registers and bits are optional. These registers and bits exists in hardware only if it was enabled atsystem generation time. Optional registers

Strany 318

Bit Name Access Description2 BRK RC Break detect. The receiver logic detects a break when the RXD pin is heldlow (logic 0) continuously for longer tha

Strany 319

Bit Name Access Description10 (1)DCTS RC Change in clear to send (CTS) signal. The DCTS bit is set to 1 whenever alogic-level transition is detected o

Strany 320 - Altera MSI to GIC Generator

Bit Name Access Description3 IROE RW Enable interrupt for a receiver overrun error.4 ITOE RW Enable interrupt for a transmitter overrun error.5 ITMT R

Strany 321 - Interrupt Servicing Process

The endofpacket register is an optional hardware feature. If the Include end-of-packet registerhardware option is not enabled, the endofpacket registe

Strany 322 - Registers of Component

Date andDocumentVersionChanges Made Summary of ChangesMay 2008v8.0.0No change from previous release. —UG-010852014.24.07Document Revision History8-17U

Strany 323

16550 UART92014.24.07UG-01085SubscribeSend FeedbackCore OverviewThe Altera 16550 UART (Universal Asynchronous Receiver/Transmitter) soft IP core with

Strany 324 - Altera SMBus Core Interface

Features Run Time Configurable Generate Time ConfigurableEven/Odd parity Yes -Baud rate selection Yes -Priority based interrupt with configu‐rable ena

Strany 325

Table 9-3: Avalon-MM SlavePin Name Width Direction Descriptionaddr 9 InputAvalon-MM Address busHighest addressable byteaddress is 0x118 so a 9-bitwidt

Strany 326 - Component Parameterization

alt_avalon_sgdma_construct_stream_to_mem_desc()...21-20alt_avalon_sgdma_construct_mem_to_stream

Strany 327

Table 9-7: DMA Sideband SignalsPin Name Direction Descriptiondma_tx_ack_n Input TX DMA acknowledgedma_rx_ack_n Input RX DMA acknowledgedma_tx_req_n Ou

Strany 328

Parameter Name Description DefaultFIFO_DEPTHSet depth of FIFOValues limited to 32, 64and 128FIFO_MODE must be 1.128FIFO_HWFC1 = Enabled HardwareFlow C

Strany 329

Resource NumberRouting optimization registers 17Global Signals 2M10k blocks 0Total MLAB memory bits 2432Timing and FmaxFigure 9-2: Maximum Delays on U

Strany 330

16 clock multi-cycle path on the output side. Furthermore, divider of 1 is an unlikely system, if the UARTis clocked at 125 MHz, the resulting baud ra

Strany 331 - Frequency Register

Reads are expected to have 2 types of behavior:• When status registers are being polled, Reads are expected to be done in singles• When data needs to

Strany 332 - 32-bit Counter

data from the shift register is written onto the Receive Buffer. The existing data in the Receive Buffer isoverwritten. This is consistent with publis

Strany 333

Figure 9-5: Hardware Auto Flow-Control Between two UARTsTXFIFOTransmit BufferFlow ControlRXFIFOReceive BufferFlow ControlRXFIFOReceive BufferFlow Cont

Strany 334 - Software Access

Qsys generation, that is to say once FIFO Depth is selected the depth for the FIFO can’t be changeanymore.Table 9-12: Supported FeaturesFeatures Run T

Strany 335 - Implementation Details

Figure 9-6: Qsys setting to configure FIFO depth16550 UART APIPublic APIsTable 9-13: altera_16550_uart_openPrototype:altera_16550_uart_dev * altera_16

Strany 336 - IP Caveats

Parameters:dev - The UART deviceptr – destination addresslen – maximum length of the dataflags – for indicating blocking/non-blocking accessfor single

Komentáře k této Příručce

Žádné komentáře