Skip to content

Commit

Permalink
i2c_worker: Extend I2CState to enable sim with VCD
Browse files Browse the repository at this point in the history
Resolve reported issues when running I2C tests via 'run_simulation'
with 'vcd_name' specified.

Internal-tag: [#69926]
Signed-off-by: Wiktoria Kuna <[email protected]>
  • Loading branch information
wkkuna committed Dec 19, 2024
1 parent 1ecd58d commit 7af03a7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions litex/soc/cores/i2c_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ class I2CState(IntEnum):
ABORT = 9
CLR_FIFO = 10

@classmethod
def encode(self):
return list(map(lambda c: c.value, self))

@classmethod
def __len__(self):
return 11


@dataclass
class I2CQueueEntry(param.Parameterized):
Expand Down

0 comments on commit 7af03a7

Please sign in to comment.