Shop OBEX P1 Docs P2 Docs Learn Events
Using PHSA as WRLONG address — Parallax Forums

Using PHSA as WRLONG address

Andrey DemenevAndrey Demenev Posts: 377
edited 2009-11-30 03:39 in Propeller 1
Is it possible to use PHSA as WRLONG address? Like this:
WRLONG data, PHSA



The intention is to use PHSA as address pointer and avoid incrementing it in software to save some instructions

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2009-11-29 09:35
    Andrey Demenev said...
    Is it possible to use PHSA as WRLONG address?
    Yes, but why don't you try and find out?
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2009-11-29 09:42
    Thanks a lot!

    Just had an idea, but no Propeller at hand within few next days
  • kuronekokuroneko Posts: 3,623
    edited 2009-11-29 09:55
    Andrey Demenev said...
    Thanks a lot!

    Just had an idea, but no Propeller at hand within few next days
    Fair enough. Have a look at my HX512 DMA driver, I use something like this in there.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-11-29 17:59
    If you remember that wrlong simply ignores the two lsbs of the hub address, it relieves you of having to make sure they're zero in phsa when the source operand of the wrlong is fetched. 'Makes the setup timing a little less fussy. But don't forget that a chain of wrlongs in sequence do not get written every four counts of phsa. Each has to wait its turn with the hub timing. This could complicate things.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 11/29/2009 6:05:40 PM GMT
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2009-11-30 03:18
    Phil Pilgrim (PhiPi) said...
    But don't forget that a chain of wrlongs in sequence do not get written every four counts of phsa. Each has to wait its turn with the hub timing. This could complicate things.
    Yes, this can make things more complex. But in application I am thinking about, 4 cogs are requirered, and PHSA increment of 16 is perfect.
  • heaterheater Posts: 3,370
    edited 2009-11-30 03:26
    Andrey, the number of COG you have running is not going to influence the timing. The HUB access window always comes around at the same frequency.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2009-11-30 03:33
    heater, nothing new to me. The access window comes every 16 cycles. PHSA is incremented by 16 from window to window. One long is 4 addressable cells (remeber "2 lsbs ignored" ?). 16 / 4 = 4 cogs, filling a memory region without gaps with free-running counters
  • heaterheater Posts: 3,370
    edited 2009-11-30 03:39
    OK now I'm with you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
Sign In or Register to comment.