DSPRelated.com
Forums

Re: request u provide me a solution in my linear assembly.

Started by Jeff Brower December 5, 2002
Mohammed Samdani-

Just a quick glance, so I might be off-base:

-how do you know a5 and a6 are not loaded?
what/where debug are you looking at?

-try 4*nop after mvk 0x700,sum1, to
make sure stw is not in pipeline

-initialize CodStat.HpfPdl also, prior to
branch() call -- make sure you're really
seeing what you think

-to verify: are you sure b14 has base
address for .bss section? you might want
to double-check

Jeff Brower
DSP sw/hw engineer
Signalogic

> jeff 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.
>
> Note 1: the stw and sth instructions are getting
> executed
> Note 2: some time even the mvk instruction will not
> get executed.
>
> ----------------------------
> 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




hi, thanks

nop are not required in linear assembly, but still i
tried giving nops it did not work

i also initialized the CodStat.HpfPdl, yes and b14 has
the address of bss. but i was not geting the results
--- Jeff Brower <> wrote: >
Mohammed Samdani-
>
> Just a quick glance, so I might be off-base:
>
> -how do you know a5 and a6 are not loaded?
> what/where debug are you looking at?
>
> -try 4*nop after mvk 0x700,sum1, to
> make sure stw is not in pipeline
>
> -initialize CodStat.HpfPdl also, prior to
> branch() call -- make sure you're really
> seeing what you think
>
> -to verify: are you sure b14 has base
> address for .bss section? you might want
> to double-check
>
> Jeff Brower
> DSP sw/hw engineer
> Signalogic
>
> > jeff 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.
> >
> > Note 1: the stw and sth instructions are getting
> > executed
> > Note 2: some time even the mvk instruction will
> not
> > get executed.
> >
> > ----------------------------
> > 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
>
> _____________________________________
> Note: If you do a simple "reply" with your email
> client, only the author of this message will receive
> your answer. You need to do a "reply all" if you
> want your answer to be distributed to the entire
> group.
>
> _____________________________________
> About this discussion group:
>
> To Join: Send an email to > To Post: Send an email to
>
> To Leave: Send an email to > Archives: http://www.yahoogroups.com/group/c6x
>
> Other Groups: http://www.dsprelated.com > ">http://docs.yahoo.com/info/terms/

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


hi,

I think it should be:
sth sum,*+b14(_CodStat)
mvk 0x700,sum1
stw sum1,*+b14(_CodStat+2)
LDH *+b14(_CodStat),a5
LDW *+b14(_CodStat+2),a6
Thus you get a5 = sum; a6 = sum1; i.e., HpfZdl = sum and HpfPdl = sum1; does
this you want?

With your code: HpfZd1 = sum; HpfPd1 = sum1 << 16;

Wang Tao
ShangHai Orda Co.

----- Original Message -----
From: mohammed samdani <>
Date: Thu, 5 Dec 2002 13:55:51 +0000 (GMT)
To: Jeff Brower <>
Subject: Re: [c6x] Re: request u provide me a solution in my linear assembly. Re: hi, thanks
Re:
Re: nop are not required in linear assembly, but still i
Re: tried giving nops it did not work
Re:
Re: i also initialized the CodStat.HpfPdl, yes and b14 has
Re: the address of bss. but i was not geting the results
Re: --- Jeff Brower <> wrote: >
Re: Mohammed Samdani-
Re: >
Re: > Just a quick glance, so I might be off-base:
Re: >
Re: > -how do you know a5 and a6 are not loaded?
Re: > what/where debug are you looking at?
Re: >
Re: > -try 4*nop after mvk 0x700,sum1, to
Re: > make sure stw is not in pipeline
Re: >
Re: > -initialize CodStat.HpfPdl also, prior to
Re: > branch() call -- make sure you're really
Re: > seeing what you think
Re: >
Re: > -to verify: are you sure b14 has base
Re: > address for .bss section? you might want
Re: > to double-check
Re: >
Re: > Jeff Brower
Re: > DSP sw/hw engineer
Re: > Signalogic
Re: >
Re: > > jeff i am working on TI 6701 processor
Re: > > this project is getting complied and getting
Re: > loaded
Re: > > but, the ldw and ldh(LDW or LDH) instruction in
Re: > linear
Re: > > assembly file is not getting executed and i dont
Re: > no
Re: > > why can u provide me a solution.
Re: > >
Re: > > Note 1: the stw and sth instructions are getting
Re: > > executed
Re: > > Note 2: some time even the mvk instruction will
Re: > not
Re: > > get executed.
Re: > >
Re: > > ----------------------------
Re: > > Note: this is my def.h file
Re: > >
Re: > > typedef int Word32 ;
Re: > > typedef short Word16 ;
Re: > > -----------------------------
Re: > > Note: this is my test2.h file
Re: > >
Re: > > #define LpcOrder 10
Re: > >
Re: > >
Re: > > typedef struct {
Re: > >
Re: > > Word16 HpfZdl ;
Re: > > Word32 HpfPdl ;
Re: > >
Re: > > Word16 SinDet ;
Re: > >
Re: > > Word16 PrevLsp[LpcOrder] ;
Re: > >
Re: > > } CODSTATDEF ;
Re: > >
Re: > > #define Frame 240
Re: > >
Re: > >
Re: > ----------------
Re: > > Note: This is my testvariable.h file
Re: > >
Re: > > extern CODSTATDEF CodStat;
Re: > >
Re: > >
Re: > ----------------
Re: > > Note: This is my C main file Where i am calling my
Re: > > Linear assembly
Re: > >
Re: > > #include<stdio.h>
Re: > > #include "def.h"
Re: > > #include "test2.h"
Re: > > #include "testvariable.h"
Re: > >
Re: > > branch();
Re: > > void main()
Re: > > {
Re: > > CodStat.HpfZdl=0x33;
Re: > > printf("CodStat.HpfZd1=%hd \n", CodStat.HpfZdl);
Re: > > printf("the frame= %d\n", Frame);
Re: > > branch();
Re: > >
Re: > > printf("CodStat.HpfZd1=%hd \n", CodStat.HpfZdl);
Re: > >
Re: > > }
Re: > >
Re: >
Re: ------------------
Re: > > Note: This is my Linear assembly file
Re: > >
Re: > > .global _branch
Re: > > .global _CodStat
Re: > > .global $bss
Re: > > .text
Re: > >
Re: > > _branch:
Re: > > .cproc
Re: > >
Re: > > .reg sum0,sum1,sum2,sum3,sum
Re: > > .reg aa,bb,cc
Re: > >
Re: > > mvk 30,sum
Re: > > mvk 240,sum1
Re: > >
Re: > > zero sum
Re: > > zero sum1
Re: > >
Re: > > sth sum,*+b14(_CodStat)
Re: > > mvk 0x700,sum1
Re: > > stw sum1,*+b14(_CodStat+4)
Re: > > LDH *+b14(_CodStat),a5
Re: > > LDW *+b14(_CodStat+4),a6
Re: > >
Re: > >
Re: > > .return
Re: > > .endproc
Re: >
Re: > _____________________________________
Re: > Note: If you do a simple "reply" with your email
Re: > client, only the author of this message will receive
Re: > your answer. You need to do a "reply all" if you
Re: > want your answer to be distributed to the entire
Re: > group.
Re: >
Re: > _____________________________________
Re: > About this discussion group:
Re: >
Re: > To Join: Send an email to
Re: >
Re: >
Re: > To Post: Send an email to
Re: >
Re: > To Leave: Send an email to
Re: >
Re: >
Re: > Archives: http://www.yahoogroups.com/group/c6x
Re: >
Re: > Other Groups: http://www.dsprelated.com
Re: >
Re: >
Re: > ">http://docs.yahoo.com/info/terms/
Re: >
Re: >
Re:
Re: ________________________________________________________________________
Re: Missed your favourite TV serial last night? Try the new, Yahoo! TV.
Re: visit http://in.tv.yahoo.com
Re:
Re:
Re: _____________________________________
Re: Note: If you do a simple "reply" with your email client, only the author of
this message will receive your answer. You need to do a "reply all" if you want
your answer to be distributed to the entire group.
Re:
Re: _____________________________________
Re: About this discussion group:
Re:
Re: To Join: Send an email to
Re:
Re: To Post: Send an email to
Re:
Re: To Leave: Send an email to
Re:
Re: Archives: http://www.yahoogroups.com/group/c6x
Re:
Re: Other Groups: http://www.dsprelated.com
Re:
Re:
Re: ">http://docs.yahoo.com/info/terms/
Re:
Re:
Re:

--