Skip to content

Commit f8d5c27

Browse files
author
Sebastien Bourdeauducq
committedJan 13, 2012
Wishbone: omit fixed LSBs
1 parent 570ea8c commit f8d5c27

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed
 

‎milkymist/lm32/__init__.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def __init__(self):
88
self.interrupt = Signal(BV(32))
99
self.ext_break = Signal()
1010
self._inst = Instance("lm32_top",
11-
[("I_ADR_O", i.adr_o),
11+
[("I_ADR_O", BV(32)),
1212
("I_DAT_O", i.dat_o),
1313
("I_SEL_O", i.sel_o),
1414
("I_CYC_O", i.cyc_o),
@@ -17,7 +17,7 @@ def __init__(self):
1717
("I_CTI_O", i.cti_o),
1818
("I_LOCK_O", BV(1)),
1919
("I_BTE_O", i.bte_o),
20-
("D_ADR_O", d.adr_o),
20+
("D_ADR_O", BV(32)),
2121
("D_DAT_O", d.dat_o),
2222
("D_SEL_O", d.sel_o),
2323
("D_CYC_O", d.cyc_o),
@@ -44,6 +44,8 @@ def __init__(self):
4444
def get_fragment(self):
4545
comb = [
4646
self._inst.ins["I_RTY_I"].eq(0),
47-
self._inst.ins["D_RTY_I"].eq(0)
47+
self._inst.ins["D_RTY_I"].eq(0),
48+
self.ibus.adr_o.eq(self._inst.outs["I_ADR_O"][2:]),
49+
self.dbus.adr_o.eq(self._inst.outs["D_ADR_O"][2:])
4850
]
4951
return Fragment(comb=comb, instances=[self._inst])

‎milkymist/norflash/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ def __init__(self, adr_width, rd_timing):
1111
self.we_n = Signal()
1212
self.ce_n = Signal()
1313
self.timeline = timeline.Inst(self.bus.cyc_i & self.bus.stb_i,
14-
[(0, [self.adr.eq(Cat(0, self.bus.adr_i[2:adr_width]))]),
14+
[(0, [self.adr.eq(Cat(0, self.bus.adr_i[:adr_width-2]))]),
1515
(rd_timing, [
1616
self.bus.dat_o[16:].eq(self.d),
17-
self.adr.eq(Cat(1, self.bus.adr_i[2:adr_width]))]),
17+
self.adr.eq(Cat(1, self.bus.adr_i[:adr_width-2]))]),
1818
(2*rd_timing, [
1919
self.bus.dat_o[:16].eq(self.d),
2020
self.bus.ack_o.eq(1)]),

0 commit comments

Comments
 (0)
Please sign in to comment.