Skip to content
LIBRARY
SampleTimeSource.md

SampleTimeSource ​

Outputs the time since the last sample on the clock that is connected to y.

Warning

Currently only works for PeriodicClocks. Event clock support is planned for the future.

Usage ​

DiscreteComponents.SampleTimeSource()

Connectors ​

  • y - This connector represents a real signal as an output from a component (RealOutput)

Behavior ​

Behavior of this component cannot be rendered because it includes path variables.

Source ​

dyad
"""
Outputs the time since the last sample on the clock that is connected to `y`.

!!! warning
    Currently only works for `PeriodicClock`s.  
    Event clock support is planned for the future.
"""
external component SampleTimeSource@[input clk]
  y = RealOutput@[clk]() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 450, "x2": 1060, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
relations
metadata {
  "Dyad": {
    "icons": {"default": "dyad://DiscreteComponents/SampleTimeSource.svg"},
    "doc": {"behavior": false}
  }
}
end
Flattened Source
dyad
"""
Outputs the time since the last sample on the clock that is connected to `y`.

!!! warning
    Currently only works for `PeriodicClock`s.  
    Event clock support is planned for the future.
"""
external component SampleTimeSource
  y = RealOutput@[clk]() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 450, "x2": 1060, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
relations
metadata {
  "Dyad": {
    "icons": {"default": "dyad://DiscreteComponents/SampleTimeSource.svg"},
    "doc": {"behavior": false}
  }
}
end


Test Cases ​

No test cases defined.

  • Examples

  • Experiments

  • Analyses