Shop OBEX P1 Docs P2 Docs Learn Events
HUB RAM interface question - Page 9 — Parallax Forums

HUB RAM interface question

12345679»

Comments

  • TonyB_TonyB_ Posts: 2,144
    edited 2022-03-02 14:40

    @evanh said:
    There's nothing new in that Tony. Not really any different from the doc. It basically says that six is the minimum. But evidence suggests the hardware actually allows less.

    Chip's post confirms burst should be at least six. Five clock delay is new info. Eight cogs is not new info ... BUT ... 6 + 5 + 8 = 19 = FIFO depth.

    I have done my own tests for 64K long fast block moves when streaming longs. I used nearly 40 different streamer frequencies, from sysclk/1.5 to syslclk/1024, mostly at the low end.

    I did eight tests for each frequency, one for each RDFAST slice, with random 16-bit waits in between. The eight slice results were always almost identical. I repeated these eight tests ten times and there was never any difference between the repeats.

    I did not see T = 9N for any frequency but there were some with bursts less than six, however total time was not excessively long. I used P2 Eval B board with 252 MHz sysclk.

  • evanhevanh Posts: 15,423
    edited 2022-03-02 19:20

    There is far more of the worst case one longword per burst that aren't that 9N thingy. eg: https://forums.parallax.com/discussion/comment/1536215/#Comment_1536215

    In fact that same example has both a case of that and also an alternating 2 to 3 longwords per burst. But because the index is high, #33, it doesn't hog the hubRAM bus anywhere near as badly as the lower indexes do.

  • TonyB_TonyB_ Posts: 2,144
    edited 2022-03-03 16:32

    Here are my test results. B is calculated burst length. T is not hugely big even when B = 2.67, e.g. D = 19 is slower than D = 8 but still useable. However, with current FIFO algorithm would expect B = 6 to 8 with transition around D = 8.

       D, mean T, B
    
     1.5, $30013, 8
       2, $2000C, 8
     2.5, $3555B, 4.57
       3, $18009, 8
     3.5, $2A008, 3.69
       4, $15559, 8
     4.5, $1CCF1, 4
       5, $1AAAF, 4
     5.5, $19250, 4
       6, $13338, 8
     6.5, $171CE, 4
       7, $16668, 4
     7.5, $14003, 5.33
       8, $12BB8, 6.75
     8.5, $16A8A, 3.2
       9, $12C87, 6
     9.5, $15B77, 3.2
      10, $14007, 4
      11, $15FE7, 2.67
      12, $1249E, 5.33
      13, $11D47, 6
      14, $11AFF, 6
      15, $12767, 4
      16, $1174F, 6
      17, $115CF, 6
      18, $11487, 6
      19, $12FF7, 2.67 
      20, $11255, 6
      24, $10F17, 6
      32, $10B2F, 6
      48, $10757, 6
      64, $1057F, 6
      96, $103A7, 6
     128, $102BF, 6
     256, $1015F, 6
     512, $100B7, 6
    1024, $1005F, 6
    

    Test code:

            rdfast  #0,pa
            setq    div_
            xinit   xmod,#0
            getct   ct1
            setq    ##65536-1
            wrlong  0,#0
            getct   ct2
            sub ct2,ct1
            sub ct2,#6
            xstop
    
    'xmod       long    %1011_0000_0000_0001 << 16 | $FFFF
    xmod        long    %1011_0000_1000_0001 << 16 | $FFFF
    
    'div_ is one of following:
    
    div_1_5     long    $55555555+1
    div_2       long    $40000000
    div_2_5     long    $33333333+1
    div_3       long    $2AAAAAAA+1
    div_3_5     long    $24924924+1
    div_4       long    $20000000
    div_4_5     long    $1C71C71C+1
    div_5       long    $19999999+1
    div_5_5     long    $1745D174+1
    div_6       long    $15555555+1
    div_6_5     long    $13B13B13+1
    div_7       long    $12492492+1
    div_7_5     long    $11111111+1
    div_8       long    $10000000
    div_8_5     long    $0F0F0F0F+1
    div_9       long    $0E38E38E+1
    div_9_5     long    $0D79435E+1
    div_10      long    $0CCCCCCC+1
    div_11      long    $0BA2E8BA+1
    div_12      long    $0AAAAAAA+1
    div_13      long    $09D89D89+1
    div_14      long    $09249249+1
    div_15      long    $08888888+1
    div_16      long    $08000000
    div_17      long    $07878787+1
    div_18      long    $071C71C7+1
    div_19      long    $06BCA1AF+1
    div_20      long    $06666666+1
    div_24      long    $05555555+1     
    div_32      long    $04000000
    div_48      long    $02AAAAAA+1
    div_64      long    $02000000
    div_96      long    $01555555+1
    div_128     long    $01000000
    div_256     long    $00800000
    div_512     long    $00400000
    div_1024    long    $00200000
    
  • evanhevanh Posts: 15,423
    edited 2022-03-03 16:14

    looks familiar :) ... and xmod is set to ...?

  • TonyB_TonyB_ Posts: 2,144
    edited 2022-03-03 16:34

    @evanh said:
    looks familiar :) ... and xmod is set to ...?

    'xmod       long    %1011_0000_0000_0001 << 16 | $FFFF
    xmod        long    %1011_0000_1000_0001 << 16 | $FFFF
    

    Choice of two, timings same for both. Added to previous post.

  • evanhevanh Posts: 15,423

    @TonyB_ said:
    Choice of two, timings same for both. Added to previous post.

    Yep, bit23 primarily impacts streamer writing to hubRAM ... namely doesn't write a thing without it.

    Streamer modes I tested are:

        mov xmod, ##DM_8bRF | DM_DIGI_IO | $ffff
        mov xmod, ##DM_16bRF | DM_DIGI_IO | $ffff
        mov xmod, ##DM_32bRF | DM_DIGI_IO | $ffff
    
    CON
        DM_8bRF     = (%1010 << 28)|(%1110 << 16)   ' 8-bit RFBYTE
        DM_16bRF    = (%1011 << 28)         ' 16-bit RFWORD
        DM_32bRF    = (%1011 << 28)|(%0001 << 16)   ' 32-bit RFLONG
    
        DM_DIGI_IO  = (1 << 23)
    
Sign In or Register to comment.