This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3358: GPMC bus timing

Part Number: AM3358

 Hi,

Questions about AM3358BZCZ100 GPMC bus timing.

The attached figure shows the waveform of GPMC connected to spartan 6 and observed with Chipscope and circuit diagram.
GPMC's GPMC_FCLK(bus) frequency is 104 MHz, but within Spartan 6 it is synchronized with a clock with a frequency of 105 MHz and it is used.
The sampling clock of Chipscope is 105 MHz.(105MHz = 24MHz(clkout) x 4.375 Spartan 6 inner PLL )

The following is a question.
The rising edge of we_d <1> is 4 cycles after the rising edge of cs_d <1>, but in theory it should be 2 or 3 cycles.
(we_d <1>,cs_d <1>,oe_d <1> is positive logic.)

1cycle vary from sampling timming , why 2cycles over ?
cpu bus issue?
I want to know the reason why such things happen.

GPMC bus timing settings are as follows.

 R/W async,single mode , 16bits data bus , adr/data mux

//----------------------------------------
// FPGA sp6 bus settings
//----------------------------------------
FCLKDIVIDER   0

CSWROFFTIME  10
CSRDOFFTIME  10
CSEXTRADELAY  0
CSONTIME      1

ADVAADMUXWROFFTIME 0
ADVAADMUXRDOFFTIME 0
ADVWROFFTIME    2
ADVRDOFFTIME    2
ADVEXTRADELAY   0
ADVAADMUXONTIME 0
ADVONTIME       1

WEOFFTIME       9
WEEXTRADELAY    0
WEONTIME        3
OEAADMUXOFFTIME 0
OEOFFTIME      10
OEEXTRADELAY    0
OEAADMUXONTIME  0
OEONTIME        3

PAGEBURSTACCESSTIME 0

RDACCESSTIME  9
WRACCESSTIME  9
WRCYCLETIME  11
RDCYCLETIME  11

WRDATAONADMUXBUS    3
CYCLE2CYCLEDELAY    1
CYCLE2CYCLESAMECSEN 0
CYCLE2CYCLEDIFFCSEN 0
BUSTURNAROUND       1

IOREG32( GPMC0_BASE, GPMC_CONFIG1(1) ) =  0x1200 | FCLKDIVIDER | (1<<22)  |  (1<<21)  | (1<<18) ; // R(b21)/W(b22) wait monitor
IOREG32( GPMC0_BASE, GPMC_CONFIG2(1) ) = ( CSWROFFTIME << 16 ) | ( CSRDOFFTIME << 8 ) | ( CSEXTRADELAY << 7 ) | CSONTIME;
IOREG32( GPMC0_BASE, GPMC_CONFIG3(1) ) =   ( ADVAADMUXWROFFTIME << 28 ) | ( ADVAADMUXRDOFFTIME << 24 ) | ( ADVWROFFTIME << 16 ) | ( ADVRDOFFTIME << 8 )
             | ( ADVEXTRADELAY << 7 ) | ( ADVAADMUXONTIME << 4 ) | ( ADVONTIME );
IOREG32( GPMC0_BASE, GPMC_CONFIG4(1) ) = ( WEOFFTIME << 24 ) | ( WEEXTRADELAY << 23 ) | ( WEONTIME << 16 )
             | ( OEAADMUXOFFTIME << 13 ) | ( OEOFFTIME << 8 ) | ( OEEXTRADELAY << 7 ) | ( OEAADMUXONTIME << 4 ) | OEONTIME ;
IOREG32( GPMC0_BASE, GPMC_CONFIG5(1) ) = ( PAGEBURSTACCESSTIME << 24 ) | ( RDACCESSTIME << 16 ) | ( WRCYCLETIME << 8 ) | RDCYCLETIME;
IOREG32( GPMC0_BASE, GPMC_CONFIG6(1) ) = ( WRACCESSTIME << 24 ) | ( WRDATAONADMUXBUS << 16 ) | ( CYCLE2CYCLEDELAY << 8 )
             | ( CYCLE2CYCLESAMECSEN << 7 ) | ( CYCLE2CYCLEDIFFCSEN << 6 ) | BUSTURNAROUND;
IOREG32( GPMC0_BASE, GPMC_CONFIG7(1) ) = 0xf00| 0x0040 | 0x18; /* CSn(1) addr.= 0x18000000  FPGA*/
//
// ---------------------------------
//

