From f4d4ae91cfac5be8bea3eb95e0563de57ae59405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20Hovind?= Date: Thu, 21 Nov 2024 19:01:37 +0100 Subject: [PATCH] [Handshake] Make sure things are integers --- .../Dialect/Handshake/multiple_loops/multiple_loops.py | 2 +- integration_test/Dialect/Handshake/nested_loops/nested_loops.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integration_test/Dialect/Handshake/multiple_loops/multiple_loops.py b/integration_test/Dialect/Handshake/multiple_loops/multiple_loops.py index 26fd5fb18332..b041211b11c9 100644 --- a/integration_test/Dialect/Handshake/multiple_loops/multiple_loops.py +++ b/integration_test/Dialect/Handshake/multiple_loops/multiple_loops.py @@ -26,7 +26,7 @@ async def sendMultiple(dut): ["out0", "out1", "out2"]) N = 10 - res0 = [i * (i + 1) / 2 for i in range(N)] + res0 = [i * (i + 1) // 2 for i in range(N)] res1 = [math.factorial(i) for i in range(N)] out0Check = cocotb.start_soon(out0.checkOutputs(res0)) diff --git a/integration_test/Dialect/Handshake/nested_loops/nested_loops.py b/integration_test/Dialect/Handshake/nested_loops/nested_loops.py index a54d380630ac..01135ff95a2f 100644 --- a/integration_test/Dialect/Handshake/nested_loops/nested_loops.py +++ b/integration_test/Dialect/Handshake/nested_loops/nested_loops.py @@ -24,7 +24,7 @@ async def sendMultiple(dut): N = 10 # sum_{i = 0}^n (sum_{j=0}^i i) = 1/6 * (n^3 + 3n^2 + 2n) - res = [(1 / 6) * (n**3 + 3 * n**2 + 2 * n) for n in range(N)] + res = [(n**3 + 3 * n**2 + 2 * n) // 6 for n in range(N)] out0Check = cocotb.start_soon(out0.checkOutputs(res))