get_registers --> get_registers_glue since it's conflicting with new Migen register automatic detection

This commit is contained in:
Florent Kermarrec 2013-03-11 20:05:30 +01:00
parent edce543b14
commit 60e2cdfe79
2 changed files with 11 additions and 13 deletions

View File

@ -39,14 +39,14 @@ class Term:
self.reg_p = RegParams("term_reg", 0, width, 2) self.reg_p = RegParams("term_reg", 0, width, 2)
self.reg = None 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.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])] comb += [self.m.eq(self.reg.field.r[1*self.width:2*self.width])]
return comb return comb
def get_fragment(self): def get_fragment(self):
comb = [self.o.eq((self.m & self.i) == self.t)] comb = [self.o.eq((self.m & self.i) == self.t)]
comb += self.get_registers() comb += self.get_registers_glue()
return Fragment(comb) return Fragment(comb)
# #
@ -75,14 +75,14 @@ class RangeDetector:
self.high = Signal(width) self.high = Signal(width)
self.o = Signal() 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[0*self.width:1*self.width])]
comb += [self.low.eq(self.reg.field.r[1*self.width:2*self.width])] comb += [self.low.eq(self.reg.field.r[1*self.width:2*self.width])]
return comb return comb
def get_fragment(self): def get_fragment(self):
comb = [self.o.eq((self.i >= self.low) & (self.i <= self.high))] comb = [self.o.eq((self.i >= self.low) & (self.i <= self.high))]
comb += self.get_registers() comb += self.get_registers_glue()
return Fragment(comb) return Fragment(comb)
# #
# Driver # Driver
@ -118,7 +118,7 @@ class EdgeDetector:
self.bo = Signal() self.bo = Signal()
self.o = Signal() self.o = Signal()
def get_registers(self): def get_registers_glue(self):
comb = [] comb = []
i = 0 i = 0
if "R" in self.mode: if "R" in self.mode:
@ -158,7 +158,7 @@ class EdgeDetector:
comb += [self.o.eq(self.ro | self.fo | self.bo)] comb += [self.o.eq(self.ro | self.fo | self.bo)]
# Registers # Registers
comb += self.get_registers() comb += self.get_registers_glue()
return Fragment(comb, sync) return Fragment(comb, sync)
@ -197,8 +197,6 @@ class Sum:
self.width = width self.width = width
self.interface = None self.interface = None
self.i = Signal(self.width) self.i = Signal(self.width)
self._o = Signal() self._o = Signal()
self.o = Signal() self.o = Signal()
@ -214,7 +212,7 @@ class Sum:
self._lut_port = self._mem.get_port() self._lut_port = self._mem.get_port()
self._prog_port = self._mem.get_port(write_capable=True) self._prog_port = self._mem.get_port(write_capable=True)
def get_registers(self): def get_registers_glue(self):
comb = [ comb = [
self.prog_adr.eq(self.reg.field.r[0:16]), self.prog_adr.eq(self.reg.field.r[0:16]),
self.prog_dat.eq(self.reg.field.r[16]), self.prog_dat.eq(self.reg.field.r[16]),
@ -233,7 +231,7 @@ class Sum:
self.o.eq(self._o) self.o.eq(self._o)
] ]
comb += self.get_registers() comb += self.get_registers_glue()
return Fragment(comb, specials={self._mem}) return Fragment(comb, specials={self._mem})
# #