URL
https://opencores.org/ocsvn/xgate/xgate/trunk
Show entire file |
Details |
Blame |
View Log
Rev 89 |
Rev 90 |
Line 196... |
Line 196... |
|
|
|
|
; Test Bit Field Find First One
|
; Test Bit Field Find First One
|
LDL R5,#$01 ; R5=$0001
|
LDL R5,#$01 ; R5=$0001
|
LDH R5,#$4f ; R5=$4f01
|
LDH R5,#$4f ; R5=$4f01
|
BFFO R4,R5
|
BFFO R4,R5 ; Result in R4
|
BVS _FAIL ; Negative Flag should be clear
|
BVS _FAIL ; Negative Flag should be clear
|
LDL R6,#$0e ; First one should have been in bit position 14
|
LDL R6,#$0e ; First one should have been in bit position 14
|
SUB R0,R6,R4
|
SUB R0,R6,R4
|
BNE _FAIL
|
BNE _FAIL
|
BFFO R4,R0 ; Zero Value should set Carry Bit
|
BFFO R4,R0 ; Zero Value should set Carry Bit
|
BCC _FAIL
|
BCC _FAIL
|
LDH R5,#$00 ; R5=$0001
|
LDH R5,#$00 ; R5=$0001
|
BFFO R4,R5
|
BFFO R4,R5
|
BCS _FAIL ; Carry should be clear
|
BCS _FAIL ; Carry should be clear
|
BVS _FAIL ; Overflow Flag should be clear
|
BVS _FAIL ; Overflow Flag should be clear
|
SUB R0,R0,R4 ; R4 Should be zero
|
SUB R0,R0,R4 ; R4 Should be zero - ie. zero bit set
|
BNE _FAIL
|
BNE _FAIL
|
|
|
; Test ASR instruction **************************************************
|
; Test ASR instruction **************************************************
|
LDL R5,#$04 ; R5=$0008
|
LDL R5,#$04 ; R5=$0008
|
LDH R5,#$81 ; R5=$8108
|
LDH R5,#$81 ; R5=$8108
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.