| Electronic Components Datasheet Search |
|
AN3350 Datasheet(PDF) 181 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3350 Datasheet(HTML) 181 Page - STMicroelectronics |
|
181 / 185 page ![]() AN3350 eTPU specific features Doc ID 018512 Rev 2 181/185 23.11 Fractional types fract8, fract16, and fract24 types represent fractional numbers of the specified size in bits. Unsigned and signed modifiers can be applied to them. Unsigned fract can represent numbers between 0 and 1. Signed fract can represent numbers between -1 and 1. 23.12 Inline assembly The inline assembly statement syntax is: asm{"<assembly instructions>"}; Both multi line and single line assembly instructions may be omitted using this statement. The <assembly instruction> would be according to the new assembly language which shall be defined by DevTech. 23.12.1 Inline assembler usage Use the inline assembler in order to write assembler code that is eTPU specific and cannot be expressed using the C language: asm{" add.f p, p, diob"}; 23.12.2 Specifying variables and labels You may also use local variable names and labels inside inline assembly statements to reference variables of a C function or targets for change of flow directly. In the example below, a local variable name needs a @Rn suffix to be recognized. Do not replace @Rn with an actual register number. It has to be the verbatim text made of the letters @, R, and n: asm{" add x@Rn,p,diob"}; // x is a local variable asm{" jmp label_name"}; asm{" ld p, glob_var"}; // glob_var is a global variable asm{" ldm p, chan_var"}; // chan_var is a variable allocated on the channel parameter ram Finally, you can also declare labels using the inline assembler to, for example, mark the beginning for a special assembly loop or branch target: asm{__mysmstart: jmp __mysmstart}; 23.12.3 Using datatype sizes You might want to reference the size of a structure from the inline assembler: asm {addi x@Rn, x@Rn, myStruct@sizeof}; 23.13 #pragma write #pragma write char, (text); |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |