another bizarre architecture

This looks really weird to me...

formatting link

Does it resemble anything you've ever seen? It looks truly ghastly to program. For example, allowing printf() to use floats adds 3500 bytes to a program binary.

John

Reply to
John Larkin
Loading thread data ...

On a sunny day (Wed, 31 Jan 2007 11:03:03 -0800) it happened John Larkin wrote in :

That last example: Remember Z80 compare increase and repeat? And that was one instruction. It also has otir (out increase and repeat). Well, OK, I guess their system works..... But I sort of do not see the advantage. It is faster then PIC io... but many processors allow direct access to io / or memory [mapped io], also with indexes. Anyways you can program your own in FPGA, opencores.org has a processor generator. Each his own processor :-) OK, now to write all the assemblers and compilers.

Reply to
Jan Panteltje

Just another small 16-bitter. From Maxim, which sounds like never use it.

It looks truly ghastly to

Coding at low level is a task of compiler. BTW, do they provide decent tools for MAXQ?

For example, allowing printf() to use floats adds 3500 bytes

I'd say this is not unusual for the printf() overhead.

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

It looks more like writing a cpu's microcode than traditional assembly language. Which might be fun if you're into that sort of thing.

Reply to
Jim Stewart

This is a lot different than the PIC code I am used to. However, there must be some advantage to it. I don't see where you get your reference to the printf() function, however. That would be a function of a C compiler.

Paul

Reply to
Paul E. Schoen

Yes, it does resemble something I've seen - microcode. ;-) It actually looks like something I'd enjoy playing with. :-)

And yes, I'd expect a printf() to use that many bytes - printf() is a freakin' monstrosity in any case. What does puts() compile to? I'd think it wouldn't take a very big loop to turn a float into a string.

Cheers! Rich

Reply to
Rich Grise

The transport-triggered architecture is wonderful for a generic architecture where ALU's, special ops, I/O are all to be "semi-custom" added to a generic core. After you pick the core and the special-op and I/O units the chip can be taped out with no human intervention.

You don't have to use that Maxim architecture to do that though, there are lots of places that can synthesize an 8051 with any of a menu of hundreds of I/O and special-op ports.

Most applications using these sorts of processors are orthogonal to the use of C code and it makes no sense at all to put printf() and floats etc. on them.

Maybe you'd be more comfortable with the TI MSP430 family.

Tm.

Reply to
Tim Shoppa

They have one of the strangest ways of documenting opcodes I have seen, which I think makes it looks stranger that it really is. It does mean users have a learning curve to climb, unless you want to operate purely, and only, in C - which places its own restrictions on what you can do.

They claim low power, but the MAXQ2000 has a very poor mA/MHz offset,

- yes, it's OK at 20MHz, but only drops Icc a few %, as the clock drops to 1MHz - so at lower clocks, it quickly looks plain lousy. Hard to believe someone pitching a low power uC, would make that mistake.

They seem to be targeting the DataACQ markets, so the core specs matter less than the peripherals - eg there are (very) few uC offering

16 bit ADCs + LCD + 16*16 to 40 bit MAC, so if you really need those features, the core will be a "don't care".

As a general mechant uC ?, nope...

-jg

Reply to
Jim Granville

Its been out for a while now - I don't see advantage over more established cores like MSP430 and ARM. And lots of disadvantages.

Then don't do that! The full printf is quite powerful (and complicated internally). An integer-only version can be made quite compact and is still quite powerful. If you are determined to use floating point you can pass the integer and fractional parts as separate parameters to the function, using a format string that combines them visually.

--

John Devereux
Reply to
John Devereux

No, I use mostly MC68332's, very clean, orthogonal CISC machines that are nice to program in assembly. I just thought that this was a really strange, sort of dated architecture.

John

Reply to
John Larkin

Why? 4K floating point library is normal.

Reply to
linnix

It is extremely simple.

formatting link

Don't be a puts(). You have to convert binary to ASCII, denormalize, deal with leading and trailing zeros, decimal points, and so on.

Best regards, Spehro Pefhany

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

