GRLIB APBUART Model

The ApbUart model is available in the ApbUart plugin. That plugin is part of the GRLIB device library feature. The ApbUart model supports both FIFO simualtion and infinite speed UARTs. In infinite speed mode bytes are sent directly when they are written to the data register.

Loading the Plugin

import ApbUart

@ApbUart Reference

Properties

Name Type Description

Class

*void

Class object

Component

*void

Pointer to component object if part of component

LoggingFlags

uint64_t

Flags for logging info

Name

*char

Object name

TimeSource

*void

Time source object

Commands

Name Description

delete

Dispose instance of @ApbUart

new

Create new instance of ApbUart

Command new Arguments
Name Type Required Description

name

string

yes

Name of object to create

ApbUart Reference

Properties

Name Type Description

Class

*void

Class object

Component

*void

Pointer to component object if part of component

LoggingFlags

uint64_t

Flags for logging info

Name

*char

Object name

TimeSource

*void

Time source object

config.clockDivider

uint32_t

Clock divider

config.fifoSize

uint8_t

UART FIFO size

config.infiniteUartSpeed

uint8_t

Set to 1 to enable immediate UARTs

config.interrupt

uint8_t

Interrupt number

control

uint32_t

UART control register.

data

uint32_t

UART data register

fifo_debug

uint32_t

UART fifo debug register.

irqCtrl

temu_IfaceRef/ <unknown>

Interrupt controller.

pnp.bar

uint32_t

AMBA plug and play base address register

pnp.config

uint32_t

AMBA plug and play config word

rxFifo.data

[uint8_t; 32]

RX FIFO data

rxFifo.size

uint8_t

RX size

rxFifo.start

uint8_t

RX start index

rxFifo.usage

uint8_t

RX usage

scaler

uint32_t

Scaler register.

status

uint32_t

UART status register

tx

temu_IfaceRef/ <unknown>

Transmit target.

txFifo.data

[uint8_t; 32]

TX FIFO data

txFifo.size

uint8_t

TX size

txFifo.start

uint8_t

TX start index

txFifo.usage

uint8_t

TX usage

txShift

uint8_t

UART shift register

Interfaces

Name Type Description

ApbIface

ApbIface

AMBA plug and play interface.

DeviceIface

DeviceIface

Device interface.

MemAccessIface

MemAccessIface

Memory access interface.

ResetIface

ResetIface

Reset interface.

UartIface

SerialIface

Serial input interface.

Ports

Prop Iface Description

tx

UartIface

serial port

Commands

Name Description

delete

Dispose instance of ApbUart

Limitations

  • Loop back mode is not presently supported.

  • Control flow (cts) is not supported.