-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Data Converter] add experimental dat-style serialization (#2347)
I did some silly hacking late last week that might get us marginally closer to unifying all the data marshaling under a single tool. This adds the ability to specify a `--to dat` (or one of the aliases) and an output directory which will generate the hex encoded files that verilator/icarus expect. There are some minor differences with the dat files generated by the python flow. Mainly, the python flow truncates leading zeroes in the encoding while I've elected to retain them in the interest of keeping things simple. Python generates: ``` 4B 53 21 5D 1E 5E 2B B 3C 60 ``` while the data-converter generates ``` 0000004B 00000053 00000021 0000005D 0000001E 0000005E 0000002B 0000000B 0000003C 00000060 ``` This also adds the ability to deserialize this style of data dump but is slightly brittle at the moment since it expect the following: - the data header is exactly that used by the tool and is cbor encoded in a file named `header`. The python currently json encodes things in a file named `shape` - the input data includes all leading zeroes Both these assumptions can probably be relaxed in the future in the interest of robustness
- Loading branch information
1 parent
fd43d16
commit 5bd3599
Showing
2 changed files
with
192 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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 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