FIREQSystemNode#
- class FIREQ_SYSTEM.fireq_system_node.FIREQSystemNode(*args: Any, **kwargs: Any)[source]#
Bases:
_GenericNodeObject representing the entire FIREQ system.
This is the root node of the complete FIREQ system tree. It is responsible for loading the bitfile, discovering IPs, building the node tree, and orchestrating inter-node dependencies.
Configuration dictionary keys:
$shots(int): Number of shots for each experiment.
- create_child(name: str, of_type: str, **kwargs: dict[str, Any]) _GenericNode[source]#
Create a child node of the specified type.
This method is not supported on the root system node; child nodes are created automatically during
_init_nodes().- Parameters:
name (str) – Name of the node
of_type (str) – Type of the node
kwargs (dict[str, Any]) – Additional arguments to pass to the node constructor
- Returns:
Created node
- Return type:
_GenericNode
- Raises:
NotImplementedError – Always raised on the root node
- set_shots(shots: int) int[source]#
Set the number of shots.
- Parameters:
shots (int) – Number of shots (must be positive)
- Returns:
Error code (0 on success)
- Return type:
int
- update_max_hw_shots() bool[source]#
Update the maximum number of hardware shots.
Computes the maximum number of hardware shots that can be executed without overflowing any acquisition FIFO.
- Returns:
Trueif the number of shots changed,Falseotherwise- Return type:
bool
- update_hw_shots() bool[source]#
Update the actual number of hardware shots.
Depends on the maximum number of hw shots and the requested number of shots.
- add_reference(ref_name: str, ref: object) None[source]#
Add a reference to a variable.
- Parameters:
ref_name (str) – Name of the reference
ref (Any) – Reference to the variable (must be mutable)
- Raises:
KeyError – If a reference with the same name already exists
- get_reference(ref_name: str) Any[source]#
Get a reference to a variable.
- Parameters:
ref_name (str) – Name of the reference
- Returns:
Reference to the variable
- Return type:
Any
- Raises:
KeyError – If the reference is not found
- static make_func_label(node: _GenericNode, func_name: str) str[source]#
Create a unique function label for a specific function.
Uses the path of a node to build a unique identifier for the function.
- Parameters:
node (_GenericNode) – Node where the function is defined
func_name (str) – Name of the function
- Returns:
Unique function label
- Return type:
str
- register_update_function(func_label: str, update_function: callable) None[source]#
Register an update function for a node.
- Parameters:
func_label (str) – Label to register the update function under
update_function (callable) – Function to call when the node needs to be updated
- add_dependency(func_label: str, depends_on: str | list[str]) None[source]#
Add a dependency between
func_labelanddepends_on.- Parameters:
func_label (str) – Function label that depends on
depends_ondepends_on (str or list[str]) – Single label or list of labels that
func_labeldepends on
- run_experiment(queue: Queue) None[source]#
Run the experiment.
Resolves intra-system dependencies and updates all registered variables before the experiment starts.
- trigger_manually(generator_node_name: str) None[source]#
Trigger a generator manually.
- Parameters:
generator_node_name (str) – Name of the generator that is to be triggered
- set_dma_payload_interface_class(interface_class: object) None[source]#
Set the interface class for all DMA nodes in the design.
The interface class is used to create the DMA payloads that are put into the outgoing queues when running an experiment.
- Parameters:
interface_class (object) – Class that wraps the DMA payload, inherits from dma_node.DMAPayload
- get_acqisition_sampling_frequency() float[source]#
Get the acquisition sampling frequency.
- Returns:
Acquisition sampling frequency in MHz
- Return type:
float
- get_fabric_frequency() float[source]#
Get the fabric frequency.
- Returns:
Fabric frequency in MHz
- Return type:
float