Difference between revisions of "Unit GENET"
(3 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
---- | ---- | ||
− | '''Broadcom GENET Gigabit Ethernet Driver''' | + | '''Broadcom GENET Gigabit Ethernet Driver unit''' |
This driver supports members of the Broadcom family of Gigabit Ethernet devices including the BCM54213PE contained in the Raspberry Pi 4B. | This driver supports members of the Broadcom family of Gigabit Ethernet devices including the BCM54213PE contained in the Raspberry Pi 4B. | ||
Line 611: | Line 611: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''UniMAC | + | <div style="font-size: 14px; padding-left: 12px;">'''UniMAC INTRL2 registers''' <code> INTRL2_CPU_* </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
Line 1,231: | Line 1,231: | ||
| <code>DMA_RX_FI_SHIFT = $0007;</code> | | <code>DMA_RX_FI_SHIFT = $0007;</code> | ||
| | | | ||
− | |- | + | |- |
− | | <code> | + | | <code>DMA_DESC_ALLOC_MASK = $00FF;</code> |
| | | | ||
|- | |- | ||
Line 2,158: | Line 2,158: | ||
---- | ---- | ||
− | '' | + | |
+ | '''GENET network''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PGENETNetwork = ^TGENETNetwork;</code> | ||
+ | |||
+ | <code>TGENETNetwork = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Network Properties'' | ||
+ | |- | ||
+ | | <code>Network:TNetworkDevice;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |colspan="2"|''Driver Properties'' | ||
+ | |- | ||
+ | | <code>IRQ0:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IRQ1:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Address:Pointer;</code> | ||
+ | | Device register base address | ||
+ | |- | ||
+ | | <code>MDIOOffset:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Lock:TSpinHandle;</code> | ||
+ | | Device lock (Differs from lock in Network device) (Spin lock due to use by interrupt handler) | ||
+ | |- | ||
+ | | <code>Version:LongWord;</code> | ||
+ | | Device version (GENET_V1..GENETV5) | ||
+ | |- | ||
+ | | <code>PhyRevision:LongWord;</code> | ||
+ | | PHY revision (GENET_V1..GENETV4 devices only) | ||
+ | |- | ||
+ | | <code>Status64Enable:LongBool;</code> | ||
+ | | True if 64 byte RX/TX status block is enabled (for hardware checksum etc) | ||
+ | |- | ||
+ | | <code>RXChecksumEnable:LongBool;</code> | ||
+ | | True if RX checksum is enabled | ||
+ | |- | ||
+ | | <code>CRCForwardEnable:LongBool;</code> | ||
+ | | True if CRC forwarding is enabled | ||
+ | |- | ||
+ | | <code>IRQStatus:LongWord;</code> | ||
+ | | Non TX/RX interrupts forwarded to worker thread for servicing | ||
+ | |- | ||
+ | | <code>PendingCount:LongWord;</code> | ||
+ | | Number of worker requests pending for this network | ||
+ | |- | ||
+ | | <code>WaiterThread:TThreadId;</code> | ||
+ | | Thread waiting for pending requests to complete (for network close) | ||
+ | |- | ||
+ | | <code>StatusTimer:TTimerHandle;</code> | ||
+ | | Timer for status change detection | ||
+ | |- | ||
+ | |colspan="2"|Hardware Parameters (Version specific) | ||
+ | |- | ||
+ | | <code>TXQueues:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TXDescriptorsPerQueue:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>RXQueues:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>RXDescriptorsPerQueue:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>BackPressureEnableShift:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>BackPressureMask:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HFBFilterCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HFBFilterSize:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>QTAGMask:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TXBufferOffset:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HFBOffset:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HFBRegOffset:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>RXDMAOffset:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TXDMAOffset:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>WordsPerDescriptor:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Flags:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Q16TXDescriptorCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Q16RXDescriptorCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|DMA Parameters (Version specific) | ||
+ | |- | ||
+ | | <code>DMARXCheckBit:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>RXDMARegOffset:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TXDMARegOffset:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>DMADescriptorSize:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>DMARegisters:TGENETDMARegisters;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>DMARingRegisters:TGENETDMARingRegisters;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|PHY Parameters | ||
+ | |- | ||
+ | | <code>PhyId:LongWord;</code> | ||
+ | | PHY Identifier | ||
+ | |- | ||
+ | | <code>PhyAddr:LongWord;</code> | ||
+ | | PHY Bus Address | ||
+ | |- | ||
+ | | <code>PhyMode:LongWord;</code> | ||
+ | | PHY Interface Mode | ||
+ | |- | ||
+ | | <code>PhyFlags:LongWord;</code> | ||
+ | | PHY Flags | ||
+ | |- | ||
+ | | <code>PhyInternal:LongBool;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PhyExternal:LongBool;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Link:LongInt;</code> | ||
+ | | 0 = Down / 1 = Up | ||
+ | |- | ||
+ | | <code>Speed:LongInt;</code> | ||
+ | | 10/100/1000 Mbps | ||
+ | |- | ||
+ | | <code>Duplex:LongInt;</code> | ||
+ | | 0 = Half / 1 = Full | ||
+ | |- | ||
+ | | <code>Pause:LongInt;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>OldLink:LongInt;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>OldSpeed:LongInt;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>OldDuplex:LongInt;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>OldPause:LongInt;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|RX/TX Parameters | ||
+ | |- | ||
+ | | <code>RXRings:TGENETRXRings;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TXRings:TGENETTXRings;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>RXControlBlocks:PGENETControlBlocks;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TXControlBlocks:PGENETControlBlocks;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Statistics Properties'' | ||
+ | |- | ||
+ | | <code>InterruptCount:LongWord;</code> | ||
+ | | Number of interrupt requests received by the device | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''GENET RX/TX control block''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PGENETControlBlock = ^TGENETControlBlock;</code> | ||
+ | |||
+ | <code>TGENETControlBlock = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''RX/TX Control Block'' | ||
+ | |- | ||
+ | | <code>DescriptorAddress:PtrUInt;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Entry:PNetworkEntry;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''GENET control blocks''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PGENETControlBlocks = ^TGENETControlBlocks;</code> | ||
+ | |||
+ | <code>TGENETControlBlocks = array[0..GENET_TOTAL_DESC - 1] of TGENETControlBlock;</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''GENET RX ring int enable''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGENETRXRingIntEnable = procedure(Network:PGENETNetwork; Ring:PGENETRXRing);</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GENET RX ring int disable''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGENETRXRingIntDisable = procedure(Network:PGENETNetwork; Ring:PGENETRXRing);</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GENET RX ring buffer''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PGENETRXRing = ^TGENETRXRing;</code> | ||
+ | |||
+ | <code>TGENETRXRing = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''RX Ring Buffer'' | ||
+ | |- | ||
+ | | <code>Network:PGENETNetwork;</code> | ||
+ | | style="width: 50%;"|The owner of this RX ring | ||
+ | |- | ||
+ | | <code>Worker:TWorkerHandle;</code> | ||
+ | | Handle of worker currently servicing RX ring | ||
+ | |- | ||
+ | | <code>Index:LongWord;</code> | ||
+ | | RX ring index | ||
+ | |- | ||
+ | | <code>Size:LongWord;</code> | ||
+ | | RX ring size | ||
+ | |- | ||
+ | | <code>Consumer:LongWord;</code> | ||
+ | | RX last consumer index | ||
+ | |- | ||
+ | | <code>Read:LongWord;</code> | ||
+ | | RX ring read pointer | ||
+ | |- | ||
+ | | <code>First:LongWord;</code> | ||
+ | | RX ring initial CB ptr | ||
+ | |- | ||
+ | | <code>Last:LongWord;</code> | ||
+ | | RX ring end CB ptr | ||
+ | |- | ||
+ | | <code>OldDiscards:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ControlBlocks:PGENETControlBlocks;</code> | ||
+ | | RX ring buffer control block | ||
+ | |- | ||
+ | | <code>IntEnable:TGENETRXRingIntEnable;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntDisable:TGENETRXRingIntDisable;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''GENET RX rings buffer''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PGENETRXRings = ^TGENETRXRings;</code> | ||
+ | |||
+ | <code>TGENETRXRings = array[0..GENET_DESC_INDEX] of TGENETRXRing;</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''GENET TX ring int enable''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGENETTXRingIntEnable = procedure(Network:PGENETNetwork;Ring:PGENETTXRing);</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GENET TX ring int disable''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGENETTXRingIntDisable = procedure(Network:PGENETNetwork;Ring:PGENETTXRing);</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GENET TX ring buffer''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PGENETTXRing = ^TGENETTXRing;</code> | ||
+ | |||
+ | <code>TGENETTXRing = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''TX Ring Buffer'' | ||
+ | |- | ||
+ | | <code>Network:PGENETNetwork;</code> | ||
+ | | style="width: 50%;"|The owner of this TX ring | ||
+ | |- | ||
+ | | <code>Worker:TWorkerHandle;</code> | ||
+ | | Handle of worker currently servicing TX ring | ||
+ | |- | ||
+ | | <code>Index:LongWord;</code> | ||
+ | | TX ring index | ||
+ | |- | ||
+ | | <code>Queue:LongWord;</code> | ||
+ | | TX queue index | ||
+ | |- | ||
+ | | <code>Size:LongWord;</code> | ||
+ | | TX ring size | ||
+ | |- | ||
+ | | <code>Clean:LongWord;</code> | ||
+ | | TX ring clean pointer | ||
+ | |- | ||
+ | | <code>Consumer:LongWord;</code> | ||
+ | | TX last consumer index | ||
+ | |- | ||
+ | | <code>Free:LongWord;</code> | ||
+ | | TX number of free descriptors | ||
+ | |- | ||
+ | | <code>Write:LongWord;</code> | ||
+ | | TX ring write pointer SW copy | ||
+ | |- | ||
+ | | <code>Producer:LongWord;</code> | ||
+ | | TX ring producer index SW copy | ||
+ | |- | ||
+ | | <code>First:LongWord;</code> | ||
+ | | TX ring initial CB ptr | ||
+ | |- | ||
+ | | <code>Last:LongWord;</code> | ||
+ | | TX ring end CB ptr | ||
+ | |- | ||
+ | | <code>ControlBlocks:PGENETControlBlocks;</code> | ||
+ | | TX ring buffer control block | ||
+ | |- | ||
+ | | <code>IntEnable:TGENETTXRingIntEnable;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntDisable:TGENETTXRingIntDisable;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''GENET TX rings buffer''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PGENETTXRings = ^TGENETTXRings;</code> | ||
+ | |||
+ | <code>TGENETTXRings = array[0..GENET_DESC_INDEX] of TGENETTXRing;</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''GENET RX/TX DMA registers''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PGENETDMARegisters = ^TGENETDMARegisters;</code> | ||
+ | |||
+ | <code>TGENETDMARegisters = array[DMA_RING_CFG..DMA_RING16_TIMEOUT] of Byte;</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''RX/TX DMA registers'' | ||
+ | |- | ||
+ | | | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''GENET RX/TX DMA ring registers''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PGENETDMARingRegisters = ^TGENETDMARingRegisters;</code> | ||
+ | |||
+ | <code>TGENETDMARingRegisters = array[TDMA_READ_PTR..TDMA_WRITE_PTR_HI] of Byte;</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''RX/TX DMA ring registers'' | ||
+ | |- | ||
+ | | | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''GENET status 64''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PGENETStatus64 = ^TGENETStatus64;</code> | ||
+ | |||
+ | <code>TGENETStatus64 = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>LengthStatus:LongWord;</code> | ||
+ | | style="width: 50%;"|Length and peripheral status | ||
+ | |- | ||
+ | | <code>ExtendedStatus:LongWord;</code> | ||
+ | | Extended status | ||
+ | |- | ||
+ | | <code>RXChecksum:LongWord;</code> | ||
+ | | Partial RX checksum | ||
+ | |- | ||
+ | | <code>Unused1:array[0..8] of LongWord;</code> | ||
+ | | Unused | ||
+ | |- | ||
+ | | <code>TXCheckusmInfo:LongWord;</code> | ||
+ | | TX checksum info | ||
+ | |- | ||
+ | | <code>Unused2:array[0..2] of LongWord;</code> | ||
+ | | Unused | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Public variables === | === Public variables === |
Latest revision as of 06:27, 3 August 2022
Return to Unit Reference
Contents
[hide]Description
Broadcom GENET Gigabit Ethernet Driver unit
This driver supports members of the Broadcom family of Gigabit Ethernet devices including the BCM54213PE contained in the Raspberry Pi 4B.
These devices support speeds of 10BASE-T, 100BASE-TX and 1000BASE-T and include a range of features including WOL and EEE.
The device included in the Raspberry Pi 4B uses a memory mapped interface which supports multiple TX and RX queues with priority queueing, hardware filtering and DMA bus master transfers.
Constants
GENET_*
DMA_MAX_*
STATUS_RX_*
STATUS_TX_*
DMA_DESC_*
UMAC_*
RBUF_*
RBUF_HFB_*
TBUF_*
HFB_*
INTRL2_CPU_*
UMAC_IRQ0_*
UMAC_IRQ1_*
GENET_*_OFF
SYS_*
EXT_*
DMA_RING_SIZE*
DMA_RW_POINTER_*
DMA_RING_*
DMA_INTR_*
DMA_XON_THREHOLD_*
DMA_FLOW_*
DMA_EN_*
DMA_DESC_*
DMA_SCB_BURST_*
DMA_ACTIVITY_*
DMA_BACKPRESSURE_MASK*
DMA_BACKPRESSURE_*
DMA_*_MODE_*
DMA_TIMEOUT_*
DMA_RATE_*
DMA_ARBITER_*
DMA_BUFLENGTH_*
DMA_TX_*
DMA_RX_*
GENET_POWER_*
GENET_HAS_*
DMA_CTRL*
TDMA_*
MDIO_*
PHY_ID_BCM*
PHY_BCM_FLAGS_*
MII_BCM54XX_*
MII_BCM54XX_AUXCTL_*
BCM_LED_SRC_*
BCM_*_MULTICOLOR*
BCM54XX_SHD_*
MII_BCM54XX_EXP_*
BCM5482_SSD_*
BCM54810_*
Type definitions
GENET network
GENET RX/TX control block
GENET control blocks
PGENETControlBlocks = ^TGENETControlBlocks;
TGENETControlBlocks = array[0..GENET_TOTAL_DESC - 1] of TGENETControlBlock;
GENET RX ring int enable
TGENETRXRingIntEnable = procedure(Network:PGENETNetwork; Ring:PGENETRXRing);
|
GENET RX ring int disable
TGENETRXRingIntDisable = procedure(Network:PGENETNetwork; Ring:PGENETRXRing);
|
GENET RX ring buffer
GENET RX rings buffer
PGENETRXRings = ^TGENETRXRings;
TGENETRXRings = array[0..GENET_DESC_INDEX] of TGENETRXRing;
GENET TX ring int enable
TGENETTXRingIntEnable = procedure(Network:PGENETNetwork;Ring:PGENETTXRing);
|
GENET TX ring int disable
TGENETTXRingIntDisable = procedure(Network:PGENETNetwork;Ring:PGENETTXRing);
|
GENET TX ring buffer
GENET TX rings buffer
PGENETTXRings = ^TGENETTXRings;
TGENETTXRings = array[0..GENET_DESC_INDEX] of TGENETTXRing;
GENET RX/TX DMA registers
PGENETDMARegisters = ^TGENETDMARegisters;
TGENETDMARegisters = array[DMA_RING_CFG..DMA_RING16_TIMEOUT] of Byte;
GENET RX/TX DMA ring registers
PGENETDMARingRegisters = ^TGENETDMARingRegisters;
TGENETDMARingRegisters = array[TDMA_READ_PTR..TDMA_WRITE_PTR_HI] of Byte;
GENET status 64
Public variables
GENET specific variables
GENET_PHY_MODE:String;
|
GENET_PHY_ADDR:LongWord;
|
GENET_SKIP_UMAC_RESET:Boolean;
|
GENET_NO_PHY_INTERRUPT:Boolean;
|
Function declarations
GENET functions
function GENETNetworkCreate(Address:PtrUInt; MDIOOffset:LongWord; IRQ0,IRQ1:LongWord):PNetworkDevice;
function GENETNetworkDestroy(Network:PNetworkDevice):LongWord;
GENET network functions
function GENETNetworkOpen(Network:PNetworkDevice):LongWord;
function GENETNetworkClose(Network:PNetworkDevice):LongWord;
function GENETNetworkControl(Network:PNetworkDevice; Request:Integer; Argument1:PtrUInt; var Argument2:PtrUInt):LongWord;
function GENETBufferAllocate(Network:PNetworkDevice; var Entry:PNetworkEntry):LongWord;
function GENETBufferRelease(Network:PNetworkDevice; Entry:PNetworkEntry):LongWord;
function GENETBufferReceive(Network:PNetworkDevice; var Entry:PNetworkEntry):LongWord;
function GENETBufferTransmit(Network:PNetworkDevice; Entry:PNetworkEntry):LongWord;
GENET helper functions
function GENETGetHardwareParameters(Network:PGENETNetwork):LongWord;
function GENETGetMACAddress(Network:PGENETNetwork; Address:PHardwareAddress):LongWord;
function GENETSetMACAddress(Network:PGENETNetwork; Address:PHardwareAddress):LongWord;
procedure GENETPowerUp(Network:PGENETNetwork; Mode:LongWord);
function GENETPowerDown(Network:PGENETNetwork; Mode:LongWord):LongWord;
function GENETDisableDMA(Network:PGENETNetwork; FlushRX:Boolean):LongWord;
procedure GENETEnableDMA(Network:PGENETNetwork; DMAControl:LongWord);
function GENETInitRXQueues(Network:PGENETNetwork):LongWord;
function GENETInitRXRing(Network:PGENETNetwork; Index,Size,First,Last:LongWord):LongWord;
procedure GENETInitTXRing(Network:PGENETNetwork; Index,Size,First,Last:LongWord);
function GENETAllocRXBuffers(Network:PGENETNetwork; Ring:PGENETRXRing):LongWord;
procedure GENETHFBClear(Network:PGENETNetwork);
procedure GENETMIISetup(Network:PGENETNetwork);
function GENETPhyReadStatus(Network:PGENETNetwork):LongWord;
UniMAC helper functions
function UniMACMDIORead(Network:PGENETNetwork; Reg:LongWord; var Value:Word):LongWord;
function UniMACMDIOWrite(Network:PGENETNetwork; Reg:LongWord; Value:Word):LongWord;
Return to Unit Reference