intel-device-plugins-for-ku.../pkg/fpga/bitstream/interfaces.go
Alexander Kanevskiy 186ec6613c FPGA: migrate to ClearLinux environment
- Migrate to OPAE 1.3.2
- Build all the tools from the source
- ignore files in workspace
- minimal fpga_tool utility to check gbs/aocx file parsing and flashing
- implemented kernel IOCTL based flashing of bitstreams
- add PCI and sysfs functions
2019-08-24 02:55:19 +03:00

42 lines
1.6 KiB
Go

// Copyright 2019 Intel Corporation. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// +build linux
//
package bitstream
import "io"
// File defines interfaces that are common for all supported bitstream file formats
// It should provide mechanisms to get raw bitstream data as a reader or as a byte array
// as well as mechanisms to identify bitstreams
type File interface {
io.Closer
// RawBitstreamReader returns Reader for raw bitstream data
RawBitstreamReader() io.ReadSeeker
// RawBitstreamData returns raw bitstream byte array
RawBitstreamData() ([]byte, error)
// InterfaceUUID returns bitstream's Interface UUID
InterfaceUUID() string
// AcceleratorTypeUUID returns bitstream's AFU UUID
AcceleratorTypeUUID() string
// UniqueUUID returns UUID that uniquely identifies bitstream
UniqueUUID() string
// InstallPath returns unique filename for bitstream relative to given directory
InstallPath(string) string
// ExtraMetadata returns map of key/value with additional metadata that can be detected from bitstream
ExtraMetadata() map[string]string
}