Documentation ¶
Overview ¶
config.go implements utilities to read Fabric machine's configuration data.
Package fabricmachine provides the interface to interact with the Fabric machine (hardware accelerators implemented on an FPGA board, accessed through PCIe).
regmap.go implements Fabric machine's register map and providies utilities to read/write the registers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPcieResourceFile ¶
func GetPcieResourceFile() string
func InitConfig ¶
func InitConfig() error
Types ¶
type FabricMachine ¶
type FabricMachine struct {
// contains filtered or unexported fields
}
func NewFabricMachine ¶
func NewFabricMachine(pcieResourceFile string) (*FabricMachine, error)
NewFabricMachine returns a Fabric machine instance. It resets the Fabric machine to ensure a consistent initial state.
func (*FabricMachine) Close ¶
func (fm *FabricMachine) Close() error
func (*FabricMachine) GetBlockData ¶
func (fm *FabricMachine) GetBlockData(blockNum uint64, numTries int) (*BlockData, error)
GetBlockData returns block data after reading from the Fabric machine. This function will only return when the block is available, unless numTries > 0 in which case it will return after trying for numTries. Do not read a block again after it has been successfully read, because that messes up the synchronization between the hardware and software. If you do that, data returned for subsequent blocks may be corrupted.
type FabricMachineConfig ¶
type FabricMachineConfig struct {
// contains filtered or unexported fields
}