Shop OBEX P1 Docs P2 Docs Learn Events
The unofficial P2 documentation project - Page 2 — Parallax Forums

The unofficial P2 documentation project

2456713

Comments

  • cgraceycgracey Posts: 14,133
    edited 2012-12-08 10:00
    Cluso99 wrote: »
    Nicely done Peter :)

    IIRC the 256 long stack/fifo can also be accessed indirectly as well as push/pop instructions. Seeing these now, its a shame we dont have 2 special move instructions to move a long into/out of the fifo by using an immediate fifo address (best not tell Chip as we dont want to delay P2 any more).

    BTW I can understand Chip just wants/needs to churn out the info at this point in time He doesn't have the time to pretty it up like you have done. Others can do that - lets just get the info from him.

    The stack in each cog can only be accessed by PUSH's and POP's using the SPA and SPB pointers. That's it.
  • cgraceycgracey Posts: 14,133
    edited 2012-12-08 11:39
    While I like the idea of well-formatted documentation, it takes me too much time to write it like that. All that formatting just gets me into trouble, as I start obsessing about the look of things and get distracted from the contents. Text files are limiting, but they put an early cap on how mired in complexity I can become while trying to get the job done.
  • FredBlaisFredBlais Posts: 370
    edited 2012-12-08 12:39
    cgracey wrote: »
    While I like the idea of well-formatted documentation, it takes me too much time to write it like that. All that formatting just gets me into trouble, as I start obsessing about the look of things and get distracted from the contents. Text files are limiting, but they put an early cap on how mired in complexity I can become while trying to get the job done.

    That's fine, I think the community is doing a fine job by formatting your plain text documentation :)
  • potatoheadpotatohead Posts: 10,260
    edited 2012-12-08 12:40
    Chip, I totally agree. You need to keep it lean and mean. Plain text works great. We all can and will add to it considerably. No worries. Frankly, I like it that way, because as we all get bootstrapped onto the P2, lots of good stuff will happen, and we are all more than happy to share it.

    **Finally get to power up today! You all have no idea how annoying this week was. Sometimes we all dread the day job.
  • SapiehaSapieha Posts: 2,964
    edited 2012-12-08 13:14
    Hi Martin.

    Answer to Yours Questin

    http://forums.parallax.com/showthread.php?144199-Propeller-II-Emulation-of-the-P2-on-DE0-NANO-amp-DE2-115-FPGA-boards&p=1148526&viewfull=1#post1148526


    Yeah, pinout is better in my opinion. Maybe in the center list the package info?
    (T)QFP-128, .4mm pin spacing, overall size (14mm?).

    The PLL multiplier bit fields are a little vague. does 0001...1111 mean "1 to 15" or

    0001 = x2
    0011 = x4
    0111 = x8
    1111 = x16
  • Martin HodgeMartin Hodge Posts: 1,246
    edited 2012-12-08 13:28
    Sapieha wrote: »

    Yep, thanks.
    \
    Looks like Peter and Seairth have it spot on already. Mode excellent. :)
  • SeairthSeairth Posts: 2,474
    edited 2012-12-08 15:27
    cgracey wrote: »
    While I like the idea of well-formatted documentation, it takes me too much time to write it like that. All that formatting just gets me into trouble, as I start obsessing about the look of things and get distracted from the contents. Text files are limiting, but they put an early cap on how mired in complexity I can become while trying to get the job done.

    Chip, we are *expecting* you to post just plain text. In fact, we *want* you to, because it's the fastest way you'll get all the content out to us. As FredBlais and others have stated, we will take care of the formatting. I would ask one favor, though. Instead of modifying the same post (in the other thread), could you post each new section as a separate post (in the other thread is still fine)? If you will do that, I will make sure to add an appendix to the unofficial document to reference each of the posts as a way to consolidate them.
  • SeairthSeairth Posts: 2,474
    edited 2012-12-08 15:35
    What would you all say to the idea of re-organizing the document to mirror the current Propeller Reference Manual (version 1.2, I believe)? Obviously, it's not going to be a one-to-one match, but I think it would be helpful for the following reasons:

    1. We are all familiar with that layout
    2. It gives all of us a general guideline where to put new material and how to format it (to the extent possible with Google Docs).
    3. With Parallax's blessing, we might even be able to copy some of the existing documentation for instructions that haven't changed (except possibly their bit patterns).
    4. Parallax might find the final product a good basis for their official documentation.
  • SapiehaSapieha Posts: 2,964
    edited 2012-12-08 15:45
    Hi Seairth.

    Last one was v2

    Seairth wrote: »
    What would you all say to the idea of re-organizing the document to mirror the current Propeller Reference Manual (version 1.2, I believe)? Obviously, it's not going to be a one-to-one match, but I think it would be helpful for the following reasons:

    1. We are all familiar with that layout
    2. It gives all of us a general guideline where to put new material and how to format it (to the extent possible with Google Docs).
    3. With Parallax's blessing, we might even be able to copy some of the existing documentation for instructions that haven't changed (except possibly their bit patterns).
    4. Parallax might find the final product a good basis for their official documentation.
  • cgraceycgracey Posts: 14,133
    edited 2012-12-08 15:52
    Seairth wrote: »
    Chip, we are *expecting* you to post just plain text. In fact, we *want* you to, because it's the fastest way you'll get all the content out to us. As FredBlais and others have stated, we will take care of the formatting. I would ask one favor, though. Instead of modifying the same post (in the other thread), could you post each new section as a separate post (in the other thread is still fine)? If you will do that, I will make sure to add an appendix to the unofficial document to reference each of the posts as a way to consolidate them.


    Okay. That sounds great. I'll post each new entry into this thread, since its title relates best to the content.

    And feel free, you guys, to arrange things however you think is best. There's no hard reason to do anything the way it was done before.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-12-08 15:52
    I have had PMs with Chip explaining what we would like him to do which I thought I made clear but obviously not. Perhaps I should have used plain English rather than Forthspeak :) No, we don't expect him to do anything but plain text, however it would be a big help if changes were apparent and not buried in the same post which is buried in the thread, however that is his prerogative . Of course we can go through with a text comparator to pick out the changes if we really need to. Ideally however, Chip could just add the plain text to the unofficial P2 document itself after which us clamoring seagulls would pounce on the "chip" and do what we do.

    EDIT: Just saw your message Chip, thanks.
  • cgraceycgracey Posts: 14,133
    edited 2012-12-08 19:03
    I have had PMs with Chip explaining what we would like him to do which I thought I made clear but obviously not. Perhaps I should have used plain English rather than Forthspeak :) No, we don't expect him to do anything but plain text, however it would be a big help if changes were apparent and not buried in the same post which is buried in the thread, however that is his prerogative . Of course we can go through with a text comparator to pick out the changes if we really need to. Ideally however, Chip could just add the plain text to the unofficial P2 document itself after which us clamoring seagulls would pounce on the "chip" and do what we do.

    EDIT: Just saw your message Chip, thanks.

    The trouble is, I keep making minor refinements to parts that are "done", so there are changes strewn throughout, at every iteration. I don't mean to cause anyone frustration.
  • SapiehaSapieha Posts: 2,964
    edited 2012-12-08 19:07
    Hi Chip


    For my needs I made my own PDF.

    and that don't disturb me if You post changes as separate post's.
    Simpler to find what changed. No need to regenerate entire PDF.


    .
    cgracey wrote: »
    The trouble is, I keep making minor refinements to parts that are "done", so there are changes strewn throughout, at every iteration. I don't mean to cause anyone frustration.
  • SeairthSeairth Posts: 2,474
    edited 2012-12-08 19:14
    cgracey wrote: »
    The trouble is, I keep making minor refinements to parts that are "done", so there are changes strewn throughout, at every iteration. I don't mean to cause anyone frustration.

    No frustration here. Actually, I was thinking of incorporating some of the original Propeller instructions that the preliminary detailed instruction document states as unchanged. That should keep me (us?) busy while you do your part. We'll take the new bits when we get it. Also, don't be too concerned about getting it "just right" before posting it. As you are well aware, no matter what you post, there will be at least three different interpretations. :) Better to work that out with the rough draft than to put in the extra effort and then still have to work it out! In the end, though, do whatever is comfortable for you.
  • Cluso99Cluso99 Posts: 18,069
    edited 2012-12-08 20:43
    I have just updated the emulation thread to point here for all further P2 instruction and other specific documents. Nice work guys!
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2012-12-08 20:53
    Thanks!!! to Chip for the info and updates and all those participating in the formatting. I read it on a Samsung Galaxy note 10.1 Tablet just using the Web browser and I really like the formatting and the color.
  • Cluso99Cluso99 Posts: 18,069
    edited 2012-12-08 21:59
    Chip:

    I started coding the P2 Interpreter (using my faster posted version) and came up with a few questions to do with the P2 hardware...

    The Interpreter sets the lower hub bytes, in particular the clkfreq at hub $0000(4 bytes) and clkmode at hub $0004(1 byte). What is your plan for these locations or are there hub windows for these locations? If it is too early to answer, just say so.

    BTW there were only a couple of compile problems...
    wrlong x,#0000
    wrbyte x,#$0004
    tjz wc
    coginit (of course)
    par (of course) - will the PARA value be identical to PAR (remember we had to <<2 to pass parameters - is this the same?)
  • cgraceycgracey Posts: 14,133
    edited 2012-12-08 22:27
    Cluso99 wrote: »
    Chip:

    I started coding the P2 Interpreter (using my faster posted version) and came up with a few questions to do with the P2 hardware...

    The Interpreter sets the lower hub bytes, in particular the clkfreq at hub $0000(4 bytes) and clkmode at hub $0004(1 byte). What is your plan for these locations or are there hub windows for these locations? If it is too early to answer, just say so.

    BTW there were only a couple of compile problems...
    wrlong x,#0000
    wrbyte x,#$0004
    tjz wc
    coginit (of course)
    par (of course) - will the PARA value be identical to PAR (remember we had to <<2 to pass parameters - is this the same?)

    I don't know yet where I'd put the clkfreq and clkmode - maybe $E80 and $E84.

    The thing that makes the original spin byte codes not work so well in the P2 is that they used words for addresses. Now, we need 17 bits, and even more for any LMM Spin. You might make a working Spin before I do.

    I don't know what the PARA value is. On the Prop2, PTRA gets the address parameter, since there's no more PAR register.
  • Cluso99Cluso99 Posts: 18,069
    edited 2012-12-08 23:46
    Thanks Chip.
    Since you haven't put a hole into the hub ram to keep it at the old location, I will make it relocatable for now. Currently I don't have the DE0-nano so I can only check that it compiled for now. At least I am starting to think about it while I complete other things. I will be ordering my DE0 shortly, along with other parts.
  • SapiehaSapieha Posts: 2,964
    edited 2012-12-08 23:50
    Hi Chip, Cluso


    In some of post's them discussed Mail BOX.

    Maybe in that area.--- That give compatibility with all types of Programming
    SPIN -- GCC and others

    will post link as fast I find it
    http://forums.parallax.com/showthread.php?144199-Propeller-II-Emulation-of-the-P2-on-DE0-NANO-amp-DE2-115-FPGA-boards&p=1147465&viewfull=1#post1147465



    cgracey wrote: »
    I don't know yet where I'd put the clkfreq and clkmode - maybe $E80 and $E84.

    The thing that makes the original spin byte codes not work so well in the P2 is that they used words for addresses. Now, we need 17 bits, and even more for any LMM Spin. You might make a working Spin before I do.

    I don't know what the PARA value is. On the Prop2, PTRA gets the address parameter, since there's no more PAR register.
  • SeairthSeairth Posts: 2,474
    edited 2012-12-09 08:17
    Chip,

    In your original post of the hub documentation (see http://forums.parallax.com/showthread.php?144199-Propeller-II-Emulation-of-the-P2-on-DE0-NANO-amp-DE2-115-FPGA-boards&p=1146196#post1146196), the hub instruction timing falls into one of three groups:

    1..8: one-clock instruction, plus up to seven clocks waiting for hub access
    2..9: two-clock instruction, plus up to seven clocks waiting for hub access
    1..9: ???-clock instruction, plus up to seven clocks waiting for hub access

    My question is about the third group, particularly the "???" part. Is this group correct or a documentation error? And if correct, what are the circumstances for the one-clock or two-clock timings?
  • Roy ElthamRoy Eltham Posts: 2,998
    edited 2012-12-09 11:52
    Seairth,
    The 3rd catagory is the cached read instructions (RDxxxxC), they will only take 1 clock if they can be satisfied by the contents of the QUAD registers, otherwise they will take 2+ clocks.
    For example if you are using RDBYTEC and assuming the QUAD registers are "cleared" or invalidated. The first RDBYTEC will take the longer time, subsequent RDBYTECs will take 1 clock if they are in the same 4 QUAD block that the first RDBYTEC was in. If you do sequential RDBYTECs then you will get 1x long read, then 15x 1 cycle reads before the next long read.
  • SeairthSeairth Posts: 2,474
    edited 2012-12-09 14:45
    I'm not talking about the cached instructions. Specifically, the instructions in the third category are COGINIT, LOCKSET, and LOCKCLR. I suspect that these are documentation errors.
  • cgraceycgracey Posts: 14,133
    edited 2012-12-09 15:12
    Seairth wrote: »
    I'm not talking about the cached instructions. Specifically, the instructions in the third category are COGINIT, LOCKSET, and LOCKCLR. I suspect that these are documentation errors.

    Ah! I thought Roy answered your question, but now I understand you were talking about something different.

    The hub instructions: CLKSET/COGID/COGINIT/COGSTOP/LOCKxxx will take 1..8 clocks if their Z/C/R bits are all 0, meaning they don't have to wait for anything back from the hub (no Z, C, or D result). If they are going to receive some result back, they must wait for the next cycle to receive it. Hence, those instructions which get results back take 2..9 clocks.

    P.S. Sorry I haven't posted any more doc's lately, but I'll have more tomorrow afternoon.
  • Cluso99Cluso99 Posts: 18,069
    edited 2012-12-09 17:07
    Hey Chip, you deserve some time off.
    We are having fun exploring the possibilities. I think you are giving us just the right amount of time to digest each set of instructions before we get the next installment. ;)

    More tid-bits from Chip...
     repd    $1FF,@extra3    '$1FF causes infinte REPD
     nop
     nop
     nop
    

    Also the READQUAD window can be set anywhere in cog ram and can then be executed in the window.
     rdquad    ptra++    '1 clock rdquad, QUAD executable at +5 clocks
    inst1    nop        'inst1..4 are the QUAD window
    inst2    nop        'because of pipeline delays, inst1..4 execute
    inst3    nop        '...from RDQUAD *before* last
    inst4    nop
    extra1    nop        'QUAD becomes executable here (5th instruction)
    extra2    nop
    extra3    nop        'whole loop takes 8 clocks and executes 4 LLM instructions
    
    http://forums.parallax.com/showthread.php?144478-LMM2-Propeller-2-LMM-experiments-(50-80-LMM2-MIPS-160MHz)&p=1148796&viewfull=1#post1148796
  • SeairthSeairth Posts: 2,474
    edited 2012-12-09 17:45
    All,

    Since we have "carte blanche" for the look and feel of the unofficial document, I started tweaking the instruction page layout in a way that I think might be more informative. But I would like some feedback before going further with it. So, towards the end of the document, take a look at the COGID instruction. The first version you encounter pretty much mirrors the format found in the Propeller Reference Manual. The second version is my modified take. Thoughts?
  • Cluso99Cluso99 Posts: 18,069
    edited 2012-12-09 18:43
    Seairth: Yes, the new format is much better (describing the wz/wc/nr effects and the clocks as separate tables). Short examples will be a help as well (some instructions already have these on the P1. However, some require further examples). Way to go :)
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-12-09 20:26
    There's really only Seairth and myself working on this and we could really do with a helping hand, even if you just tackle a small section. I have been porting the Propeller 2 Detailed Preliminary Feature List over starting with all the hardware and now down into the miscellaneous instructions while Seairth has been doing the Assembly Language Reference in the new format.

    So what do you say? At least request edit permissions to be in a position to contribute would be good for a start.
  • SeairthSeairth Posts: 2,474
    edited 2012-12-09 20:38
    Cluso99 wrote: »
    Seairth: Yes, the new format is much better (describing the wz/wc/nr effects and the clocks as separate tables). Short examples will be a help as well (some instructions already have these on the P1. However, some require further examples). Way to go :)

    Hah. That's good enough for me. I made one tweak to the encoding table that I think will make more sense. Otherwise, I think I'm good with it for this go.
  • SeairthSeairth Posts: 2,474
    edited 2012-12-09 21:30
    Seairth wrote: »
    Hah. That's good enough for me. I made one tweak to the encoding table that I think will make more sense. Otherwise, I think I'm good with it for this go.

    Okay. I couldn't leave well enough alone. Take a look at the ABS instruction. It has all of the same information, but I have formatted it for the landscape layout of the page. In case you are wondering about the landscape layout, I asked Peter about this choice. He pointed out that it's better suited for widescreen monitors. Quite right!
Sign In or Register to comment.