74 #pragma HLS INTERFACE ap_vld register port=sys_reset name=piSysReset
75 #pragma HLS INTERFACE ap_vld register port=DIAG_CTRL_IN name=piMMIO_diag_ctrl
76 #pragma HLS INTERFACE ap_ovld register port=DIAG_STAT_OUT name=poMMIO_diag_stat
77 #pragma HLS INTERFACE ap_ovld register port=debug_out name=poDebug
80 #pragma HLS INTERFACE axis register both port=soMemRdCmdP0
81 #pragma HLS INTERFACE axis register both port=siMemRdStsP0
82 #pragma HLS INTERFACE axis register both port=siMemReadP0
84 #pragma HLS DATA_PACK variable=soMemRdCmdP0 instance=soMemRdCmdP0
85 #pragma HLS DATA_PACK variable=siMemRdStsP0 instance=siMemRdStsP0
88 #pragma HLS INTERFACE axis register both port=soMemWrCmdP0
89 #pragma HLS INTERFACE axis register both port=siMemWrStsP0
90 #pragma HLS INTERFACE axis register both port=soMemWriteP0
92 #pragma HLS DATA_PACK variable=soMemWrCmdP0 instance=soMemWrCmdP0
93 #pragma HLS DATA_PACK variable=siMemWrStsP0 instance=siMemWrStsP0
127 switch(DIAG_CTRL_IN) {
130 *DIAG_STAT_OUT = (0 << 1) |
wasError;
143 *DIAG_STAT_OUT = 0b10;
168 *DIAG_STAT_OUT = (1 << 1) |
wasError;
171 *DIAG_STAT_OUT = (0 << 1) |
wasError;
182 *DIAG_STAT_OUT = (1 << 1) |
wasError;
195 *DIAG_STAT_OUT = (0 << 1) |
wasError;
208 if (!soMemWrCmdP0.full()) {
217 if (!soMemWriteP0.full()) {
221 ap_uint<8> keepVal = 0xFF;
222 memP0.
tkeep = (ap_uint<64>) (keepVal, keepVal, keepVal, keepVal, keepVal, keepVal, keepVal, keepVal);
233 soMemWriteP0.write(memP0);
239 if (!siMemWrStsP0.empty()) {
241 siMemWrStsP0.read(memWrStsP0);
266 if (!soMemRdCmdP0.full()) {
274 if (!siMemReadP0.empty()) {
276 siMemReadP0.read(memP0);
280 printf(
"error in pattern reading!\n");
288 if (memP0.
tlast == 1)
297 if (!siMemRdStsP0.empty()) {
299 siMemRdStsP0.read(memRdStsP0);
323 if (!soMemWrCmdP0.full()) {
333 if (!soMemWriteP0.full()) {
340 memP0.
tdata = (currentAntiPattern,currentAntiPattern,currentAntiPattern,currentAntiPattern,currentAntiPattern,currentAntiPattern,currentAntiPattern,currentAntiPattern);
341 ap_uint<8> keepVal = 0xFF;
342 memP0.
tkeep = (ap_uint<64>) (keepVal, keepVal, keepVal, keepVal, keepVal, keepVal, keepVal, keepVal);
353 soMemWriteP0.write(memP0);
359 if (!siMemWrStsP0.empty()) {
361 siMemWrStsP0.read(memWrStsP0);
376 if (!soMemRdCmdP0.full()) {
385 if (!siMemReadP0.empty()) {
387 siMemReadP0.read(memP0);
391 if (memP0.
tdata != ((ap_uint<512>) (currentAntiPattern,currentAntiPattern,currentAntiPattern,currentAntiPattern,currentAntiPattern,currentAntiPattern,currentAntiPattern,currentAntiPattern)) )
393 printf(
"error in antipattern reading!\n");
401 if (memP0.
tlast == 1)
410 if (!siMemRdStsP0.empty()) {
412 siMemRdStsP0.read(memRdStsP0);
ap_uint< 8 > STS_to_Vector(DmSts sts)
ap_uint< 33 > lastCheckedAddress
ap_uint< 32 > patternWriteNum
ap_uint< 64 > currentMemPattern
ap_uint< 33 > currentPatternAdderss
#define CHECK_CHUNK_SIZE
This define configures tha AXI burst size of DDRM memory-mapped interfaces AXI4 allows 4KiB,...
#define TRANSFERS_PER_CHUNK
#define CYCLES_UNTIL_TIMEOUT