diff --git a/cmod/include/axi/AxiMasterGate/testbench/Host.h b/cmod/include/axi/AxiMasterGate/testbench/Host.h index 91f15947..7e45f3ea 100644 --- a/cmod/include/axi/AxiMasterGate/testbench/Host.h +++ b/cmod/include/axi/AxiMasterGate/testbench/Host.h @@ -189,7 +189,7 @@ SC_MODULE(Host) { << "\t data = " << hex << rdResp.data << "\t expected = " << hex << rd_data_expected << std::endl, kDebugLevel); - NVHLS_ASSERT_MSG(rdResp.data == rd_data_expected, "Read response data did not match expected value"); + CMOD_ASSERT_MSG(rdResp.data == rd_data_expected, "Read response data did not match expected value"); if (rdResp.last == 1) ctr++; if (ctr == read_count) done_read = 1; diff --git a/cmod/include/axi/testbench/MasterFromFile.h b/cmod/include/axi/testbench/MasterFromFile.h index fbdae20f..c476ad71 100644 --- a/cmod/include/axi/testbench/MasterFromFile.h +++ b/cmod/include/axi/testbench/MasterFromFile.h @@ -104,7 +104,7 @@ template class MasterFromFile std::vector< std::vector > dataList = reader.readCSV(); for (unsigned int i=0; i < dataList.size(); i++) { std::vector vec = dataList[i]; - NVHLS_ASSERT_MSG(vec.size() == 5, "Each request must have five elements"); + CMOD_ASSERT_MSG(vec.size() == 5, "Each request must have five elements"); if (!burst_inflight) delay_q.push(atoi(vec[0].c_str())); if (vec[1] == "R") { if (!burst_inflight) { @@ -118,8 +118,8 @@ template class MasterFromFile sc_uint len; ss_len << hex << vec[4]; ss_len >> len; - if (len) NVHLS_ASSERT_MSG(axiCfg::useBurst, "A burst transaction was requested but the AXI config does not support bursts"); - NVHLS_ASSERT_MSG(axiCfg::maxBurstSize >= len, "A burst transaction was requested that is longer than the maximum allowed by the AXI config"); + if (len) CMOD_ASSERT_MSG(axiCfg::useBurst, "A burst transaction was requested but the AXI config does not support bursts"); + CMOD_ASSERT_MSG(axiCfg::maxBurstSize >= len, "A burst transaction was requested that is longer than the maximum allowed by the AXI config"); addr_pld.len = 0; addr_pld.len = static_cast(len); raddr_q.push(addr_pld); @@ -144,8 +144,8 @@ template class MasterFromFile sc_uint len; ss_len << hex << vec[4]; ss_len >> len; - if (len) NVHLS_ASSERT_MSG(axiCfg::useBurst, "A burst transaction was requested but the AXI config does not support bursts"); - NVHLS_ASSERT_MSG(axiCfg::maxBurstSize >= len, "A burst transaction was requested that is longer than the maximum allowed by the AXI config"); + if (len) CMOD_ASSERT_MSG(axiCfg::useBurst, "A burst transaction was requested but the AXI config does not support bursts"); + CMOD_ASSERT_MSG(axiCfg::maxBurstSize >= len, "A burst transaction was requested that is longer than the maximum allowed by the AXI config"); addr_pld.len = static_cast(len); waddr_q.push(addr_pld); burst_inflight = int(len); @@ -165,10 +165,10 @@ template class MasterFromFile } wdata_q.push(wr_data_pld); } else if (vec[1] == "Q") { - NVHLS_ASSERT_MSG(enable_interrupts, "Interrupt command read, but interrupts are not enabled"); + CMOD_ASSERT_MSG(enable_interrupts, "Interrupt command read, but interrupts are not enabled"); req_q.push(2); } else { - NVHLS_ASSERT_MSG(1, "Requests must be R or W or Q"); + CMOD_ASSERT_MSG(1, "Requests must be R or W or Q"); } } @@ -192,7 +192,7 @@ template class MasterFromFile if (delay > 0) wait(delay); delay_q.pop(); if (req_q.front() == 2) { - NVHLS_ASSERT_MSG(enable_interrupts,"Interrupt command found, but interrupts are not enabled"); + CMOD_ASSERT_MSG(enable_interrupts,"Interrupt command found, but interrupts are not enabled"); CDCOUT(sc_time_stamp() << " " << name() << " Beginning wait for interrupt" << endl, kDebugLevel); while (interrupt.read() == 0) wait(); @@ -226,11 +226,11 @@ template class MasterFromFile CDCOUT(sc_time_stamp() << " " << name() << " Received read response: [" << data_pld << "]" << endl, kDebugLevel); - NVHLS_ASSERT_MSG(data_pld.data == rresp_q.front(),"Read response did not match expected value"); + CMOD_ASSERT_MSG(data_pld.data == rresp_q.front(),"Read response did not match expected value"); rresp_q.pop(); } while (!data_pld.last); } else { - NVHLS_ASSERT_MSG(0,"Unexpected value in req_q"); + CMOD_ASSERT_MSG(0,"Unexpected value in req_q"); } req_q.pop(); } diff --git a/cmod/include/axi/testbench/Slave.h b/cmod/include/axi/testbench/Slave.h index 206c3b3d..088195da 100644 --- a/cmod/include/axi/testbench/Slave.h +++ b/cmod/include/axi/testbench/Slave.h @@ -87,7 +87,7 @@ class Slave : public sc_module { typename axi4_::AddrPayload rd_addr_pld; if (if_rd.nb_aread(rd_addr_pld)) { typename axi4_::Addr addr = rd_addr_pld.addr; - NVHLS_ASSERT_MSG(addr % bytesPerBeat == 0, "Addresses must be word aligned"); + CMOD_ASSERT_MSG(addr % bytesPerBeat == 0, "Addresses must be word aligned"); CDCOUT(sc_time_stamp() << " " << name() << " Received read request: [" << rd_addr_pld << "]" << endl, kDebugLevel); @@ -174,7 +174,7 @@ class Slave : public sc_module { // Grab a write request (addr) and put it in the local queue if (if_wr.aw.PopNB(wr_addr_pld)) { - NVHLS_ASSERT_MSG(wr_addr_pld.addr.to_uint64() % bytesPerBeat == 0, "Addresses must be word aligned"); + CMOD_ASSERT_MSG(wr_addr_pld.addr.to_uint64() % bytesPerBeat == 0, "Addresses must be word aligned"); wr_addr.push(wr_addr_pld); CDCOUT(sc_time_stamp() << " " << name() << " Received write request: [" << wr_addr_pld << "]" diff --git a/cmod/include/axi/testbench/SlaveFromFile.h b/cmod/include/axi/testbench/SlaveFromFile.h index 2545e845..3a0942ac 100644 --- a/cmod/include/axi/testbench/SlaveFromFile.h +++ b/cmod/include/axi/testbench/SlaveFromFile.h @@ -79,7 +79,7 @@ template class SlaveFromFile : public sc_module { std::vector< std::vector > dataList = reader.readCSV(); for (unsigned int i=0; i < dataList.size(); i++) { std::vector vec = dataList[i]; - NVHLS_ASSERT_MSG(vec.size() == 2, "Each request must have two elements"); + CMOD_ASSERT_MSG(vec.size() == 2, "Each request must have two elements"); std::stringstream ss; sc_uint addr_sc_uint; ss << hex << vec[0];