- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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- Etiquetas:
- Nios® II Embedded Design Suite (EDS)
Enlace copiado
- « Anterior
-
- 1
- 2
- Siguiente »
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
:mad: No one can answer this question?
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Did you try.section onchipmemory
instead? Or have a look at the linker script, to find out what name it gave to your section.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
thank you,i am glad to try it again
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
i tried in different way,but still can't seen the objectcode carried to the TCM,if anyone know how to do this with assembly instruction please tell me,thank you very much!
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
I have delayed this issue two weeks, please help me, thank you!:mad:
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
what does your linker script look like? In what section is your code put by the linker?
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
i can't see and edit the linker file,the file is created by the IDE automatically,can you tell me how to see and edit the linker file? thank you!
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
If you are using the IDE, it is in your system library > Debug > system_description > generated.x
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
TO_BE_DONE
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
From what I can read in the linker script, you don't have any section called onchip_memory. You have instruction_onchipmemory (address 0x08000000) and onchip_memory2_0 (address 0x04000000).
One of those should be your TCM memory. Use its name as section name, without the . in front, and see if it works.- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
the instruction_onchipmemory (address 0x08000000) is sure my TCM, the IDE also crectly compilated my instructions and asign the code address at the TCM zone, but when i debug the IDE din't exicute the download action to the TCM,it only download the program to de extern sram. if i use the instruction_onchipmemory as the section name without dot front of it ,the IDE would asign a increct address to the TCM section.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
the IDE can crectly compilated and download the program to the SRAM and TCM if the program is writen by C, or the section of TCM code is writen by c but called by the assembly main function, but when i develope my program with pure assembly instruction the IDE can't exicute the download action to the TCM,i don't know why and how to solve the problem.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
That's odd... As long as the object file generated from your assembly source code is included in the project and linked with the rest there shouldn't be any difference between an assembly function and a C function...
I expect that you used a dual port memory with one port connected to the TCM interface and the other on the data master? Do they have both the same address? Did you try to switch the two ports? IIRC I had some trouble when the TCM interface was connected to the s2 port on the on-chip memory. Connecting it to s1 worked better. Something to do with how the BSP tools parse the ptf file, I guess.- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
I recreated a hardware project to test the TCM,i wrote the program with pure assembly instruction and encount a new problem:when the IDE complete dowloading the code to SRAM and TCM ,I found that the instruction code is not be download to the TCM successfully,the data in the TCM zone is not be changed at all! is it the problem of IDE? is it the problem of my hardware project? is it the problem of my simple assembly instruction program? if anyone know what the problem is ,please tell me,thanks!
in my hardware project my TCM's name is instruction_onchipmemory,the folowing is my testing assembly instruction program: .global main .type main, @function main: addi sp, sp,-12 stw ra, 8(sp) stw fp, 4(sp) mov fp, sp loop: call tcm_test br loop //the folowing instruction will be executed in tightly coupled memory // the tightly coupled memory's name is instruction_onchipmemory .section .instruction_onchipmemory tcm_test: addi sp, sp,-4 stw ra, 0(sp) movi r2,0x123 movi r3,0x345 mul r2,r2,r3 mov r4,r2 ldw ra,0(sp) addi sp,sp,4 ret- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Could you show us your SOPC system with all the connections?
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
How to connections sent to you? I sent you the picture on the connect, or files? By e-mail sent to you or in the forum reply?
thanks- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
You can take a screenshot of SOPC Builder and attach it to your reply on the forum
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
The SOPC system looks good, and as far as I can tell the call assembly instruction uses a 28-bit address, so it should be able to jump to the TCM. I can find any reason for your problem...
It could be something with the way the compiler/linker processes assembly files. What if you try to put a C function in the TCM, but use an asm() block inside?
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla
- « Anterior
-
- 1
- 2
- Siguiente »