Does ARMs support bytes?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi.

A question somewhat (or rather) silly: can I manipulate individual bytes
with an ARM processor? (LPC213x to be more specific)

In other words, will the statement:

char buffer[16];

occupy 16 8 bit bytes or 16 32 bit words?


TIA.

Elder.

Re: Does ARMs support bytes?

Quoted text here. Click to load it

Yes.


I don't know for sure, but I'd be shocked if the answer was no.

Quoted text here. Click to load it

The former.

Wouldn't it have been easier to just compile it and see for
yourself?

--
Grant Edwards                   grante             Yow!  I'm a GENIUS! I
                                  at               want to dispute sentence
We've slightly trimmed the long signature. Click to see the full one.
Re: Does ARMs support bytes?
Quoted text here. Click to load it

  There is an issue in ARMS with efficent memory use, I think has
to do with non aligned access, so an array of bytes is OK, but
a RECORD that has mixed size types, may need to have packers.

  Their new cortex claims to be more efficent at RAM usage :)

-jg


Re: Does ARMs support bytes?
Quoted text here. Click to load it

I think you're getting confused about the capability of the core versus the
constraints that the C compiler might choose to impose on structures versus
what happens when you do unaligned loads.

What follows does depend rather on the capabilities of the memory system in
use (eg. you don't always have the luxury of individual byte strobes so it
may not be possible to write a single byte), and the pragmas/compiler
options (eg. you may have asked it to pack structs in order to save RAM at
the expense of larger and slower code).

I'll also apologise in advance about nonsense pseudo 'C'.

For example if you have a structure along the lines
 struct {
  char one;
  long four;
  char array[3];
  short two;
  }

I'd expect that could take 16 bytes when there's only 10 useful bytes (38%
waste) being stored as what would be implied is
 struct {
  char one;
  char padding[3];
  long four;
  char array[3];
  char padding;
  short two;
  short paddingtonextstruct;
  }

The reason for the padding to 16/32 bit boundaries is to make the code
required to access them simpler and faster.

You might instead write, or get the compiler to shuffle to give
 struct {
  char one;
  char array[3];
  long four;
  short two;
  }
which is only 12 bytes (so 17% waste).

If you remove all the packing, then non aligned half and word wide loads
would need to be broken up into a set of LDRB's and ORR's/MOV's.

Anyway, the point being that unless your memory system forbids it, or you
have the "abort when unaligned access happens" turned on LDRB can load from
any address, LDRH can load from any address on 16 bit alignment, LDR/LDM can
load from any address on 32 bit alignment.

There's a little extra fun with LDR where you can have unaligned loads
proceed, but they barrel shift the bytes by 8 times the number that was in
the bottom 2 bits of the address. A little light reading of the ARMARM will
explain in more detail...
Sprow.


Re: Does ARMs support bytes?
Quoted text here. Click to load it

Hi there,

You can do byte transfers in ARM cores.

ARM11 already support unaligned data accesses.
It is a part of the V6 architecture.

The new Cortex cores will provide better code density
and performance from the Thumb-2 instruction set.
For more details see
http://www.arm.com/products/CPUs/ARM_Cortex-M3.html
and
http://www.arm.com/products/CPUs/archi-thumb2.html

regards,
Joseph

This e-mail message is intended for the addressee(s) only
and may contain information that is the property of, and/or
subject to a confidentiality agreement between the intended
recipient(s), their organisation and/or the ARM Group of
Companies. If you are not an intended recipient of this
e-mail message, you should not read, copy, forward or
otherwise distribute or further disclose the information
in it; misuse of the contents of this e-mail message may
violate various laws in your state, country or jurisdiction.
If you have received this e-mail message in error, please
contact the originator of this e-mail message via e-mail
and delete all copies of this message from your computer
or network, thank you.

Re: Does ARMs support bytes?
Quoted text here. Click to load it

  Are there any opcode level details on Cortex yet ? - the
links above are large on 'warm fuzzies' and small on real info..

-jg


Re: Does ARMs support bytes?
Quoted text here. Click to load it

Question is how successful the Cortex cores will be over time.

