Shop OBEX P1 Docs P2 Docs Learn Events
Code and Data Size limits and additional RAM cap — Parallax Forums

Code and Data Size limits and additional RAM cap

ALIBEALIBE Posts: 299
edited 2006-04-01 14:50 in Propeller 1
Sorry - I did not find this info in the tech spec for the chip.

what is the limit on code and data size. I'm assuming the limit is per cog level rather than at the chip level.

Also what is the cap on how much extra RAM that can be added (if that is at all possible that is).

Thanks, ALIBE

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-03-31 20:43
    There is 2K of memory in each cog (512 longs) and there is 32K central memory, it is a Von Nueman architecture (data and code in same memory space). You can do memory overlays rather easily, the Hydra already does this.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    6+6=10 (Long live the duodecimal system!)
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-31 21:24
    The only thing that runs in the 2K cog memory is a custom assembly program, or the Spin interpreter (which is written in Propeller assembly). Spin programs and data reside in the main system RAM and can be as big as the amount of RAM you have left (up to about 32K)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • ALIBEALIBE Posts: 299
    edited 2006-04-01 13:01
    Jon,
    re the custom assembly program in the 2k cog, does this include user written propeller asm programs. or is it reserved for parallax only system level programs (interpreter, etc). IF one of my programs is made up of 1) Spin code and 2) ASM code, will #2 go into cog 2k space?


    Thanks
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-01 13:13
    You, too, can write in Propeller assembly -- the code is embedded into a DAT block in a Spin program.· The Spin portion will include interface methods to the assembly code, as well as a launch mechanism (using cognew) to put the assembly code into·it's own·cog.·

    I've attached the FullDuplex object which allows for high-speed serial comms (I've tested it up to 460 kBaud); you can see the Spin methods and the assembly code at the end.· The Spin methods get merged into your program (that runs in system RAM) and the assembly code -- if successfully launched -- runs in the 2K RAM of the cog that was available for the cognew method.

    (Note: I added a .txt extension to the .spin file so you can browse it online)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • ALIBEALIBE Posts: 299
    edited 2006-04-01 13:45
    Jon, that's great to hear.

    what's the RTM or GA dates for the dev board? I really need it (it's not "want", it is "need")

    [noparse]:)[/noparse]



    thanks
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-01 14:12
    I don't know, and even if I did I wouldn't say -- the Marketing department (specifically Lauren) will provide that information when it's set. And someone of your experience will be able to take the DIP40 and our USB2SER (for programming) and be ready to go; the rest of the parts you can get anywhere.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • ALIBEALIBE Posts: 299
    edited 2006-04-01 14:32
    ok - cool - I should get the chip and the usb2ser to really get my teeth sunk in.

    here's a dumb question re the usb2ser.

    While trying out Brainstem I had purchased their BS to Serial adapter. Just curious if that would do the job of the USB2SER for me to connecting the chip to my pc? Here's the url:
    http://www.acroname.com/robotics/parts/S13-SERIAL-INT-CONN.html

    I know this is a wierd question.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-01 14:50
    Here's the thing: if you attempt to use that and the Propeller chip and/or the adapter get damaged, we're going to blame them, they're going to blame us, and you're going to be stuck in the middle with busted parts.· Why put yourself through this hassle?· Buy a USB2SER and know that you've got the right programming adapter, or build an RS232-to-Propeller adapter per our schematic.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax

    Post Edited (Jon Williams (Parallax)) : 4/1/2006 3:21:15 PM GMT
    800 x 390 - 79K
Sign In or Register to comment.