GRLIB GRGPIO Model
The GRGPIO device is part of the GRLIB device library from Gaisler. The GrGPIO model simulates a 16 pin GPIO device by providing input and output via the SignalIface.
Usage
The device can be connected to and from via the signal interface it implements. It implements 16 usable signals (signal 0 through 15). Signal 0 cannot raise interrupts.
You can connect the signal interface as follows:
# Connect GPIO device signal 0 to device model
connect a=gpio.outSignals[0] b=mydevice:SignalIface
# Connect a device signal interface ref to GPIO device
connect a=mydevice.signal b=gpio:SignalIface[1]
// Connect GPIO device signal 0 to device model
temu_connect(gpio, "outSignals[0]", mydevice, "SignalIface");
// Connect a device signal interface ref to GPIO device
temu_connect(mydevice, "signal", gpio, "SignalIface[1]");
@GrGPIO Reference
Properties
| Name | Type | Description |
|---|---|---|
Class |
*void |
Class object |
Component |
*void |
Pointer to component object if part of component |
LocalName |
*char |
Local name (in component, if applicable) |
LogMessageFlags |
uint64_t |
Per-object log message suppression flags |
LoggingFlags |
uint64_t |
Flags for logging info |
Name |
*char |
Object name |
ObjectID |
uint64_t |
Unique ObjectID. |
ReplayLoggingFlags |
uint64_t |
Replay-time category logging flags |
TimeSource |
*void |
Time source object |
GrGPIO Reference
Properties
| Name | Type | Description |
|---|---|---|
Class |
*void |
Class object |
Component |
*void |
Pointer to component object if part of component |
LocalName |
*char |
Local name (in component, if applicable) |
LogMessageFlags |
uint64_t |
Per-object log message suppression flags |
LoggingFlags |
uint64_t |
Flags for logging info |
Name |
*char |
Object name |
ObjectID |
uint64_t |
Unique ObjectID. |
ReplayLoggingFlags |
uint64_t |
Replay-time category logging flags |
TimeSource |
*void |
Time source object |
bypass |
uint32_t |
|
capability |
uint32_t |
Capability register |
config.inputEnable |
uint8_t |
|
config.irqFlag |
uint8_t |
|
config.irqGen |
uint8_t |
|
config.irqMask |
uint32_t |
|
config.littleEndian |
uint8_t |
Endianess of memory interface. |
config.pinMask |
uint32_t |
|
config.pirq |
uint8_t |
|
config.pulse |
uint8_t |
|
data |
uint32_t |
|
direction |
uint32_t |
|
edge |
uint32_t |
|
inputEnable |
uint32_t |
|
irqAvailable |
uint32_t |
Interrupt available register |
irqCtrl |
temu_IfaceRef/ <unknown> |
Interrupt controller |
irqFlag |
uint32_t |
|
irqMap |
[uint32_t; 8] |
|
mask |
uint32_t |
|
outSignals |
[temu_IfaceRef; 32]/ <unknown> |
GPIO signals |
output |
uint32_t |
|
pnp.bar |
uint32_t |
|
pnp.config |
uint32_t |
|
polarity |
uint32_t |
|
pulse |
uint32_t |
Interfaces
| Name | Type | Description |
|---|---|---|
ApbIface |
ApbIface |
|
DeviceIface |
DeviceIface |
|
MemAccessIface |
MemAccessIface |
|
PulseIface |
SignalIface |
Pulse signals |
RegisterIface |
temu::RegisterIface |
|
ResetIface |
ResetIface |
|
SignalIface |
SignalIface |
Incoming signals |
Registers
| Register support is currently experimental! |
Register Bank default
Register DATA
- Description
-
I/O port data register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
| Field | Mask | Reset | Description |
|---|---|---|---|
- |
- |
- |
- |
Register OUTPUT
- Description
-
I/O port output register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
| Field | Mask | Reset | Description |
|---|---|---|---|
- |
- |
- |
- |
Register DIRECTION
- Description
-
I/O port direction register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
| Field | Mask | Reset | Description |
|---|---|---|---|
- |
- |
- |
- |
Register IMAKS
- Description
-
Interrupt mask register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
| Field | Mask | Reset | Description |
|---|---|---|---|
- |
- |
- |
- |
Register IPOL
- Description
-
Interrupt polarity register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
| Field | Mask | Reset | Description |
|---|---|---|---|
- |
- |
- |
- |
Register IEDGE
- Description
-
Interrupt edge register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
| Field | Mask | Reset | Description |
|---|---|---|---|
- |
- |
- |
- |
Register BYPASS
- Description
-
Bypass register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
| Field | Mask | Reset | Description |
|---|---|---|---|
- |
- |
- |
- |
Register IRQMAPR0
- Description
-
Interrupt map register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
| Field | Mask | Reset | Description |
|---|---|---|---|
- |
- |
- |
- |
Register IFLAG
- Description
-
Interrupt flag register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
| Field | Mask | Reset | Description |
|---|---|---|---|
- |
- |
- |
- |