39 #define THIS_NAME "TB"
41 #define TRACE_OFF 0x0000
42 #define TRACE_RCV 1 << 1
43 #define TRACE_SND 1 << 2
44 #define TRACE_ALL 0xFFFF
45 #define DEBUG_LEVEL (TRACE_OFF)
64 int main(
int argc,
char* argv[])
79 unsigned int rxEventSig=0;
80 unsigned int txEventSig=0;
90 stream<ExtendedEvent> ssEVeToAKd_Event;
92 stream<ExtendedEvent> ssAKdToTXe_Event;
93 stream<SigBit> ssAKdToEVe_RxEventSig;
94 stream<SigBit> ssAKdToEVe_TxEventSig;
101 printInfo(
THIS_NAME,
"############################################################################\n");
103 printInfo(
THIS_NAME,
"############################################################################\n");
118 else if (
loop >= 10 and
loop < 25) {
125 else if (
loop > 100 and
loop < 150) {
132 else if (
loop > 200 and
loop < 300) {
134 if (
loop % 10 == 0) {
147 ssAKdToEVe_RxEventSig,
148 ssAKdToEVe_TxEventSig,
157 if (!ssAKdToTXe_Event.empty()) {
158 ssAKdToTXe_Event.read(outEvent);
166 if (!ssAKdToEVe_RxEventSig.empty()) {
167 ssAKdToEVe_RxEventSig.read();
170 if (!ssAKdToEVe_TxEventSig.empty()) {
171 ssAKdToEVe_TxEventSig.read();
189 if (nrInpSyn != nrOutSyn)
191 if (nrInpAck < nrOutAck)
193 if ((nrInpSyn + nrInpAck) != rxEventSig)
195 if ((nrOutSyn + nrOutAck) != txEventSig)
200 printError(
THIS_NAME,
"#### TEST BENCH FAILED : TOTAL NUMBER OF ERROR(S) = %2d ####\n", nrErr);
203 printInfo(
THIS_NAME,
"FYI - You may want to check for \'ERROR\' and/or \'WARNING\' alarms in the LOG file...\n\n");
206 printInfo(
THIS_NAME,
"#############################################################\n");
208 printInfo(
THIS_NAME,
"#############################################################\n");
int main(int argc, char *argv[])
Main (does use any param).
void stepSim()
Increment the simulation counter.
void ack_delay(stream< ExtendedEvent > &siEVe_Event, stream< SigBit > &soEVe_RxEventSig, stream< SigBit > &soEVe_TxEventSig, stream< ExtendedEvent > &soTXe_Event)
ACK Delayer (AKd)
#define printError(callerName, format,...)
A macro to print an error message.
#define printInfo(callerName, format,...)
A macro to print an information message.
: Testbench for or ACK delayer (AKd) function of TOE.