-
Notifications
You must be signed in to change notification settings - Fork 86
Add rohd waveform package #681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
desmonddak
wants to merge
14
commits into
intel:main
Choose a base branch
from
desmonddak:add-rohd-waveform-package
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
69d3333
Add rohd_waveform package
desmonddak 618f9e2
server side rohd_wveform package
desmonddak e366b5c
isolate analysis of packages
desmonddak e2dd355
multiple review fixes, added tests for packages
desmonddak 9500ca5
Backpropagate merged/: flc_data & source_navigator constructor docs, …
desmonddak 3f325c4
dtd discovery fix
desmonddak 6b5716e
remove public fields, add back benchmark tag
desmonddak 287e4bf
coverage for devtools and packages
desmonddak 35971a9
more tests
desmonddak 1137539
Merge branch 'main' into add-rohd-waveform-package
desmonddak 455f47b
minor error
desmonddak ff414c7
vm test
desmonddak ca85b39
Merge branch 'add-rohd-waveform-package' of https://github.com/desmon…
desmonddak e4f831a
remove trailing whitespace from copyrights
desmonddak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ## 0.1.0 | ||
|
|
||
| - Initial release of source-agnostic hierarchy models, addressing, adapters, and search utilities. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # https://dart.dev/guides/libraries/private-files | ||
| # Created by `dart pub` | ||
| .dart_tool/ | ||
|
|
||
| # Avoid committing pubspec.lock for library packages; see | ||
| # https://dart.dev/guides/libraries/private-files#pubspeclock. | ||
| pubspec.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ## 0.1.0 | ||
|
|
||
| - Initial release of waveform data models, service APIs, repositories, and signal data helpers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| BSD 3-Clause License | ||
|
|
||
| Copyright (C) 2021-2026 Intel Corporation | ||
|
|
||
| Redistribution and use in source and binary forms, with or without | ||
| modification, are permitted provided that the following conditions are met: | ||
|
|
||
| 1. Redistributions of source code must retain the above copyright notice, this | ||
| list of conditions and the following disclaimer. | ||
|
|
||
| 2. Redistributions in binary form must reproduce the above copyright notice, | ||
| this list of conditions and the following disclaimer in the documentation | ||
| and/or other materials provided with the distribution. | ||
|
|
||
| 3. Neither the name of the copyright holder nor the names of its | ||
| contributors may be used to endorse or promote products derived from | ||
| this software without specific prior written permission. | ||
|
|
||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
| FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
| SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
| OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # rohd_waveform | ||
|
|
||
| Pure-Dart waveform data services and models for ROHD wave viewers. | ||
|
|
||
| This package supplies waveform value data to remote clients, viewers, and | ||
| debugging tools while using [`rohd_hierarchy`](../rohd_hierarchy) for module | ||
| and signal structure. It defines the boundary between a waveform source, such | ||
| as a simulator, debugger, VCD/Wellen reader, or DevTools connection, and a UI | ||
| that needs signal values over time. | ||
|
|
||
| ## Service | ||
|
|
||
| `rohd_waveform` provides a small service layer for requesting, caching, and | ||
| streaming waveform values: | ||
|
|
||
| - `SignalWaveformApi` defines the source-facing API for loading waveform data, | ||
| streaming incremental updates, reading the current simulation time, and | ||
| retrieving value snapshots. | ||
| - `SignalWaveformRepository` wraps a `SignalWaveformApi`, waits for asynchronous | ||
| sources to become ready, caches signal metadata and waveform values, and can | ||
| synthesize computed sub-field waveforms from parent signal data. | ||
| - `SignalDataService` exposes a signal-centric interface for clients that work | ||
| with `SignalOccurrence` objects from `rohd_hierarchy`. | ||
| - `RepositorySignalDataService` adapts the repository cache into `WaveData` | ||
| objects for wave viewers and other clients. | ||
|
|
||
| The package does not include a waveform backend. Applications provide a | ||
| concrete `SignalWaveformApi` implementation for their data source, while this | ||
| package handles the shared service contract, caching, and transfer models. | ||
|
|
||
| ## Models | ||
|
|
||
| The package also includes waveform-specific models used across the service | ||
| boundary: | ||
|
|
||
| - `ModuleStructure` — top-level waveform structure metadata and hierarchy roots. | ||
| - `WaveformData` — transfer payload returned by a `SignalWaveformApi` fetch or | ||
| stream. It carries a signal ID, data points, and whether the values were | ||
| computed, but it does not provide hierarchy metadata or lookup behavior. | ||
| - `SignalWaveform` — repository/client-side waveform state for one signal. It | ||
| can be built from `WaveformData`, appended to over time, queried by time or | ||
| range, and linked back to `SignalOccurrence` metadata through a lookup | ||
| function. | ||
| - `WaveformUpdateEvent` — event payload for waveform update notifications. | ||
| - `WaveData` — combined `SignalOccurrence` metadata and waveform data returned | ||
| by `SignalDataService`. | ||
| - `Data`, `WaveFormat`, and `MetaData` — waveform data primitives. | ||
|
|
||
| In short, use `WaveformData` at the service/API boundary and `SignalWaveform` | ||
| inside clients or repositories that need cached state, incremental appends, | ||
| metadata access, or waveform queries. | ||
|
|
||
| For hierarchy types such as `HierarchyOccurrence` and `SignalOccurrence`, | ||
| import `package:rohd_hierarchy/rohd_hierarchy.dart` directly. | ||
|
|
||
| ---------------- | ||
| Copyright (C) 2026 Intel Corporation | ||
| SPDX-License-Identifier: BSD-3-Clause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| include: ../../analysis_options.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // Copyright (C) 2024-2026 Intel Corporation | ||
| // SPDX-License-Identifier: BSD-3-Clause | ||
| // | ||
| // rohd_waveform.dart | ||
| // Waveform data models and APIs for wave viewers. | ||
| // | ||
| // 2026 July 15 | ||
| // Author: Desmond Kirkpatrick <desmond.a.kirkpatrick@intel.com> | ||
|
|
||
| /// Waveform data models and APIs for wave viewers. | ||
| /// | ||
| /// This library provides waveform-specific data models: | ||
| /// - `ModuleStructure` - top-level waveform structure | ||
| /// - `SignalWaveform` - waveform data with backpointer to signal metadata | ||
| /// - `Data`, `WaveFormat`, and `MetaData` - waveform data primitives | ||
| /// | ||
| /// For hierarchy types such as `HierarchyOccurrence` and `SignalOccurrence`, | ||
| /// import 'package:rohd_hierarchy/rohd_hierarchy.dart' directly. | ||
| library; | ||
|
|
||
| export 'src/models/models.dart'; | ||
| export 'src/waveform_api.dart'; | ||
| export 'src/waveform_repository.dart'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| // Copyright (C) 2024-2026 Intel Corporation | ||
| // SPDX-License-Identifier: BSD-3-Clause | ||
| // | ||
| // data.dart | ||
| // An entity that describes the data of a signal. | ||
| // | ||
| // 2024 January 29 | ||
| // Author: Desmond Kirkpatrick <desmond.a.kirkpatrick@intel.com> | ||
|
|
||
| /// A class that represents the data of a signal. | ||
| /// | ||
| /// It contains a time and a value. | ||
| class Data { | ||
| /// The time of the data. | ||
| int time; | ||
|
|
||
| /// The value of the data. | ||
| String value; | ||
|
desmonddak marked this conversation as resolved.
|
||
|
|
||
| /// Creates a new instance of [Data]. | ||
| /// | ||
| /// Requires [time] and [value] as parameters. | ||
| Data({required this.time, required this.value}); | ||
|
|
||
| /// Converts the [Data] instance into a JSON Map. | ||
| Map<String, dynamic> toJson() => {'time': time, 'value': value}; | ||
|
|
||
| /// Creates a new instance of [Data] from a JSON Map. | ||
| factory Data.fromJson(Map<String, dynamic> json) => | ||
| Data(time: json['time'] as int, value: json['value'] as String); | ||
|
|
||
| /// Creates an empty data point at time zero with value `0`. | ||
| factory Data.empty() => Data(time: 0, value: '0'); | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.