Skip to content

Commit

Permalink
fhdl: fix handling of we_granularity in MemoryToArray
Browse files Browse the repository at this point in the history
sbourdeauducq committed Nov 15, 2016
1 parent e8193b0 commit c64f148
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migen/fhdl/simplify.py
Original file line number Diff line number Diff line change
@@ -108,7 +108,7 @@ def transform_fragment(self, i, f):
m = i*port.we_granularity
M = (i+1)*port.we_granularity
sync.append(If(port.we[i],
storage[port.adr][m:M].eq(port.dat_w)))
storage[port.adr][m:M].eq(port.dat_w[m:M])))
else:
sync.append(If(port.we,
storage[port.adr].eq(port.dat_w)))

0 comments on commit c64f148

Please sign in to comment.