I apologize ahead of time for the length and formatting of this post (I tried i swear). Any help would be greatly appreciated and please excuse me for my naivete in concerns to certain topics.
I have the GPMC configured to write then read a 2048 word block from an FPGA. The data written to the device is randomly generated. When comparing the data written vs. read there occurs errors every 10,000 or so accesses. Each access being an entire read and write of the 2048 words. We have tested it under a variety of conditions(all synchronous but will be trying it asynchronously soon).
Tried:
-16 word/8 word/ 4 word
-96/48/24 Mhz
-With/Without Cycle Delay Enabled
-With/Without EDMA
Weird things about it:
-For a given data set, if an error occurs the error reoccurs at the same address.
-For a data set that has previously generated errors, the likelihood of an error occurring increases drastically.
The rate of errors goes from tens of thousands to only a few accesses before errors reoccur.
-Between error generating datasets, the error locations seem to be unique.
-The errors are typically an offset in the words.
As seen from the logic analyzer on the fpga, it appears as if the correct data is being sent from the fpga to the beaglebone. At least verifying that
the data was correctly written in the first place to the fpga.
Configuration of FPGA:
#define GPMC_DEVICE_SIZE GPMC_16MB_SIZE
//Single Read Time Settings
#define CSONTIME (0x00)//
#define ADVRDOFFTIME (0x01)//
#define ADVONTIME (0x00)//
#define OEONTIME (0x01)//
#define RDACCESSTIME (0x04)//
#define RDCYCLETIME ((0x04) + 1)//
#define CSRDOFFTIME ((0x04) + 1)//
#define OEOFFTIME ((0x04))//
//Single Write Time Settings
#define CSWROFFTIME (0x03)//
#define ADVWROFFTIME (0x01)//
#define WEOFFTIME ((CSWROFFTIME))//
#define WEONTIME ((CSWROFFTIME-(2)))//
#define WRCYCLETIME ((CSWROFFTIME))//
#define WRACCESSTIME ((CSWROFFTIME-(1)))//
//Other
#define CYCLEDELAY 0x00//
#define CYCLEDELAYEN 0x01
#define SYNCHWREN 0x01
#define SYNCHRDEN 0x01
#define WRMULTEN 0x01
#define RDMULTEN 0x01
#define WAITMONITORMODE GPMC_CONFIG1_0_WAITMONITORINGTIME_NOTDEFINED
#define CLKACTSTART GPMC_CONFIG1_0_CLKACTIVATIONTIME_ATSTART //GPMC_CONFIG1_0_CLKACTIVATIONTIME_TWOCLKB4
#define FCLOCKDIV GPMC_CONFIG1_0_GPMCFCLKDIVIDER_DIVBY2
#define TIMEGRANULAR GPMC_CONFIG1_0_TIMEPARAGRANULARITY_X2
#define WRAPBURSTEN 0x00u
//#define WORDPAGELEN GPMC_CONFIG1_0_ATTACHEDDEVICEPAGELENGTH_FOUR
#define WORDPAGELEN GPMC_CONFIG1_0_ATTACHEDDEVICEPAGELENGTH_SIXTEEN
#define DATAWIDTH GPMC_CONFIG1_0_DEVICESIZE_SIXTEENBITS
#define DEVICETYPE GPMC_CONFIG1_0_DEVICETYPE_NORLIKE
#define MUXADDATATYPE GPMC_CONFIG1_0_MUXADDDATA_NONMUX
//#define MUXADDATATYPE GPMC_CONFIG1_0_MUXADDDATA_MUX
#define WRDATAONADMUXBUS ADVWROFFTIME
#define CSEXTRADELAY GPMC_CONFIG2_0_CSEXTRADELAY_NOTDELAYED
#define ADVEXTRADELAY GPMC_CONFIG3_0_ADVEXTRADELAY_NOTDELAYED
#define WEEXTRADELAY GPMC_CONFIG4_0_WEEXTRADELAY_NOTDELAYED
#define OEEXTRADELAY GPMC_CONFIG4_0_OEEXTRADELAY_NOTDELAYED
#define PAGEBURSTACCTIME 0x01// //0-15
#define BUSTURNAROUND 0x00 //0-15
Results when data is always randomly generate(from serial):
Pass: 46000
Pass: 47000
Error, address 316
w0: 0x5A76, expected: 0x5643
w1: 0x092D, expected: 0x5A76
w2: 0x3D24, expected: 0x092D
w3: 0x20A4, expected: 0x3D24
Pass: 47095
Average runs to fail: 29907
Error, address 317
w0: 0x3D0A, expected: 0x20A4
w1: 0x05F3, expected: 0x3D0A
w2: 0x35CA, expected: 0x05F3
w3: 0x444A, expected: 0x35CA
Pass: 0
Average runs to fail: 29907
Error, address 318
w0: 0x0338, expected: 0x444A
w1: 0x2F05, expected: 0x0338
w2: 0x08E7, expected: 0x2F05
w3: 0x42A7, expected: 0x08E7
Pass: 0
Average runs to fail: 29907
Error, address 319
w0: 0x355E, expected: 0x42A7
w1: 0x1A91, expected: 0x355E
w2: 0x5F82, expected: 0x1A91
w3: 0x121E, expected: 0x5F82
Pass: 0
Average runs to fail: 29673
Pass: 1000
Pass: 2000
Pass: 3000
Results when data is locked in after first error generation:
ass: 11000
Pass: 12000
Pass: 13000
Pass: 14000
Pass: 15000
Error, address 128
w0: 0x2033, expected: 0x2033
w1: 0x2033, expected: 0x1322
w2: 0x1322, expected: 0x1D3B
w3: 0x1D3B, expected: 0x16BB
Pass: 15458
Average runs to fail: 4294967295
Error, address 129
w0: 0x16BB, expected: 0x58BF
w1: 0x58BF, expected: 0x3396
w2: 0x3396, expected: 0x50F9
w3: 0x50F9, expected: 0x374D
Pass: 0
Average runs to fail: 4294967295
Error, address 130
w0: 0x374D, expected: 0x19D4
w1: 0x19D4, expected: 0x1716
w2: 0x1716, expected: 0x2BA7
w3: 0x2BA7, expected: 0x4271
Pass: 0
Average runs to fail: 4294967295
Error, address 131
w0: 0x4271, expected: 0x0D6E
w1: 0x0D6E, expected: 0x632F
w2: 0x632F, expected: 0x0274
w3: 0x0274, expected: 0x1F77
Pass: 0
Average runs to fail: 15458
Error, address 128
w0: 0x2033, expected: 0x2033
w1: 0x1D3B, expected: 0x1322
w2: 0x16BB, expected: 0x1D3B
w3: 0x58BF, expected: 0x16BB
Pass: 17
Average runs to fail: 15475
Error, address 129
w0: 0x3396, expected: 0x58BF
w1: 0x50F9, expected: 0x3396
w2: 0x374D, expected: 0x50F9
w3: 0x19D4, expected: 0x374D
Pass: 0
Average runs to fail: 15475
Error, address 130
w0: 0x1716, expected: 0x19D4
w1: 0x2BA7, expected: 0x1716
w2: 0x4271, expected: 0x2BA7
w3: 0x0D6E, expected: 0x4271
Pass: 0
Average runs to fail: 15475
Error, address 131
w0: 0x632F, expected: 0x0D6E
w1: 0x0274, expected: 0x632F
w2: 0x1F77, expected: 0x0274
w3: 0x502C, expected: 0x1F77
Pass: 0
As you can see the error occurs at the same place and only takes 17 passes before it occurs again. This is pretty typical of what i have been seeing.
Thank you for your time if you have read this far, I have tried quite a few things but the errors seem to persist and I think I have run out of theories at this point. Any input is greatly appreciated, and while it is strange that the numbers written seem to play a role in this I have not ruled out other possibilities(e.g. bad timing, bad trace layouts to FPGA, etc.). It still is strange though that it can do sometimes 100's of thousands of writes with no errors, but with data sets it seems to have difficulties even doing a hundreds cycles prior to getting an error.
Thanks again,
Rodney