Circuit.py#

Abstract base class for FPGA circuit representations.

Concrete subclasses (e.g. FileBasedCircuit) implement compilation, bitstream access, and file-attribute storage for a specific hardware format.

class Circuit.Circuit.Circuit(index: int, filename: str, logger: Logger)[source]#
__repr__()[source]#

Returns the string representation of this Circuit, used in functions such as ‘print’.

Returns:

A string representation of the Circuit. (the file name)

Return type:

str

abstractmethod compile(fpga: FPGA_Compilation_Data) Result[None, Exception][source]#

Performs the upload function of this Circuit. Prerequisite to collecting data

abstractmethod copy_from(other)[source]#

Fully copy the bitstream from the other circuit

Parameters:

other (Circuit) – The other circuit to copy the bitstream from

abstractmethod get_bitstream() list[bool][source]#

Returns the full bitstream of the circuit

abstractmethod set_bitstream(bitstream: list[bool])[source]#

Sets the bitstream of the circuit