mirror of
https://github.com/fpganinja/taxi.git
synced 2025-12-12 10:08:39 -08:00
Cast to int instead of using .integer
Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
@@ -87,11 +87,11 @@ class TB:
|
||||
return (await self.data_sink.recv()).tdata
|
||||
|
||||
async def i2c_wait(self):
|
||||
if self.dut.busy.value.integer:
|
||||
if int(self.dut.busy.value):
|
||||
await FallingEdge(self.dut.busy)
|
||||
|
||||
async def i2c_wait_bus_idle(self):
|
||||
if self.dut.bus_active.value.integer:
|
||||
if int(self.dut.bus_active.value):
|
||||
await FallingEdge(self.dut.bus_active)
|
||||
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ async def run_test_write(dut):
|
||||
await tb.i2c_master.write(0x70, b'\x11\xAA')
|
||||
await tb.i2c_master.send_stop()
|
||||
|
||||
assert dut.data_out.value.integer == 0xAA
|
||||
assert int(dut.data_out.value) == 0xAA
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
await RisingEdge(dut.clk)
|
||||
@@ -79,7 +79,7 @@ async def run_test_null_write(dut):
|
||||
await tb.i2c_master.write(0x70, b'')
|
||||
await tb.i2c_master.send_stop()
|
||||
|
||||
assert dut.data_out.value.integer == 0xAA
|
||||
assert int(dut.data_out.value) == 0xAA
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
await RisingEdge(dut.clk)
|
||||
@@ -123,7 +123,7 @@ async def run_test_nack(dut):
|
||||
await tb.i2c_master.write(0x55, b'\x00\x04'+b'\xde\xad\xbe\xef')
|
||||
await tb.i2c_master.send_stop()
|
||||
|
||||
assert dut.data_out.value.integer == 0xAA
|
||||
assert int(dut.data_out.value) == 0xAA
|
||||
|
||||
# assert missed ack
|
||||
|
||||
|
||||
Reference in New Issue
Block a user