Forum Discussion
Altera_Forum
Honored Contributor
21 years agoHi, here is an asm sample, where I could set breakpoints
also I have enabled in menu "Window->preferences->C/C++->Debug" check mark "Disassembly option" "Automatically switch to disassembly mode" perhaps this helps # .section .text# .align 3 .section .text .globl main .type main,@function .globl sample .type sample,@function .globl testasm .type testasm,@function coeff: .short 3*2,-11*2,-11*2,53*2,12*2,-156*2,32*2,362*2,-210*2,-805*2,951*2,3876*2, 3876*2,951*2,-805*2,-210*2,362*2,32*2,-156*2,12*2,53*2,-11*2,-11*2,3*2 .section .data .globl dindex .globl firdata dindex: .int 0 firdata: .short 0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0,0,0,0,0 .section .text main: start_loop: br start_loop sample: addi sp, sp, -48 stw r16, 36(sp) stw r17, 32(sp) stw r18, 28(sp)# stw r19, 24(sp)# stw r20, 20(sp)# stw r21, 16(sp)# stw r22, 12(sp)# stw r23, 8(sp) stw fp, 4(sp) stw ra, 0(sp) # here we start movia r16,firdata ldhu r17,44(r16) sth r17,46(r16) ldhu r17,42(r16) sth r17,44(r16) ldhu r17,40(r16) sth r17,44(r16) ldhu r17,38(r16) sth r17,44(r16) ldhu r17,36(r16) sth r17,44(r16) ldhu r17,34(r16) sth r17,44(r16) ldw r16, 36(sp) ldw r17, 32(sp) ldw r18, 28(sp)# ldw r19, 24(sp)# ldw r20, 20(sp)# ldw r21, 16(sp)# ldw r22, 12(sp)# ldw r23, 8(sp) ldw fp, 4(sp) ldw ea, 0(sp) addi sp, sp, 48 ret testasm: addi sp, sp, -48 stw r16, 36(sp) stw r17, 32(sp) stw r18, 28(sp) stw r19, 24(sp) stw r20, 20(sp) stw r21, 16(sp) stw r22, 12(sp) stw r23, 8(sp) stw fp, 4(sp) stw ra, 0(sp) # here we start movia r16,firdata movi r17,5 sth r17,0(r16) movi r17,12 sth r17,2(r16) movia r16,coeff ldhu r17,0(r16) ldhu r17,2(r16) ldhu r17,2(r16) movi r16,-3 movi r17,4 custom 1,r18,r16,r17 movi r16,2 movi r17,6 custom 129,r18,r16,r17 movi r16,-3 movi r17,4 custom 0,r18,r16,r17 movi r16,5 movi r17,7 custom 128,r18,r16,r17 ldw r16, 36(sp) ldw r17, 32(sp) ldw r18, 28(sp) ldw r19, 24(sp) ldw r20, 20(sp) ldw r21, 16(sp) ldw r22, 12(sp) ldw r23, 8(sp) ldw fp, 4(sp) ldw ea, 0(sp) addi sp, sp, 48 ret