-
Notifications
You must be signed in to change notification settings - Fork 2
Add flux implementation #4
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
65d34b1
Add flux implementation
FakeShemp d644f81
Address some Sonar issues
FakeShemp 588b354
Print more verbose info for flux images with tool
FakeShemp 86b6680
Add data type to datastream block
FakeShemp c412030
Use block alignment offset instead of absolute offset
FakeShemp 8693766
Use lazy loading of flux captures
FakeShemp 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,83 @@ | ||
| === Data Stream Payload Block (`DSPL`) | ||
|
|
||
| This block contains a generic data stream payload. Can be used for data streams such as bitstreams or flux data. | ||
| Each `DataStreamPayloadBlock` stores a compressed or uncompressed stream of binary data of variable length. | ||
| The block may be compressed using LZMA compression if compression is enabled for the image. | ||
|
|
||
| For flux captures, the payload data consists of: | ||
| * Data buffer: Raw flux transition timing data | ||
| * Index buffer: Index structure mapping logical positions to offsets within the data buffer | ||
|
|
||
| These two buffers are concatenated: `[data_buffer][index_buffer]` before compression and storage. | ||
| For other data types, the payload layout is specific to the data type. | ||
|
|
||
| ==== Structure Definition | ||
|
|
||
| [source,c] | ||
| #define DATA_STREAM_PAYLOAD_MAGIC 0x4C505344 | ||
| /** Data stream payload block header */ | ||
| typedef struct DataStreamPayloadHeader | ||
| { | ||
| uint32_t identifier; ///< Block identifier, must be BlockType::DataStreamPayloadBlock (0x4C505344). | ||
| uint16_t dataType; ///< Data type classification (value from DataType), e.g., FluxData or BitstreamData. | ||
| uint16_t compression; ///< Compression type (0 = None, 1 = Lzma). | ||
| uint32_t cmpLength; ///< Compressed length in bytes (includes LZMA properties if compressed). | ||
| uint32_t length; ///< Uncompressed length in bytes. | ||
| uint64_t cmpCrc64; ///< CRC64-ECMA checksum of the compressed payload (or same as crc64 if uncompressed). | ||
| uint64_t crc64; ///< CRC64-ECMA checksum of the uncompressed payload. | ||
| } DataStreamPayloadHeader; | ||
|
|
||
| ==== Field Descriptions | ||
|
|
||
| [cols="2,2,2,6",options="header"] | ||
| |=== | ||
| |Type | ||
| |Size | ||
| |Name | ||
| |Description | ||
|
|
||
| |uint32_t | ||
| |4 bytes | ||
| |identifier | ||
| |The data stream payload block identifier, always `DSPL` (`0x4C505344`) | ||
|
|
||
| |uint16_t | ||
| |2 bytes | ||
| |dataType | ||
| |The data type contained in this block (value from DataType), e.g., FluxData or BitstreamData. See Annex B. | ||
|
|
||
| |uint16_t | ||
| |2 bytes | ||
| |compression | ||
| |Compression type: 0 = None, 1 = Lzma | ||
|
|
||
| |uint32_t | ||
| |4 bytes | ||
| |cmpLength | ||
| |Compressed length in bytes (includes LZMA properties if compression = Lzma) | ||
|
|
||
| |uint32_t | ||
| |4 bytes | ||
| |length | ||
| |Uncompressed length in bytes (for flux captures: total of data buffer + index buffer) | ||
|
|
||
| |uint64_t | ||
| |8 bytes | ||
| |cmpCrc64 | ||
| |CRC64-ECMA checksum of the compressed payload data | ||
|
|
||
| |uint64_t | ||
| |8 bytes | ||
| |crc64 | ||
| |CRC64-ECMA checksum of the uncompressed payload data (for flux captures: data + index buffers) | ||
| |=== | ||
|
|
||
| ==== Payload Data | ||
|
|
||
| The payload data immediately follows the `DataStreamPayloadHeader`. If compression is Lzma, the first 5 bytes contain LZMA properties, followed by the compressed data. If compression is None, the payload data is stored uncompressed. | ||
|
|
||
| For flux captures, the uncompressed payload consists of: | ||
| * Data buffer: `length - indexOffset` bytes of flux transition timing data | ||
| * Index buffer: `indexOffset` bytes of index structure data | ||
|
|
||
| The `indexOffset` value from the corresponding `FluxEntry` indicates where the index buffer starts within the payload. For other data types, the payload layout is specific to the data type. |
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
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
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
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
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.