Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Wishbone: omit fixed LSBs

  • Loading branch information...
commit f8d5c27ef8b81c3aa82c7e498cd0edafeecf0226 1 parent 570ea8c
Sébastien Bourdeauducq authored January 13, 2012
8  milkymist/lm32/__init__.py
@@ -8,7 +8,7 @@ def __init__(self):
8 8
 		self.interrupt = Signal(BV(32))
9 9
 		self.ext_break = Signal()
10 10
 		self._inst = Instance("lm32_top",
11  
-			[("I_ADR_O", i.adr_o),
  11
+			[("I_ADR_O", BV(32)),
12 12
 			("I_DAT_O", i.dat_o),
13 13
 			("I_SEL_O", i.sel_o),
14 14
 			("I_CYC_O", i.cyc_o),
@@ -17,7 +17,7 @@ def __init__(self):
17 17
 			("I_CTI_O", i.cti_o),
18 18
 			("I_LOCK_O", BV(1)),
19 19
 			("I_BTE_O", i.bte_o),
20  
-			("D_ADR_O", d.adr_o),
  20
+			("D_ADR_O", BV(32)),
21 21
 			("D_DAT_O", d.dat_o),
22 22
 			("D_SEL_O", d.sel_o),
23 23
 			("D_CYC_O", d.cyc_o),
@@ -44,6 +44,8 @@ def __init__(self):
44 44
 	def get_fragment(self):
45 45
 		comb = [
46 46
 			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:])
48 50
 		]
49 51
 		return Fragment(comb=comb, instances=[self._inst])
4  milkymist/norflash/__init__.py
@@ -11,10 +11,10 @@ def __init__(self, adr_width, rd_timing):
11 11
 		self.we_n = Signal()
12 12
 		self.ce_n = Signal()
13 13
 		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]))]),
15 15
 			(rd_timing, [
16 16
 				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]))]),
18 18
 			(2*rd_timing, [
19 19
 				self.bus.dat_o[:16].eq(self.d),
20 20
 				self.bus.ack_o.eq(1)]),

0 notes on commit f8d5c27

Please sign in to comment.
Something went wrong with that request. Please try again.