Regards,
Isao

  • I don't understand much from this timing diagram. Are these the actual external GPMC signals? If so, please name them accordingly. Also please post the actual GPMC_CONFIGx register settings.
  • Additional comment from one of our team engineers:

    "I’m concerned operating Chip Scope (the internal FPGA logic analyzer tool) at a frequency that is not greater than 2x the frequency of signals being captured. Did I read this wrong? You may want to clarify the sample rate."
  • fig2.pdf

    thaks,

    The following is a setting condition.

    SPRS717J –OCTOBER 2011–REVISED APRIL 2016
    7.7.1.2 GPMC and NOR Flash—Asynchronous Mode

    GPMC_FCLK:104MHz

    --------- question part
    FA25 = E
    E=((WEOnTime - CSOnTime)x(TimeParaGranularity + 1)+0.5x(WEExtraDelay - CSExtraDelay))xGPMC_FCLK
                   3                    1                         0                                                 0                      0
    E= 2 x GPMC_FCLK  <-- 2cycles
      add 1cycle by limit of samping clock resolution.(105Mhz)
      chipscope capture signal --> 2 or 3 cycles
      chipscope capture signal --> 4 cycles , over more 1cycle?
      Will there be some kind of conditions that the cycle counts(2 x GPMC_FCLK) that I set increases?
      I investigate the spartan 6 side if there is not such situation at AM3358BZCZ100.

    ---------
    FA1 = A
    A=(CSWrOffTime - CSOnTime)x(TimeParaGranularity + 1)xGPMC_FCLK
                     10            1                               0 
    A= 9 x GPMC_FCLK
    ---------
    FA27 = F
    F=((WEOffTime - CSOnTime)x(TimeParaGranularity + 1) + 0.5x(WEExtraDelay - CSExtraDelay))xGPMC_FCLK
                    9                1                         0                                              0                               0
    F= 8 x GPMC_FCLK
    -----------
       min     typ.  max
    FAn-0.2n < FAn < FAn+2.0ns
    ---------

    Best Regards
    Isao

  • Again, please post the actual GPMC_CONFIGx register values.

  • The following is a actual GPMC Registers (from CCS5 Memory Browser).

    GPMC_Registers_DUMP.jpg (red framed rectangle -- GPMC_CONFIG1_1,..GPMC_CONFIG1_7 )

    32-Bit Hex TI Style
    0x50000000  00000060 00000000 00000000 00000000 00000000 00000001 00000000 00000000 00000000 00000000
    0x50000028  00000000 00000000 00000000 00000000 00000000 00000000 00001FF0 400000DC 00000211 00000000
    0x50000050  00000000 00000101 00000000 00000000 00001200 00101001 00020201 0F031003 000F1111 0F030101
    0x50000078  00000E48 E59F0130 E321F0DB E2800010 00000000 00000000 00641200 000A0A01 00020201 09030A03
    0x500000A0  00090B0B 09030101 00000F58 00570056 00590058 005B005A 00000000 00000000 00001000 00101001
    0x500000C8  22060514 10057016 010F1111 8F070000 00000F00 ???????? ???????? ???????? 00000000 00000000
    0x500000F0  00001000 00101001 22060514 10057016 010F1111 8F070000 00000F00 ???????? ???????? ????????
    0x50000118  00000000 00000000 00001000 00101001 22060514 10057016 010F1111 8F070000 00000F00 ????????
    0x50000140  ???????? ???????? 00000000 00000000 00001000 00101001 22060514 10057016 010F1111 8F070000
    0x50000168  00000F00 ???????? ???????? ???????? 00000000 00000000 00001000 00101001 22060514 10057016
    0x50000190  010F1111 8F070000 00000F00 ???????? ???????? ???????? 00000000 00000000 00001000 00101001
    0x500001B8  22060514 10057016 010F1111 8F070000 00000F00 ???????? ???????? ???????? 00000000 00000000
    0x500001E0  00004000 00000000 00000000 00000000 00000000 00001030 00000000 FFFFF000 00000000 00000000
    0x50000208  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    0x50000230  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    0x50000258  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    0x50000280  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

    Best Regards
    Isao

  • These settings seem valid. Have you verified the actual GPMC signals with an oscilloscope?
  • After makeover HDL(frequency x4) , the phenomenon disappeared.
    I concluded that the cause was Spartan.

    Best Regards
    Isao