lasmi: fix minor problems
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 10 Jun 2013 20:49:33 +0000 (22:49 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 10 Jun 2013 20:49:33 +0000 (22:49 +0200)
migen/actorlib/dma_lasmi.py
migen/bus/wishbone2lasmi.py

index 3a0956e922626c6fd6a49fd2458bfb8120493df6..41ac1f44b9f2d483d4ed0a377d4bdc1a32335502 100644 (file)
@@ -19,7 +19,7 @@ class Reader(Module):
                request_issued = Signal()
 
                self.comb += [
-                       self.bus.we.eq(0),
+                       lasmim.we.eq(0),
                        lasmim.stb.eq(self.address.stb & request_enable),
                        lasmim.adr.eq(self.address.payload.a),
                        self.address.ack.eq(lasmim.ack),
index 2df26bbff2218fc29250debd474521671a885b08..2aa48ff160a4f9278f793180518cc5e8abd53e52 100644 (file)
@@ -20,7 +20,7 @@ class WB2LASMI(Module):
                # TAG | LINE NUMBER | LINE OFFSET
                offsetbits = log2_int(lasmim.dw//32)
                addressbits = lasmim.aw + offsetbits
-               linebits = log2_int(self.cachesize) - offsetbits
+               linebits = log2_int(cachesize) - offsetbits
                tagbits = addressbits - linebits
                adr_offset, adr_line, adr_tag = split(self.wishbone.adr, offsetbits, linebits, tagbits)
                
@@ -93,7 +93,7 @@ class WB2LASMI(Module):
                                fsm.next_state(fsm.IDLE)
                        ).Else(
                                If(tag_do.dirty,
-                                       fsm.next_state(fsm.EVICT_ISSUE)
+                                       fsm.next_state(fsm.EVICT_REQUEST)
                                ).Else(
                                        fsm.next_state(fsm.REFILL_WRTAG)
                                )
@@ -120,6 +120,6 @@ class WB2LASMI(Module):
                        If(lasmim.ack, fsm.next_state(fsm.REFILL_DATAD))
                )
                fsm.act(fsm.REFILL_DATA,
-                       write_from_asmi.eq(1),
+                       write_from_lasmi.eq(1),
                        fsm.next_state(fsm.TEST_HIT)
                )