From: Luke Kenneth Casson Leighton Date: Fri, 5 Jul 2019 09:11:07 +0000 (+0100) Subject: split out InputTest random capability X-Git-Tag: ls180-24jan2020~932 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5cf281be1faec69834252f88d95c0d6214dd7728;p=ieee754fpu.git split out InputTest random capability --- diff --git a/src/ieee754/fpcommon/test/fpmux.py b/src/ieee754/fpcommon/test/fpmux.py index 3a2f0730..5f066dfb 100644 --- a/src/ieee754/fpcommon/test/fpmux.py +++ b/src/ieee754/fpcommon/test/fpmux.py @@ -11,38 +11,25 @@ from nmigen.cli import verilog, rtlil class InputTest: - def __init__(self, dut, width, fpkls, fpop, single_op=False): + def __init__(self, dut, width, fpkls, fpop, vals, single_op): self.dut = dut self.fpkls = fpkls self.fpop = fpop self.single_op = single_op self.di = {} self.do = {} - self.tlen = 10 + self.tlen = len(vals) // dut.num_rows self.width = width for muxid in range(dut.num_rows): self.di[muxid] = {} self.do[muxid] = [] for i in range(self.tlen): - op1 = randint(0, (1<