Monkeys with typewriters. Most of the functions say nothing about what they do, and many are effectively or entirely comment-free. This is the Microsoft philosophy: the only documentation is the code itself.

Fixed-point 64-bit to formatted ascii string is maybe a page of assembly for the 68K. Might run over a page with zero supression and commas every 3 digits.

John

Reply to
John Larkin

I used to work with New England Digital (no relation to DEC) Able computers. The first commercial single-instruction computer. Built out of MSI circuitry and used as a signal processor in the first commercial digital synthesizers.

formatting link

One of these days I'd love to do it in VHDL, although I bet Cameron already has.

--
	mac the naïf
Reply to
Alex Colvin

On a sunny day (Wed, 31 Jan 2007 17:04:14 -0800) it happened John Larkin wrote in :

No, you have to be able to read 'C'!!!!!! I sort of like that link, maybe it is because I used DJ Delorie's C compiler djgpp on MS DOS many many years ago... :-)

formatting link

Reply to
Jan Panteltje

To even tell what the intent of a 100-line function is? The fact that the comments are so few, and generally misspelled, suggest that what's going on here is beyond simple inarticulateness.

Face it: the current state of software is an unholy mess, and the paradigm doesn't work. Windows source code looks like this.

John

Reply to
John Larkin

On a sunny day (Thu, 01 Feb 2007 08:53:47 -0800) it happened John Larkin wrote in :

OK, I will face it, I have heard your argument before, but I happily write many hundreds of lines of C code without additional explaining text before each line (that is what you want). Long ago I have learned: Write your code so it is readble, so not something like:

double pnurk(double a, souble b) { double c;

c = b / a;

return b / a; }

but:

BOOL calculate_current(double resistance, double voltage, double *current) { if(debug) { fprintf(stderr,\\ "calculate_current: arg resistance, voltage\\n",\\ resistance, voltage); }

if(resistance < 0.0) { fprintf(stderr,\\ "My-Program: calculate_current():\\n\\ Your resistance is negative (%.2f), you must be kidding right? Aborting.\\n",\\ resistance);

return SUCKS; }

*current = voltage / resistance;

if(debug) { fprintf(stderr, "calculate_current(): calculated current=%.2f\\n", *current); }

return OK }

Sorry could not resist.

So in a program you can then know what it does. Of course the example is very simple, but if you are consistent most of the time you need no more text, use the right variable names.

And use spaces.....

return a/b*c%25+15; // sucks

In the link we were talking about it is 100% clear to me at least what happens. If you have a look at gcc, and libc.info (the reference in Linux) you can look up all these functions. I cannot say anything about the MS soft... MS is C++ so, and so silly that Visual Studio. I program in Linux with 9 rxvt terminals, libc.info open in one of these, with the source in a normal text editor in an other rxvt, and run the code in a third rxvt. And switch between the virtual screens with ctrl-cu left-right-up-down. rarely run out of (9) rxvts. No mouse, only mouse when I test GUI stuff, and even then started from rxvt.

Anyways I do not see your problem, but you are no programmaer I think, so I had very very hard time myself in the begining (>20 years ago) to understand C code... mathematical shock to see != and == etc.. :-)

Reply to
Jan Panteltje

What a shamefull nonportable, unsafe and murky piece of code.

This is a way to go:

CURRENT calculate_current(VOLTAGE voltage, RESISTANCE resistance) { CURRENT current;

if(fabs(resistance) < VERY_SMALL_NUMBER) { throw BAD_RESISTANCE; } else { current = voltage/resistance; } return current; }

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

You do realise that this is an implementation of the C standard library? The behaviour of the functions is spelled out, in detail, in the C standard, and any number of C reference books and online references.

What would you do, rewrite Windows XP in 68k assembler? :)

If Only...

--

John Devereux
Reply to
John Devereux

On a sunny day (Thu, 01 Feb 2007 19:02:07 GMT) it happened Vladimir Vassilevsky wrote in :

You are naorrw minded.

exit

Reply to
Jan Panteltje

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.