Should anyone in the semiconductor industry be interested in paying money
for
an ARM Ltd core which is not an ARM?
I mean compared to lets say the MIPS, Tricore, PowerPC, Coldfire or
whatever.
The value of the Cortex is much lower than that of the ARM
Anyone can build a better core than the ARM, but you wont get access to the
tools/customer base
unless you do a lot of things right.
The AVR team has managed to introduce a new architecture which became
popular,
The consisten flash approach helped, like the OTP did help the PIC.
but it is harder in the high end. You need O/S.
It is possible to introduce new cores if you know how, but look how Motorola
failed with the M-Core.
They have some success with Coldfire where the price has dropped, but as
long as you
meet the pricing, people go ARM.

Should anyone in the tools business be interested? No customers yet.
Before anyone releases a general purpose micro, there wont be enough market
to finance tools
unless ARM pays up, but I think they rather sell their own compiler.

It will certainly be of some academic interest.

--
Best Regards
Ulf at atmel dot com
We've slightly trimmed the long signature. Click to see the full one.
Re: Does ARMs support bytes?

Quoted text here. Click to load it

  Yes, all good points, which is why seeing opcode and binary details
are important.
  The Cortex is not ARM7 binary compatible, but may have enough
commonality that porting tools is not a big issue.
  Right now, ARM seem to be very short on public release of the
important details.

  I can understand that those with a big investment in ARM7 might be
a little concerned by this.

-jg



Re: Does ARMs support bytes?
Quoted text here. Click to load it

Hi Jim,

No, sorry. The opcode level details are not release on public
domain yet.

regards,
Joseph

This e-mail message is intended for the addressee(s) only
and may contain information that is the property of, and/or
subject to a confidentiality agreement between the intended
recipient(s), their organisation and/or the ARM Group of
Companies. If you are not an intended recipient of this
e-mail message, you should not read, copy, forward or
otherwise distribute or further disclose the information
in it; misuse of the contents of this e-mail message may
violate various laws in your state, country or jurisdiction.
If you have received this e-mail message in error, please
contact the originator of this e-mail message via e-mail
and delete all copies of this message from your computer
or network, thank you.

Re: Does ARMs support bytes?
Quoted text here. Click to load it

Sorry for replying to my own post.
It seems it has just been released to customer with NDA (non-disclosure
agreement). See
http://www.arm.com/news/8513.html

Joseph

This e-mail message is intended for the addressee(s) only
and may contain information that is the property of, and/or
subject to a confidentiality agreement between the intended
recipient(s), their organisation and/or the ARM Group of
Companies. If you are not an intended recipient of this
e-mail message, you should not read, copy, forward or
otherwise distribute or further disclose the information
in it; misuse of the contents of this e-mail message may
violate various laws in your state, country or jurisdiction.
If you have received this e-mail message in error, please
contact the originator of this e-mail message via e-mail
and delete all copies of this message from your computer
or network, thank you.

Re: Does ARMs support bytes?
Quoted text here. Click to load it

Am I missing something, or is this the height of stupidity.  We are
selling a processor, but you can't know what's in the instruction
set?  The time to promulgate that is before the design is complete,
in order to get comments from the general public.

--
Chuck F ( snipped-for-privacy@yahoo.com) ( snipped-for-privacy@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
We've slightly trimmed the long signature. Click to see the full one.
Re: Does ARMs support bytes?
Quoted text here. Click to load it

  Close to stupidity, but a sad sign of what happens when lawyers
out-number engineers in a company....
  It means we are expected to believe their marketing hoopla, but
cannot actually verify any of the claims.
-jg



Re: Does ARMs support bytes?
Quoted text here. Click to load it
Hi guys,

Don't worry. The instruction details will be released to public, it just
take time to finish off all the documentation works! :-)

Bear in mind once the design is released to silicon partners, it will
take another several months (or even half year) for them to produce the
actual silicon chips.

(Honestly I don't know how much of the paper works are in the legal
department ;-) )

Joseph

This e-mail message is intended for the addressee(s) only
and may contain information that is the property of, and/or
subject to a confidentiality agreement between the intended
recipient(s), their organisation and/or the ARM Group of
Companies. If you are not an intended recipient of this
e-mail message, you should not read, copy, forward or
otherwise distribute or further disclose the information
in it; misuse of the contents of this e-mail message may
violate various laws in your state, country or jurisdiction.
If you have received this e-mail message in error, please
contact the originator of this e-mail message via e-mail
and delete all copies of this message from your computer
or network, thank you.

