URL
https://opencores.org/ocsvn/amber/amber/trunk
[/] [amber/] [trunk/] [hw/] [tests/] [adc.S] - Diff between revs 2 and 35
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 35 |
Line 37... |
Line 37... |
// from http://www.opencores.org/lgpl.shtml //
|
// from http://www.opencores.org/lgpl.shtml //
|
// //
|
// //
|
*****************************************************************/
|
*****************************************************************/
|
|
|
#include "amber_registers.h"
|
#include "amber_registers.h"
|
|
#include "amber_macros.h"
|
|
|
.section .text
|
.section .text
|
.globl main
|
.globl main
|
main:
|
main:
|
ldr r0, Data0
|
ldr r0, Data0
|
Line 53... |
Line 54... |
adc r8, r8, r3
|
adc r8, r8, r3
|
|
|
@ check that overflow flag has been set
|
@ check that overflow flag has been set
|
mov r5, pc
|
mov r5, pc
|
and r5, r5, #0xf0000000 @ clear non-flag bits
|
and r5, r5, #0xf0000000 @ clear non-flag bits
|
cmp r5, #0x90000000 @ negative and overflow flags set
|
expect r5, 0x90000000, __LINE__
|
movne r10, #10
|
|
bne testfail
|
|
|
|
@ check the result
|
|
cmp r8, r4
|
|
movne r10, #20
|
|
bne testfail
|
|
|
|
|
@ fail if r4 not equal to r8
|
|
compare r8, r4, __LINE__
|
|
|
b testpass
|
b testpass
|
|
|
|
|
testfail:
|
testfail:
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.