Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

how can i tell the IDE to carry code to TCM

i write a program with assembly instruction,i want this program can be excuted in tightly coupled memory,but when i debug ,this code is not in the TCM,my TCM name is “onchipmemory",my program is follow:

start: nop

call test_code

br start

.section .onchipmemory

test_code:

addi sp,sp,-4

stw ra,0(sp)

movi r2,0x99

movi r3,0xaa

mul r2,r2,r3

ldw ra,o(sp)

addi sp,sp,4

ret

24 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    the code modified as :

    .section .instruction_onchipmemory ,"a"

    everything is ok.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    the code modified as :

    .section .instruction_onchipmemory ,"a"

    everything is ok.

    --- Quote End ---

    It is very good Idea!