This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
in the reference guide for TMS320C66x DSP the instruction RETNOP is not mentioned or described like any other assembly instruction.
this instruction is so important since it s the only instruction used to go out of the current function.
I believe an update shall be made to cover this point.
Best regard
Hi,
RETNOP is available in the software packages.
I could find some assembly code snippet in "i2cparam.asm" in processor SDK 6.3 - http://software-dl.ti.com/processor-sdk-rtos/esd/C665x/latest/index_FDS.html - path after installation : ti\pdk_c665x_2_0_16\packages\ti\boot\ibl\src\util\i2cConfig\i2cparam.asm
.dwcfi restore_reg, 19
.dwcfi cfa_offset, 0
$C$DW$39 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$39, DW_AT_low_pc(0x00)
.dwattr $C$DW$39, DW_AT_TI_return
RETNOP .S2 B3,5 ; |i2cparam.c:130|
; BRANCH OCCURS {B3} ; |i2cparam.c:130|
.dwattr $C$DW$32, DW_AT_TI_end_file("i2cparam.c")
.dwattr $C$DW$32, DW_AT_TI_end_line(0x82)
.dwattr $C$DW$32, DW_AT_TI_end_column(0x01)
.dwendentry
.dwendtag $C$DW$32
.sect ".text"
.clink
.global _onesComplementChksum
----
I could see few more ocurences in the file, "Intvecs.asm".
_INT_SetWaitForInterrupt:
IDLE
RETNOP B3,5
-----
swenr_return:
NOP 5
RETNOP .S2 B3, 5
NOP 4
.endasmfunc
----
Regards
Shankari G
Thank you for your answer.
In the .asm generated code you will find this instruction.
The issue here, it s when you want to write assembly code to test the 8 units you will use the reference guide for TMS320C66x DSP, and there you will not find any indication how to use RETNOP and how much is important to use to go out of the function.
The conclusion here it s to add RETNOP like any other assembly instruction in the reference guide for TMS320C66x DSP and describe how to use it.
For my case I spent one week to figure out how to exit the function since there is no indication in the manual, I found it by looking to the generated assembly code (.asm) and understanding by myself how to use RETNOP. Without this instruction I got a lot of reset.
Thank you.
Best regards,
Sofiene Bk
RETNOP is actually BNOP and it seems to behave identically.
The description of BNOP - assembly instruction is given in the reference guide for TMS320C66x DSP.
Regards
Shankari G
it s not the same:
BNOP .S1 LABEL, 5 : needs a label to branch you to another local function, it s a shortcut of B .S1 LABEL; NOP 5
But RETNOP B3,5 : as u can see it s using B3 to return back to the previous function where the address is saved in B3.
one more difference between BNOP and RETNOP, with BNOP we need to use either .S1 or .S2 unit or NOP however for RETNOP we dont need to use any unit.
Hi,
Yeah, That's true. You are right!.
---
I believe, as of now, atleast, you have some reference to keep moving forward for the RETNOP usage.... with reference to the software, I pointed, above..
-----
If.... in the software packages, it is exisiting and missing in the literature- https://www.ti.com/lit/ug/sprugh7/sprugh7.pdf
let me check, whether anybody filed a literature bug, already.
----
Usually, the document update on reference guide will take a longer time, at it involves more approvals, internally
I will keep you posted on the status of the literature bug, if existing.... else, will get you the description of RETNOP if available.....
----
let me forward this query on "RETNOP - Description on the usage / syntax" to internal team and get back.
Regards
Shankari G
That sounds good
I hope if an update will be written later in the reference guide for TMS320C66x DSP related to this issue, my name will be linked to that finding in the document history update.
Thank you.
HI,
Though we wish to......
I don't think so. This seems to be a longtime, known one.
I could find a ten year old discussion thread internally....
( you may not have access to the below link )
Regards
Shankari G