python -m pip install lxml
python -m pip install tabulate
Use URL to get dictionaries. Use URL to get dictionary tools.
python rde_schema_dictionary_gen.py view -f ..\DSP8010_2023_1\dictionaries\Memory_v1.bin
{
"CapacityMiB": 65536,
"DataWidthBits": 64,
"AllowedSpeedsMHz": [2400, 3200],
"ErrorCorrection": "NoECC",
"MemoryLocation": {
"Channel": 0,
"Slot": 0
}
}
python pldm_bej_encoder_decoder.py encode -j ..\example.json -s ..\DSP8010_2023_1\dictionaries\Memory_v1.bin -a ..\DSP8010_2023_1\dictionaries\annotation.bin -o ..\example.bin
0X000000: 00 F0 F0 F1 00 00 00 01 00 00 01 3F 01 05 01 08 ...........?....
0X000010: 30 01 03 00 00 01 01 0A 30 01 01 40 01 02 10 01 0.......0..@....
0X000020: 10 01 02 01 00 30 01 02 60 09 01 02 30 01 02 80 .....0..`...0...
0X000030: 0C 01 12 40 01 02 01 02 01 26 00 01 0E 01 02 01 ...@.....&......
0X000040: 00 30 01 01 00 01 04 30 01 01 00
JSON size: 137
Total encode size: 75
Compression ratio(%): 45.25547445255474
Now example.bin can be used as your test data
python pldm_bej_encoder_decoder.py decode -s ..\DSP8010_2023_1\dictionaries\Memory_v1.bin -a ..\DSP8010_2023_1\dictionaries\annotation.bin -b ..\example.bin
{
"CapacityMiB": 65536,
"DataWidthBits": 64,
"AllowedSpeedsMHz": [
2400,
3200
],
"ErrorCorrection": "NoECC",
"MemoryLocation": {
"Channel": 0,
"Slot": 0
}
}