Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Wishbone: omit fixed LSBs

  • Loading branch information...
commit f8d5c27ef8b81c3aa82c7e498cd0edafeecf0226 1 parent 570ea8c
@sbourdeauducq sbourdeauducq authored
Showing with 7 additions and 5 deletions.
  1. +5 −3 milkymist/lm32/__init__.py
  2. +2 −2 milkymist/norflash/__init__.py
View
8 milkymist/lm32/__init__.py
@@ -8,7 +8,7 @@ def __init__(self):
self.interrupt = Signal(BV(32))
self.ext_break = Signal()
self._inst = Instance("lm32_top",
- [("I_ADR_O", i.adr_o),
+ [("I_ADR_O", BV(32)),
("I_DAT_O", i.dat_o),
("I_SEL_O", i.sel_o),
("I_CYC_O", i.cyc_o),
@@ -17,7 +17,7 @@ def __init__(self):
("I_CTI_O", i.cti_o),
("I_LOCK_O", BV(1)),
("I_BTE_O", i.bte_o),
- ("D_ADR_O", d.adr_o),
+ ("D_ADR_O", BV(32)),
("D_DAT_O", d.dat_o),
("D_SEL_O", d.sel_o),
("D_CYC_O", d.cyc_o),
@@ -44,6 +44,8 @@ def __init__(self):
def get_fragment(self):
comb = [
self._inst.ins["I_RTY_I"].eq(0),
- self._inst.ins["D_RTY_I"].eq(0)
+ self._inst.ins["D_RTY_I"].eq(0),
+ self.ibus.adr_o.eq(self._inst.outs["I_ADR_O"][2:]),
+ self.dbus.adr_o.eq(self._inst.outs["D_ADR_O"][2:])
]
return Fragment(comb=comb, instances=[self._inst])
View
4 milkymist/norflash/__init__.py
@@ -11,10 +11,10 @@ def __init__(self, adr_width, rd_timing):
self.we_n = Signal()
self.ce_n = Signal()
self.timeline = timeline.Inst(self.bus.cyc_i & self.bus.stb_i,
- [(0, [self.adr.eq(Cat(0, self.bus.adr_i[2:adr_width]))]),
+ [(0, [self.adr.eq(Cat(0, self.bus.adr_i[:adr_width-2]))]),
(rd_timing, [
self.bus.dat_o[16:].eq(self.d),
- self.adr.eq(Cat(1, self.bus.adr_i[2:adr_width]))]),
+ self.adr.eq(Cat(1, self.bus.adr_i[:adr_width-2]))]),
(2*rd_timing, [
self.bus.dat_o[:16].eq(self.d),
self.bus.ack_o.eq(1)]),
Please sign in to comment.
Something went wrong with that request. Please try again.