Skip to content

Commit

Permalink
Wishbone: omit fixed LSBs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Bourdeauducq committed Jan 13, 2012
1 parent 570ea8c commit f8d5c27
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions milkymist/lm32/__init__.py
Expand Up @@ -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),
Expand All @@ -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),
Expand All @@ -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])
4 changes: 2 additions & 2 deletions milkymist/norflash/__init__.py
Expand Up @@ -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)]),
Expand Down

0 comments on commit f8d5c27

Please sign in to comment.