Commit e85187d
committed
Fix write logic in SP model
The simulation model for SP memories wasn't describing a functional
memory as on a write it was only setting bits, never clearing them.
Fix the write statement.
The bitwise OR operation may have been a remnant of a write mask. Before
commit 0fb7f8c ("Re-factored fakeram to support sp/dp ram/regfile")
there was a commented-out line:
# V_file.write(' mem[addr_in] <= (wd_in & w_mask_in) | (mem[addr_in] & ~w_mask_in);\n')
Signed-off-by: Martin Povišer <povik@cutebit.org>1 parent 63706f6 commit e85187d
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
0 commit comments