Re: Does ARMs support bytes?
Quoted text here. Click to load it

The answer appears to be "Yes, the height of stupidity.  We are not
capable of marking any early release documents as 'Preliminary,
subject to change'".

This is purely an academic comment on my part.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on
We've slightly trimmed the long signature. Click to see the full one.
Re: Does ARMs support bytes?

Hi there,

The "early access" architecture specification has been released quite a
long time ago (e.g. to ARM partners and development tools vendors). The
one on 7 March is an official release.  If you read the details of the
press release, you will see some development tools vendors has been
working with the V7 architecture already.
(http://www.arm.com/news/8513.html )

In the following link, you can find some of the details about the V7
architecture and Thumb-2 instruction set. (see bottom of the page)
http://www.arm.com/products/CPUs/architecture.html

Joseph

This e-mail message is intended for the addressee(s) only
and may contain information that is the property of, and/or
subject to a confidentiality agreement between the intended
recipient(s), their organisation and/or the ARM Group of
Companies. If you are not an intended recipient of this
e-mail message, you should not read, copy, forward or
otherwise distribute or further disclose the information
in it; misuse of the contents of this e-mail message may
violate various laws in your state, country or jurisdiction.
If you have received this e-mail message in error, please
contact the originator of this e-mail message via e-mail
and delete all copies of this message from your computer
or network, thank you.

Re: Does ARMs support bytes?
Quoted text here. Click to load it

thanks Joseph,
  A quick scan of this info, shows :

* Thumb-2 is not binary compatible with Thumb[16] or ARM[32]
* Thumb-2 removes the need to juggle/optimise your app for Size.Speed
across the 16 and 32 bit opcode alternatives.
* Thumb-2 introduces (among other things) variable length opcodes, and
  atomic Bit access.
* Thumb-2 also adds opcodes for 16 bit constant load,
short skips [IF THEN], bit fields, bit reversal, TestZ&Branch,
TableBranch, improved interrupt handling (HW Stacking).....

  They state all this gives you a 5% smaller and 2-3% faster code than
Thumb. [presumably those values are averages, maybe even
'marketing-filtered' averages :) ? ]

  Variable length opcodes, atomic Bit access, TestZ&Branch will be very
familiar to 80C51 users. Thus yes, Cortex will be a better
MicroController core than earlier ARMs.

Comment:
  There is likely to be some confusion in the field, between ARMv7, and
ARM7.
   Reminds me of the Philips XA51, where Philips tried to coat-tail on
the large 80C51 market, with a device that was NOT binary compatible.

  Time will tell how Cortex flies.

<paste>
Joseph wrote:
Quoted text here. Click to load it
time to finish off all the documentation works!
Quoted text here. Click to load it
another several months (or even half year) for them to produce the actual
silicon chips.

  Hmmm, well one of those papers is dated June 2003, and the Opcodes are
defined very early in a processor design. Releasing opcode info is also
just a simple text file, so consumes very little actual publishing effort.
  Of course the silicon follows some time later, but designers can
decide what to place on their radar much earlier in a life cycle.

-jg


Re: Does ARMs support bytes?

Quoted text here. Click to load it

Hi Jim,

Correct. You need updated development tools. That's why it is important
that development tools vendors are involved during development of the V7
architecture.

Quoted text here. Click to load it

That's is true for Cortex-M Series.  For Cortex-A and Cortext-R series
processors, it will support ARM, Thumb and Thumb-2 instruction sets. So
some users might still want to separate part of their code as ARM
instruction set and other parts as Thumb/Thumb-2 instruction set.

(http://www.arm.com/products/CPUs/families/CortexFamily.html )

Quoted text here. Click to load it

I am not sure how much I can tell you (in case I upset the marketing
guys ;-) So I better not to detail these areas.

Quoted text here. Click to load it

Time will tell ;)  And don't forget that the core size is smaller (lower
power consumption). For more advantages of Cortex-M3 core please see
http://www.arm.com/products/CPUs/ARM_Cortex-M3.html

