Hello,
I'm still working on my diploma thesis with uC/OS and the Micrium TCP/IP Stack. I'm working with the Ml403 Xilinx Board and with the Microblaze. I use the Xilinx EDK and the RTOS is working fine and the Stack too. I posted my problem in several forums. It's not really a problem with the RTOS or the Stack.
I want to show you the last mail I send to Xilinx:
It takes still 17 us to post the semaphore. Now I have got some questions:
I load all variables in the BRAM: .rodata,.sdata,.data
First I did an arithmetic operation in my ISR (only a test):
PCM_mWriteDEBUG(PCM0_BASEADDR, 0x01); (Chipscope)
ccx= 50+bb*100/20+cc; (alles globale Variablen)
PCM_mWriteDEBUG(PCM0_BASEADDR, 0x00);
My first question: When I set the optimization level to one or above, the operation will be deleted. Why?
Link to the pictures:
Here is a picture when I trigger the first time the ISR is entered: (1)
It takes around 8 cycles for the first 4 Instructions, that seems correct.
Here is a picture when I trigger again: (2)
For the same Instructions it takes now ca. 10 times longer, the access to the BRAM too.
And now the same thing with the semaphore:
The first run takes ca. 1us and later ca. 17 us.
PCM_mWriteDEBUG(PCM0_BASEADDR, 0x01);
os_err = OSSemPost(PCM_Signal);
PCM_mWriteDEBUG(PCM0_BASEADDR, 0x00);
(3)
28002cdc: b0002803 imm 10243 28002ce0: e8a0f564 lwi r5, r0, -2716 // 2803f564 28002ce4: b0000003 imm 3 28002ce8: b9f4c494 brlid r15, -15212 // 2803f17c 28002cec: 80000000 or r0, r0, r0(4)
2803f1d0: f873001c swi r3, r19, 28 2803f1d4: e873003c lwi r3, r19, 60 2803f1d8: e063000a lbui r3, r3, 10 2803f1dc: bc030044 beqi r3, 68 2803f1e0: e8b3003c lwi r5, r19, 60 2803f220: e873003c lwi r3, r19, 60The timings when I trigger again:
(5)
I tried to load some Files to the BRAM and I did the following:
.text : { __text_start = .;
- (EXCLUDE_FILE(C:/DiplomEDK/Final/PCMLAN/microblaze_0/libsrc/uCOS-II_v2_81_a/src\ /os_sem.o).text)
- (.text)
- (.text.*)
- (.gnu.linkonce.t*)
__text_end = .; } > DDR_SDRAM_64Mx32_C_MEM0_BASEADDR
.bram_text : { __bram_text_start = .;
C:/DiplomEDK/Final/PCMLAN/microblaze_0/libsrc/uCOS-II_v2_81_a/src/os_sem.o(.text\ )
__bram_text_end = .; } > ilmb_cntlr_dlmb_cntlr
The file will not be found without the path.
The functions are still located in the DDR-RAM.
I can't write down everything I tried in the last weeks but I tried several solutions and nothing works. May be somebody had the same problem and can help me.
In my opinion it is not a problem with the RTOS or the stack. When the Microblaze need over 20 cycles for a simple add instruction it's more a problem with the EDK,Hardware... . Am I right? My tasks run correct and I can send and receive data over LAN.
So I hope somebody can help me.
Cu Emp