question on p2 hub ram access
laurent974
Posts: 77
in Propeller 2
My question is very neophyte one, but now that i can see this image from the new forum website:
The following question is rising: why is it necessary to turn the blue dots ?
Comments
They represent the hub address low order long addresses, specifically hub address bits[4..2] ie aaaa aaaa aaaa aaae eebb where eee equal the blue numbers 0-7 and bb = the byte 0-3 within the long.
Hub addresses are 20 bits b[19..0] but be aware the current P2 only has 512KB. The top 16KB of the 1MB can be dual mapped into the top 16KB of the 512KB addresses.
Physically, hubRAM is eight blocks of SRAM. Each block has its own bus interface, just like each cog also has its own bus interface. They can all be accessed in parallel with a unique address each. This allows all cogs to simultaneously access hubRAM, all the time.
But only one cog can access a specific block at a time. Each cog has to wait for its allotted time slot to a particular block. The blocks are arranged interleaved on the least 3 address bits (32-bit granularity). Meaning that incrementing addresses step through the blocks each and every clock cycle. Which means it takes 8 clock cycles for every cog to cycle through all the blocks.
There is a big matrix of switches and routes to make it all work. Known as a cross-point, or cross-bar, switch.
Do Not forget there is a small cache between Cog and blue dot
You can safely allot that to the cog itself. The latency to start filling the FIFO is about the same as a RDLONG instruction (which doesn't use the FIFO).