Hello All,
I am using TMS320C6713 and CCS 3.3. I want to load higher and lower bits into a
register. My code is given here under:
#####################################################
.data
.def _main
.text
_main
MVKL .S1 0x0041,A4
MVKH .S1 0x2541,A4
IDLE
.end
####################################################
after execution of the code when I go to see the content of core register A4 it
shows only lower bits. why it does not show higher bits. A4 register shows only
"0x00000041"
can anybody please help me.
Thanx in advance
Vijay
_____________________________________
Higher bits does not show in register
Started by ●September 4, 2009
Reply by ●September 4, 20092009-09-04
Vijay,
On Fri, Sep 4, 2009 at 2:43 AM, vijay7000 wrote:
> Hello All,
>
> I am using TMS320C6713 and CCS 3.3. I want to load higher and lower bits
> into a register. My code is given here under:
> #####################################################
> .data
> .def _main
> .text
> _main
> MVKL .S1 0x0041,A4
> MVKH .S1 0x2541,A4
Use 1 32 bit constant for both instructions.
MVKL .S1 0x25410041,A4
MVKH .S1 0x25410041,A4
mikedunn
>
> IDLE
> .end
> ####################################################
> after execution of the code when I go to see the content of core register A4
> it shows only lower bits. why it does not show higher bits. A4 register
> shows only "0x00000041"
> can anybody please help me.
>
> Thanx in advance
>
> Vijay
--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
_____________________________________
On Fri, Sep 4, 2009 at 2:43 AM, vijay7000 wrote:
> Hello All,
>
> I am using TMS320C6713 and CCS 3.3. I want to load higher and lower bits
> into a register. My code is given here under:
> #####################################################
> .data
> .def _main
> .text
> _main
> MVKL .S1 0x0041,A4
> MVKH .S1 0x2541,A4
Use 1 32 bit constant for both instructions.
MVKL .S1 0x25410041,A4
MVKH .S1 0x25410041,A4
mikedunn
>
> IDLE
> .end
> ####################################################
> after execution of the code when I go to see the content of core register A4
> it shows only lower bits. why it does not show higher bits. A4 register
> shows only "0x00000041"
> can anybody please help me.
>
> Thanx in advance
>
> Vijay
--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
_____________________________________
Reply by ●September 4, 20092009-09-04
vijay,
here is what the ti manual says about the MVKH instruction
For the MVKH instruction:
if (cond)((cst31..16) << 16) or (dst15..0) → dst
else nop
(admittedly, I don't quite understand the "(cond)")
however, in your example, it seems the (cond) is evaluating to false.
R. Williams
---------- Original Message -----------
From: "vijay7000"
To: c...
Sent: Fri, 04 Sep 2009 07:43:47 -0000
Subject: [c6x] Higher bits does not show in register
>
>
> Hello All,
>
> I am using TMS320C6713 and CCS 3.3. I want to load higher and lower bits into a register. My code is given here under:
> #####################################################
> .data
> .def _main
> .text
> _main
> MVKL .S1 0x0041,A4
> MVKH .S1 0x2541,A4
>
> IDLE
> .end
> ####################################################
> after execution of the code when I go to see the content of core register A4 it shows only lower bits. why it does not show higher bits. A4 register shows only "0x00000041"
> can anybody please help me.
>
> Thanx in advance
>
> Vijay
------- End of Original Message -------
here is what the ti manual says about the MVKH instruction
For the MVKH instruction:
if (cond)((cst31..16) << 16) or (dst15..0) → dst
else nop
(admittedly, I don't quite understand the "(cond)")
however, in your example, it seems the (cond) is evaluating to false.
R. Williams
---------- Original Message -----------
From: "vijay7000"
To: c...
Sent: Fri, 04 Sep 2009 07:43:47 -0000
Subject: [c6x] Higher bits does not show in register
>
>
> Hello All,
>
> I am using TMS320C6713 and CCS 3.3. I want to load higher and lower bits into a register. My code is given here under:
> #####################################################
> .data
> .def _main
> .text
> _main
> MVKL .S1 0x0041,A4
> MVKH .S1 0x2541,A4
>
> IDLE
> .end
> ####################################################
> after execution of the code when I go to see the content of core register A4 it shows only lower bits. why it does not show higher bits. A4 register shows only "0x00000041"
> can anybody please help me.
>
> Thanx in advance
>
> Vijay
------- End of Original Message -------
Reply by ●September 4, 20092009-09-04
Richard and Vijay,
On Fri, Sep 4, 2009 at 10:27 AM, Richard Williams
wrote:
>
> vijay,
>
> here is what the ti manual says about the MVKH instruction
> For the MVKH instruction:
> if (cond)((cst31..16) << 16) or (dst15..0) → dst
> else nop
Some tutorial info.
On most processors with simple instruction sets you can go to the
'instruction description' page in the manual and figure it out. C6000
devices require you to look at multiple pages [if you are starting at
'ground zero'].
1. All original C6000 instructions [not c64+] are conditional [see
conditional operations section for 'decoder ring'].
2. The details for a machine instruction and assembly instruction are
different [there are a few 'mirrors' at the assembly level to help
you].
3. "if (cond)((cst31..16) << 16) or (dst15..0) → dst" is a description
of the machine instruction. As far as I know, the only use for this
is to manually disassemble 32 bits.
4. Although the machine instruction only deals with and 'cares about'
16 bits, the writers of the assembler decided that the major use of
MVKL/MVKH would be to load a 32 bit value. In some cases the value
could be a symbol - to simplify user programming, the assembler uses a
32 bit value following MVKL/MVKH.
The asm code
MVKL .S1 0x12345678, A4 ;loads 5678 into A4 bits 0-15
MVKH .S1 0x12345678, A4 ;loads 1234 into A4 bits 16-31
The code from the original question, rewritten with no functionality changes:
MVKL .S1 0x00000041,A4 ;loads 0041 into A4 bits 0-15
MVKH .S1 0x00002541,A4 ;loads 0000 into A4 bits 16-31
mikedunn
>
> (admittedly, I don't quite understand the "(cond)")
> however, in your example, it seems the (cond) is evaluating to false.
>
> R. Williams
>
> ---------- Original Message -----------
> From: "vijay7000"
> To: c...
> Sent: Fri, 04 Sep 2009 07:43:47 -0000
> Subject: [c6x] Higher bits does not show in register
>
> >
> >
> > Hello All,
> >
> > I am using TMS320C6713 and CCS 3.3. I want to load higher and lower bits into a register. My code is given here under:
> > #####################################################
> > .data
> > .def _main
> > .text
> > _main
> > MVKL .S1 0x0041,A4
> > MVKH .S1 0x2541,A4
> >
> > IDLE
> > .end
> > ####################################################
> > after execution of the code when I go to see the content of core register A4 it shows only lower bits. why it does not show higher bits. A4 register shows only "0x00000041"
> > can anybody please help me.
> >
> > Thanx in advance
> >
> > Vijay
> >
> >
> ------- End of Original Message -------
>
>
--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
_____________________________________
On Fri, Sep 4, 2009 at 10:27 AM, Richard Williams
wrote:
>
> vijay,
>
> here is what the ti manual says about the MVKH instruction
> For the MVKH instruction:
> if (cond)((cst31..16) << 16) or (dst15..0) → dst
> else nop
Some tutorial info.
On most processors with simple instruction sets you can go to the
'instruction description' page in the manual and figure it out. C6000
devices require you to look at multiple pages [if you are starting at
'ground zero'].
1. All original C6000 instructions [not c64+] are conditional [see
conditional operations section for 'decoder ring'].
2. The details for a machine instruction and assembly instruction are
different [there are a few 'mirrors' at the assembly level to help
you].
3. "if (cond)((cst31..16) << 16) or (dst15..0) → dst" is a description
of the machine instruction. As far as I know, the only use for this
is to manually disassemble 32 bits.
4. Although the machine instruction only deals with and 'cares about'
16 bits, the writers of the assembler decided that the major use of
MVKL/MVKH would be to load a 32 bit value. In some cases the value
could be a symbol - to simplify user programming, the assembler uses a
32 bit value following MVKL/MVKH.
The asm code
MVKL .S1 0x12345678, A4 ;loads 5678 into A4 bits 0-15
MVKH .S1 0x12345678, A4 ;loads 1234 into A4 bits 16-31
The code from the original question, rewritten with no functionality changes:
MVKL .S1 0x00000041,A4 ;loads 0041 into A4 bits 0-15
MVKH .S1 0x00002541,A4 ;loads 0000 into A4 bits 16-31
mikedunn
>
> (admittedly, I don't quite understand the "(cond)")
> however, in your example, it seems the (cond) is evaluating to false.
>
> R. Williams
>
> ---------- Original Message -----------
> From: "vijay7000"
> To: c...
> Sent: Fri, 04 Sep 2009 07:43:47 -0000
> Subject: [c6x] Higher bits does not show in register
>
> >
> >
> > Hello All,
> >
> > I am using TMS320C6713 and CCS 3.3. I want to load higher and lower bits into a register. My code is given here under:
> > #####################################################
> > .data
> > .def _main
> > .text
> > _main
> > MVKL .S1 0x0041,A4
> > MVKH .S1 0x2541,A4
> >
> > IDLE
> > .end
> > ####################################################
> > after execution of the code when I go to see the content of core register A4 it shows only lower bits. why it does not show higher bits. A4 register shows only "0x00000041"
> > can anybody please help me.
> >
> > Thanx in advance
> >
> > Vijay
> >
> >
> ------- End of Original Message -------
>
>
--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
_____________________________________
Reply by ●September 4, 20092009-09-04
Many thanks Michael,
now its working. Its also working with 16-bit constant using "MVKLH" instruction.
Thanks once again,
Regards:
Vijay
--- On Fri, 9/4/09, Michael Dunn wrote:
From: Michael Dunn
Subject: Re: [c6x] Higher bits does not show in register
To: "vijay7000"
Cc: c...
Date: Friday, September 4, 2009, 6:15 AM
Vijay,
On Fri, Sep 4, 2009 at 2:43 AM, vijay7000 wrote:
> Hello All,
>
> I am using TMS320C6713 and CCS 3.3. I want to load higher and lower bits
> into a register. My code is given here under:
> #####################################################
> .data
> .def _main
> .text
> _main
> MVKL .S1 0x0041,A4
> MVKH .S1 0x2541,A4
Use 1 32 bit constant for both instructions.
MVKL .S1 0x25410041,A4
MVKH .S1 0x25410041,A4
mikedunn
>
> IDLE
> .end
> ####################################################
> after execution of the code when I go to see the content of core register A4
> it shows only lower bits. why it does not show higher bits. A4 register
> shows only "0x00000041"
> can anybody please help me.
>
> Thanx in advance
>
> Vijay
--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
now its working. Its also working with 16-bit constant using "MVKLH" instruction.
Thanks once again,
Regards:
Vijay
--- On Fri, 9/4/09, Michael Dunn wrote:
From: Michael Dunn
Subject: Re: [c6x] Higher bits does not show in register
To: "vijay7000"
Cc: c...
Date: Friday, September 4, 2009, 6:15 AM
Vijay,
On Fri, Sep 4, 2009 at 2:43 AM, vijay7000 wrote:
> Hello All,
>
> I am using TMS320C6713 and CCS 3.3. I want to load higher and lower bits
> into a register. My code is given here under:
> #####################################################
> .data
> .def _main
> .text
> _main
> MVKL .S1 0x0041,A4
> MVKH .S1 0x2541,A4
Use 1 32 bit constant for both instructions.
MVKL .S1 0x25410041,A4
MVKH .S1 0x25410041,A4
mikedunn
>
> IDLE
> .end
> ####################################################
> after execution of the code when I go to see the content of core register A4
> it shows only lower bits. why it does not show higher bits. A4 register
> shows only "0x00000041"
> can anybody please help me.
>
> Thanx in advance
>
> Vijay
--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
Reply by ●September 4, 20092009-09-04
MLD,
YOur right, I made the silly mistake of thinking in 16 bit values for the constant rather than 32 bit values.
Thanks for clearing that up.
R. Williams
---------- Original Message -----------
From: Michael Dunn
To: Richard Williams
Cc: vijay7000 , c...
Sent: Fri, 4 Sep 2009 13:47:02 -0500
Subject: Re: [c6x] Higher bits does not show in register
>
>
> Richard and Vijay,
>
> On Fri, Sep 4, 2009 at 10:27 AM, Richard Williams
> wrote:
> >
> >
> >
> > vijay,
> >
> > here is what the ti manual says about the MVKH instruction
> > For the MVKH instruction:
> > if (cond)((cst31..16) << 16) or (dst15..0) [UTF-8?]→ dst
> > else nop
>
>
> Some tutorial info.
>
> On most processors with simple instruction sets you can go to the
> 'instruction description' page in the manual and figure it out. C6000
> devices require you to look at multiple pages [if you are starting at
> 'ground zero'].
> 1. All original C6000 instructions [not c64+] are conditional [see
> conditional operations section for 'decoder ring'].
> 2. The details for a machine instruction and assembly instruction are
> different [there are a few 'mirrors' at the assembly level to help
> you].
> 3. "if (cond)((cst31..16) << 16) or (dst15..0) [UTF-8?]→ dst" is a description
> of the machine instruction. As far as I know, the only use for this
> is to manually disassemble 32 bits.
> 4. Although the machine instruction only deals with and 'cares about'
> 16 bits, the writers of the assembler decided that the major use of
> MVKL/MVKH would be to load a 32 bit value. In some cases the value
> could be a symbol - to simplify user programming, the assembler uses a
> 32 bit value following MVKL/MVKH.
> The asm code
> MVKL .S1 0x12345678, A4 ;loads 5678 into A4 bits 0-15
> MVKH .S1 0x12345678, A4 ;loads 1234 into A4 bits 16-31
>
> The code from the original question, rewritten with no functionality changes:
> MVKL .S1 0x00000041,A4 ;loads 0041 into A4 bits 0-15
> MVKH .S1 0x00002541,A4 ;loads 0000 into A4 bits 16-31
>
> mikedunn
>
> >
> > (admittedly, I don't quite understand the "(cond)")
> > however, in your example, it seems the (cond) is evaluating to false.
> >
> > R. Williams
> >
> >
> >
> > ---------- Original Message -----------
> > From: "vijay7000"
> > To: c...
> > Sent: Fri, 04 Sep 2009 07:43:47 -0000
> > Subject: [c6x] Higher bits does not show in register
> >
> > >
> > >
> > > Hello All,
> > >
> > > I am using TMS320C6713 and CCS 3.3. I want to load higher and lower bits into a register. My code is given here under:
> > > #####################################################
> > > .data
> > > .def _main
> > > .text
> > > _main
> > > MVKL .S1 0x0041,A4
> > > MVKH .S1 0x2541,A4
> > >
> > > IDLE
> > > .end
> > > ####################################################
> > > after execution of the code when I go to see the content of core register A4 it shows only lower bits. why it does not show higher bits. A4 register shows only "0x00000041"
> > > can anybody please help me.
> > >
> > > Thanx in advance
> > >
> > > Vijay
> > >
> > >
> > ------- End of Original Message -------
> >
> > --
> www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
------- End of Original Message -------
YOur right, I made the silly mistake of thinking in 16 bit values for the constant rather than 32 bit values.
Thanks for clearing that up.
R. Williams
---------- Original Message -----------
From: Michael Dunn
To: Richard Williams
Cc: vijay7000 , c...
Sent: Fri, 4 Sep 2009 13:47:02 -0500
Subject: Re: [c6x] Higher bits does not show in register
>
>
> Richard and Vijay,
>
> On Fri, Sep 4, 2009 at 10:27 AM, Richard Williams
> wrote:
> >
> >
> >
> > vijay,
> >
> > here is what the ti manual says about the MVKH instruction
> > For the MVKH instruction:
> > if (cond)((cst31..16) << 16) or (dst15..0) [UTF-8?]→ dst
> > else nop
>
>
> Some tutorial info.
>
> On most processors with simple instruction sets you can go to the
> 'instruction description' page in the manual and figure it out. C6000
> devices require you to look at multiple pages [if you are starting at
> 'ground zero'].
> 1. All original C6000 instructions [not c64+] are conditional [see
> conditional operations section for 'decoder ring'].
> 2. The details for a machine instruction and assembly instruction are
> different [there are a few 'mirrors' at the assembly level to help
> you].
> 3. "if (cond)((cst31..16) << 16) or (dst15..0) [UTF-8?]→ dst" is a description
> of the machine instruction. As far as I know, the only use for this
> is to manually disassemble 32 bits.
> 4. Although the machine instruction only deals with and 'cares about'
> 16 bits, the writers of the assembler decided that the major use of
> MVKL/MVKH would be to load a 32 bit value. In some cases the value
> could be a symbol - to simplify user programming, the assembler uses a
> 32 bit value following MVKL/MVKH.
> The asm code
> MVKL .S1 0x12345678, A4 ;loads 5678 into A4 bits 0-15
> MVKH .S1 0x12345678, A4 ;loads 1234 into A4 bits 16-31
>
> The code from the original question, rewritten with no functionality changes:
> MVKL .S1 0x00000041,A4 ;loads 0041 into A4 bits 0-15
> MVKH .S1 0x00002541,A4 ;loads 0000 into A4 bits 16-31
>
> mikedunn
>
> >
> > (admittedly, I don't quite understand the "(cond)")
> > however, in your example, it seems the (cond) is evaluating to false.
> >
> > R. Williams
> >
> >
> >
> > ---------- Original Message -----------
> > From: "vijay7000"
> > To: c...
> > Sent: Fri, 04 Sep 2009 07:43:47 -0000
> > Subject: [c6x] Higher bits does not show in register
> >
> > >
> > >
> > > Hello All,
> > >
> > > I am using TMS320C6713 and CCS 3.3. I want to load higher and lower bits into a register. My code is given here under:
> > > #####################################################
> > > .data
> > > .def _main
> > > .text
> > > _main
> > > MVKL .S1 0x0041,A4
> > > MVKH .S1 0x2541,A4
> > >
> > > IDLE
> > > .end
> > > ####################################################
> > > after execution of the code when I go to see the content of core register A4 it shows only lower bits. why it does not show higher bits. A4 register shows only "0x00000041"
> > > can anybody please help me.
> > >
> > > Thanx in advance
> > >
> > > Vijay
> > >
> > >
> > ------- End of Original Message -------
> >
> > --
> www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
------- End of Original Message -------