1 from nmigen
import Signal
, Module
2 from nmigen
.back
.pysim
import Simulator
, Delay
, Settle
3 from nmutil
.formaltest
import FHDLTestCase
4 from nmigen
.cli
import rtlil
5 from soc
.fu
.compunits
.compunits
import FunctionUnitBaseSingle
6 from soc
.experiment
.alu_hier
import DummyALU
7 from soc
.experiment
.compalu_multi
import MultiCompUnit
8 from soc
.fu
.alu
.alu_input_record
import CompALUOpSubset
9 from soc
.decoder
.power_enums
import InternalOp
12 class MaskGenTestCase(FHDLTestCase
):
13 def test_maskgen(self
):
17 m
.submodules
.dut
= dut
= MultiCompUnit(16, alu
,
22 yield dut
.src1_i
.eq(0x5)
23 yield dut
.src2_i
.eq(0x5)
24 yield dut
.issue_i
.eq(1)
25 yield dut
.oper_i
.insn_type
.eq(InternalOp
.OP_ADD
)
27 yield dut
.issue_i
.eq(0)
31 rd_rel
= yield dut
.rd
.rel
34 yield dut
.rd
.go
.eq(0xfff)
43 sim
.add_sync_process(process
)
44 with sim
.write_vcd("compunit.vcd", "compunit.gtkw", traces
=dut
.ports()):
47 if __name__
== '__main__':