Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24 - Page 4

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

Translate This Thread From English to

Threaded View
Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24

Quoted text here. Click to load it

And where do you get 78 bit micros?

--
Grant Edwards                   grante             Yow!  Bo Derek ruined
                                  at               my life!
We've slightly trimmed the long signature. Click to see the full one.
Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
Quoted text here. Click to load it

errrr.....  in a custom FPGA :-)

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
We've slightly trimmed the long signature. Click to see the full one.
Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
Quoted text here. Click to load it

Well ... strings are only one part of the problem.
Any constant tables/arrays, such as:

o state tables
o lookup-tables
o <shield-up> v-tables <shield-down>

are problematic to most traditional compilers/languages that
only understand a single contiguous address space.


--
Michael N. Moran           (h) 770 516 7918
5009 Old Field Ct.         (c) 678 521 5460
We've slightly trimmed the long signature. Click to see the full one.
Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24

Quoted text here. Click to load it

But surely that is a *compiler* issue not a fault of the underlying
architecture?

Ian

Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
Ian Bell schrieb:
Quoted text here. Click to load it

No. To achive true transparency, the compiler would have to generate
code that can tell a ROM address from a RAM address at runtime.
Otherwise functions that take pointer arguments would not be possible.

Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24

Quoted text here. Click to load it

So it *is* a compiler issue.

Ian


Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
Ian Bell schrieb:
Quoted text here. Click to load it

Any hardware annoyance can be hidden by a layer of software. Still I
think it's fair to think of it as a fault of the architecture.

Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24

Quoted text here. Click to load it

No you do not always need to add a LAYER of software. Most of the time it
is just a case of generating code that looks horrible to YOU.

On a PIC you can insert RAM page select instructions in front of all
instructions if you wish *** OR *** you can analyse your code and only
insert them where you NEED them. This may not be "nice" because it
involves extra work for you. But if you do the job properly you end up
with a VERY LOW page select overhead, much lower than if each instruction
actually carried the extra bits required.

The trick is to use a high level language or sophisticated assembler that
will do this work for you. This is not adding a layer of software.


Regards
Sergio Masci

http://www.xcprod.com/titan/XCSB - optimising PIC compiler
FREE for personal non-commercial use



.


Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
Sergio Masci schrieb:
Quoted text here. Click to load it

As I said, in theory you can hide any architecture issue from the
programmer with software. But if none of the compilers does this
(because it would require a lot of effort or would create too much
overhead), this knowledge is of little value for me.

Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
Quoted text here. Click to load it

Hi-Tech's C compilers for the PIC have RAM/ROM pointers without the
use of extensions.  Const objects (those which have storage allocated)
and string literals reside in ROM.  Other objects reside in RAM.
Pointers to const point to ROM and RAM, with the appropriate address
space determined at runtime.  Other pointers point only to RAM.

--
John W. Temples, III

Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24

Quoted text here. Click to load it

No what you said was "using a layer of software" not "with software" these
are different things.

We hide the underlying architecture with software every time we use a high
level language.

Quoted text here. Click to load it

Writing any half decent compiler "requires a lot of effort"

Yes compilers that generate VERY EFFICIENT executables for the PIC do
exist. And at least one assembler (XCASM) that performs analysis of RAM
and code page useage does exist and yes it does insert RAM and code page
select instructions at optimal locations. I guess the gripes is that this
is not done by the FREE Microchip assembler.

Also, using the XCSB compiler, you can add lots of embedded (inline)
assembler and not worry about RAM and code paging.

Yes tools that do the job (and do it very well) do exist. You just
obviously don't know about them.

To claim that the underlying PIC architecture is a problem is nonsense.
It's crap compilers and assemblers that are the problem.


Regards
Sergio Masci

http://www.xcprod.com/titan/XCSB - optimising PIC compiler
FREE for personal non-commercial use



.



Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
On Sun, 16 Oct 2005 19:41:46 +0100, Sergio Masci

Quoted text here. Click to load it

Wow.



Well, looking at your signature, I feel a little bit better, because
now I understand how come someone can write paragraphs like the one
above.

Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
Sergio Masci schrieb:

Quoted text here. Click to load it

We were talking about AVRs and RAM/ROM. Still looking for a compiler
that can "do the job".

Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24


Quoted text here. Click to load it

Sorry I thought we were talking about RAM / CODE on the PICs.

Anyway it is still trivial to write an assembler that emits a machine code
instruction based on the address space of the operand. There really is no
need to have different nmeonics for instructions that handle different
address spaces.

I could probably add this functionallity to the XCASM meta assembler in
less than a day.


Regards
Sergio Masci

http://www.xcprod.com/titan/XCSB - optimising PIC compiler
FREE for personal non-commercial use



.



Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
Quoted text here. Click to load it


So why are there so many crap compilers for PIC?

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
We've slightly trimmed the long signature. Click to see the full one.
Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24


Quoted text here. Click to load it

Because the market tolerates them.


Regards
Sergio Masci

http://www.xcprod.com/titan/XCSB - optimising PIC compiler
FREE for personal non-commercial use



.


Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24

Quoted text here. Click to load it

Sounds to me like a case of the tail wagging the dog.

Ian

Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24

Quoted text here. Click to load it

This is simply wrong. A compiler can trace the use of a pointer throughout
the code at compile time. What you need to do is add an attribute to the
pointer that says "this pointer can only ever point to RAM" or "this
pointer can only ever point to CODE". If you want you could call this
attribute "const" and insist that all const pointers point to code and all
non-const pointers point to RAM.

The fundamental problem with your "transparency" assertion is that you are
picking up on a particular language shortfall and translating it to the
underlying architecture.


Regards
Sergio Masci

http://www.xcprod.com/titan/XCSB - optimising PIC compiler
FREE for personal non-commercial use



.

Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
Quoted text here. Click to load it
that
Quoted text here. Click to load it
that
Quoted text here. Click to load it

Particulary not in the face of separate compilation.  Even if the
entire source is available, it still may not be able to determine
where a pointer points (a number is a number is a number...).

Quoted text here. Click to load it

And if we want to get even a little more picky about it, the
AVR has a third address space (I/O) which (somewhat) overlaps
the RAM address space and includes the register set.

Quoted text here. Click to load it

Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24

Quoted text here. Click to load it
that
Quoted text here. Click to load it
that
Quoted text here. Click to load it

where a pointer points to is not the issue, what a pointer is pointing to
is.

Consider a pointer to a "char". No mater where the pointer is pointing the
compiler knows it is pointing to a "char". Regardless of how you
manipulate the pointer the compiler will always derefernce it as a char
pointer. You can play hide and seek and force a non char pointer into it
but that is not the point. Here "char" is an attribute of the pointer and
the attribute is tracked throughout the use of the pointer at compile time
NOT runtime. Another attribute could easily be the address space (RAM,
CODE, I/O etc). The actual runtime contents is not important, the compile
time attribute is.

With regard to seperate compilation: don't make me laugh!

Yes it may have been necessary 20 years ago to compile a 10,000 line C
program as seperate 1,000 line modules because each module took 5 minutes
to compile (on a state of the art PDP/11). But today a 1,000,000 line
program takes less than 2 minutes to compile AND given that most programs
for a tiny MCU are much smaller than this, seperate compilation is not
necessary and in many cases it is actually counter productive from an
optimisation standpoint.



Regards
Sergio Masci

http://www.xcprod.com/titan/XCSB - optimising PIC compiler
FREE for personal non-commercial use



.



Site Timeline