Documentation ¶
Overview ¶
Package smi/protocol provides low level primitives and data types for working with the SMI protocol.
Index ¶
- Constants
- func ArbitrateX2(upstreamRequestA <-chan Flit64, upstreamResponseA chan<- Flit64, ...)
- func ArbitrateX3(upstreamRequestA <-chan Flit64, upstreamResponseA chan<- Flit64, ...)
- func ArbitrateX4(upstreamRequestA <-chan Flit64, upstreamResponseA chan<- Flit64, ...)
- func AssembleFrame64(assembleReq <-chan bool, smiInput <-chan Flit64, smiOutput chan<- Flit64, ...)
- func ForwardFrame64(forwardReq <-chan bool, smiInput <-chan Flit64, smiOutput chan<- Flit64, ...)
- func ReadBurstUInt16(smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, ...) bool
- func ReadBurstUInt32(smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, ...) bool
- func ReadBurstUInt64(smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, ...) bool
- func ReadBurstUInt8(smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, ...) bool
- func ReadPagedBurstUInt16(smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, ...) bool
- func ReadPagedBurstUInt32(smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, ...) bool
- func ReadPagedBurstUInt64(smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, ...) bool
- func ReadPagedBurstUInt8(smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, ...) bool
- func ReadUInt16(smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddr uintptr, ...) uint16
- func ReadUInt32(smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddr uintptr, ...) uint32
- func ReadUInt64(smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddr uintptr, ...) uint64
- func ReadUInt8(smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddr uintptr, ...) uint8
- func WriteBurstUInt16(smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, ...) bool
- func WriteBurstUInt32(smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, ...) bool
- func WriteBurstUInt64(smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, ...) bool
- func WriteBurstUInt8(smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, ...) bool
- func WritePagedBurstUInt16(smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, ...) bool
- func WritePagedBurstUInt32(smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, ...) bool
- func WritePagedBurstUInt64(smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, ...) bool
- func WritePagedBurstUInt8(smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, ...) bool
- func WriteUInt16(smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddr uintptr, ...) bool
- func WriteUInt32(smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddr uintptr, ...) bool
- func WriteUInt64(smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddr uintptr, ...) bool
- func WriteUInt8(smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddr uintptr, ...) bool
- type Flit64
Constants ¶
const ( SmiMemWriteReq = 0x01 // SMI memory write request. SmiMemWriteResp = 0xFE // SMI memory write response. SmiMemReadReq = 0x02 // SMI memory read request. SmiMemReadResp = 0xFD // SMI memory read response. )
Constants specifying the supported SMI frame type bytes.
const (
DefaultOptions = uint8(0x00) // Use default buffered read or write.
)
Default options constant
const (
MemOptUnbuffered = uint8(0x01) // Perform direct unbuffered read or write.
)
Constants specifying the supported SMI memory access options.
const SmiMemBurstSize = 256
Specify the standard burst fragment size as an integer number of bytes.
const SmiMemFrame64Size = 2 + SmiMemBurstSize/8
The maximum frame size is derived from the SmiMemBurstSize parameter and can contain the specified amount of data plus up to 16 bytes of header information.
const SmiMemInFlightLimit = 4
Specify the number of in-flight transactions supported by each arbitrated SMI port.
Variables ¶
This section is empty.
Functions ¶
func ArbitrateX2 ¶
func ArbitrateX2( upstreamRequestA <-chan Flit64, upstreamResponseA chan<- Flit64, upstreamRequestB <-chan Flit64, upstreamResponseB chan<- Flit64, downstreamRequest chan<- Flit64, downstreamResponse <-chan Flit64)
ArbitrateX2 is a goroutine for providing arbitration between two pairs of SMI request/response channels. This uses tag matching and substitution on bytes 2 and 3 of each transfer to ensure that response frames are correctly routed to the source of the original request.
func ArbitrateX3 ¶
func ArbitrateX3( upstreamRequestA <-chan Flit64, upstreamResponseA chan<- Flit64, upstreamRequestB <-chan Flit64, upstreamResponseB chan<- Flit64, upstreamRequestC <-chan Flit64, upstreamResponseC chan<- Flit64, downstreamRequest chan<- Flit64, downstreamResponse <-chan Flit64)
ArbitrateX3 is a goroutine for providing arbitration between three pairs of SMI request/response channels. This uses tag matching and substitution on bytes 2 and 3 of each transfer to ensure that response frames are correctly routed to the source of the original request.
func ArbitrateX4 ¶
func ArbitrateX4( upstreamRequestA <-chan Flit64, upstreamResponseA chan<- Flit64, upstreamRequestB <-chan Flit64, upstreamResponseB chan<- Flit64, upstreamRequestC <-chan Flit64, upstreamResponseC chan<- Flit64, upstreamRequestD <-chan Flit64, upstreamResponseD chan<- Flit64, downstreamRequest chan<- Flit64, downstreamResponse <-chan Flit64)
ArbitrateX4 is a goroutine for providing arbitration between four pairs of SMI request/response channels. This uses tag matching and substitution on bytes 2 and 3 of each transfer to ensure that response frames are correctly routed to the source of the original request.
func AssembleFrame64 ¶
func AssembleFrame64( assembleReq <-chan bool, smiInput <-chan Flit64, smiOutput chan<- Flit64, assembleDone chan<- bool)
Assembles a single Flit64 based SMI frame from an input channel, copying the frame to the output channel once the entire frame has been received. The maximum frame size is derived from the SmiMemBurstSize parameter and can contain the specified amount of payload data plus up to 16 bytes of header information. TODO: Update once there is a fix for the channel size compiler limitation.
func ForwardFrame64 ¶
func ForwardFrame64( forwardReq <-chan bool, smiInput <-chan Flit64, smiOutput chan<- Flit64, forwardDone chan<- bool)
Forwards a single Flit64 based SMI frame from an input channel to an output channel with intermediate buffering. The buffer has capacity to store a complete frame, with data being available at the output as soon as it has been received on the input. TODO: Update once there is a fix for the channel size compiler limitation.
func ReadBurstUInt16 ¶
func ReadBurstUInt16( smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, readOptions uint8, readLengthIn uint32, readDataChan chan<- uint16) bool
ReadBurstUInt16 reads an incrementing burst of 16-bit unsigned data values from a word aligned address on the specified SMI memory endpoint, with the bottom address bit being ignored. The supplied burst length specifies the number of 16-bit values to be transferred, up to a maximum of 2^31-1. The burst is automatically segmented to respect page boundaries and avoid blocking other transactions. In order to ensure optimum performance, the read data channel should be a buffered channel that has sufficient free space to hold all the data to be transferred. The status of the read transaction is returned as the boolean 'readOk' flag.
func ReadBurstUInt32 ¶
func ReadBurstUInt32( smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, readOptions uint8, readLengthIn uint32, readDataChan chan<- uint32) bool
ReadBurstUInt32 reads an incrementing burst of 32-bit unsigned data values from a word aligned address on the specified SMI memory endpoint, with the bottom two address bits being ignored. The supplied burst length specifies the number of 32-bit values to be transferred, up to a maximum of 2^30-1. The burst is automatically segmented to respect page boundaries and avoid blocking other transactions. In order to ensure optimum performance, the read data channel should be a buffered channel that has sufficient free space to hold all the data to be transferred. The status of the read transaction is returned as the boolean 'readOk' flag.
func ReadBurstUInt64 ¶
func ReadBurstUInt64( smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, readOptions uint8, readLengthIn uint32, readDataChan chan<- uint64) bool
ReadBurstUInt64 reads an incrementing burst of 64-bit unsigned data values from a word aligned address on the specified SMI memory endpoint, with the bottom three address bits being ignored. The supplied burst length specifies the number of 64-bit values to be transferred, up to a maximum of 2^29-1. The burst is automatically segmented to respect page boundaries and avoid blocking other transactions. In order to ensure optimum performance, the read data channel should be a buffered channel that has sufficient free space to hold all the data to be transferred. The status of the read transaction is returned as the boolean 'readOk' flag.
func ReadBurstUInt8 ¶
func ReadBurstUInt8( smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, readOptions uint8, readLengthIn uint32, readDataChan chan<- uint8) bool
ReadBurstUInt8 reads an incrementing burst of 8-bit unsigned data values from a byte aligned address on the specified SMI memory endpoint. The burst is automatically segmented to respect page boundaries and avoid blocking other transactions. In order to ensure optimum performance, the read data channel should be a buffered channel that has sufficient free space to hold all the data to be transferred. The status of the read transaction is returned as the boolean 'readOk' flag.
func ReadPagedBurstUInt16 ¶
func ReadPagedBurstUInt16( smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, readOptions uint8, readLengthIn uint16, readDataChan chan<- uint16) bool
ReadPagedBurstUInt16 reads an incrementing burst of 16-bit unsigned data values from a word aligned address on the specified SMI memory endpoint, with the bottom address bit being ignored. The supplied burst length specifies the number of 16-bit values to be transferred. The overall burst must be contained within a single 4096 byte page and must not cross page boundaries. In order to ensure optimum performance, the read data channel should be a buffered channel that has sufficient free space to hold all the data to be transferred. The status of the read transaction is returned as the boolean 'readOk' flag.
func ReadPagedBurstUInt32 ¶
func ReadPagedBurstUInt32( smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, readOptions uint8, readLengthIn uint16, readDataChan chan<- uint32) bool
ReadPagedBurstUInt32 reads an incrementing burst of 32-bit unsigned data values from a word aligned address on the specified SMI memory endpoint, with the bottom two address bits being ignored. The supplied burst length specifies the number of 32-bit values to be transferred. The overall burst must be contained within a single 4096 byte page and must not cross page boundaries. In order to ensure optimum performance, the read data channel should be a buffered channel that has sufficient free space to hold all the data to be transferred. The status of the read transaction is returned as the boolean 'readOk' flag.
func ReadPagedBurstUInt64 ¶
func ReadPagedBurstUInt64( smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, readOptions uint8, readLengthIn uint16, readDataChan chan<- uint64) bool
ReadPagedBurstUInt64 reads an incrementing burst of 64-bit unsigned data values from a word aligned address on the specified SMI memory endpoint, with the bottom three address bits being ignored. The supplied burst length specifies the number of 64-bit values to be transferred. The overall burst must be contained within a single 4096 byte page and must not cross page boundaries. In order to ensure optimum performance, the read data channel should be a buffered channel that has sufficient free space to hold all the data to be transferred. The status of the read transaction is returned as the boolean 'readOk' flag.
func ReadPagedBurstUInt8 ¶
func ReadPagedBurstUInt8( smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddrIn uintptr, readOptions uint8, readLengthIn uint16, readDataChan chan<- uint8) bool
ReadPagedBurstUInt8 reads an incrementing burst of 8-bit unsigned data values from a byte aligned address on the specified SMI memory endpoint. The burst must be contained within a single 4096 byte page and must not cross page boundaries. In order to ensure optimum performance, the read data channel should be a buffered channel that has sufficient free space to hold all the data to be transferred. The status of the read transaction is returned as the boolean 'readOk' flag.
func ReadUInt16 ¶
func ReadUInt16( smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddr uintptr, readOptions uint8) uint16
ReadUInt16 reads a single 16-bit unsigned data value from a word aligned address on the specified SMI memory endpoint, with the bottom address bit being ignored. TODO: The status of the write transaction should also be returned as the boolean 'readOk' flag.
func ReadUInt32 ¶
func ReadUInt32( smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddr uintptr, readOptions uint8) uint32
ReadUInt32 reads a single 32-bit unsigned data value from a word aligned address on the specified SMI memory endpoint, with the bottom two address bits being ignored. TODO: The status of the write transaction should also be returned as the boolean 'readOk' flag.
func ReadUInt64 ¶
func ReadUInt64( smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddr uintptr, readOptions uint8) uint64
ReadUInt64 reads a single 64-bit unsigned data value from a word aligned address on the specified SMI memory endpoint, with the bottom three address bits being ignored. TODO: The status of the write transaction should also be returned as the boolean 'readOk' flag.
func ReadUInt8 ¶
func ReadUInt8( smiRequest chan<- Flit64, smiResponse <-chan Flit64, readAddr uintptr, readOptions uint8) uint8
ReadUInt8 reads a single 8-bit unsigned data value from a byte aligned address on the specified SMI memory endpoint. TODO: The status of the write transaction should also be returned as the boolean 'readOk' flag.
func WriteBurstUInt16 ¶
func WriteBurstUInt16( smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, writeOptions uint8, writeLengthIn uint32, writeDataChan <-chan uint16) bool
WriteBurstUInt16 writes an incrementing burst of 16-bit unsigned data values to a word aligned address on the specified SMI memory endpoint, with the bottom address bit being ignored. The supplied burst length specifies the number of 16-bit values to be transferred, up to a maximum of 2^31-1. The burst is automatically segmented to respect page boundaries and avoid blocking other transactions. In order to ensure optimum performance, the write data channel should be a buffered channel that already contains all the data to be written prior to invoking this function. The status of the write transaction is returned as the boolean 'writeOk' flag.
func WriteBurstUInt32 ¶
func WriteBurstUInt32( smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, writeOptions uint8, writeLengthIn uint32, writeDataChan <-chan uint32) bool
WriteBurstUInt32 writes an incrementing burst of 32-bit unsigned data values to a word aligned address on the specified SMI memory endpoint, with the bottom two address bits being ignored. The supplied burst length specifies the number of 32-bit values to be transferred, up to a maximum of 2^30-1. The burst is automatically segmented to respect page boundaries and avoid blocking other transactions. In order to ensure optimum performance, the write data channel should be a buffered channel that already contains all the data to be written prior to invoking this function. The status of the write transaction is returned as the boolean 'writeOk' flag.
func WriteBurstUInt64 ¶
func WriteBurstUInt64( smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, writeOptions uint8, writeLengthIn uint32, writeDataChan <-chan uint64) bool
WriteBurstUInt64 writes an incrementing burst of 64-bit unsigned data values to a word aligned address on the specified SMI memory endpoint, with the bottom three address bits being ignored. The supplied burst length specifies the number of 64-bit values to be transferred, up to a maximum of 2^29-1. The burst is automatically segmented to respect page boundaries and avoid blocking other transactions. In order to ensure optimum performance, the write data channel should be a buffered channel that already contains all the data to be written prior to invoking this function. The status of the write transaction is returned as the boolean 'writeOk' flag.
func WriteBurstUInt8 ¶
func WriteBurstUInt8( smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, writeOptions uint8, writeLengthIn uint32, writeDataChan <-chan uint8) bool
WriteBurstUInt8 writes an incrementing burst of 8-bit unsigned data values to a byte aligned address on the specified SMI memory endpoint. The burst is automatically segmented to respect page boundaries and avoid blocking other transactions. In order to ensure optimum performance, the write data channel should be a buffered channel that already contains all the data to be written prior to invoking this function. The status of the write transaction is returned as the boolean 'writeOk' flag.
func WritePagedBurstUInt16 ¶
func WritePagedBurstUInt16( smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, writeOptions uint8, writeLengthIn uint16, writeDataChan <-chan uint16) bool
WritePagedBurstUInt16 writes an incrementing burst of 16-bit unsigned data values to a word aligned address on the specified SMI memory endpoint, with the bottom address bit being ignored. The supplied burst length specifies the number of 16-bit values to be transferred. The overall burst must be contained within a single 4096 byte page and must not cross page boundaries. In order to ensure optimum performance, the write data channel should be a buffered channel that already contains all the data to be written prior to invoking this function. The status of the write transaction is returned as the boolean 'writeOk' flag.
func WritePagedBurstUInt32 ¶
func WritePagedBurstUInt32( smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, writeOptions uint8, writeLengthIn uint16, writeDataChan <-chan uint32) bool
WritePagedBurstUInt32 writes an incrementing burst of 32-bit unsigned data values to a word aligned address on the specified SMI memory endpoint, with the bottom two address bits being ignored. The supplied burst length specifies the number of 32-bit values to be transferred. The overall burst must be contained within a single 4096 byte page and must not cross page boundaries. In order to ensure optimum performance, the write data channel should be a buffered channel that already contains all the data to be written prior to invoking this function. The status of the write transaction is returned as the boolean 'writeOk' flag.
func WritePagedBurstUInt64 ¶
func WritePagedBurstUInt64( smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, writeOptions uint8, writeLengthIn uint16, writeDataChan <-chan uint64) bool
WritePagedBurstUInt64 writes an incrementing burst of 64-bit unsigned data values to a word aligned address on the specified SMI memory endpoint, with the bottom three address bits being ignored. The supplied burst length specifies the number of 64-bit values to be transferred. The overall burst must be contained within a single 4096 byte page and must not cross page boundaries. In order to ensure optimum performance, the write data channel should be a buffered channel that already contains all the data to be written prior to invoking this function. The status of the write transaction is returned as the boolean 'writeOk' flag.
func WritePagedBurstUInt8 ¶
func WritePagedBurstUInt8( smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddrIn uintptr, writeOptions uint8, writeLengthIn uint16, writeDataChan <-chan uint8) bool
WritePagedBurstUInt8 writes an incrementing burst of 8-bit unsigned data values to a byte aligned address on the specified SMI memory endpoint. The burst must be contained within a single 4096 byte page and must not cross page boundaries. In order to ensure optimum performance, the write data channel should be a buffered channel that already contains all the data to be written prior to invoking this function. The status of the write transaction is returned as the boolean 'writeOk' flag.
func WriteUInt16 ¶
func WriteUInt16( smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddr uintptr, writeOptions uint8, writeData uint16) bool
WriteUInt16 writes a single 16-bit unsigned data value to a word aligned address on the specified SMI memory endpoint, with the bottom address bit being ignored. The status of the write transaction is returned as the boolean 'writeOk' flag.
func WriteUInt32 ¶
func WriteUInt32( smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddr uintptr, writeOptions uint8, writeData uint32) bool
WriteUInt32 writes a single 32-bit unsigned data value to a word aligned address on the specified SMI memory endpoint, with the bottom two address bits being ignored. The status of the write transaction is returned as the boolean 'writeOk' flag.
func WriteUInt64 ¶
func WriteUInt64( smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddr uintptr, writeOptions uint8, writeData uint64) bool
WriteUInt64 writes a single 64-bit unsigned data value to a word aligned address on the specified SMI memory endpoint, with the bottom three address bits being ignored. The status of the write transaction is returned as the boolean 'writeOk' flag.
func WriteUInt8 ¶
func WriteUInt8( smiRequest chan<- Flit64, smiResponse <-chan Flit64, writeAddr uintptr, writeOptions uint8, writeData uint8) bool
WriteUInt8 writes a single 8-bit unsigned data value to a byte aligned address on the specified SMI memory endpoint. The status of the write transaction is returned as the boolean 'writeOk' flag.