URL
https://opencores.org/ocsvn/lxp32/lxp32/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 2 |
Rev 9 |
/*
|
/*
|
* This test verifies bytewise DBUS access
|
* This test verifies bytewise DBUS access
|
*/
|
*/
|
|
|
lc r100, 0x10000000 // test result output pointer
|
lc r100, 0x10000000 // test result output pointer
|
lc r101, halt
|
lc r101, halt
|
lc r102, failure
|
lc r102, failure
|
|
|
lc r16, 0x10000004 // output pointer
|
lc r16, 0x10000004 // output pointer
|
lc r17, data // input pointer
|
lc r17, data // input pointer
|
|
|
// Check for bytewise read
|
// Check for bytewise read
|
lc r18, 0xbc
|
lc r18, 0xbc
|
lc r19, 0x9a
|
lc r19, 0x9a
|
lc r20, 0x78
|
lc r20, 0x78
|
lc r21, 0x56
|
lc r21, 0x56
|
lc r22, 0xffffffbc
|
lc r22, 0xffffffbc
|
lc r23, 0xffffff9a
|
lc r23, 0xffffff9a
|
lc r24, 0x78
|
lc r24, 0x78
|
lc r25, 0x56
|
lc r25, 0x56
|
|
|
lub r0, r17
|
lub r0, r17
|
sw r16, r0
|
sw r16, r0
|
cjmpne r102, r0, r18
|
cjmpne r102, r0, r18
|
add r17, r17, 1
|
add r17, r17, 1
|
lub r0, r17
|
lub r0, r17
|
sw r16, r0
|
sw r16, r0
|
cjmpne r102, r0, r19
|
cjmpne r102, r0, r19
|
add r17, r17, 1
|
add r17, r17, 1
|
lub r0, r17
|
lub r0, r17
|
sw r16, r0
|
sw r16, r0
|
cjmpne r102, r0, r20
|
cjmpne r102, r0, r20
|
add r17, r17, 1
|
add r17, r17, 1
|
lub r0, r17
|
lub r0, r17
|
sw r16, r0
|
sw r16, r0
|
cjmpne r102, r0, r21
|
cjmpne r102, r0, r21
|
sub r17, r17, 3
|
sub r17, r17, 3
|
lsb r0, r17
|
lsb r0, r17
|
sw r16, r0
|
sw r16, r0
|
cjmpne r102, r0, r22
|
cjmpne r102, r0, r22
|
add r17, r17, 1
|
add r17, r17, 1
|
lsb r0, r17
|
lsb r0, r17
|
sw r16, r0
|
sw r16, r0
|
cjmpne r102, r0, r23
|
cjmpne r102, r0, r23
|
add r17, r17, 1
|
add r17, r17, 1
|
lsb r0, r17
|
lsb r0, r17
|
sw r16, r0
|
sw r16, r0
|
cjmpne r102, r0, r24
|
cjmpne r102, r0, r24
|
add r17, r17, 1
|
add r17, r17, 1
|
lsb r0, r17
|
lsb r0, r17
|
sw r16, r0
|
sw r16, r0
|
cjmpne r102, r0, r25
|
cjmpne r102, r0, r25
|
|
|
// Check for bytewise write
|
// Check for bytewise write
|
lc r17, 0x00008004
|
lc r17, 0x00008004
|
sb r17, 0x12
|
sb r17, 0x12
|
add r17, r17, 1
|
add r17, r17, 1
|
sb r17, 0x34
|
sb r17, 0x34
|
add r17, r17, 1
|
add r17, r17, 1
|
sb r17, 0x56
|
sb r17, 0x56
|
add r17, r17, 1
|
add r17, r17, 1
|
sb r17, 0x78
|
sb r17, 0x78
|
|
|
// Read the whole word and compare
|
// Read the whole word and compare
|
sub r17, r17, 3
|
sub r17, r17, 3
|
lw r0, r17
|
lw r0, r17
|
lc r18, 0x78563412
|
lc r18, 0x78563412
|
cjmpne r102, r0, r18
|
cjmpne r102, r0, r18
|
|
|
sw r100, 1
|
sw r100, 1
|
jmp r101
|
jmp r101
|
|
|
failure:
|
failure:
|
sw r100, 2
|
sw r100, 2
|
|
|
halt:
|
halt:
|
hlt
|
hlt
|
jmp r101
|
jmp r101
|
|
|
data:
|
data:
|
.word 0x56789ABC
|
.word 0x56789ABC
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.