Sign in

username:

password:



Not a member?

Search c6x



Search tips

Subscribe to c6x



c6x by Keywords

AD535 | BIOS | Booting | Bootloader | C621 | C6211 | C6415 | C671 | C6711 | C6711DSK | C6713 | CCS | Chassaing | COFF | DAT | DM64 | DM642 | DMA | DSK671 | DSK6711 | EDM | EDMA | EMIF | Emulator | EVM | EVM620 | FFT | FIR | GPIO | Halting | HPI | HWI | IDK | JTAG | LDB | LDH | LDW | Linker | LMS | LOG_printf | Matlab | McBSP | MEM_alloc | MIPS | PCI | PCM3003 | Pipeline | Profiling | QDM | Reset | ROM | RTDX | Sampling | SDRAM | Stack | TEB | THS1206 | TMS320C621 | TMS320C6416 | TMS320C6711 | TMS320C6713 | UART | Vector Table | XBUS | XDS560


Discussion Groups

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | TMS320C6x | Sharing Header fiels in C and assembly.

Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).

  

Post a new Thread

Sharing Header fiels in C and assembly. - mohammed samdani - Nov 25 15:01:00 2002


i have tried to implement the figure 1 in the
spra205 pdf which is attached.
*************************************************
cl30 -dASMDEFS -k defs.h
#define PI 3.14
#define E 2.72
#ifdef ASMDEFS /*IF DEFINED, CREATE .asg DIRECTIVES*/
#define ASM_ASG(sym) asm(“\t.asg\t” VAL(sym) “,”
#sym)
#define VAL(sym) #sym
ASM_ASG(PI);
ASM_ASG(E);
#endif /*ASMDEFS*/

figure1
*********************************************

but i was not able to access the defs.asm file

can u help me in acessing the defs.asm file

thanks,


Attachment (not stored)
using same include file for 'c' and assembly.pdf
Type: application/pdf


______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )

RE: Sharing Header fiels in C and assembly. - William Zimmerman - Nov 25 17:56:00 2002

What do you mean by not being able to access the file? Does it exist?
Do you get an error?

Bill

> -----Original Message-----
> From: mohammed samdani [mailto:]
> Sent: Monday, November 25, 2002 10:02 AM
> To:
> Subject: [c6x] Sharing Header fiels in C and assembly. >
> i have tried to implement the figure 1 in the
> spra205 pdf which is attached.
> *************************************************
> cl30 -dASMDEFS -k defs.h
> #define PI 3.14
> #define E 2.72
> #ifdef ASMDEFS /*IF DEFINED, CREATE .asg DIRECTIVES*/
> #define ASM_ASG(sym) asm("\t.asg\t" VAL(sym) ","
> #sym)
> #define VAL(sym) #sym
> ASM_ASG(PI);
> ASM_ASG(E);
> #endif /*ASMDEFS*/
>
> figure1
> *********************************************
>
> but i was not able to access the defs.asm file
>
> can u help me in acessing the defs.asm file
>
> thanks,
>
> _____________________________________



______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )

RE: Sharing Header fiels in C and assembly. - mohammed samdani - Nov 26 6:55:00 2002


i have tried to implement the figure 1 in the
spra205 pdf which is attached.
according to the pdf the .asm file should be
generated
auotomatically.

even after i run the program i am the .asm file is
not generated, please just go through the pdf which is
attached along with theis mail.

*************************************************
cl30 -dASMDEFS -k defs.h
#define PI 3.14
#define E 2.72
#ifdef ASMDEFS /*IF DEFINED, CREATE .asg
DIRECTIVES*/
#define ASM_ASG(sym) asm("\t.asg\t" VAL(sym) ","
#sym)
#define VAL(sym) #sym
ASM_ASG(PI);
ASM_ASG(E);
#endif /*ASMDEFS*/

figure1
*********************************************

but i was not able to access the defs.asm file

can u help me in acessing the defs.asm file

thanks,

_____________________________________

--- William Zimmerman <> wrote: >
What do you mean by not being able to access the
> file? Does it exist?
> Do you get an error?
>
> Bill
>


Attachment (not stored)
using same include file for 'c' and assembly.pdf
Type: application/pdf

______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )

I have a problem in executing few instructions[LDW,LDH,MVK] in linear assembly. - mohammed samdani - Dec 5 7:59:00 2002

hi,

I am working on TI 6701 processor
this project is getting complied and getting loaded
but, the ldw and ldh(LDW or LDH) instruction in linear
assembly file is not getting executed and i dont no
why ,can u provide me a solution.

i have enclosed my project for u kind perusal.

