Enum FPGALinkRegisters
- All Implemented Interfaces:
Serializable
,Comparable<FPGALinkRegisters>
@SARKStruct("spio") public enum FPGALinkRegisters extends Enum<FPGALinkRegisters>
FPGA registers within a register bank.
- Author:
- Donal Fellows
- See Also:
- Spio documentation
-
Enum Constant Summary
Enum Constants Enum Constant Description BUSY
Packet dispatcher busy counter.CFCL
Local channel flow control status.CFCR
Remote channel flow control status.CRCE
CRC error counter.CRDT
Credit.DFRM
Frame disassembler valid frame counter.EMPT
Empty frame assembler queues.FRME
Frame error counter.FULL
Full frame assembler queues.HAND
Handshake.IDSI
IDle Sentinel Input value.IDSO
IDle Sentinel Output value.LACK
Local ack'd frame counter.LNAK
Local nack'd frame counter.LOOC
Local out-of-credit counter.RACK
Remote ack counter.RECO
Link reconnection (re-handshake) counter.RFRM
Packet dispatcher valid received frame counter.RNAK
Remote nack counter.ROOC
Remote out-of-credit counter.SFRM
Frame assembler valid sent frame counter.STOP
1 = Stop sending data frames.TFRM
Frame transmitter frame counter.VERS
Version. -
Field Summary
Fields Modifier and Type Field Description static int
BANK_OFFSET_MULTIPLIER
The base addresses of register banks are all multiples of this.int
offset
The offset of the register within the bank of registers.int
size
Size of register, in bits.boolean
writable
Whether this is a writable register. -
Method Summary
Modifier and Type Method Description MemoryLocation
address(int registerBank)
Compute the address of the register in a particular register bank.static FPGALinkRegisters
valueOf(String name)
Returns the enum constant of this type with the specified name.static FPGALinkRegisters[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
VERS
Version. {top 24: Module, bottom 8: Protocol} -
CRCE
CRC error counter. -
FRME
Frame error counter. -
BUSY
Packet dispatcher busy counter. -
LNAK
Local nack'd frame counter. -
RNAK
Remote nack counter. -
LACK
Local ack'd frame counter. -
RACK
Remote ack counter. -
LOOC
Local out-of-credit counter. -
ROOC
Remote out-of-credit counter. -
CRDT
Credit. -
SFRM
Frame assembler valid sent frame counter. -
TFRM
Frame transmitter frame counter. -
DFRM
Frame disassembler valid frame counter. -
RFRM
Packet dispatcher valid received frame counter. -
EMPT
Empty frame assembler queues. -
FULL
Full frame assembler queues. -
CFCL
Local channel flow control status. -
CFCR
Remote channel flow control status. -
IDSO
IDle Sentinel Output value. (Sent in idle frames.) -
IDSI
IDle Sentinel Input value. (Latest received) -
HAND
Handshake. {bit 1: version err, bit 0: complete} -
RECO
Link reconnection (re-handshake) counter. -
STOP
1 = Stop sending data frames. (NB: Will still receive them)
-
-
Field Details
-
BANK_OFFSET_MULTIPLIER
public static final int BANK_OFFSET_MULTIPLIERThe base addresses of register banks are all multiples of this.- See Also:
- Constant Field Values
-
offset
public final int offsetThe offset of the register within the bank of registers. -
writable
public final boolean writableWhether this is a writable register. -
size
public final int sizeSize of register, in bits.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
address
Compute the address of the register in a particular register bank.- Parameters:
registerBank
- Which register bank. Must be 0, 1, or 2.- Returns:
- The address in the FPGA's address space.
- Throws:
IllegalArgumentException
- If a bad register bank is given.
-