Connect with us

another bizarre architecture

Discussion in 'Electronic Design' started by John Larkin, Jan 31, 2007.

Scroll to continue with content
  1. John Larkin

    John Larkin Guest

  2. 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.
     
  3. 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

    http://www.abvolt.com
     
  4. Jim Stewart

    Jim Stewart Guest

    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.
     
  5. 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
     
  6. Rich Grise

    Rich Grise Guest

    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
     
  7. Tim Shoppa

    Tim Shoppa Guest

    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.
     
  8. 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
     
  9. 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.
     
  10. John Larkin

    John Larkin Guest


    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
     
  11. linnix

    linnix Guest

    Why? 4K floating point library is normal.
     
  12. It is extremely simple.
    http://www.koders.com/c/fid61148695142D20F84C4E83E059EEED5677E7CD79.aspx
    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
     
  13. John Larkin

    John Larkin Guest


    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
     
  14. Alex Colvin

    Alex Colvin Guest

    http://www.maxim-ic.com/appnotes.cfm/appnote_number/3960
    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.

    http://world.std.com/~alexc/able.html

    One of these days I'd love to do it in VHDL, although I bet Cameron
    already has.
     
  15. 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...
    :)
    http://en.wikipedia.org/wiki/DJGPP
     
  16. John  Larkin

    John Larkin Guest

    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
     
  17. 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.. :)
     
  18. Jan Panteltje wrote:

    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

    http://www.abvolt.com
     
  19. 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...
     
  20. You are naorrw minded.
    exit
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-