Note 1: the stw and sth(STW & STH) instructions are
getting executed
Note 2: some time even the mvk instruction will not
get executed.

can u suggest me a solution.
I have enclosed my project for

Thanks
mos

Note the all are in different file in a single
project.
-----------------------------------------------------
Note: this is my def.h file

typedef int Word32 ;
typedef short Word16 ;
-----------------------------
Note: this is my test2.h file

#define LpcOrder 10 typedef struct {

Word16 HpfZdl ;
Word32 HpfPdl ;

Word16 SinDet ;

Word16 PrevLsp[LpcOrder] ;

} CODSTATDEF ; #define Frame 240

----------------------------------------------------
Note: This is my testvariable.h file

extern CODSTATDEF CodStat;

----------------------------------------------------
Note: This is my C main file Where i am calling my
Linear assembly

#include<stdio.h>
#include "def.h"
#include "test2.h"
#include "testvariable.h"

branch();
void main()
{
CodStat.HpfZdl=0x33;
printf("CodStat.HpfZd1=%hd \n", CodStat.HpfZdl);
printf("the frame= %d\n", Frame);
branch();

printf("CodStat.HpfZd1=%hd \n", CodStat.HpfZdl);

}
------------------------------------------------------
Note: This is my Linear assembly file .global _branch
.global _CodStat
.global $bss
.text _branch:
.cproc

.reg sum0,sum1,sum2,sum3,sum
.reg aa,bb,cc

mvk 30,sum
mvk 240,sum1

zero sum
zero sum1

sth sum,*+b14(_CodStat)
mvk 0x700,sum1
stw sum1,*+b14(_CodStat+4)
LDH *+b14(_CodStat),a5
LDW *+b14(_CodStat+4),a6 .return
.endproc
-----------------------------------------------------

________________________________________________________________________
Missed your favourite TV serial last night? Try the new, Yahoo! TV.
visit http://in.tv.yahoo.com







(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )

RE: I have a problem in executing few instructions[LDW,LDH,MVK] in linear assembly. - pablo fraile - Dec 5 14:22:00 2002

Have you checked that the source of the loads is not pointing to program
memory? Once I had the same problem, and that was the reason. Hope this
helps

-----Mensaje original-----
De: mohammed samdani [mailto:]
Enviado el: jueves 5 de diciembre de 2002 9:00
Para: William Zimmerman;
Asunto: [c6x] I have a problem in executing few
instructions[LDW,LDH,MVK] in linear assembly. hi,

I am working on TI 6701 processor
this project is getting complied and getting loaded
but, the ldw and ldh(LDW or LDH) instruction in linear
assembly file is not getting executed and i dont no
why ,can u provide me a solution.

i have enclosed my project for u kind perusal.

Note 1: the stw and sth(STW & STH) instructions are
getting executed
Note 2: some time even the mvk instruction will not
get executed.

can u suggest me a solution.
I have enclosed my project for

Thanks
mos

Note the all are in different file in a single
project.
-----------------------------------------------------
Note: this is my def.h file

typedef int Word32 ;
typedef short Word16 ;
-----------------------------
Note: this is my test2.h file

#define LpcOrder 10 typedef struct {

Word16 HpfZdl ;
Word32 HpfPdl ;

Word16 SinDet ;

Word16 PrevLsp[LpcOrder] ;

} CODSTATDEF ; #define Frame 240

----------------------------------------------------
Note: This is my testvariable.h file

extern CODSTATDEF CodStat;

----------------------------------------------------
Note: This is my C main file Where i am calling my
Linear assembly

#include<stdio.h>
#include "def.h"
#include "test2.h"
#include "testvariable.h"

branch();
void main()
{
CodStat.HpfZdl=0x33;
printf("CodStat.HpfZd1=%hd \n", CodStat.HpfZdl);
printf("the frame= %d\n", Frame);
branch();

printf("CodStat.HpfZd1=%hd \n", CodStat.HpfZdl);

}
------------------------------------------------------
Note: This is my Linear assembly file .global _branch
.global _CodStat
.global $bss
.text _branch:
.cproc

.reg sum0,sum1,sum2,sum3,sum
.reg aa,bb,cc

mvk 30,sum
mvk 240,sum1

zero sum
zero sum1

sth sum,*+b14(_CodStat)
mvk 0x700,sum1
stw sum1,*+b14(_CodStat+4)
LDH *+b14(_CodStat),a5
LDW *+b14(_CodStat+4),a6 .return
.endproc
-----------------------------------------------------

________________________________________________________________________
Missed your favourite TV serial last night? Try the new, Yahoo! TV.
visit http://in.tv.yahoo.com _____________________________________


______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )