Skip to content

Commit 58f4f78

Browse files
author
Sebastien Bourdeauducq
committedFeb 6, 2012
sram: fix sub-word write
1 parent 5cde57c commit 58f4f78

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

Diff for: ‎milkymist/sram/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def __init__(self, depth):
99
def get_fragment(self):
1010
# generate write enable signal
1111
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])
1313
for i in range(4)]
1414
# split address
1515
nbits = bits_for(self.depth-1)

Diff for: ‎top.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
def get():
99
MHz = 1000000
1010
clk_freq = 80*MHz
11-
sram_size = 4096 # in kilobytes
11+
sram_size = 4096 # in bytes
1212

1313
clkfx_sys = clkfx.ClkFX(50*MHz, clk_freq)
1414
reset0 = m1reset.M1Reset()

0 commit comments

Comments
 (0)
Please sign in to comment.