Block System
Referencestable

Block System

Built-in blocks, custom block development, and the Component Finder

Block System

The SimFusion block system is the foundation of visual modeling. Learn about built-in blocks, creating custom blocks, and finding components with the Component Finder.

Block Anatomy

Every block has:

┌─────────────────────┐
│     Block Name      │  ← Title
│   [Configuration]   │  ← Parameters
├─────────────────────┤
│ ○ Input 1           │  ← Input ports
│ ○ Input 2           │
├─────────────────────┤
│ ● Output 1          │  ← Output ports
│ ● Output 2          │
└─────────────────────┘

Port Types

TypeColorData Direction
DataTealNumeric arrays
ControlOrangeTriggers, events
ConfigGreenStatic parameters

Built-in Libraries

Signal Sources

BlockFunctionParameters
Sine WaveGenerate sinusoidal signalfrequency, amplitude, phase
NoiseRandom noise generatordistribution, seed
StepStep functiondelay, final value
File ReaderLoad from diskfilepath, format

Signal Processing

BlockFunctionParameters
FFTFast Fourier Transformsize, window
FilterDigital filtertype, cutoff, order
MathArithmetic operationsoperation, constant
DelayTime delaysamples

Sinks

BlockFunctionParameters
ScopeReal-time plotchannels, time window
SpectrumFrequency domain plotbins, averaging
File WriterSave to diskfilepath, format
ExportData exportdestination

The Component Finder

SimFusion does not have a marketplace — it ships with a library of components you search with the built-in Component Finder:

  1. Open the Component Finder from the project workspace toolbar (or the block library panel)
  2. Search by name, category, or function (e.g. "butterworth", "control", "import")
  3. Read the block's documentation inline — every block is well documented
  4. Drag the block straight into your project workspace

When the library doesn't have what you need, write your own block in C/C++ or Python.

Creating Custom Blocks

Custom processing blocks are written in C/C++ & Python, directly in the built-in IDE.

Python Template

from simfusion import Block, Input, Output, Parameter
import numpy as np

class MyCustomBlock(Block):
    """Description of what this block does."""

    # Define ports
    input_signal = Input(type="data", description="Input signal")
    gain_factor = Parameter(type="float", default=1.0, description="Gain multiplier")

    output_signal = Output(type="data", description="Amplified signal")

    def process(self, input_signal):
        """Main processing function called each tick."""
        amplified = input_signal * self.gain_factor
        return {"output_signal": amplified}

Block Configuration

# block.yaml
name: "MyCustomBlock"
category: "Signal Processing"
icon: "waveform"
inputs:
  input_signal:
    type: data
    required: true
outputs:
  output_signal:
    type: data
parameters:
  gain_factor:
    type: float
    default: 1.0
    min: 0.0
    max: 100.0

Debugging Blocks in a Simulation

Use the simulation debug tools while your model runs:

  • Breakpoints: Pause the simulation at a time (in seconds) or at an exact sample
  • Buffer inspection: Inspect any block's input/output buffers at the paused point
  • Block documentation: Open a block's docs directly from the project workspace when something behaves unexpectedly

Block Styling

Custom Appearance

class StyledBlock(Block):
    style = {
        "color": "#4BA6A1",
        "shape": "rectangle",  # or "circle", "diamond"
        "icon": "custom_icon.svg",
        "width": 120,
        "height": 80
    }

Performance Optimization

Vectorization

Always use NumPy/vectorized operations:

# Good: Vectorized
output = input_array * 2 + 1

# Bad: Loop-based
output = np.array([x * 2 + 1 for x in input_array])

Caching

Cache expensive computations:

from functools import lru_cache

@lru_cache(maxsize=128)
def expensive_calculation(params):
    ...

Further Reading

Help us improve

Found an issue or have a suggestion?