Shop OBEX P1 Docs P2 Docs Learn Events
Data Sheet — Parallax Forums

Data Sheet

[Deleted User][Deleted User] Posts: 0
edited 2006-10-31 04:10 in Propeller 1
HI,
·does anybody know if there is a data sheet for the propeller,not the one that shows the hub & cogs , but one that breaks down each cog (really just one,because there all the same)? I see bean asked the same question about the video generator does this fall in with that?

Thank's Brian




Post Edited (truckwiz) : 10/28/2006 7:42:33 PM GMT

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-10-28 20:16
    What level of detail are you looking for beyond Figure 1.2 and Table 1-3 of the manual?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • [Deleted User][Deleted User] Posts: 0
    edited 2006-10-28 22:04
    Paul,
    The first time I opened the book up on the 8085 , I shuttered when looked at the block diagram , then when I the book on sx (& pic ) I shuttered again ,the first time looked at the propeller block I said "well this is just a quick refrence picture " ,but let me get this straight ,say you use the MOV instruction -· am· I right in saying that you can move from any one address to any other address & theres no working register in tha middle of this?

    Post Edited (truckwiz) : 10/28/2006 11:05:39 PM GMT
  • [Deleted User][Deleted User] Posts: 0
    edited 2006-10-28 22:33
    next question ,when you make your declerations in assembly for a long where does the compiler put these, also is "long %10100110011010001000110101110010 " a CON & res 1 a VAR

    Thank's Brian
  • cgraceycgracey Posts: 14,133
    edited 2006-10-28 22:46
    truckwiz said...
    Paul,
    The first time I opened the book up on the 8085 , I shuttered when looked at the block diagram , then when I the book on sx (& pic ) I shuttered again ,the first time looked at the propeller block I said "well this is just a quick refrence picture " ,but let me get this straight ,say you use the MOV instrution -· am· I right in saying that you can move from any one address to any other address & theres no working register in tha middle of this?
    That's right!!! It's all register-to-register within each COG.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • cgraceycgracey Posts: 14,133
    edited 2006-10-28 22:49
    truckwiz said...
    next question ,when you make your declerations in assembly for a long where does the compiler put these, also is "long %10100110011010001000110101110010 " a CON & res 1 a VAR

    Thank's Brian
    Defined longs will be placed in the HUB memory, but they will get sucked up into a COG if they are part of an assembly program, when that program is launched with COGNEW or COGINIT. RES's are place-holders which keep track of what will become COG ram, so that after your program loads into a COG, those offsets are now local to the COG's RAM.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • [Deleted User][Deleted User] Posts: 0
    edited 2006-10-28 23:02
    So ,register to register means any memory address to any memory address ? I just want to clarify that this is no set registers , say bc,de,hl ......
  • cgraceycgracey Posts: 14,133
    edited 2006-10-28 23:08
    truckwiz said...
    So ,register to register means any memory address to any memory address ? I just want to clarify that this is no set registers , say bc,de,hl ......
    You can look at the binary·instruction breakdown and see that there are two 9-bit fields (destination and source)·which each specify one of 512 registers. You're not hallucinating.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • [Deleted User][Deleted User] Posts: 0
    edited 2006-10-28 23:15
    Chip,
    One more & i'll leave you alone , where do the flags get set at ?

    Thank's Brian
  • cgraceycgracey Posts: 14,133
    edited 2006-10-28 23:26
    truckwiz said...
    Chip,
    One more & i'll leave you alone , where do the flags get set at ?

    Thank's Brian
    They could get set by every instruction, if you want. You must specify, after the operands, what flag(s) you want affected. There are only C and Z flags. Also, before the instruction, you can place a conditional which will gate whether or not the instruction even executes. Here is some example code:

    ······················· test··· stat,#1········ wc····· 'if reset flag, transmit reset command
    ······· if_c··········· mov···· data,#$FF
    ······· if_c··········· call··· #transmit

    ·
    You can see that the 'test' instruction writes the carry because of the "wc". The other two instructions execute only if the carry is set. You can do things a lot more complex than this and really create tight functionality. You'd be surprised at how seldom any flags need to get affected. It's nice to be able to write code that isn't always dealing with·unavoidable flag updates. The conditionals that can precede instructions (like these "if_c" examples) account for every logical combination of C and Z.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • [Deleted User][Deleted User] Posts: 0
    edited 2006-10-29 00:50
    Chip, see what happens when you( I really mean me)·have a 8 bit head in 32 bit world , da EVERYTHING is on one line of code , I was sitting here looking at the assembly code & decided to count how much room -INSTR- -ZCRI- -CON- -DEST- -SRC- took up ,and you'll never guess ,32 bit's

    Thank's Brian

    Post Edited (truckwiz) : 10/29/2006 1:13:17 AM GMT
  • [Deleted User][Deleted User] Posts: 0
    edited 2006-10-31 02:48
    Ok, heres a couple more things that i'm trying to get a grasp on!

    PUB Toggle
    dira[noparse][[/noparse]16]~~
    repeat
    !outa[noparse][[/noparse]16]
    waitcnt(3_000_000 + cnt)

    if you look at the memory block of this code in hex this is what I see ,this is not all of it ,just the first code

    20 00 02 00 = -INSTR - ZRCI _CON__ DEST_____ SRC
    ______________100000 0000 0000 000000001 000000000

    Instrution is ADD dest to src , this is where my brain starts to melt , do I have a value of 1 in dest or is this the memory location that the real info is in , at address 001 hex
    the next code is
    08 00 00 00········001000 0000 0000 000000000 000000000
    this in machine code is·ROR· ,am I doing this right , how can rotate right 0 or did my 000000001 sneak in here & now I have 111111111 ?

    thanks ,brian

    Post Edited (truckwiz) : 10/31/2006 3:01:53 AM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-31 03:55
    The main problem is that you've got a SPIN program and you're thinking in terms of assembly language.· SPIN compiles to a byte code sequence which is not described publicly.· Cliff Biffle has been documenting some of the byte codes on his website (search the forums for his name) if you're interested.
  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-31 04:10
    Here's your SPIN code hand·translated into assembler.· Compile this and look at the hex produced.· I've included a dummy SPIN routine to make the compiler happy that just starts up the assembly in its own cog.
    [noparse][[/noparse]code]
    PUB dummy
    · COGNEW(@toggle,0)

    DAT
    toggle······· mov·· DIRA,Mask16
    ················mov·· OUTA,#0
    :loop········ xor···· OUTA,Mask16
    ··············· mov··· temp,TimeCnt
    ··············· add····temp,CNT
    ················waitcnt temp,#0
    ··············· jmp··· #:loop
    Mask16····· long···|<16
    TimeCnt···· long·· 3_000_000
    temp········ long·· 0
    [noparse][[/noparse]/code]
    ·
Sign In or Register to comment.