fabricmachine

package
v0.0.0-...-3d6c228 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

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

func IsEnabled

func IsEnabled() bool

Types

type BlockData

type BlockData struct {
	Num         uint64
	NumTxs      uint32
	Valid       bool
	TxsVldFlags util.TxValidationFlags
	Latency     time.Duration
}

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
}

type RegMap

type RegMap struct {
	// contains filtered or unexported fields
}

func NewRegMap

func NewRegMap(pcieResourceFile string) (*RegMap, error)

Directories

Path Synopsis
Package pcieutil contains utilities to read from and write to registers of a PCIe device.
Package pcieutil contains utilities to read from and write to registers of a PCIe device.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL