self.reg_p = RegParams("term_reg", 0, width, 2)
self.reg = None
- def get_registers(self):
+ def get_registers_glue(self):
comb = [self.t.eq(self.reg.field.r[0*self.width:1*self.width])]
comb += [self.m.eq(self.reg.field.r[1*self.width:2*self.width])]
return comb
def get_fragment(self):
comb = [self.o.eq((self.m & self.i) == self.t)]
- comb += self.get_registers()
+ comb += self.get_registers_glue()
return Fragment(comb)
#
self.high = Signal(width)
self.o = Signal()
- def get_registers(self):
+ def get_registers_glue(self):
comb = [self.low.eq(self.reg.field.r[0*self.width:1*self.width])]
comb += [self.low.eq(self.reg.field.r[1*self.width:2*self.width])]
return comb
def get_fragment(self):
comb = [self.o.eq((self.i >= self.low) & (self.i <= self.high))]
- comb += self.get_registers()
+ comb += self.get_registers_glue()
return Fragment(comb)
#
# Driver
self.bo = Signal()
self.o = Signal()
- def get_registers(self):
+ def get_registers_glue(self):
comb = []
i = 0
if "R" in self.mode:
comb += [self.o.eq(self.ro | self.fo | self.bo)]
# Registers
- comb += self.get_registers()
+ comb += self.get_registers_glue()
return Fragment(comb, sync)
self.width = width
self.interface = None
-
-
self.i = Signal(self.width)
self._o = Signal()
self.o = Signal()
self._lut_port = self._mem.get_port()
self._prog_port = self._mem.get_port(write_capable=True)
- def get_registers(self):
+ def get_registers_glue(self):
comb = [
self.prog_adr.eq(self.reg.field.r[0:16]),
self.prog_dat.eq(self.reg.field.r[16]),
self.o.eq(self._o)
]
- comb += self.get_registers()
+ comb += self.get_registers_glue()
return Fragment(comb, specials={self._mem})
#
# generate ports csr registers fields
for port in self.ports:
rf = RegisterField(port.reg_p.name, port.reg_p.size, reset=0,
- access_bus=WRITE_ONLY, access_dev=READ_ONLY)
+ access_bus=WRITE_ONLY, access_dev=READ_ONLY)
setattr(self, port.reg_p.name, rf)
# generate sum csr registers fields
self.sum_reg = RegisterField(self.sum.reg_p.name, self.sum.reg_p.size, reset=0,
- access_bus=WRITE_ONLY, access_dev=READ_ONLY)
+ access_bus=WRITE_ONLY, access_dev=READ_ONLY)
# generate registers
self.regs = list_regs(self.__dict__)