aboutsummaryrefslogtreecommitdiff
path: root/tests/embedded_bram_slave/operations.memv
blob: 9cca80008d4dc9289cf5299d133c7ebfd676a551 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
`include "macroasm.vh" // look into macroasm.vh for more info

// First, check if memory initialization went ok
`READ (00000, 0000) // 0*7 at address 0
`DESELECT
`READ (00001, 0007) // 1*7 at address 1
`READ (00002, 000E) // 2*7 at address 2
`WAIT
`WAIT
`READ (00089, 03BF) // 137*7 at address 137
`READ (00101, 0707) // 257*7 at address 257

// Now, check that writing works (this is based on self test)
`WRITE(00000, abcd)
`WAIT
`READ (00000, abcd)
`WRITE(00001, 1234)
`READ (00000, abcd)
`DESELECT
`DESELECT
`READ (00001, 1234)
`WRITE(001E0, a2a2)
`WRITE(00001, 4321)
`READ (001E0, a2a2)
`WAIT
`WAIT
`WAIT
`WAIT
`WAIT
`DESELECT
`DESELECT
`DESELECT
`WAIT
`DESELECT
`WAIT
`READ(00001, 4321)