Shop OBEX P1 Docs P2 Docs Learn Events
PASM question -- HUBOP implementation in the instruction set — Parallax Forums

PASM question -- HUBOP implementation in the instruction set

WossnameWossname Posts: 174
edited 2017-07-11 19:04 in Propeller 1
I'm back with another awkward edge-case question about something nobody else will ever care about :)

(might be one for @cgracey if he has a free second during a lunch-hour, hehe)

In a nutshell, why are...

CLKSET, COGID, COGINIT, COGSTOP, LOCKNEW, LOCKRET, LOCKSET, and LOCKCLR *

...considered to be "HUB operations", whereas...

RDBYTE, RDWORD, RDLONG, WRBYTE, WRWORD and WRLONG

...are not described in the same manner?

All the above take need HUB sync and take between 8 and 23 system clocks to run.

I realise that the first 8 all share the same opcode number ('iiiiii' field in the 32 bits mapping are all %000011). And that the three LSBs of the source field are used to determine which HUBOP is executed. But there why not use the 4 LSBs (it looks to be available(?)) instead and just incorporate the latter 6 opcodes into the same HUPOB %000011 umbrella?

I'm merely curious, I noticed this just now while writing my simulator.









*Ahh, the Oxford comma :P

Comments

  • The memory operations use src and dst to specify registers so they need unique op fields,
    whereas the other hub ops only use a dst register and can share an op-field value.

    This is the sort of compromise you always see in real instruction sets (except perhaps in
    some VLIW or microcoded architectures).

    Note that the RDLONG and WRLONG operations actually have the same op-field, the r-flag
    determines which one is meant...
  • jmgjmg Posts: 15,148
    Wossname wrote: »
    In a nutshell, why are...

    CLKSET, COGID, COGINIT, COGSTOP, LOCKNEW, LOCKRET, LOCKSET, and LOCKCLR *

    ...considered to be "HUB operations", whereas...

    RDBYTE, RDWORD, RDLONG, WRBYTE, WRWORD and WRLONG

    ...are not described in the same manner?
    Perhaps not well worded.

    The opcode DOCs do expand this a little, some are control commands and some are RAM (or FIFO) commands

    CLKSET Hub Control - Clock
    COGID... Hub Control - Cogs
    LOCKNEW... Hub Control - Locks

    WRBYTE... Hub RAM - Write

    RDFAST Hub FIFO - New Read
    RFWORD Hub FIFO - Read

    I'm not sure the Control group even need 'Hub' word in there, as they are more P2 Chip Config & Control, than anything 'HUB memory' related
Sign In or Register to comment.