59 ap_uint<2> DIAG_CTRL_IN;
60 ap_uint<2> DIAG_STAT_OUT;
61 ap_uint<16> debug_out;
65 DmSts dmSts_MemWrStsP0;
66 DmSts dmSts_MemRdStsP0;
72 #define DUT mem_test_flash_main(sys_reset, DIAG_CTRL_IN, &DIAG_STAT_OUT, &debug_out,sROL_Shl_Mem_RdCmdP0, sSHL_Rol_Mem_RdStsP0, sSHL_Rol_Mem_ReadP0,sROL_Shl_Mem_WrCmdP0, sSHL_Rol_Mem_WrStsP0, sROL_Shl_Mem_WriteP0);
79 assert(DIAG_STAT_OUT = 0b10);
81 #define TEST_ITERATIONS (MEM_END_ADDR/CHECK_CHUNK_SIZE + 1)
92 assert(dmCmd_MemCmdP0.
type == 1 && dmCmd_MemCmdP0.
dsa == 0 && dmCmd_MemCmdP0.
eof == 1 && dmCmd_MemCmdP0.
drr == 0 && dmCmd_MemCmdP0.
tag == 0x7);
102 assert(memP0.
tlast == 0);
104 assert(memP0.
tlast == 1);
107 assert(memP0.
tkeep == 0xffffffffffffffff);
114 dmSts_MemWrStsP0.
tag = 7;
115 dmSts_MemWrStsP0.
okay = 1;
116 dmSts_MemWrStsP0.
interr = 0;
117 dmSts_MemWrStsP0.
slverr = 0;
118 dmSts_MemWrStsP0.
decerr = 0;
121 printf(
"debug_out: 0x%x\n", (uint16_t) debug_out);
122 assert((debug_out & 0xFF) == 0x0087);
129 printf(
"write done.\n");
140 assert(dmCmd_MemCmdP0.
type == 1 && dmCmd_MemCmdP0.
dsa == 0 && dmCmd_MemCmdP0.
eof == 1 && dmCmd_MemCmdP0.
drr == 0 && dmCmd_MemCmdP0.
tag == 0x7);
147 dmSts_MemRdStsP0.
tag = 7;
148 dmSts_MemRdStsP0.
okay = 1;
149 dmSts_MemRdStsP0.
interr = 0;
150 dmSts_MemRdStsP0.
slverr = 0;
151 dmSts_MemRdStsP0.
decerr = 0;
154 printf(
"debug_out: 0x%x\n", (uint16_t) debug_out);
155 assert(debug_out == 0x8787);
162 printf(
"RAMD completed\n");
174 assert(dmCmd_MemCmdP0.
type == 1 && dmCmd_MemCmdP0.
dsa == 0 && dmCmd_MemCmdP0.
eof == 1 && dmCmd_MemCmdP0.
drr == 0 && dmCmd_MemCmdP0.
tag == 0x7);
185 assert(memP0.
tlast == 0);
187 assert(memP0.
tlast == 1);
190 assert(memP0.
tkeep == 0xffffffffffffffff);
198 dmSts_MemWrStsP0.
tag = 7;
199 dmSts_MemWrStsP0.
okay = 1;
200 dmSts_MemWrStsP0.
interr = 0;
201 dmSts_MemWrStsP0.
slverr = 0;
202 dmSts_MemWrStsP0.
decerr = 0;
205 printf(
"debug_out: 0x%x\n", (uint16_t) debug_out);
206 assert((debug_out & 0xFF) == 0x0087);
212 assert(dmCmd_MemCmdP0.
type == 1 && dmCmd_MemCmdP0.
dsa == 0 && dmCmd_MemCmdP0.
eof == 1 && dmCmd_MemCmdP0.
drr == 0 && dmCmd_MemCmdP0.
tag == 0x7);
219 dmSts_MemRdStsP0.
tag = 7;
220 dmSts_MemRdStsP0.
okay = 1;
221 dmSts_MemRdStsP0.
interr = 0;
222 dmSts_MemRdStsP0.
slverr = 0;
223 dmSts_MemRdStsP0.
decerr = 0;
226 printf(
"debug_out: 0x%x\n", (uint16_t) debug_out);
227 assert(debug_out == 0x8787);
229 printf(
"%d. Write & Read Pattern completed.\n", j);
236 assert(dmCmd_MemCmdP0.
type == 1 && dmCmd_MemCmdP0.
dsa == 0 && dmCmd_MemCmdP0.
eof == 1 && dmCmd_MemCmdP0.
drr == 0 && dmCmd_MemCmdP0.
tag == 0x7);
248 assert(memP0.
tlast == 0);
250 assert(memP0.
tlast == 1);
253 assert(memP0.
tkeep == 0xffffffffffffffff);
261 dmSts_MemWrStsP0.
tag = 7;
262 dmSts_MemWrStsP0.
okay = 1;
263 dmSts_MemWrStsP0.
interr = 0;
264 dmSts_MemWrStsP0.
slverr = 0;
265 dmSts_MemWrStsP0.
decerr = 0;
268 printf(
"debug_out: 0x%x\n", (uint16_t) debug_out);
269 assert(debug_out == 0x8787);
275 assert(dmCmd_MemCmdP0.
type == 1 && dmCmd_MemCmdP0.
dsa == 0 && dmCmd_MemCmdP0.
eof == 1 && dmCmd_MemCmdP0.
drr == 0 && dmCmd_MemCmdP0.
tag == 0x7);
282 dmSts_MemRdStsP0.
tag = 7;
283 dmSts_MemRdStsP0.
okay = 1;
284 dmSts_MemRdStsP0.
interr = 0;
285 dmSts_MemRdStsP0.
slverr = 0;
286 dmSts_MemRdStsP0.
decerr = 0;
289 printf(
"debug_out: 0x%x\n", (uint16_t) debug_out);
290 assert(debug_out == 0x8787);
292 printf(
"%d. Write & Read Antipattern completed.\n", j);
300 printf(
"------ DONE ------\n");
ap_uint< 64 > currentMemPattern
#define CHECK_CHUNK_SIZE
This define configures tha AXI burst size of DDRM memory-mapped interfaces AXI4 allows 4KiB,...
#define TRANSFERS_PER_CHUNK