Quoted text here. Click to load it

This one I am sure :)
But don't forget it is called Cortex-M3.  (See next answer)

Quoted text here. Click to load it

It will certainly takes time for the market to adapt to the new naming
system.  Instead of calling it ARM12, the development has now divered to
three areas and come with a new naming system:
Applications   - Cortex-A
Real time      - Cortex-R
Microcontroller- Cortex-M
See  http://www.arm.com/products/CPUs/families/CortexFamily.html
In this way it should help to reduce confusion between V7 architecture
and ARM7 core.

<Personal Opinion>
I guess people will get soon lazy and just call Cortex-M3 as "M3"
(This reminded me of the M3 motorway in UK  8-)
</Personal Opinion>

Quoted text here. Click to load it

The difficult part is to define the corner cases behaviours.  These
needed to be clearly documented.

Hope this information helps.  If there is any further questions, please
post it on comp.sys.arm.  There are more ARM people reading that
newsgroup and they can help answer questions.

Joseph

This e-mail message is intended for the addressee(s) only
and may contain information that is the property of, and/or
subject to a confidentiality agreement between the intended
recipient(s), their organisation and/or the ARM Group of
Companies. If you are not an intended recipient of this
e-mail message, you should not read, copy, forward or
otherwise distribute or further disclose the information
in it; misuse of the contents of this e-mail message may
violate various laws in your state, country or jurisdiction.
If you have received this e-mail message in error, please
contact the originator of this e-mail message via e-mail
and delete all copies of this message from your computer
or network, thank you.

Re: Does ARMs support bytes?

Quoted text here. Click to load it

I guess we are too small for ARM Inc. to notice for now. I asked several
times for NDA and info but to no avail. Oh well. I am betting that in a
year's time, a good number of non-GNU users for ARM7 MCU will be using
our compilers (fully functional for 45 days, 10K limited afterward w/o
asking us for a license or anything). May be we can get some info on the
Thumb-2 then :-)

--
// richard
http://www.imagecraft.com

Re: Does ARMs support bytes?
Quoted text here. Click to load it

Hi Richard,

I really shouldn't comment on this non-technical issue ;)
<My own opinion>
Please check if any of your current customers will be using Cortex.
If there is any, try push the ARM sale guys saying that you need to
support your customer.  Also it should be much easier now as the V7
architecture is officially released.
</My own opinion>

Joseph

This e-mail message is intended for the addressee(s) only
and may contain information that is the property of, and/or
subject to a confidentiality agreement between the intended
recipient(s), their organisation and/or the ARM Group of
Companies. If you are not an intended recipient of this
e-mail message, you should not read, copy, forward or
otherwise distribute or further disclose the information
in it; misuse of the contents of this e-mail message may
violate various laws in your state, country or jurisdiction.
If you have received this e-mail message in error, please
contact the originator of this e-mail message via e-mail
and delete all copies of this message from your computer
or network, thank you.

Re: Does ARMs support bytes?
On Wed, 16 Mar 2005 13:59:54 +0000, Joseph

Quoted text here. Click to load it

Joseph, it seems to me that it should be enough to hear that Richard
is willing to apply his own personal time into this business area.  He
already exists, is making his own way in the world, has a demonstrated
level of competence, and is asking for very little by way of help in
order to invest a serious amount of his own time.  Would you imagine
any rational person would do that, without any prospects of evidence
or belief that the time will pay off??

It seems that Richard may have more confidence in the future of this
processor than ARM's own people do.

If I were Richard, I might be a little offended at the suggestion that
I might have such bad business sense and hadn't already found that
there was customer interest in the new CPU core before committing
myself to the idea of fielding a new target for my compiler tool.

I know you aren't marketing or sales here.  And I'm only yelling at
you because you are here to hear it.  You cannot do anything about
this.  But it does shock me to the core, Joseph, that ARM acts this
way towards a legitimate compiler vendor.  (It's the kind of thing
that makes me wonder if they have a personal axe to grind in the
compiler arena or hidden associations they are trying to protect.)

I see no excuse, none, for Richard to have experienced what he has
from ARM, enough to say, "I asked several times for NDA and info but
to no avail."

Jon

Site Timeline