x.bv.width -> len(x)
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Fri, 13 Jul 2012 16:33:03 +0000 (18:33 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Fri, 13 Jul 2012 16:33:03 +0000 (18:33 +0200)
milkymist/asmicon/multiplexer.py
milkymist/dfii/__init__.py

index 6ab16a4ddddd1eef70756b90d52c28765072cba3..f3d5ffbfd680580d7a5a6dbdefc014233f77c1e8 100644 (file)
@@ -29,7 +29,7 @@ class _CommandChooser:
                self.want_reads = Signal()
                self.want_writes = Signal()
                # NB: cas_n/ras_n/we_n are 1 when stb is inactive
-               self.cmd = CommandRequestRW(self.requests[0].a.bv.width, self.requests[0].ba.bv.width, tagbits)
+               self.cmd = CommandRequestRW(len(self.requests[0].a), len(self.requests[0].ba), tagbits)
        
        def get_fragment(self):
                comb = []
@@ -102,7 +102,7 @@ class _Datapath:
        def get_fragment(self):
                comb = []
                sync = []
-               tagbits = self.hub.tag_call.bv.width
+               tagbits = len(self.hub.tag_call)
                
                rd_valid = Signal()
                rd_tag = Signal(BV(tagbits))
@@ -169,7 +169,7 @@ class Multiplexer:
                
                # Command choosing
                requests = [bm.cmd for bm in self.bank_machines]
-               tagbits = self.hub.tag_call.bv.width
+               tagbits = len(self.hub.tag_call)
                choose_cmd = _CommandChooser(requests, tagbits)
                choose_req = _CommandChooser(requests, tagbits)
                comb += [
index 4bf28af7528772825d944fb0c1d7881aebfa424a..3f6c7a0adc6ed23bdeacfdb68000010730c7f74c 100644 (file)
@@ -16,11 +16,11 @@ class PhaseInjector:
                self._command = RegisterFields("command",
                        [self._cs, self._we, self._cas, self._ras, self._wren, self._rden])
                
-               self._address = RegisterField("address", self.phase.address.bv.width)
-               self._baddress = RegisterField("baddress", self.phase.bank.bv.width)
+               self._address = RegisterField("address", len(self.phase.address))
+               self._baddress = RegisterField("baddress", len(self.phase.bank))
                
-               self._wrdata = RegisterField("wrdata", self.phase.wrdata.bv.width)
-               self._rddata = RegisterField("rddata", self.phase.rddata.bv.width, READ_ONLY, WRITE_ONLY)
+               self._wrdata = RegisterField("wrdata", len(self.phase.wrdata))
+               self._rddata = RegisterField("rddata", len(self.phase.rddata), READ_ONLY, WRITE_ONLY)
        
        def get_registers(self):
                return [self._command,