mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
sim: fix zero encoding
This commit is contained in:
parent
decbd069fa
commit
678a89d572
1 changed files with 8 additions and 5 deletions
|
@ -51,6 +51,9 @@ message_classes = [MessageTick, MessageGo, MessageWrite, MessageRead, MessageRea
|
|||
#
|
||||
|
||||
def _pack_int(v):
|
||||
if v == 0:
|
||||
p = [1, 0]
|
||||
else:
|
||||
p = []
|
||||
while v != 0:
|
||||
p.append(v & 0xff)
|
||||
|
|
Loading…
Reference in a new issue