2009-05-01 16:29:44 +00:00
|
|
|
; This test checks the effect of the index looping registers (R8-R11)
|
|
|
|
incdir "tests"
|
|
|
|
include "dsp_base.inc"
|
|
|
|
|
2009-06-13 04:55:58 +00:00
|
|
|
; Tests done using AR1 = 0x0010, IX1 = 0. WR1 (wrap 1) means WR1.
|
2009-05-01 19:07:29 +00:00
|
|
|
; WR1 = 0
|
2009-05-01 16:29:44 +00:00
|
|
|
; 10, 10, 10, 10,
|
2009-05-01 19:07:29 +00:00
|
|
|
; WR1 = 1
|
2009-05-01 16:29:44 +00:00
|
|
|
; 10, 11, 10, 11,
|
2009-05-01 19:07:29 +00:00
|
|
|
; WR1 = 2
|
2009-05-01 16:29:44 +00:00
|
|
|
; 10, 12, 11, 13, 12, 11, 13, 12, 11, 13, 12, 11
|
2009-05-01 19:07:29 +00:00
|
|
|
; WR1 = 3
|
2009-05-01 16:29:44 +00:00
|
|
|
; 10, 13, 12, 11, 10, 13, 12...
|
2009-05-01 19:07:29 +00:00
|
|
|
; WR1 = 4
|
2009-05-01 16:29:44 +00:00
|
|
|
; 10, 14, 13, 17, 16, 15, 14, 13, 17, 16, 15, 14, 13, ...
|
2009-05-01 19:07:29 +00:00
|
|
|
; WR1 = 5
|
2009-05-01 16:29:44 +00:00
|
|
|
; 10, 15, 14, 13, 12, 17, 16, 15, 14, 13, 12, 17,
|
2009-05-01 19:07:29 +00:00
|
|
|
; WR1 = 6
|
2009-05-01 16:29:44 +00:00
|
|
|
; 10, 16, 15, 14, 13, 12, 11, 17, 16, 15, 14, 13
|
2009-05-01 19:07:29 +00:00
|
|
|
; WR1 = 7
|
2009-05-01 16:29:44 +00:00
|
|
|
; 10, 17, 16, 15, .. normal
|
2009-05-01 19:07:29 +00:00
|
|
|
; WR1 = 8
|
2009-05-01 16:29:44 +00:00
|
|
|
; 10, 18, 17, 1f, 1e, 1d, 1c, 1b, 1a, 19, 18, 17, 1f, 1e, .....
|
|
|
|
|
|
|
|
|
|
|
|
; I really don't know how the above could possibly be efficiently implemented in hardware.
|
|
|
|
; And thus it's tricky to implement in software too :p
|
|
|
|
|
|
|
|
; test using indexing register 1 - 0 is used in send_back
|
|
|
|
lri $AR1, #16
|
|
|
|
lri $IX1, #32
|
2009-06-13 04:55:58 +00:00
|
|
|
lri $WR1, #0
|
2009-05-01 16:29:44 +00:00
|
|
|
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
|
|
|
|
lri $AR1, #16
|
2009-06-13 04:55:58 +00:00
|
|
|
lri $WR1, #1
|
2009-05-01 16:29:44 +00:00
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
|
|
|
|
lri $AR1, #16
|
2009-06-13 04:55:58 +00:00
|
|
|
lri $WR1, #2
|
2009-05-01 16:29:44 +00:00
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
|
|
|
|
lri $AR1, #16
|
2009-06-13 04:55:58 +00:00
|
|
|
lri $WR1, #3
|
2009-05-01 16:29:44 +00:00
|
|
|
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
|
|
|
|
lri $AR1, #16
|
2009-06-13 04:55:58 +00:00
|
|
|
lri $WR1, #4
|
2009-05-01 16:29:44 +00:00
|
|
|
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
|
|
|
|
lri $AR1, #16
|
2009-06-13 04:55:58 +00:00
|
|
|
lri $WR1, #5
|
2009-05-01 16:29:44 +00:00
|
|
|
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
|
|
|
|
lri $AR1, #16
|
2009-06-13 04:55:58 +00:00
|
|
|
lri $WR1, #6
|
2009-05-01 16:29:44 +00:00
|
|
|
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
|
|
|
|
lri $AR1, #16
|
2009-06-13 04:55:58 +00:00
|
|
|
lri $WR1, #7
|
2009-05-01 16:29:44 +00:00
|
|
|
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
|
|
|
|
lri $AR1, #16
|
2009-06-13 04:55:58 +00:00
|
|
|
lri $WR1, #8
|
2009-05-01 16:29:44 +00:00
|
|
|
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
nx'dr : $AR1
|
|
|
|
call send_back ; 1
|
|
|
|
|
|
|
|
|
2009-06-13 04:55:58 +00:00
|
|
|
lri $WR1, #0xFFFF
|
2009-05-01 16:29:44 +00:00
|
|
|
|
|
|
|
; We're done, DO NOT DELETE THIS LINE
|
|
|
|
jmp end_of_test
|