-
Notifications
You must be signed in to change notification settings - Fork 0
Further documentation #1
Copy link
Copy link
Open
Description
Although this repo is not part of official GHDL, it probably is still the best documentation for its .ghw file format an also referenced from its documentation. So I like to share the bit here, that I figured out additionally:
- unsigned integer values have the following format in
E32(I guess E='encoded'): The first byte contains bits 6 down to 0 of the LSB in its lower bits, the second byte contains bits 13 down to 7 and so on. bit 7 of each byte is used to indicate, whether an additional byte is required to store that value. So an integer 127 would be stored as [0x7f], an integer 128 as [0x80, 0x01], 16383=0x3fff as [0xff, 0x7f] and so on. - prev_len of string entries follows a similar approach: Bit 7 is used again to indicate, that an additional byte is required, but instead of bits 6 down to 0 only bits 4 down to 0 are used. This implies, that a valid character must have bit 6 or bit 5 set. Assuming '\0', '\r' and '\n' are not required, this should make sense.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels