Add missing ready, fix constant endianness
This commit is contained in:
@@ -57,7 +57,7 @@ class TB:
|
||||
data_in.extend(struct.unpack("8I", key.to_bytes(32, "little")))
|
||||
data_in.extend(struct.unpack("2I", counter.to_bytes(8, "little")))
|
||||
data_in.extend(struct.unpack("2I", nonce.to_bytes(8, "little")))
|
||||
|
||||
|
||||
data_out = chacha_block(data_in)
|
||||
|
||||
await self.expected_queue.put(data_out)
|
||||
@@ -72,6 +72,8 @@ class TB:
|
||||
self.dut.i_ready.value = 1
|
||||
self.dut.i_valid.value = 1
|
||||
await RisingEdge(self.dut.i_clk)
|
||||
while not self.dut.o_ready.value == 1:
|
||||
await RisingEdge(self.dut.i_clk)
|
||||
self.dut.i_valid.value = 0
|
||||
|
||||
async def run_output(self):
|
||||
@@ -91,7 +93,7 @@ async def test_sanity(dut):
|
||||
|
||||
await tb.cycle_reset()
|
||||
|
||||
count = 1
|
||||
count = 200
|
||||
|
||||
for i in range(count):
|
||||
key = random.randint(0, 2**256-1)
|
||||
|
||||
Reference in New Issue
Block a user