Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

sram: fix sub-word write

  • Loading branch information...
commit 58f4f78d2c6337017a0da0a32dc85ab68d6cc84c 1 parent 5cde57c
Sébastien Bourdeauducq authored February 06, 2012
2  milkymist/sram/__init__.py
@@ -9,7 +9,7 @@ def __init__(self, depth):
9 9
 	def get_fragment(self):
10 10
 		# generate write enable signal
11 11
 		we = Signal(BV(4))
12  
-		comb = [we[i].eq(self.bus.cyc_i & self.bus.stb_i & self.bus.we_i & self.bus.sel_i[3-i])
  12
+		comb = [we[i].eq(self.bus.cyc_i & self.bus.stb_i & self.bus.we_i & self.bus.sel_i[i])
13 13
 			for i in range(4)]
14 14
 		# split address
15 15
 		nbits = bits_for(self.depth-1)
2  top.py
@@ -8,7 +8,7 @@
8 8
 def get():
9 9
 	MHz = 1000000
10 10
 	clk_freq = 80*MHz
11  
-	sram_size = 4096 # in kilobytes
  11
+	sram_size = 4096 # in bytes
12 12
 	
13 13
 	clkfx_sys = clkfx.ClkFX(50*MHz, clk_freq)
14 14
 	reset0 = m1reset.M1Reset()

0 notes on commit 58f4f78

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