Shop OBEX P1 Docs P2 Docs Learn Events
P2 Newbie Questions — Parallax Forums

P2 Newbie Questions

parskoparsko Posts: 501
edited 2013-07-06 19:14 in Propeller 2
Hi guys,

I'm amazed at the amount of documentation you guys have put together so far! Great job guys!!! It's been a while for me, and I had not realized how close this thing has become. Since last night I've been reading a bunch, and some newbie questions keep popping up in my head regarding the new assembly instructions!

Multiply.P1 was 188 clocks, worst case. P2 is 1 clock (Both assuming 16x16 multiplication)? Is this really true???
Based on:
SETMULA D/#n 'provide 1st term for signed multiply (use SETMULU for unsigned multiply)
SETMULB D/#n 'provide 2nd term and start multiply
(~16 clocks, if you want to do anything here)
GETMULL D 'get lower-long result, waits if not ready yet
GETMULH D 'get upper-long result, waits if not ready yet
P2 is ~20 clocks worst case for 32x32? Will that work for floats too?

I love the new math instructions!!!

Counter.
64 bit. This will count 3200 years, roughly, right?? What a great idea!

SDRAM
I'm assuming the gurus will write on object to make this easy for folks like me to use?? (please) Or is it just as easy as...?

COGRAM
256 longs! I love this too! I briefly read about pushing and popping, this was new to me. Can each of these longs be addressed individually? If so, this drastically reduces the variable space on each cog (if needed), and increase the instruction space, right?

SIN/COS
What is the deal with this? There's a register for it? Are the tables gone??

I feel like I can start porting stuff over already with the amount of documentation so far! It's awesome!

Is this post too early or in the wrong place?

Thanks!!!

-Parsko

Comments

  • cgraceycgracey Posts: 14,151
    edited 2013-07-06 19:14
    Parsko,

    For MACA and MACB instructions, one clock is taken. For MUL and SCL instructions, two clocks are taken. MACA/MACB is faster because the pipeline doesn't need to wait for the results. There are actually two 20x20-bit multipliers per cog that multiplex for streaming MACA or MACB instructions, but for MUL or SCL, which need results by the end of the instruction, the currently mux'd multiplier needs two clocks to get the job done.

    There is a separate larger multiplier in each cog which handles full 32x32-bit operations.

    It will be up to a programmer to implement floating point, but the big math circuits will make it easy.

    There is already an SDRAM object that is easy to use and provides 32MB from a single SDRAM device.

    Aside from a register space of 512 longs, each cog has a 256-long stack memory which can be quickly read and written sequentially, up or down.

    There are no more sin/cos or log tables because the CORDIC circuit in each cog can perform these operations much more quickly and accurately.

    If you read the latest .txt doc file, it's all in there. It's just lacking some CTR details and pin configuration information. Coming soon.
Sign In or Register to comment.