517dc51edefcfabfab09f1212517aeaba6998668
[soc.git] / TLB / src / VectorAssembler.py
1 from nmigen import Array, Module, Signal
2 from nmigen.cli import main
3
4 class VectorAssembler():
5 def __init__(self, width):
6 # Internal
7 self.width = width
8
9 # Input
10 self.input = Array(Signal(1) for index in range(width))
11
12 # Output
13 self.o = Signal(width)
14
15 def elaborate(self, platform=None):
16 m = Module()
17 for index in range(self.width):
18 m.d.comb += self.o[index].eq(self.input[index])
19
20 return m