URL
https://opencores.org/ocsvn/usb2uart/usb2uart/trunk
Subversion Repositories usb2uart
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 2 to Rev 3
- ↔ Reverse comparison
Rev 2 → Rev 3
/usb2uart/trunk/verify/agents/usb/usb_agent.v
0,0 → 1,3809
|
`timescale 1 ns/ 1 ns |
module usb_agent ( |
dpls, |
dmns |
); |
|
inout dpls, dmns; |
wire [24:0] ControlPkt; |
|
|
|
assign dpls = 1'bz; |
assign dmns = 1'bz; |
|
pullup(dpls); |
pulldown(dmns); |
|
|
// ------------------------------ |
// Module Instantiations.--------------- |
// ------------------------------ |
|
|
// a. Host Bus Model Instantiation. |
|
host_usb_bfm bfm_inst( .DPLS( dpls ), |
.DMNS( dmns ), |
.ControlPkt( ControlPkt) |
); |
|
|
|
|
|
endmodule |
|
module host_usb_bfm( |
DPLS, |
DMNS, |
ControlPkt |
); |
|
inout DPLS; |
inout DMNS; |
output [24:0] ControlPkt; |
|
wire DPLS; |
wire DMNS; |
|
reg zDPLS; // this register is driven in host_usb_drvr.v |
reg zDMNS; // this register is driven in host_usb_drvr.v |
|
wire clk; // clock |
|
// encoder signals |
reg enc_enbl; // signal to enable encoder block |
reg enc_reset_n; // signal to reset encoder block |
reg [7:0] enc_data_in; // byte wide data being pumped into the encoder |
wire enc_count_out; // wire for encoder count_out signal |
wire enc_data_out_valid; // wire for encoder data_out_valid signal |
reg enc_last_byte; |
wire [3:0] enc_bit_count_out; |
|
// decoder signals |
reg dec_enbl; // signal to enable decoder block |
reg dec_reset_n; // signal to reset decoder block |
wire dec_ser_data_rdy; // signal to indicate serial data is ready |
wire dec_par_data_rdy; // signal to indicate parallel data is ready |
wire [7:0] dec_par_data_out; // parallel data out from decoder |
wire [31:0] dec_recv_bit_count; // gives the number of bits received so far |
wire dec_bit_stuff_err; // goes high if there is a bit stuff error in |
// the present data stream |
// dpll signals |
reg clk48; |
reg clk6; |
reg dpll_reset_n; |
wire dpll_clk; |
reg rec_clk; |
wire clk4x; |
|
// Jitter control registers |
|
integer tmpJitterPeriod; |
integer tmpJitterCount; |
|
// clock related registers |
reg HSClkComp; // compensation when generating the 4x clock |
reg HSClkCompToggle; |
|
//////////////////////////////////////////////// |
// // |
// Added to accomodate 1 ms slots and files // |
// // |
//////////////////////////////////////////////// |
|
// reg [24:0] ControlPkt; |
|
// Control Packet format; |
|
// [0] : 1 - Assert BufOk/0 - Donot assert BufOk. |
// [1] : 1 - Create BufOk Error/0 - Donot Create BufOk Error. |
// [9:2] : Start Byte for In Transfers. |
// [10] : 1 - Create a 4 Clock Protocol violation/0 - donot create vio. |
// [20:11]: Errors after num transfers. |
// [21] : Stalled or Not. |
// [22] : Check for data on Application Bus during Writes. |
// [23] : Check for the Hshk on the Application Bus. |
// [24] : If check for hshkis true, 1'b1 = XfrAck, 1'b0 = XfrNack. |
|
// integer ByteCount; |
// integer Status ; |
|
reg [6:0] dutAddr; |
reg sofOnFlag ; |
integer sofPeriod ; |
reg interruptOnFlag ; |
reg interruptRequest ; |
integer interruptTimer ; |
integer interruptPeriod ; |
reg controlRequest ; |
reg controlGrant ; |
reg bulkInOnFlag ; |
reg bulkOutOnFlag ; |
|
parameter DumpToFile = 1; |
|
parameter IN_OUT_BUF_SIZE = 2048, // outgoing buffer data size |
IN_OUT_BUF_PTR_SIZE = 12, // number of bits in out buff pointer |
|
XMIT_BUF_SIZE = 1028, // Xmitbuffer size |
RECV_BUF_SIZE = 1028; // Recvbuffer size |
|
parameter OUT_TOKEN = 4'b0001, |
IN_TOKEN = 4'b1001, |
SOF_TOKEN = 4'b0101, |
SETUP_TOKEN = 4'b1101, |
DATA0 = 4'b0011, |
DATA1 = 4'b1011, |
ACK = 4'b0010, |
NAK = 4'b1010, |
STALL = 4'b1110, |
PREAMBLE = 4'b1100; |
|
parameter GET_CONFIGURATION = 01, // Standard Request Codes for end points |
GET_DESCRIPTOR = 02, |
GET_INTERFACE = 03, |
GET_MAX_PACKET = 04, |
GET_STATUS = 05, |
SET_ADDRESS = 06, |
SET_CONFIGURATION = 07, |
SET_DESCRIPTOR = 08, |
SET_IDLE = 09, |
SET_INTERFACE = 10, |
SET_MAX_PACKET = 11, |
SET_REMOTE_WAKEUP = 12, |
SET_STATUS = 13; |
|
parameter DEVICE = 1, // Descriptor Types |
CONFIGURATION = 2, |
STRING = 3, |
INTERFACE = 4, |
ENDPOINT = 5; |
|
parameter GET_HUB_STATUS = 0, // Hub class request codes |
GET_PORT_STATUS = 0, |
CLEAR_FEATURE = 1, |
GET_STATE = 2, |
SET_FEATURE = 3, |
// reserved for future use 4-5 |
GET_HUB_DESCRIPTOR = 6, |
SET_HUB_DESCRIPTOR = 7; |
|
parameter C_HUB_LOCAL_POWER = 00, // Hub class feature selectors |
C_HUB_OVER_CURRENT = 01, |
PORT_CONNECTION = 00, |
PORT_ENABLE = 01, |
PORT_SUSPEND = 02, |
PORT_OVER_CURRENT = 03, |
PORT_RESET = 04, |
PORT_POWER = 08, |
PORT_LOW_SPEED = 09, |
C_PORT_CONNECTION = 16, |
C_PORT_ENABLE = 17, |
C_PORT_SUSPEND = 18, |
C_PORT_OVER_CURRENT = 19, |
C_PORT_RESET = 20; |
|
parameter true = 1'b1, |
True = 1'b1, |
TRUE = 1'b1, |
false = 1'b0, |
False = 1'b0, |
FALSE = 1'b0; |
|
parameter HIGH_SPEED = 1'b1, |
LOW_SPEED = 1'b0; |
|
parameter J = 2'b10, // high speed idle state {DPLS, DMNS} |
K = 2'b01, // low speed idle state {DPLS, DMNS} |
SE0 = 2'b00, // single ended zero {DPLS, DMNS} |
SE1 = 2'b11; // single ended 1 {DPLS, DMNS} |
|
parameter MAX_CNTRL_INTERLEAVE= 6; // number of control transactions that can |
// interleaved |
|
parameter NUM_ENDPT_FILES = 12; // number of transmit files associtated |
// with endpoints |
|
parameter READ = 2'b10; |
parameter WRITE = 2'b11; |
|
parameter BINARY = 1'b0; |
parameter HEX = 1'b1; |
|
parameter XMIT_BUF = 4'b0000; |
parameter OUT_BUFF = 4'b0001; |
|
parameter NumCharsInFileName = 20; // number of characters in a file name |
parameter CharByte = 8; // number of bits for a character |
parameter MaxFileSize = 9 * 1024; // 9k file size |
|
reg [7:0] in_out_buf [0 : IN_OUT_BUF_SIZE - 1]; |
reg [11:0] in_out_buf_ptr; |
|
reg [7:0] XmitBuffer [0 : XMIT_BUF_SIZE]; // Xmit buffer |
reg [7:0] RecvBuffer [0 : RECV_BUF_SIZE]; // Recv buffer |
|
reg [10:0] FrameNumber; // frame number |
|
reg [15:0] InDataToggle [127:0]; // set\unset Data0/Data1 for data Xfers |
reg [15:0] OutDataToggle [127:0]; // set\unset Data0/Data1 for data Xfers |
|
reg TimeOut; // register to specify timeout |
integer TimeOutVal; // value to specify for how many bit times |
// to wait for before time out |
|
reg [31:0] ResponseLatency; // turnaround time for the host before |
// responding |
reg IsoHeadGen; // specifies if a header is generated for an |
// isochronous transfer or not |
|
reg GenCrc16Err; // specifies if a crc error is to be generated or not |
reg [15:0] Crc16ErrMask; // a particular crc bit is inverted according to the |
// bit in the Mask is high |
|
reg GenCrc5Err; // specifies if a crc error is to be generated or not |
reg [4:0] Crc5ErrMask; // a particular crc bit is inverted according to the |
// bit in the Mask is high |
|
reg ReportResults; // reports results to a file |
reg [NumCharsInFileName * CharByte : 1] ResultsFile; // reports file name |
integer ResultsFp; // filepointer for reults file |
|
reg ReportErrors; |
|
integer PulseWidth; // PulseWidth of USB clock |
|
reg SyncField; // specifies if a correct/incorrect sync field is to |
// be sent |
reg [31:0] SyncLevel; // at which point in a task to corrupt the SyncField |
reg [31:0] SetSyncLevel; // set this value before calling SendData |
reg [7:0] SyncFieldMask; // specifies how the sync field is to be corrupted |
|
reg GenSE0Error; // generate a SE0 error |
reg [31:0] SE0BitTimes; // generate SE0 for this many bit times |
reg [31:0] SE0ErrorLevel; // = 0 : generates a SE0 error after a sync field |
// = 1 : generates a SE0 error after data |
// = 2 : generates a SE0 error after a handshake |
|
|
reg HshkPidIntegrity; // specifies if correct ACKs should be sent |
reg [7:0] HshkPidIntegrityMask; // Mask according to which ACK's are corrupted |
|
reg BitStuffErr; |
|
integer RespTimeOutVal; // bit times to wait for when no response is to be |
// sent |
|
integer tmpCounter; // a scratch variable to be used any where |
|
event DoesNotOccur; // an event which will not be triggered to |
// used to suspend threads |
|
reg [31:0] StartTime; // start time of a transaction |
reg [31:0] StopTime; // stop time of a transaction |
reg [31:0] SE0StartTime; // start time of a single ended 0 |
reg [31:0] SE0StopTime; // stop of a single ended 0 |
|
reg [31:0] SelfName; // 4 byte wide register to differentiate between |
// instantiations |
|
|
// info about a current control transaction |
|
reg [1:0] CntrlTransType [1 : MAX_CNTRL_INTERLEAVE]; |
// type of control transaction |
// 00 no control transaction in progress |
// 01 control_rd transaction in progress |
// 11 control_wr transaction in progress |
reg [6:0] CntrlTransAddr [1 : MAX_CNTRL_INTERLEAVE]; |
// address to which a cntrl trans is in progress |
reg [3:0] CntrlTransEndP [1 : MAX_CNTRL_INTERLEAVE]; |
// End Pnt to which a cntrl trans is in progress |
reg [15:0] CntrlTransDlen [1 : MAX_CNTRL_INTERLEAVE]; |
// data length for this control transaction |
|
|
reg [NumCharsInFileName * CharByte : 1] SendDataFileName; |
// File from which data to be sent is taken from, format is 1 byte per line |
// in hex format |
|
reg [NumCharsInFileName * CharByte : 1] RecvDataFileName; |
// File to which received data is logged to, format is 1 byte per line in |
// hex format |
|
reg [NumCharsInFileName * CharByte : 1] ErrorFileName; |
// file name to report errors |
|
reg [31:0] RecvDataFp; // file pointer to RecvDataFileName |
|
reg [31:0] SendDataOfst; // offset into SendDataFileName |
|
reg [31:0] ErrorFileFp; // file pointer of the error file |
|
|
reg [NumCharsInFileName * CharByte : 1] EndPtFileName [1 : NUM_ENDPT_FILES]; |
// array to store file names associated with end points |
reg [1:0] EndPtFileMode [1 : NUM_ENDPT_FILES]; |
// array to store read/write mode info for each file |
reg [31:0] EndPtFp [1 : NUM_ENDPT_FILES]; |
reg [10:0] EndPtFileInfo [1 : NUM_ENDPT_FILES]; |
reg [31:0] EndPtFileOfst [1 : NUM_ENDPT_FILES]; |
// offset into the file if it is in write mode |
|
|
reg Debug; // debugging messages are turned on if set to true |
|
|
reg GenDataPidErr; // generates a data pid integrity error |
reg [7:0] DataPidErrMask; // error mask for generating |
reg GenTokenErr; // generates a token pid integrity error |
reg [7:0] TokenErrMask; // token error mask |
|
reg DeviceSpeed; // low speed or high speed |
|
reg GenByteBoundary; // generate a byte boundary error |
|
reg SendPreamble; |
|
// registers to log simulation results |
|
reg [31:0] NumBulkInTrans; // number of bulk in transactions |
reg [31:0] NumSucBulkInTrans; // number of successful bulk in transctions |
reg [31:0] NumBulkOutTrans; // number of bulk out transactions |
reg [31:0] NumSucBulkOutTrans; // number of successful bulk out transactions |
reg [31:0] NumIsoInTrans; // number of iso in transactions |
reg [31:0] NumSucIsoInTrans; // number of successful iso in transactions |
reg [31:0] NumIsoOutTrans; // number of iso out transactions |
reg [31:0] NumSOF; // number of SOF's sent |
reg [31:0] NumCntrlRdTrans; // number of control reads |
reg [31:0] NumSucCntrlRdTrans; // number of successful control reads |
reg [31:0] NumCntrlWrTrans; // number of control writes |
reg [31:0] NumSucCntrlWrTrans; // number of successful control writes |
reg [31:0] NumIntrptTrans; // number of interrupt transactions |
reg [31:0] NumSucIntrptTrans; // number of successful interrupt transactions |
reg [31:0] NumIntrOutTrans; // number of interrupt out transactions |
reg [31:0] NumSucIntrOutTrans; // number of successful interrupt out transactions |
reg [31:0] NumResets; // number of resets |
|
|
// registers to store jitter information |
|
integer HighJitterTime; // time by which high time pulse width is modified |
integer LowJitterTime; // time by which low time pulse width is modified |
integer JitterPeriod; // specifies in pulse numbers when the Jitter is |
// to be repeated |
integer JitterCount; // number of pulses for which jitter is induced |
reg JitterOnOff; // specifies if jitter is being induced or not |
|
reg task_in_progress; |
|
// SOF's |
reg hs_clk; // high speed clock |
reg ls_clk; // low-speed clock |
reg clk_swtch; // clock switch |
|
|
reg [31:0] SetupDataLen; |
|
reg GenByteBoundaryPos; |
reg BoundaryBitVal; |
|
integer ModifyGran; |
|
|
|
task DispErrMsg; |
|
input [6:0] address; |
input [3:0] EndPt; |
input [31:0] ErrMsgNo; |
|
begin |
if (ReportErrors == FALSE) disable DispErrMsg; |
if ((ErrorFileFp == 0) & (ErrorFileName == "")) begin |
$display("No file name specified to log errors."); |
disable DispErrMsg; |
end |
if (ErrorFileFp == 0) ErrorFileFp = $fopen(ErrorFileName); |
if ((ErrMsgNo >= 0) & (ErrMsgNo <= 32)) $fwrite(ErrorFileFp, "Error %0d :", (500 + ErrMsgNo)); |
case (ErrMsgNo) |
0: $fdisplay(ErrorFileFp, "Time out for bulk in transfer at address %h for End Point %h at time %0t", address, EndPt, $time); |
1: $fdisplay(ErrorFileFp, "Time out for iso in transfer at address %h for End Point %h at time %0t", address, EndPt, $time); |
2: $fdisplay(ErrorFileFp, "Time out for interrupt transfer at address %h for End Point %h at time %0t", address, EndPt, $time); |
3: $fdisplay(ErrorFileFp, "Time out for control transfer at address %h for End Point %h at time %0t", address, EndPt, $time); //this EndPt value should be zero |
4: $fdisplay(ErrorFileFp, "Time out for bulk out transfer at address %h for End Point %h at time %0t", address, EndPt, $time); |
5: $fdisplay(ErrorFileFp, "Pid error at address %h for End Point %h at time %0t", address, EndPt, $time); |
6: $fdisplay(ErrorFileFp, "Short packet at address %h for End Point %h at time %0t", address, EndPt, $time); |
7: $fdisplay(ErrorFileFp, "CRC error for token packet at address %h for End Point %h at time %0t", address, EndPt, $time); |
8: $fdisplay(ErrorFileFp, "CRC error for data at address %h for End Point %h at time %0t", address, EndPt, $time); |
9: $fdisplay(ErrorFileFp, "Incorrect token received at address %h for End Point %h at time %0t", address, EndPt, $time); |
10: $fdisplay(ErrorFileFp, "Incorrect Data0/Data1 toggle received at address %h for End Point %h at time %0t", address, EndPt, $time); |
11: $fdisplay(ErrorFileFp, "NAK recevied at address %h for End Point %h at time %0t", address, EndPt, $time); |
12: $fdisplay(ErrorFileFp, "STALL received at address %h for End Point %h at time %0t", address, EndPt, $time); |
13: $fdisplay(ErrorFileFp, "Incorrect handshake received at address %h for End Point %h at time %0t", address, EndPt, $time); |
14: $fdisplay(ErrorFileFp, "Long packet at address %h for End Point %h at time %0t", address, EndPt, $time); |
15: $fdisplay(ErrorFileFp, "Corrupted handshake received at address %h for End Point %h at time %0t", address, EndPt, $time); |
16: $fdisplay(ErrorFileFp, "Device error at address %h for End Point %h at time %0t", address, EndPt, $time); |
17: $fdisplay(ErrorFileFp, "Invalid wIndex value for control transfer to address %h at time %0t", address, $time); |
18: $fdisplay(ErrorFileFp, "Invalid RequestType for control transfer to address %h at time %0t", address, $time); |
19: $fdisplay(ErrorFileFp, "Invalid wValue value for control transfer to address %h at time %0t", address, $time); |
20: $fdisplay(ErrorFileFp, "Invalid data length during data phase for control transfer to address %0h and End Point %0h at time %0t", address, EndPt, $time); |
21: $fdisplay(ErrorFileFp, "No setup transaction in progress to do a control_in or a control_out or a status transaction at time %0t", $time); |
22: $fdisplay(ErrorFileFp, "Doing a control_in when a control_out is expected and vice-versa at time %0t", $time); |
23: $fdisplay(ErrorFileFp, "Doing a control_in or control_out when the number of bytes specified by wLength have been received or sent at time %0t", $time); |
24: $fdisplay(ErrorFileFp, "Doing a status_in when a status_out is expected and vice-versa at time %0t", $time); |
25: $fdisplay(ErrorFileFp, "Received a DATA0 token during the status phase of a control transaction at address %0h, EndPt %0h, at time %0t", address, EndPt, $time); |
26: $fdisplay(ErrorFileFp, "Incorrect sync field at time %0t", $time); |
27: $fdisplay(ErrorFileFp, "Bit Stuffing error at time %0t", $time); |
28: $fdisplay(ErrorFileFp, "Eop incorrect at time %0t", $time); |
29: $fdisplay(ErrorFileFp, "Null File Name passed to command at time %0t", $time); |
30: $fdisplay(ErrorFileFp, "Offset into file greater than size of file at time %0t", $time); |
31: $fdisplay(ErrorFileFp, "Command not supported by a low speed device issued at time %0t.", $time); |
32: $fdisplay(ErrorFileFp, "Command not supported by command line interface issued at time %0t.", $time); |
endcase |
end |
endtask |
|
//bit 0 has the IN DataToggle and bit 1 has the OUT DataToggle |
function [1:0] CheckDataToggle; |
input [6:0] address; |
input [3:0] EndPt; |
|
reg [15:0] tmpReg1; |
reg [15:0] tmpReg2; |
|
begin |
tmpReg1 = InDataToggle[address]; |
tmpReg2 = OutDataToggle[address]; |
if ((EndPt < 16) & (EndPt >= 0)) begin |
CheckDataToggle[0] = tmpReg1[EndPt]; |
CheckDataToggle[1] = tmpReg2[EndPt]; |
end |
else CheckDataToggle = 0; // default |
end |
endfunction |
|
function CheckDataToggleIN; |
input [6:0] address; |
input [3:0] EndPt; |
|
reg [15:0] tmpReg; |
|
begin |
tmpReg = InDataToggle[address]; |
if ((EndPt < 16) & (EndPt >= 0)) CheckDataToggleIN = tmpReg[EndPt]; |
else CheckDataToggleIN = 0; // default |
end |
endfunction |
|
function CheckDataToggleOUT; |
input [6:0] address; |
input [3:0] EndPt; |
|
reg [15:0] tmpReg; |
|
begin |
tmpReg = OutDataToggle[address]; |
if ((EndPt < 16) & (EndPt >= 0)) CheckDataToggleOUT = tmpReg[EndPt]; |
else CheckDataToggleOUT = 0; // default |
end |
endfunction |
|
task SetDataToggle; |
input [6:0] address; |
input [3:0] EndPt; |
input [1:0] SetVal; //value to which the toggle value should be changed to |
// index 0 has the IN value and index 1 has the OUT value |
reg [15:0] tmpReg; |
begin |
tmpReg = InDataToggle[address]; |
if ((SetVal[0] == 0) | (SetVal[0] == 1)) tmpReg[EndPt] = SetVal; |
else tmpReg[EndPt] = 0; // default |
InDataToggle[address] = tmpReg; |
tmpReg = OutDataToggle[address]; |
if ((SetVal[1] == 0) | (SetVal[1] == 1)) tmpReg[EndPt] = SetVal; |
else tmpReg[EndPt] = 0; // default |
OutDataToggle[address] = tmpReg; |
end |
endtask |
|
task SetDataToggleIN; |
input [6:0] address; |
input [3:0] EndPt; |
input SetVal; //value to which the toggle value should be changed to |
reg [15:0] tmpReg; |
begin |
tmpReg = InDataToggle[address]; |
if ((SetVal == 0) | (SetVal == 1)) tmpReg[EndPt] = SetVal; |
else tmpReg[EndPt] = 0; // default |
InDataToggle[address] = tmpReg; |
end |
endtask |
|
task SetDataToggleOUT; |
input [6:0] address; |
input [3:0] EndPt; |
input SetVal; //value to which the toggle value should be changed to |
reg [15:0] tmpReg; |
begin |
tmpReg = OutDataToggle[address]; |
if ((SetVal == 0) | (SetVal == 1)) tmpReg[EndPt] = SetVal; |
else tmpReg[EndPt] = 0; // default |
OutDataToggle[address] = tmpReg; |
end |
endtask |
|
function [7:0] CorruptHshk; |
input [7:0] funHshk; |
reg [7:0] tmpReg; |
reg [4:0] i; |
begin |
tmpReg = funHshk; |
if (HshkPidIntegrity == TRUE) begin |
for (i = 0; i < 8; i = i + 1) begin |
if (HshkPidIntegrityMask[i] == 1'b1) tmpReg[i] = ~tmpReg[i]; |
end |
end |
CorruptHshk = tmpReg; |
end |
endfunction |
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// swap2 : swaps around the bits in half a nibble |
// |
//////////////////////////////////////////////////////////////////////////////// |
function [1:0] swap2; |
input [1:0] SwapBits; |
begin |
swap2 = {SwapBits[0], SwapBits[1]}; |
end |
endfunction |
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// swap8 : swaps around the bits in a byte and returns the swapped byte |
// |
//////////////////////////////////////////////////////////////////////////////// |
function [7:0] swap8; |
input [7:0] SwapByte; |
begin |
swap8 = {SwapByte[0], SwapByte[1], SwapByte[2], SwapByte[3], SwapByte[4], SwapByte[5], SwapByte[6], SwapByte[7]}; |
end |
endfunction |
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// DumpData : dumps the data received into in_out_buf to a file |
// Inputs : address : device address to which data is dumped to the |
// associated file, 7 bits |
// EndPt : End Point number, 4 bits |
// ByteCount : number of bytes to dump from in_out_buf to the file |
// |
//////////////////////////////////////////////////////////////////////////////// |
task DumpData; |
|
input [6:0] address; |
input [3:0] EndPt; |
input [3:0] DataToggle; |
input [31:0] ByteCount; |
|
integer i; |
integer j; |
|
reg [39:0] DataToggleString; |
reg Match; |
|
begin |
DataToggleString = (DataToggle == DATA0) ? "DATA0" : "DATA1" ; |
Match = FALSE; |
for (i = 1; i <= NUM_ENDPT_FILES; i = i + 1) begin |
if (EndPtFileInfo[i] == {EndPt, address}) begin |
if ((EndPtFp[i] > 0) & (EndPtFileMode[i] == WRITE)) begin |
$fdisplay (EndPtFp[i], "//address = %b, EndPt = %b, Data Toggle = %0s at time = %0t", address, EndPt, DataToggleString, $time); |
//for (j = 1; j <= ByteCount; j = j + 1) $fwrite (EndPtFp[i], "%h, ", in_out_buf [j]); |
for (j = 1; j <= ByteCount; j = j + 1) $fdisplay (EndPtFp[i], "%h", in_out_buf[j]); |
$fdisplay(EndPtFp[i], "\n"); |
Match = TRUE; |
end |
i = NUM_ENDPT_FILES + 1; |
end |
end |
|
if (Match == FALSE) begin // no file name associated with this address |
// dump data into the common bucket(file) |
if (RecvDataFp == 0) RecvDataFp = $fopen(RecvDataFileName); |
$fdisplay (RecvDataFp, "//address = %b, EndPt = %b, Data Toggle = %0s at time = %0t", address, EndPt, DataToggleString, $time); |
//for (j = 1; j <= ByteCount; j = j + 1) $fwrite (RecvDataFp, "%h, ", in_out_buf[j]); |
for (j = 1; j <= ByteCount; j = j + 1) $fdisplay (RecvDataFp, "%h", in_out_buf[j]); |
$fdisplay(RecvDataFp, "\n"); |
end |
|
end |
endtask |
|
|
|
function [7:0] CorruptDataPid; |
input [7:0] funDataPid; |
integer i; |
reg [7:0] tmpReg; |
begin |
tmpReg = funDataPid; |
if (GenDataPidErr == TRUE) begin |
for ( i = 0; i < 8; i = i + 1) begin |
if (DataPidErrMask[i] == 1'b1) tmpReg[i] = ~tmpReg[i]; |
end |
end |
CorruptDataPid = tmpReg; |
end |
endfunction |
|
|
function [7:0] CorruptToken; |
input [7:0] funToken; |
integer i; |
reg [7:0] tmpReg; |
begin |
tmpReg = funToken; |
if (GenTokenErr == TRUE) begin |
for ( i = 0; i < 8; i = i + 1) begin |
if (TokenErrMask[i] == 1'b1) tmpReg[i] = ~tmpReg[i]; |
end |
end |
CorruptToken = tmpReg; |
end |
endfunction |
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// WriteResults : writes out the results to the file pointed to by ResultsFp |
// |
//////////////////////////////////////////////////////////////////////////////// |
task WriteResults; |
|
begin |
|
if (ResultsFile == "") disable WriteResults; |
|
if (ResultsFp != 0) $fclose(ResultsFp); |
|
ResultsFp = $fopen(ResultsFile); |
|
$fdisplay(ResultsFp, "\n"); |
$fdisplay(ResultsFp, "--------------------------------------------------------------------------------"); |
$fdisplay(ResultsFp, "-------------------- Transfer Statistics for the HOST model --------------------"); |
$fdisplay(ResultsFp, "--------------------------------------------------------------------------------"); |
$fdisplay(ResultsFp, "\n"); |
|
|
$fdisplay(ResultsFp, |
" Simulation Start Time ------------------------------ : 0",); |
$fdisplay(ResultsFp, |
" Number of Bulk In transactions --------------------- : %0d", |
NumBulkInTrans); |
$fdisplay(ResultsFp, |
" Number of Successful Bulk In transactions ---------- : %0d", |
NumSucBulkInTrans); |
$fdisplay(ResultsFp, |
" Number of Bulk Out transactions -------------------- : %0d", |
NumBulkOutTrans); |
$fdisplay(ResultsFp, |
" Number of Successful Bulk Out transactions --------- : %0d", |
NumSucBulkOutTrans); |
$fdisplay(ResultsFp, |
" Number of Iso In transactions ---------------------- : %0d", |
NumIsoInTrans); |
$fdisplay(ResultsFp, |
" Number of Successful Iso In transactions ----------- : %0d", |
NumSucIsoInTrans); |
$fdisplay(ResultsFp, |
" Number of Iso Out transactions --------------------- : %0d", |
NumIsoOutTrans); |
$fdisplay(ResultsFp, |
" Number of Interrupt transactions ------------------- : %0d", |
NumIntrptTrans); |
$fdisplay(ResultsFp, |
" Number of Successful Interrupt transactions -------- : %0d", |
NumSucIntrptTrans); |
$fdisplay(ResultsFp, |
" Number of resets ----------------------------------- : %0d", |
NumResets); |
$fdisplay(ResultsFp, |
" Number of SOF's sent ------------------------------- : %0d", |
NumSOF); |
$fdisplay(ResultsFp, |
" Number of Control Read transactions ---------------- : %0d", |
NumCntrlRdTrans); |
$fdisplay(ResultsFp, |
" Number of Successful Control Read transactions ----- : %0d", |
NumSucCntrlRdTrans); |
$fdisplay(ResultsFp, |
" Number of Control Write transactions --------------- : %0d", |
NumCntrlWrTrans); |
$fdisplay(ResultsFp, |
" Number of Successful Control Write transactions ---- : %0d", |
NumSucCntrlWrTrans); |
$fdisplay(ResultsFp, |
" Simulation End Time -------------------------------- : %0t", |
$time); |
$fdisplay(ResultsFp, "\n"); |
|
end |
endtask |
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// CorruptCrc16 : Corrupts the crc16 value passed on to it according to the |
// present crc16 error generation status |
// |
//////////////////////////////////////////////////////////////////////////////// |
function [15:0] CorruptCrc16; |
input [15:0] funCrc16; |
reg [5:0] i; |
begin |
if (GenCrc16Err == TRUE) begin |
for (i = 0; i < 16; i = i + 1) begin |
if (Crc16ErrMask[i] == 1'b1) funCrc16[i] = ~funCrc16[i]; |
end |
end |
CorruptCrc16 = funCrc16; |
end |
endfunction |
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// CorruptCrc5 : Corrupts the crc5 value passed on to it according to the |
// present crc5 error generation status |
// |
//////////////////////////////////////////////////////////////////////////////// |
function [4:0] CorruptCrc5; |
input [4:0] funCrc5; |
reg [5:0] i; |
begin |
if (GenCrc5Err == TRUE) begin |
for (i = 0; i < 5; i = i + 1) begin |
if (Crc5ErrMask[i] == 1'b1) funCrc5[i] = ~funCrc5[i]; |
end |
end |
CorruptCrc5 = funCrc5; |
end |
endfunction |
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// modify_device_speed : modifies the device speed |
// |
//////////////////////////////////////////////////////////////////////////////// |
task modify_device_speed; |
input tskDeviceSpeed; |
begin |
DeviceSpeed = (tskDeviceSpeed == LOW_SPEED) ? LOW_SPEED:HIGH_SPEED; |
end |
endtask |
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// CorruptSyncField : corrupts the sync field according to SyncFieldMask |
// |
//////////////////////////////////////////////////////////////////////////////// |
function [7:0] CorruptSyncField; |
input [7:0] funSyncField; |
reg [7:0] tmpReg; |
reg [4:0] i; |
begin |
tmpReg = funSyncField; |
if ((SyncField == TRUE) & (SyncLevel == SetSyncLevel)) begin |
for (i = 0; i < 8; i = i + 1) begin |
if (SyncFieldMask[i] == 1'b1) tmpReg[i] = ~tmpReg[i]; |
end |
end |
CorruptSyncField = tmpReg; |
end |
endfunction |
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// SendData : serialises and puts out the data in in_out_buf onto DPLS(D+) |
// and DMNS(D-) |
// |
//////////////////////////////////////////////////////////////////////////////// |
task SendData; |
integer i; |
reg [31:0] SE0Counter; // Single Ended Zero Counter |
reg [31:0] SE0Terminate; |
event SE0Event; |
begin |
i = 0; |
SE0Counter = 2'b00; |
if (in_out_buf_ptr > 0) begin |
@(posedge clk); |
@(posedge clk) begin // synchronise to positive edge of clock |
enc_enbl = 1'b1; // active high |
enc_reset_n = 1'b1; // active low |
enc_last_byte = 1'b0; |
enc_data_in = CorruptSyncField(8'h80); |
end |
fork |
forever @(posedge clk) begin |
if (GenByteBoundary == TRUE) begin |
if ((i == in_out_buf_ptr) & (enc_bit_count_out == 6)) begin |
enc_enbl = 1'b0; |
enc_reset_n = 1'b0; |
in_out_buf_ptr = 0; |
-> SE0Event; |
end |
end |
end |
|
forever @(posedge clk) begin |
if (GenByteBoundaryPos == TRUE) begin |
in_out_buf[in_out_buf_ptr + 1] = {BoundaryBitVal, BoundaryBitVal, BoundaryBitVal, BoundaryBitVal, BoundaryBitVal, BoundaryBitVal, BoundaryBitVal, BoundaryBitVal}; |
if ((i == (in_out_buf_ptr + 1)) & (enc_bit_count_out == 0)) begin |
enc_enbl = 1'b0; |
enc_reset_n = 1'b0; |
in_out_buf_ptr = 0; |
-> SE0Event; |
end |
end |
end |
|
forever @(negedge enc_count_out) begin |
if ((i == in_out_buf_ptr) & (GenByteBoundaryPos == FALSE)) begin |
//@(posedge clk); |
enc_enbl = 1'b0; // active high |
enc_reset_n = 1'b0; // active low |
in_out_buf_ptr = 0; // reset output buffer pointer |
-> SE0Event; |
end |
else begin |
enc_data_in = in_out_buf[i]; |
if (i == in_out_buf_ptr - 1) enc_last_byte = 1'b1; |
else enc_last_byte = 1'b0; |
//if (Debug) $display("in_out_buf[%h] = %h at time %0t",i, in_out_buf[i], $time); |
i = i + 1; |
end |
end |
|
forever @(SE0Event) begin // drive a SE0 for 2 bit times |
SE0Terminate = ((GenSE0Error == TRUE) & (SE0ErrorLevel == SetSyncLevel)) ? (SE0BitTimes) : 2; |
if (ModifyGran < -8) ModifyGran = -8; |
// SE0Terminate = (SE0Terminate * 4) + ModifyGran; |
// @(posedge clk); |
// forever @(posedge clk4x) begin |
forever @(posedge clk) begin |
if (SE0Counter >= SE0Terminate) begin |
zDPLS = #1 1'bZ; |
zDMNS = 1'bZ; |
@(posedge clk); // wait for one idle state after pulls |
disable SendData; |
end |
if (i >= in_out_buf_ptr) begin |
zDPLS = #1 1'b0; |
zDMNS = 1'b0; |
SE0Counter = SE0Counter + 1; |
end |
end |
end |
join |
end |
|
end |
endtask |
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// WaitForResp : collects the data from DPLS(D+) and DMNS(D-) and fills in_out_buf |
// |
//////////////////////////////////////////////////////////////////////////////// |
task WaitForResp; |
|
output [31:0] recv_bit_count; |
|
reg [31:0] recv_bit_count; |
integer EopDetect; |
reg [4:0] ClkCount; |
reg [3:0] DplsCount; |
reg FltrSyncFld; |
integer tmpTimeOutCounter; |
reg tmpTimeOut; |
reg OnlyOnce; |
reg SyncDetect; |
time SyncPulseT1; |
time SyncPulseT2; |
time SyncPulseDuration; |
|
begin |
if (Debug) $display("In %0s --> In task wait for response at time %0t", SelfName, $time); |
EopDetect = 0; |
in_out_buf_ptr = 0; |
DplsCount = 0; |
ClkCount = 0; |
FltrSyncFld = 1'b1; |
tmpTimeOutCounter = 0; |
tmpTimeOut = TRUE; |
recv_bit_count = 0; |
OnlyOnce = TRUE; |
SyncDetect = FALSE; |
|
// dec_enbl = 1'b1; // active high |
// dec_reset_n = 1'b1; // active low |
begin : TimeOutBlock |
forever @(posedge dpll_clk) begin |
//if (Debug) $display("In %0s --> waiting for event in WaitForResp %0t", SelfName, $time); |
if (TimeOut == TRUE) begin |
if (tmpTimeOutCounter == TimeOutVal) begin |
if (Debug) $display("In %0s --> Time out at time %0t", SelfName, $time); |
disable WaitForResp; |
end |
tmpTimeOutCounter = tmpTimeOutCounter + 1; |
end |
//if (Debug) $display("In %0s --> DeviceSpeed = %b at time %0t", SelfName, DeviceSpeed, $time); |
//if (DPLS === 1'b0) begin |
if (DPLS === ~DeviceSpeed) begin |
if (Debug) $display("In %0s --> DPLS = %b , DeviceSpeed = %b at time %0t", SelfName, DPLS, DeviceSpeed, $time); |
if (DMNS === DeviceSpeed) begin // differential data |
|
@DPLS |
StartTime = $time; |
SyncPulseT1 = $time; |
@DPLS |
SyncPulseT2 = $time; |
@DPLS |
SyncPulseDuration = SyncPulseT2 - SyncPulseT1; |
@DPLS |
SyncPulseT1 = $time; |
@DPLS |
SyncPulseT2 = $time; |
@DPLS |
#SyncPulseDuration |
#SyncPulseDuration |
#SyncPulseDuration |
|
dec_enbl = 1'b1; // active high |
dec_reset_n = 1'b1; // active low |
// StartTime = $time; this time should be start of syncpulse |
disable TimeOutBlock; |
end |
else if ((DMNS === 1'b0) & (DPLS === 1'b0)) begin |
EopDetect = 1; |
disable TimeOutBlock; |
end |
end |
end |
end // TimeOutBlock |
|
if (Debug) $display("In %0s --> Decoder enabled at time %0t in host", SelfName, $time); |
fork |
begin : DataSink |
forever @(posedge dec_par_data_rdy) begin |
if (FltrSyncFld == 1'b1) begin // filter out the sync field |
in_out_buf[in_out_buf_ptr] = dec_par_data_out; |
in_out_buf_ptr = in_out_buf_ptr + 1; |
end |
if (dec_par_data_out == {~PREAMBLE, PREAMBLE} & |
in_out_buf_ptr == 1) begin |
dec_enbl = 1'b0; |
dec_reset_n = 1'b0; |
StopTime = $time; |
disable WaitForResp; |
end |
if (Debug) $display("In %0s --> receive data = %h", SelfName, dec_par_data_out); |
if (FltrSyncFld == 1'b0) begin |
/* |
if (dec_par_data_out != 8'h80) begin |
if (Debug) $display("In %0s --> Incorrect sync field %0h received at time %0t, ...discarding packet", SelfName, dec_par_data_out, $time); |
in_out_buf_ptr = 0; // equivalent to a time out |
dec_enbl = 1'b0; |
dec_reset_n = 1'b0; |
wait(1==0); // wait while the other block detects a EOP and disables task |
end |
*/ |
end |
FltrSyncFld = 1'b1; |
end |
end |
|
forever @(posedge dpll_clk) begin |
if (dec_bit_stuff_err == 1'b1) begin |
if (OnlyOnce == TRUE) begin |
DispErrMsg(0, 0, 27); |
OnlyOnce = FALSE; |
in_out_buf_ptr = 0; // reset data pointer |
end |
disable DataSink; |
end |
if((DPLS == DMNS) & (DPLS == 1'b0)) begin |
EopDetect = EopDetect + 1; |
recv_bit_count = dec_recv_bit_count - 1; |
if (StopTime == 0) StopTime = $time; |
if (SE0StartTime == 0) SE0StartTime = $time; |
if (Debug) $display("In %0s --> StopTime = %0d, SE0StartTime = %0d", SelfName, StopTime, SE0StartTime); |
end |
if (EopDetect == 1) begin |
if (DPLS == ~DMNS) begin // SE0 seen for only 1 bit time |
if (Debug) $display("In %0s --> EOP asserted for 1 bit time at time %0t", SelfName, $time); |
dec_enbl = 1'b0; // disable the decoder |
dec_reset_n = 1'b0; // reset the decoder |
SE0StopTime = $time; |
disable WaitForResp; // incorrect EOP was received |
end |
end |
if (EopDetect == 2) begin |
dec_enbl = 1'b0; // disable the decoder |
dec_reset_n = 1'b0; // reset the decoder |
if (DPLS == ~DMNS) begin |
if (Debug) $display("In %0s --> EOP asserted for 2 bit time at time %0t", SelfName, $time); |
dec_enbl = 1'b0; // disable the decoder |
dec_reset_n = 1'b0; // reset the decoder |
SE0StopTime = $time; |
disable WaitForResp; // correct EOP was received |
end |
end |
if ((EopDetect > 2) & (EopDetect < 32)) begin // incorrect EOP received |
if (DPLS == ~DMNS) begin |
if (Debug) $display("In %0s --> EOP asserted for %h bit times at time ", SelfName, EopDetect, $time); |
SE0StopTime = $time; |
disable WaitForResp; |
end |
end |
if (EopDetect >= 32) begin |
if (DPLS == ~DMNS) begin |
if (Debug) $display("In %0s --> Reset at time ", SelfName, $time); |
SE0StopTime = $time; |
in_out_buf_ptr = 0; |
disable WaitForResp; |
end |
end |
end |
join |
|
|
end |
endtask |
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// SendReset : asserts a SE0 on the USB for the number of bit times specified |
// by ResetTime. |
// Input : ResetTime, number of bit times for which to drive a reset on |
// the USB |
// |
//////////////////////////////////////////////////////////////////////////////// |
|
task SendReset; |
|
input [7:0] ResetTime; |
reg [7:0] tskResetTime; |
reg [7:0] tskResetTimeCounter; |
|
begin |
tskResetTime = ResetTime; |
//if (tskResetTime <= 32) tskResetTime = 7'b0100000; |
//if (tskResetTime >= 64) tskResetTime = 7'b1000000; |
tskResetTimeCounter = 7'b0000000; |
forever @(posedge clk) begin |
zDPLS = 1'b0; |
zDMNS = 1'b0; |
tskResetTimeCounter = tskResetTimeCounter + 1'b1; |
if (tskResetTimeCounter > tskResetTime) begin |
zDPLS = 1'bz; |
zDMNS = 1'bz; |
@(posedge clk); |
@(posedge clk); |
disable SendReset; |
end |
end |
end |
endtask |
|
|
|
|
|
parameter M16 = 16'h8005; //mask value to calculate 16 bit crc |
parameter M05 = 8'h05; //mask value to calculate 5 bit crc |
|
function [15:0] crc16; |
input [7:0] DataByte; |
input [15:0] PrevCrc; |
|
reg [15:0] TempPrevCrc; |
integer i; |
|
begin |
TempPrevCrc = PrevCrc; |
for (i = 0; i < 8; i = i + 1) |
begin |
if (DataByte[i] ^ TempPrevCrc[15] ) |
TempPrevCrc = {TempPrevCrc[14:0],1'b0} ^ M16; |
else |
TempPrevCrc = {TempPrevCrc[14:0], 1'b0}; |
end |
crc16 = TempPrevCrc; |
end |
|
endfunction |
|
|
//////////////////////////////////////////////////////////////////////////////// |
//function crc5 calculates a 5 bit crc |
//inputs : |
// PrevCrc : 5 bit value, initially set to zero by the |
// calling module, from the next call onwards |
// it is the previous CRC value returned by |
// the function. |
// |
// DataByte : 8 bit value for which crc is to calculated |
// |
//////////////////////////////////////////////////////////////////////////////// |
|
function [4:0] crc5; |
input [10:0] DataByte; |
input [4:0] PrevCrc; |
|
reg [4:0] TempPrevCrc; |
integer i; |
begin |
TempPrevCrc = PrevCrc; |
for (i = 0; i < 11; i = i + 1) |
begin |
if (DataByte[i] ^ TempPrevCrc[4] ) |
TempPrevCrc = {TempPrevCrc[3:0],1'b0} ^ M05; |
else |
TempPrevCrc = {TempPrevCrc[3:0], 1'b0}; |
end |
crc5 = TempPrevCrc[4:0]; |
end |
endfunction |
|
|
|
|
/////////////////////////////////////////////////////////////////////////////// |
// |
// FillCrc5 : fills with crc5 given a 11 bit value |
// input : InVal, in value for which crc5 has to be appended |
// this is a 11 bit value for which the 7 LSB bits are address and |
// 4 MSB bits are end point number |
// returns : 16 bit value for which is InVal with crc5 appended to it. |
// |
/////////////////////////////////////////////////////////////////////////////// |
function [15:0] FillCrc5; |
input [10:0] InVal; |
reg [15:0] tmpReg; |
begin |
tmpReg[10:0] = InVal; // put address and EndPt into consecutive bits |
tmpReg[15:11] = crc5(InVal, 5'b11111); // calculate crc5 for the first 8 bits |
|
tmpReg[15:11] ={tmpReg[11], tmpReg[12], tmpReg[13], tmpReg[14], tmpReg[15]}; |
tmpReg[6:0] = InVal[6:0]; // address |
tmpReg[10:7] = InVal[10:7]; // End Point |
if (GenCrc5Err == FALSE) tmpReg[15:11] = ~tmpReg[15:11]; |
// invert the bits in the crc |
tmpReg[15:11] = CorruptCrc5(tmpReg[15:11]); // crc5 corruption |
FillCrc5 = tmpReg; |
end |
endfunction |
|
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// FillCrc16 : Calculates the crc16 value from in_out_buf |
// input : StartAddr : start address of in_out_buf, 32 bits |
// StopAddr : stop address of in_out_buf, 32 bits |
// returns : 16 bit value which is the crc16 for this segment of memory |
// |
//////////////////////////////////////////////////////////////////////////////// |
function [16:0] FillCrc16; |
|
input [31:0] StartAddr; |
input [31:0] StopAddr; |
|
reg [16:0] tmpCrc; |
integer i; |
|
begin |
tmpCrc = 16'hffff; |
for (i = StartAddr; i <= StopAddr; i = i + 1) begin |
tmpCrc = crc16(in_out_buf[i], tmpCrc); |
end |
FillCrc16 = tmpCrc; |
end |
endfunction |
|
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// SendAck : sends an ack |
// |
//////////////////////////////////////////////////////////////////////////////// |
task SendAck; |
|
begin |
task_in_progress = TRUE; |
in_out_buf[0] = CorruptHshk({~ACK, ACK}); |
in_out_buf_ptr = 1; |
SetSyncLevel = 2; |
usb_idle(ResponseLatency - 3); |
task_in_progress = TRUE; |
SendData; |
task_in_progress = FALSE; |
end |
endtask |
|
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// reset : performs a reset on the USB bus by driving SE0 |
// |
// input : Reset Time in bit times |
// |
//////////////////////////////////////////////////////////////////////////////// |
task usb_reset; |
|
input [7:0] tskResetTime; |
|
begin |
task_in_progress = TRUE; |
NumResets = NumResets + 1; |
SendReset(tskResetTime); |
WriteResults; |
task_in_progress = FALSE; |
end |
endtask |
|
|
|
////////////////////////////////////////////////////////////////////////////////// |
// usb_idle : idles the USB. |
// input : IdleTime, which is the number of bit times for which to idle the |
// bus. |
// |
//////////////////////////////////////////////////////////////////////////////// |
task usb_idle; |
input [31:0] IdleTime; |
reg [31:0] tskIdleTime; |
|
begin : usb_idle |
task_in_progress = TRUE; |
tskIdleTime = 0; |
forever @(posedge clk) begin |
if (tskIdleTime >= IdleTime) begin |
task_in_progress = FALSE; |
disable usb_idle; |
end |
tskIdleTime = tskIdleTime + 1; |
end |
task_in_progress = FALSE; |
end |
endtask |
|
|
/////////////////////////////////////////////////////////////////////////////// |
// |
// task usb_idle_nolock : same as usb_idle except that there is no lock |
// that is there is no assertion of the task_in_progress |
// flag |
// |
/////////////////////////////////////////////////////////////////////////////// |
task usb_idle_nolock; |
input [31:0] IdleTime; |
reg [31:0] tskIdleTime; |
begin : usb_idle_nolock |
tskIdleTime = 0; |
forever @(posedge clk) begin |
if (tskIdleTime >= IdleTime) begin |
task_in_progress = FALSE; |
disable usb_idle_nolock; |
end |
tskIdleTime = tskIdleTime + 1; |
end |
end |
endtask |
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// setup : issues a setup token with the corresponding data |
// inputs : address : address of the device, 7 bits |
// EndPt : end point number, 4 bits |
// outputs : Status : returns the status of the transaction, 4 bits |
// |
//////////////////////////////////////////////////////////////////////////////// |
task setup; |
|
input [6:0] address; |
input [3:0] EndPt; |
|
output [3:0] Status; // 0 : ack received |
// 3 : no response |
// 4 : invalid response |
// 6 : another control transaction in progress |
// 8 : invalid control data |
reg [3:0] Status; |
reg [15:0] tmpCrc; |
reg [15:0] tmpReg; |
integer i; |
integer CntrlNum; // number of the control transaction |
reg [31:0] recv_bit_count; |
reg Match; |
reg [31:0] tmpPulseWidth; |
|
// eight bytes of setup data is assumed to be in Xmitbuffer |
begin : setup |
task_in_progress = TRUE; |
tmpPulseWidth = PulseWidth; |
Match = FALSE; |
for (i = 1; i <= MAX_CNTRL_INTERLEAVE; i = i + 1) begin |
if ((address == CntrlTransAddr[i]) & (EndPt == CntrlTransEndP[i])) begin |
Status = 4'b0110; |
disable setup; |
end |
end |
for (i = 1; i <= MAX_CNTRL_INTERLEAVE; i = i + 1) begin |
if (CntrlTransType[i] == 2'b00) begin |
Match = TRUE; |
CntrlTransAddr[i] = address; |
CntrlTransEndP[i] = EndPt; |
CntrlTransDlen[i] = {XmitBuffer[7], XmitBuffer[6]}; |
CntrlNum = i; |
i = MAX_CNTRL_INTERLEAVE + 1; |
end |
end |
if (Match == FALSE) begin |
Status = 6; // only one control transaction in progress |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
disable setup; |
end |
|
usb_idle(ResponseLatency - 3); // #27 |
if ((SendPreamble == TRUE) & (DeviceSpeed == HIGH_SPEED)) begin |
send_preamble; // a high speed preamble is sent only when a high speed |
// hub is connected to the host model so in this case |
// switch clock speeds |
task_in_progress = TRUE; |
usb_idle(4); // idle for 4 high speed clock times after a preamble |
task_in_progress = TRUE; |
// PulseWidth = PulseWidth * 8; // decrease the clock frequency |
clk_swtch = LOW_SPEED; |
end |
|
in_out_buf[0] = CorruptToken({~SETUP_TOKEN, SETUP_TOKEN}); |
|
tmpReg = FillCrc5({EndPt, address}); |
in_out_buf[1] = tmpReg[7:0]; |
in_out_buf[2] = tmpReg[15:8]; |
in_out_buf_ptr = 3; |
SetSyncLevel = 0; |
// usb_idle(ResponseLatency - 3); #27 |
task_in_progress = TRUE; |
|
SendData; |
|
usb_idle(ResponseLatency - 3); // #27 |
|
send_high_speed_preamble; |
task_in_progress = TRUE; |
in_out_buf[0] = CorruptDataPid({~DATA0, DATA0}); |
tmpCrc = 16'hffff; |
for (i = 1; i <= SetupDataLen; i = i + 1) begin |
in_out_buf[i] = XmitBuffer[i - 1]; |
tmpCrc = crc16(in_out_buf[i], tmpCrc); |
end |
//if (Debug) $display("In %0s raw crc is %h at time %0t", SelfName, tmpCrc, $time); |
tmpCrc = CorruptCrc16(~{swap8(tmpCrc[15:8]), swap8(tmpCrc[7:0])}); |
in_out_buf[9] = tmpCrc[15:8]; |
in_out_buf[10] = tmpCrc[7:0]; |
//if (Debug) $display("In %0s bus crc is %h at time %0t", SelfName, {in_out_buf[9], in_out_buf[10]}, $time); |
in_out_buf_ptr = SetupDataLen + 3; |
SetSyncLevel = 1; |
// usb_idle(ResponseLatency - 3); #27 |
task_in_progress = TRUE; |
SendData; |
tmpReg[7:0] = XmitBuffer[0]; |
//if (Debug) $display("In %0s --> tmpReg = %b at time %0t", SelfName, tmpReg[7:0], $time); |
case(tmpReg[7]) |
1'b1 : CntrlTransType[CntrlNum] = READ; |
1'b0 : CntrlTransType[CntrlNum] = WRITE; |
default : begin |
Status = 8; // invalid control data |
in_out_buf_ptr = 0; |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
disable setup; |
end |
endcase |
|
if (tmpReg[7] == 1'b1) NumCntrlRdTrans = NumCntrlRdTrans + 1; |
else NumCntrlWrTrans = NumCntrlWrTrans + 1; |
|
if (Debug) $display("CntrlTransType = %b", CntrlTransType[CntrlNum]); |
|
|
WaitForResp(recv_bit_count); |
if (Debug) $display("In %0s --> in_out_buf[0] = %b, in_out_buf_ptr = %d", SelfName, in_out_buf[0], in_out_buf_ptr); |
case (in_out_buf_ptr) |
0 : begin // time out |
if (dec_bit_stuff_err == TRUE) begin |
usb_idle(RespTimeOutVal); |
task_in_progress = TRUE; |
end |
Status = 3; |
CntrlTransType[CntrlNum] = 2'b00; // clear the transaction in progress flag |
CntrlTransAddr[CntrlNum] = 7'b1111111; |
CntrlTransEndP[CntrlNum] = 4'b1111; |
CntrlTransDlen[CntrlNum] = 0; |
end |
1 : begin |
if (in_out_buf[0] == {~ACK, ACK}) begin |
Status = 0; //setup initiated successfully |
SetDataToggle(address, EndPt, 2'b11); |
end |
else begin |
Status = 4; // invalid response |
CntrlTransType[CntrlNum] = 2'b00; |
// clear the transaction in progress flag |
CntrlTransAddr[CntrlNum] = 7'b1111111; |
CntrlTransEndP[CntrlNum] = 4'b1111; |
CntrlTransDlen[CntrlNum] = 0; |
end |
end |
default : begin |
Status = 4; // invalid response |
CntrlTransType[CntrlNum] = 2'b00; |
// clear the transaction in progress flag |
CntrlTransAddr[CntrlNum] = 7'b1111111; |
CntrlTransEndP[CntrlNum] = 4'b1111; |
CntrlTransDlen[CntrlNum] = 0; |
end |
endcase |
WriteResults; |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
end |
endtask |
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// control_IN : does the data phase in a control transaction initiated by |
// a call to setup |
// output : ByteCount : number of bytes received during this control_in |
// Status : Exit Status of this task |
// |
//////////////////////////////////////////////////////////////////////////////// |
|
task control_IN; |
input [6:0] address; |
input [3:0] EndPt; |
output [31:0] ByteCount; |
output [3:0] Status; |
|
reg [3:0] Status; |
reg [31:0] tskByteCount; |
reg [31:0] recv_bit_count; |
reg [15:0] tmpReg; |
reg [15:0] tmpCrc; |
integer i; |
integer CntrlNum; |
reg tmpDataToggle; |
reg [31:0] tmpPulseWidth; |
|
begin : control_IN |
task_in_progress = TRUE; |
ByteCount = 0; |
tmpPulseWidth = PulseWidth; |
CntrlNum = 0; |
for (i = 1; i <= MAX_CNTRL_INTERLEAVE; i = i + 1) begin |
if ((CntrlTransType[i] != 2'b00) & (CntrlTransAddr[i] == address) & (CntrlTransEndP[i] == EndPt)) begin |
CntrlNum = i; |
i = MAX_CNTRL_INTERLEAVE + 1; |
end |
end |
if (Debug) $display("CntrlTransType = %b", CntrlTransType[CntrlNum]); |
if (CntrlNum == 0) begin |
DispErrMsg(0, 0, 21); |
Status = 7; |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
disable control_IN; |
end |
if (CntrlTransType[CntrlNum] == 2'b00) begin // redundant ?? |
DispErrMsg(0, 0, 21); |
Status = 7; // no setup transaction in progress to do a control_in xfer |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
disable control_IN; |
end |
|
if (CntrlTransType[CntrlNum] != READ) begin |
DispErrMsg(0, 0, 22); |
Status = 9; // wrong type of control transaction |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
disable control_IN; |
end |
|
|
if ((SendPreamble == TRUE) & (DeviceSpeed == HIGH_SPEED)) begin |
clk_swtch = LOW_SPEED; // #27 |
usb_idle(ResponseLatency - 3); // #27 |
clk_swtch = HIGH_SPEED; // #27 |
send_preamble; // a high speed preamble is sent only when a high speed |
// hub is connected to the host model so in this case |
// switch clock speeds |
task_in_progress = TRUE; |
usb_idle(4); // idle for 4 high speed clock times after a preamble |
task_in_progress = TRUE; |
// PulseWidth = PulseWidth * 8; |
clk_swtch = LOW_SPEED; |
end |
|
in_out_buf[0] = CorruptToken({~IN_TOKEN, IN_TOKEN}); |
in_out_buf_ptr = 1; |
|
tmpReg[15:0] = FillCrc5({EndPt, address}); |
|
in_out_buf[1] = tmpReg[7:0]; |
in_out_buf[2] = tmpReg[15:8]; |
in_out_buf_ptr = 3; |
SetSyncLevel = 0; |
// usb_idle(ResponseLatency - 3); #27 |
task_in_progress = TRUE; |
SendData; //serialises, encodes and sends the data in in_out_buf, |
|
WaitForResp(recv_bit_count); |
@(posedge dpll_clk); // 10/10/97 |
case(in_out_buf_ptr) |
0 : begin // no response from device abort control transaction |
Status = 3; |
if (Debug) $display("In %0s --> time out for control_in transaction at time %0t", SelfName, $time); |
end |
1 : begin |
tmpReg[7:0] = in_out_buf[0]; //should contain the pid |
if (tmpReg[7:4] != (~tmpReg[3:0])) begin |
DispErrMsg(address, EndPt, 5); |
end |
if (tmpReg[3:0] == NAK) begin |
DispErrMsg(address, EndPt, 11); |
Status = 1; //NAK received from end point |
end |
if (tmpReg[3:0] == STALL) begin |
DispErrMsg(address, EndPt, 12); |
Status = 2; //STALL received from end point |
end |
end |
2 : begin |
DispErrMsg(address, EndPt, 6); // invalid number of data bytes received |
Status = 4; //invalid response |
end |
default : begin |
tmpReg[7:0] = in_out_buf[0]; //should contain the pid |
if (tmpReg[7:4] != (~tmpReg[3:0])) begin |
DispErrMsg(address, EndPt, 5); |
end |
if (Debug) $display("In %0s --> Data toggle recevied is %0b at time %0t", SelfName, tmpReg[7:0], $time); |
ByteCount = 0; |
tmpCrc = 16'hffff; |
//if (Debug) $display("In %0s --> calculating crc for in_out_buf[%0d] = %0h", SelfName, i, in_out_buf[i]); |
for (i = 1; i < (in_out_buf_ptr - 2); i = i + 1) begin |
tmpCrc = crc16(in_out_buf[i], tmpCrc); |
RecvBuffer[i - 1] = in_out_buf[i]; |
ByteCount = ByteCount + 1; |
if (Debug) $display("In %0s --> received byte[%0d] = %b", SelfName, i, in_out_buf[i]); |
end |
if (Debug) $display("In %0s --> calculated crc is %0h at time %0t.", SelfName, tmpCrc, $time); |
if (Debug) $display("In %0s --> received raw crc is %0h at time %0t.", SelfName, {swap8(~in_out_buf[in_out_buf_ptr - 2]), swap8(~in_out_buf[in_out_buf_ptr - 1])}, $time); |
tmpCrc = CorruptCrc16(~{swap8(tmpCrc[15:8]), swap8(tmpCrc[7:0])}); |
if (Debug) $display("In %0s --> received crc is %0h at time %0t.", SelfName, {in_out_buf[in_out_buf_ptr - 2], in_out_buf[in_out_buf_ptr - 1]}, $time); |
|
//ByteCount = ByteCount + 1; |
if (Debug) $display("In %0s --> tmpCrc %0h, at time %0t", SelfName, tmpCrc, $time); |
if (tmpCrc != {in_out_buf[in_out_buf_ptr - 2], in_out_buf[in_out_buf_ptr - 1]}) begin |
DispErrMsg(address, EndPt, 8); //CRC Error, send no response |
Status = 5; |
usb_idle(RespTimeOutVal); |
task_in_progress = TRUE; |
end |
else begin |
case (tmpReg[3:0]) //check the token |
DATA0 : begin |
if(CheckDataToggleIN(address, EndPt) != 0) begin |
DispErrMsg(address, EndPt, 10); |
ByteCount = 0; // discard data |
end |
SetDataToggle(address, EndPt, 2'b11); |
//usb_idle(ResponseLatency - 3); // #27 |
send_high_speed_preamble; |
task_in_progress = TRUE; |
SendAck; |
task_in_progress = TRUE; |
Status = 0; |
if (Debug) $display("In %0s --> sending ACK at time %0t", SelfName, $time); |
end |
DATA1 : begin |
if(CheckDataToggleIN(address, EndPt) != 1) begin |
DispErrMsg(address, EndPt, 10); |
ByteCount = 0; // discard data |
end |
SetDataToggle(address, EndPt, 2'b00); |
//usb_idle(ResponseLatency - 3); |
send_high_speed_preamble; |
task_in_progress = TRUE; |
SendAck; |
task_in_progress = TRUE; |
Status = 0; |
if (Debug) $display("In %0s --> sending ACK at time %0t", SelfName, $time); |
end |
default : begin |
Status = 4; |
ByteCount = 0; // discard data |
DispErrMsg(address, EndPt, 9); //incorrect token |
end |
endcase |
end //if (tmpCrc ... |
end // default : |
endcase |
|
if (ByteCount > CntrlTransDlen[CntrlNum]) begin |
CntrlTransDlen[CntrlNum] = 0; |
DispErrMsg(address, EndPt, 20); |
end |
if (Status == 0) CntrlTransDlen[CntrlNum] = CntrlTransDlen[CntrlNum] - ByteCount; |
WriteResults; |
// PulseWidth = tmpPulseWidth; |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
end |
endtask |
|
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// control_OUT : does the data phase in control transaction intiated by a setup |
// input : ByteCount, number of bytes from XmitBuffer to send |
// Status : exit status |
// |
//////////////////////////////////////////////////////////////////////////////// |
task control_OUT; |
input [6:0] address; |
input [3:0] EndPt; |
input [31:0] ByteCount; |
output [3:0] Status; |
|
reg [3:0] Status; |
reg [31:0] tskByteCount; |
reg [31:0] recv_bit_count; |
reg [15:0] tmpReg; |
reg [15:0] tmpCrc; |
integer i; |
integer CntrlNum; |
reg tmpDataToggle; |
reg [31:0] tmpPulseWidth; |
|
begin : control_OUT |
task_in_progress = TRUE; |
tmpPulseWidth = PulseWidth; |
CntrlNum = 0; |
for (i = 1; i <= MAX_CNTRL_INTERLEAVE; i = i + 1) begin |
if ((CntrlTransType[i] != 2'b00) & (CntrlTransAddr[i] == address) & (CntrlTransEndP[i] == EndPt)) begin |
CntrlNum = i; |
i = MAX_CNTRL_INTERLEAVE + 1; |
end |
end |
if (CntrlNum == 0) begin |
DispErrMsg(0, 0, 21); |
Status = 7; |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
disable control_OUT; |
end |
|
if (CntrlTransType[CntrlNum] == 2'b00) begin |
DispErrMsg(0, 0, 21); |
Status = 7; // no setup transaction in progress to do a control_in xfer |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
disable control_OUT; |
end |
|
if (CntrlTransType[CntrlNum] != WRITE) begin |
DispErrMsg(0, 0, 22); |
Status = 9; // wrong type of control transaction |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
disable control_OUT; |
end |
|
if (CntrlTransDlen[CntrlNum] == 0) begin |
DispErrMsg(0, 0, 23); |
Status = 10; // doing a control transaction when wLength is 0 |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
disable control_OUT; |
end |
// no setup transaction in progress so start a control_in transaction |
|
usb_idle(ResponseLatency - 3); |
|
if ((DeviceSpeed == HIGH_SPEED) & (SendPreamble == TRUE)) begin |
clk_swtch = LOW_SPEED; // #27 |
usb_idle(ResponseLatency - 3); // #27 |
clk_swtch = HIGH_SPEED; // #27 |
send_preamble; // a high speed preamble is sent only when a high speed |
// hub is connected to the host model so in this case |
// switch clock speeds |
task_in_progress = TRUE; |
// PulseWidth = PulseWidth * 8; |
clk_swtch = LOW_SPEED; |
end |
|
|
tskByteCount = ByteCount; |
if (tskByteCount > CntrlTransDlen[CntrlNum]) begin |
if (Debug) $display("In %0s --> more data is being requested than specified by wLength, ignoring the extra bytes at time %0t", SelfName, $time); |
tskByteCount = CntrlTransDlen[CntrlNum]; |
end |
// else CntrlTransDlen[CntrlNum] = CntrlTransDlen[CntrlNum] - tskByteCount; |
// decrement data count |
|
in_out_buf[0] = CorruptToken({~OUT_TOKEN, OUT_TOKEN}); |
in_out_buf_ptr = 1; |
|
tmpReg[15:0] = FillCrc5({EndPt, address}); |
|
in_out_buf[1] = tmpReg[7:0]; |
in_out_buf[2] = tmpReg[15:8]; |
in_out_buf_ptr = 3; |
if (Debug) $display("In host --> address = %h, EndPt = %h, crc5 = %h, tmpReg = %h", address, EndPt, tmpReg[15:11], tmpReg); |
|
SetSyncLevel = 0; |
task_in_progress = TRUE; |
SendData; //serialises, encodes and sends the data in in_out_buf |
|
task_in_progress = TRUE; |
tmpDataToggle = CheckDataToggleIN(address, EndPt); |
if (Debug) $display("In %0s --> DataToggle is %0h", SelfName, tmpDataToggle); |
|
case (tmpDataToggle) |
0 : in_out_buf[0] = CorruptDataPid({~DATA0, DATA0}); |
1 : in_out_buf[0] = CorruptDataPid({~DATA1, DATA1}); |
default : in_out_buf[0] = CorruptDataPid({~DATA0, DATA0}); |
endcase |
in_out_buf_ptr = 1; |
if (Debug) $display("In %0s --> DataToggle is %0h at time %0t.", SelfName, in_out_buf[0], $time); |
|
tmpCrc = 16'hffff; |
for (i = 1; i <= ByteCount; i = i + 1) begin |
in_out_buf[i] = XmitBuffer[i - 1]; |
tmpCrc = crc16(in_out_buf[i], tmpCrc); |
in_out_buf_ptr = in_out_buf_ptr + 1; |
if (Debug) $display("In %0s --> sending byte[%0d] = %b", SelfName, i, in_out_buf[i]); |
end |
if (Debug) $display("In %0s --> raw crc is %0h at time", SelfName, tmpCrc, $time); |
tmpCrc = CorruptCrc16(~{swap8(tmpCrc[15:8]), swap8(tmpCrc[7:0])}); |
if (Debug) $display("In %0s --> sent crc is %0h at time", SelfName, tmpCrc, $time); |
in_out_buf[ByteCount + 2] = tmpCrc[7:0]; |
in_out_buf[ByteCount + 1] = tmpCrc[15:8]; |
in_out_buf_ptr = in_out_buf_ptr + 2; |
SetSyncLevel = 1; |
usb_idle(ResponseLatency - 3); |
task_in_progress = TRUE; |
send_high_speed_preamble; |
task_in_progress = TRUE; |
SendData; //send the contents of in_out_buf |
|
WaitForResp(recv_bit_count); //wait for a response for this transfer |
if (Debug) $display("In %0s --> bits received are %0h", SelfName, recv_bit_count); |
|
case (in_out_buf_ptr) |
0 : begin |
if (dec_bit_stuff_err == TRUE) begin |
usb_idle(RespTimeOutVal); |
task_in_progress = TRUE; |
end |
Status = 3; |
DispErrMsg(address, EndPt, 4); |
end |
1 : begin |
tmpReg[7:0] = in_out_buf[0]; |
case (tmpReg[3:0]) |
ACK : begin |
case (tmpDataToggle) //change the data toggle |
0 : SetDataToggle(address, EndPt, 2'b11); |
1 : SetDataToggle(address, EndPt, 2'b00); |
default : SetDataToggle(address, EndPt, 0); |
endcase |
Status = 0; |
if (Debug) $display("In %0s --> ACK received at time %0t.", SelfName, $time); |
end |
NAK : begin |
DispErrMsg(address, EndPt, 11); |
Status = 1; // nak received |
end |
STALL : begin |
DispErrMsg(address, EndPt, 12); |
Status = 2; // stall received |
end |
default : begin |
DispErrMsg(address, EndPt, 13); |
Status = 4; // invalid response |
end |
endcase |
end |
default : DispErrMsg(address, EndPt, 14); |
endcase |
if (Status == 0) CntrlTransDlen[CntrlNum] = CntrlTransDlen[CntrlNum] - tskByteCount; |
WriteResults; |
// PulseWidth = tmpPulseWidth; |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
end |
endtask //control_out |
|
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// status_in : does the status phase in a control transaction |
// output : Status : exit status of the transaction |
// |
//////////////////////////////////////////////////////////////////////////////// |
task status_IN; |
input [6:0] address; |
input [3:0] EndPt; |
output Status; |
reg [3:0] Status; |
reg [31:0] recv_bit_count; |
reg [15:0] tmpReg; |
integer i; |
reg tmpDataToggle; |
integer CntrlNum; |
reg [31:0] tmpPulseWidth; |
|
begin : status_IN |
task_in_progress = TRUE; |
tmpPulseWidth = PulseWidth; |
CntrlNum = 0; |
$display("Input Address:%x, EndPt:%x",address,EndPt); |
for (i = 1; i <= MAX_CNTRL_INTERLEAVE; i = i + 1) begin |
$display("i :%d, CntrlTransType:%x; CntrlTransAddr:%x;CntrlTransEndP:%x ", |
i,CntrlTransType[i],CntrlTransAddr[i],CntrlTransEndP[i]); |
if ((CntrlTransType[i] != 2'b00) & (CntrlTransAddr[i] == address) & (CntrlTransEndP[i] == EndPt)) begin |
CntrlNum = i; |
i = MAX_CNTRL_INTERLEAVE + 1; |
end |
end |
if (CntrlNum == 0) begin |
DispErrMsg(0, 0, 21); |
Status = 7; |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
disable status_IN; |
end |
if (CntrlTransType[CntrlNum] == 2'b00) begin |
DispErrMsg(0, 0, 24); |
Status = 7; // no setup transaction in progress to do a control_in xfer |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
disable status_IN; |
end |
if (Debug) $display("In %0s CntrlTransType = %b, WRITE = %b", SelfName, CntrlTransType[CntrlNum], WRITE); |
if (CntrlTransType[CntrlNum] != WRITE) begin |
DispErrMsg(0, 0, 22); |
Status = 9; // wrong type of control transaction |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
disable status_IN; |
end |
|
usb_idle(ResponseLatency - 3); |
task_in_progress = TRUE; |
if ((DeviceSpeed == HIGH_SPEED) & (SendPreamble == TRUE)) begin |
clk_swtch = LOW_SPEED; // #27 |
usb_idle(ResponseLatency - 3); // #27 |
clk_swtch = HIGH_SPEED; // #27 |
send_preamble; // a high speed preamble is sent only when a high speed |
// hub is connected to the host model so in this case |
// switch clock speeds |
task_in_progress = TRUE; |
// PulseWidth = PulseWidth * 8; |
clk_swtch = LOW_SPEED; |
end |
in_out_buf[0] = CorruptToken({~IN_TOKEN, IN_TOKEN}); |
in_out_buf_ptr = 1; |
|
tmpReg[15:0] = FillCrc5({EndPt, address}); |
|
in_out_buf[1] = tmpReg[7:0]; |
in_out_buf[2] = tmpReg[15:8]; |
in_out_buf_ptr = 3; |
SetSyncLevel = 0; |
SendData; //serialises, encodes and sends the data in in_out_buf, |
|
WaitForResp(recv_bit_count); |
case (in_out_buf_ptr) |
0 : begin // timeout |
if (dec_bit_stuff_err == TRUE) begin |
usb_idle(RespTimeOutVal); |
task_in_progress = TRUE; |
end |
Status = 3; |
end |
1 : begin |
tmpReg[7:0] = in_out_buf[0]; //should contain the pid |
if (tmpReg[7:4] != (~tmpReg[3:0])) begin |
DispErrMsg(address, EndPt, 5); |
end |
if (tmpReg[3:0] == NAK) begin |
DispErrMsg(address, EndPt, 11); |
Status = 1; //NAK received from end point |
end |
else if (tmpReg[3:0] == STALL) begin |
DispErrMsg(address, EndPt, 12); |
Status = 2; //STALL received from end point |
end |
else begin |
Status = 4; // invalid response |
end |
end |
3 : begin |
tmpReg[7:0] = in_out_buf[0]; //should contain the pid |
if (tmpReg[7:4] != (~tmpReg[3:0])) begin |
DispErrMsg(address, EndPt, 5); |
end |
if ({in_out_buf[1], in_out_buf[2]} != 16'h0000) begin |
DispErrMsg(address, EndPt, 8); |
usb_idle(RespTimeOutVal); |
task_in_progress = TRUE; |
Status = 5; |
end |
else begin |
if (tmpReg[3:0] == DATA1) begin |
NumSucCntrlWrTrans = NumSucCntrlWrTrans + 1; |
//usb_idle(ResponseLatency - 3); // #27 |
send_high_speed_preamble; |
task_in_progress = TRUE; |
SendAck; |
task_in_progress = TRUE; |
Status = 0; |
end |
else begin |
DispErrMsg(address, EndPt, 25); |
usb_idle(RespTimeOutVal); |
task_in_progress = TRUE; |
end |
end |
end |
default : begin |
Status = 4; // invalid response |
end |
endcase |
|
//reset control transaction flags |
if (Status != 1) begin |
CntrlTransEndP[CntrlNum] = 4'b1111; |
CntrlTransAddr[CntrlNum] = 7'b1111111; |
CntrlTransDlen[CntrlNum] = 0; |
CntrlTransType[CntrlNum] = 0; |
end |
WriteResults; |
// PulseWidth = tmpPulseWidth; |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
end |
endtask |
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// status_out : does the status phase of a control transaction |
// output : Status : Exit Status |
// |
//////////////////////////////////////////////////////////////////////////////// |
task status_OUT; |
input [6:0] address; |
input [3:0] EndPt; |
output Status; |
reg [3:0] Status; |
reg [31:0] recv_bit_count; |
reg [15:0] tmpReg; |
integer i; |
reg tmpDataToggle; |
integer CntrlNum; |
reg [31:0] tmpPulseWidth; |
|
begin : status_OUT |
task_in_progress = TRUE; |
tmpPulseWidth = PulseWidth; |
CntrlNum = 0; |
for (i = 1; i <= MAX_CNTRL_INTERLEAVE; i = i + 1) begin |
if ((CntrlTransType[i] != 2'b00) & (CntrlTransAddr[i] == address) & (CntrlTransEndP[i] == EndPt)) begin |
CntrlNum = i; |
i = MAX_CNTRL_INTERLEAVE + 1; |
end |
end |
if (CntrlNum == 0) begin |
DispErrMsg(0, 0, 21); |
Status = 7; |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
disable status_OUT; |
end |
if (CntrlTransType [CntrlNum]== 2'b00) begin |
DispErrMsg(0, 0, 24); |
Status = 7; // no setup transaction in progress to do a control_in xfer |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
disable status_OUT; |
end |
|
if (CntrlTransType[CntrlNum] != READ) begin |
DispErrMsg(0, 0, 22); |
Status = 9; // wrong type of control transaction |
clk_swtch = HIGH_SPEED; |
task_in_progress = FALSE; |
disable status_OUT; |
end |
|
usb_idle(ResponseLatency - 3); |
task_in_progress = TRUE; |
if ((DeviceSpeed == HIGH_SPEED) & (SendPreamble == TRUE)) begin |
clk_swtch = LOW_SPEED; // #27 |
usb_idle(ResponseLatency - 3); // #27 |
clk_swtch = HIGH_SPEED; // #27 |
send_preamble; // a high speed preamble is sent only when a high speed |
// hub is connected to the host model so in this case |
// switch clock speeds |
task_in_progress = TRUE; |
usb_idle(4); // idle for 4 high speed clock times after a preamble |
task_in_progress = TRUE; |
// PulseWidth = PulseWidth * 8; |
clk_swtch = LOW_SPEED; |
end |
in_out_buf[0] = CorruptToken({~OUT_TOKEN, OUT_TOKEN}); |
in_out_buf_ptr = 1; |
|
tmpReg[15:0] = FillCrc5({EndPt, address}); |
|
in_out_buf[1] = tmpReg[7:0]; |
in_out_buf[2] = tmpReg[15:8]; |
in_out_buf_ptr = 3; |
SetSyncLevel = 0; |
SendData; |
|
usb_idle(ResponseLatency - 3); |
task_in_progress = TRUE; |
send_high_speed_preamble; |
task_in_progress = TRUE; |
in_out_buf[0] = CorruptDataPid({~DATA1, DATA1}); |
in_out_buf[1] = 0; |
in_out_buf[2] = 0; |
in_out_buf_ptr = 3; |
SetSyncLevel = 1; |
SendData; |
|
WaitForResp(recv_bit_count); |
|
case (in_out_buf_ptr) |
0 : begin |
if (dec_bit_stuff_err == TRUE) begin |
usb_idle(RespTimeOutVal); |
task_in_progress = TRUE; |
end |
Status = 3; // time out |
end |
1 : begin |
tmpReg[7:0] = in_out_buf[0]; //should contain the pid |
if (tmpReg[7:4] != (~tmpReg[3:0])) begin |
DispErrMsg(address, EndPt, 5); |
end |
if (tmpReg[3:0] == NAK) begin |
DispErrMsg(address, EndPt, 11); |
Status = 1; //NAK received from end point |
end |
else if (tmpReg[3:0] == STALL) begin |
DispErrMsg(address, EndPt, 12); |
Status = 2; //STALL received from end point |
end |
else if (tmpReg[3:0] == ACK) begin |
NumSucCntrlRdTrans = NumSucCntrlRdTrans + 1; |
Status = 0; |
end |
else begin |
Status = 4; // invalid response |
end |
end |
default : begin |
Status = 4; // invalid response |
end |
endcase |
|
//reset control transaction flags |
if (Status != 1) begin |
CntrlTransEndP[CntrlNum] = 0; |
CntrlTransAddr[CntrlNum] = 7'b1111111; |
CntrlTransDlen[CntrlNum] = 4'b1111; |
CntrlTransType[CntrlNum] = 0; |
end |
// PulseWidth = tmpPulseWidth; |
clk_swtch = HIGH_SPEED; |
WriteResults; |
task_in_progress = FALSE; |
end |
endtask |
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// usb_resume : drives a K state on the bus for ResumeTime number of bit times |
// |
//////////////////////////////////////////////////////////////////////////////// |
task usb_resume; |
input [31:0] ResumeTime; |
reg [31:0] tskResumeTime; |
|
begin : usb_resume |
task_in_progress = TRUE; |
tskResumeTime = 0; |
forever @(posedge clk) begin |
if (tskResumeTime >= ResumeTime) begin |
zDPLS = 1'b0; |
zDMNS = 1'b0; |
if (DeviceSpeed == HIGH_SPEED) begin // wait for two low speed bit times |
#667; |
#667; |
end |
else begin |
@(posedge clk); |
@(posedge clk); |
end |
zDPLS = 1'bZ; |
zDMNS = 1'bZ; |
task_in_progress = FALSE; |
disable usb_resume; |
end |
if (DeviceSpeed == HIGH_SPEED) begin |
zDPLS = 1'b0; |
zDMNS = 1'b1; |
end |
else begin |
zDPLS = 1'b1; |
zDMNS = 1'b0; |
end |
tskResumeTime = tskResumeTime + 1; |
end |
task_in_progress = FALSE; |
end |
endtask |
|
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// send_preamble : sends a Preamble token and idles the bus for the required |
// 4 bit times which is the hub setup time for low speed devices |
// |
//////////////////////////////////////////////////////////////////////////////// |
task send_preamble; |
|
reg tskGenSE0Error; |
reg [31:0] tskSE0BitTimes; |
reg [31:0] tskSE0ErrorLevel; |
|
begin |
task_in_progress = TRUE; |
// SE0 should not be generated after sending a preamble 10/03/1996 |
// modify SE0 error generation logic |
tskGenSE0Error = GenSE0Error; |
tskSE0BitTimes = SE0BitTimes; |
tskSE0ErrorLevel = SE0ErrorLevel; |
|
GenSE0Error = TRUE; |
SE0BitTimes = 0; |
SE0ErrorLevel = SetSyncLevel; |
|
in_out_buf[0] = {~PREAMBLE, PREAMBLE}; |
in_out_buf_ptr = 1; |
SendData; |
|
// restore SE0 error generation logic 10/03/1996 |
GenSE0Error = tskGenSE0Error; |
SE0BitTimes = tskSE0BitTimes; |
SE0ErrorLevel = tskSE0ErrorLevel; |
|
usb_idle(4); // hub setup time |
task_in_progress = FALSE; |
end |
endtask |
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// transfer_buf : transfers whatever data from the xmit buffer with a sync |
// field in the front |
// input : ByteCount : number of bytes to be transferred from buffer, 32 bits |
// FromFile : TRUE/FALSE, if TRUE data is taken from host_usb_recv.dat |
// |
//////////////////////////////////////////////////////////////////////////////// |
task transfer_buf; |
|
input [31:0] ByteCount; |
input FromFile; |
input [160:1] FileName; |
reg [3:0] Status; |
integer i; |
|
begin : transfer_buf |
task_in_progress = TRUE; |
for (i = 0; i < ByteCount; i = i + 1) begin |
in_out_buf[i] = XmitBuffer[i]; // addition 5/29/1996 |
end |
in_out_buf_ptr = ByteCount; |
SendData; |
task_in_progress = FALSE; |
end |
endtask |
|
|
//////////////////////////////////////////////////////////////////////////////// |
// |
// receive_buf : receives the data from the bus and puts in RecvBuf |
// input : DumpToFile : if true data is dumped to a file |
// output : ByteCount : number of bytes received |
// |
//////////////////////////////////////////////////////////////////////////////// |
task receive_buf; |
|
input DumpToFile; |
output [31:0] ByteCount; |
reg [31:0] recv_bit_count; |
integer i; |
|
begin |
task_in_progress = TRUE; |
WaitForResp(recv_bit_count); |
for (i = 0; i < in_out_buf_ptr; i = i + 1) begin |
RecvBuffer[i] = in_out_buf[i]; |
end |
ByteCount = in_out_buf_ptr; |
if (DumpToFile == TRUE && ByteCount > 0) DumpData(7'b1111111, 4'b1111, DATA0, ByteCount-1); |
task_in_progress = FALSE; |
end |
|
endtask |
|
|
/////////////////////////////////////////////////////////////////////////////// |
// |
// task send_high_speed_preamble : sends a preamble by switching clock |
// during a low speed transaction |
// |
//////////////////////////////////////////////////////////////////////////////// |
task send_high_speed_preamble; |
begin |
task_in_progress = TRUE; |
if ((SendPreamble == TRUE) & (DeviceSpeed == HIGH_SPEED)) begin |
// PulseWidth = PulseWidth / 8; |
clk_swtch = HIGH_SPEED; |
send_preamble; |
task_in_progress = TRUE; |
// a high speed preamble is sent only when a high speed |
// hub is connected to the host model so in this case |
// switch clock speeds |
usb_idle(4); |
task_in_progress = TRUE; |
// idle for 4 high speed clock times after a preamble |
// PulseWidth = PulseWidth * 8; |
clk_swtch = LOW_SPEED; |
end |
task_in_progress = FALSE; |
end |
endtask |
|
|
|
initial begin // initilaise the input and output buffers |
for(tmpCounter = 0; tmpCounter <= 2048; tmpCounter = tmpCounter + 1) begin |
XmitBuffer[tmpCounter] = 8'b00000000; |
end |
for(tmpCounter = 0; tmpCounter <= RECV_BUF_SIZE; tmpCounter = tmpCounter + 1) begin |
RecvBuffer[tmpCounter] = 8'b00000000; |
end |
for (tmpCounter = 0; tmpCounter < IN_OUT_BUF_SIZE; tmpCounter = tmpCounter + 1) begin |
in_out_buf[tmpCounter] = 0; |
end |
//for (tmpCounter = 0; tmpCounter < OUT_BUF_SIZE; tmpCounter = tmpCounter + 1) begin |
//out_buf[tmpCounter] = 0; |
//end |
for (tmpCounter = 0; tmpCounter < 128; tmpCounter = tmpCounter + 1) |
begin |
InDataToggle[tmpCounter] = 16'h0000; |
OutDataToggle[tmpCounter] = 16'h0000; |
end |
|
TimeOut = TRUE; |
TimeOutVal = 16; // timeout after 16 bit times |
RespTimeOutVal = 16; |
|
ResponseLatency = 3; |
|
GenCrc16Err = FALSE; |
Crc16ErrMask = 16'hffff; |
|
GenCrc5Err = FALSE; |
Crc5ErrMask = 5'b00000; |
|
ReportResults = TRUE; // default : turned on |
ResultsFile = "host_usb_res.log"; // default file name |
ResultsFp = 0; // initially log file pointer is 0 |
|
PulseWidth = 42; |
|
SyncField = FALSE; // default : sync field corruption is turned off |
SyncFieldMask = 8'hf0; // default no sync field corruption specified |
SyncLevel = 0; |
SetSyncLevel = 0; |
|
GenSE0Error = FALSE; |
SE0BitTimes = 2; // default conforms to the spec |
SE0ErrorLevel = 0; |
|
HshkPidIntegrity = FALSE; // no corruption |
HshkPidIntegrityMask = 8'hf0; // corruption mask for ACK's |
|
BitStuffErr = FALSE; // changed TRUE to FALSE 02/18/97 |
|
for (tmpCounter = 1; tmpCounter <= MAX_CNTRL_INTERLEAVE; tmpCounter = tmpCounter + 1) begin |
CntrlTransType[tmpCounter] = 2'b00; |
// no control transaction in progress |
CntrlTransAddr[tmpCounter] = 7'b1111111; |
// address of a control transaction |
CntrlTransEndP[tmpCounter] = 4'b1111; |
// endpoint number of a control transaction |
CntrlTransDlen[tmpCounter] = 16'h0000; |
// data length for this control transaction |
end |
|
SendDataFileName = "host_usb_xmit.dat"; |
RecvDataFileName = "host_usb_recv.dat"; |
RecvDataFp = 0; |
ReportErrors = TRUE; |
ErrorFileName = "host_usb_err.log"; |
ErrorFileFp = 0; |
|
for ( tmpCounter = 1; tmpCounter <= NUM_ENDPT_FILES; tmpCounter = tmpCounter + 1) begin |
EndPtFileName[tmpCounter] = ""; |
EndPtFileMode[tmpCounter] = 2'b00; // no mode is assigned to it |
EndPtFileInfo[tmpCounter] = 11'b00000000000; |
EndPtFp[tmpCounter] = 0; |
EndPtFileOfst[tmpCounter] = 0; |
end |
|
SendDataOfst = 0; |
|
Debug = FALSE; |
|
GenDataPidErr = FALSE; |
DataPidErrMask = 8'hff; |
GenTokenErr = FALSE; |
TokenErrMask = 8'hff; |
|
//DeviceSpeed = LOW_SPEED; |
DeviceSpeed = HIGH_SPEED; |
GenByteBoundary = FALSE; |
|
SendPreamble = FALSE; // assumes a low speed device is connected to the |
// host |
|
FrameNumber = 0; |
|
NumBulkInTrans = 0; // number of bulk in transactions |
NumSucBulkInTrans = 0; // number of successful bulk in transctions |
NumBulkOutTrans = 0; // number of bulk out transactions |
NumSucBulkOutTrans = 0; // number of successful bulk out transactions |
NumIsoInTrans = 0; // number of iso in transactions |
NumSucIsoInTrans = 0; // number of successful iso in transactions |
NumIsoOutTrans = 0; // number of iso out transactions |
NumSOF = 0; // number of SOF's sent |
NumCntrlRdTrans = 0; // number of control reads |
NumSucCntrlRdTrans = 0; // number of successful control reads |
NumCntrlWrTrans = 0; // number of control writes |
NumSucCntrlWrTrans = 0; // number of successful control writes |
NumIntrptTrans = 0; // number of interrupts |
NumSucIntrptTrans = 0; // number of successful interrupts |
NumIntrOutTrans = 0; // number of interrupt out transactions |
NumSucIntrOutTrans = 0; // number of successful interrupt out transactions |
NumResets = 0; // number of resets |
|
// intialize Jitter registers |
HighJitterTime = 0; |
LowJitterTime = 0; |
JitterPeriod = 0; |
JitterCount = 0; |
JitterOnOff = FALSE; // Jitter generation is off by default; |
|
task_in_progress = FALSE; |
|
clk_swtch = HIGH_SPEED; |
|
SetupDataLen = 8; |
|
GenByteBoundaryPos = FALSE; |
BoundaryBitVal = 1'b0; |
|
ModifyGran = 0; |
|
end |
|
|
assign clk = (clk_swtch == LOW_SPEED) ? ls_clk : hs_clk; |
assign clk4x = (clk_swtch == LOW_SPEED) ? clk6 : clk48; |
|
|
|
|
/////////////////////////////////////////////////////////////////////////////// |
// |
// task in_token : sends an in token on to the bus. |
// inputs : address : 7 bits : endpoint address |
// EndPt : 4 bits : endpoint number |
// |
/////////////////////////////////////////////////////////////////////////////// |
task in_token; |
input [6:0] address; |
input [3:0] EndPt; |
reg [15:0] tmpReg; |
begin |
in_out_buf[0] = CorruptToken({~IN_TOKEN, IN_TOKEN}); |
tmpReg[15:0] = FillCrc5({EndPt, address}); |
in_out_buf[1] = tmpReg[7:0]; |
in_out_buf[2] = tmpReg[15:8]; |
in_out_buf_ptr = 3; |
SendData; |
end |
endtask |
|
|
/////////////////////////////////////////////////////////////////////////////// |
// |
// task out_token : sends an out token on to the bus. |
// inputs : address : 7 bits : endpoint address |
// EndPt : 4 bits : endpoint number |
// |
/////////////////////////////////////////////////////////////////////////////// |
task out_token; |
input [6:0] address; |
input [3:0] EndPt; |
reg [15:0] tmpReg; |
begin |
in_out_buf[0] = CorruptToken({~OUT_TOKEN, OUT_TOKEN}); |
tmpReg[15:0] = FillCrc5({EndPt, address}); |
in_out_buf[1] = tmpReg[7:0]; |
in_out_buf[2] = tmpReg[15:8]; |
in_out_buf_ptr = 3; |
SendData; |
end |
endtask |
|
|
/////////////////////////////////////////////////////////////////////////////// |
// |
// task setup_token : sends an setup token on to the bus |
// inputs : address : 7 bits : endpoint address |
// EndPt : 4 bits : endpoint number |
// |
/////////////////////////////////////////////////////////////////////////////// |
task setup_token; |
input [6:0] address; |
input [3:0] EndPt; |
reg [15:0] tmpReg; |
begin |
in_out_buf[0] = CorruptToken({~SETUP_TOKEN, SETUP_TOKEN}); |
tmpReg[15:0] = FillCrc5({EndPt, address}); |
in_out_buf[1] = tmpReg[7:0]; |
in_out_buf[2] = tmpReg[15:8]; |
in_out_buf_ptr = 3; |
SendData; |
end |
endtask |
|
|
|
/////////////////////////////////////////////////////////////////////////////// |
// |
// task send_ack : sends an ACK on to the bus |
// |
/////////////////////////////////////////////////////////////////////////////// |
task send_ack; |
begin |
in_out_buf[0] = CorruptHshk({~ACK, ACK}); |
in_out_buf_ptr = 1; |
SendData; |
end |
endtask |
|
|
/////////////////////////////////////////////////////////////////////////////// |
// |
// task send_nak : sends a NAK on the bus (though an host is not supposed |
// to send a NAK) |
// |
/////////////////////////////////////////////////////////////////////////////// |
task send_nak; |
begin |
in_out_buf[0] = CorruptHshk({~NAK, NAK}); |
in_out_buf_ptr = 1; |
SendData; |
end |
endtask |
|
|
/////////////////////////////////////////////////////////////////////////////// |
// |
// task send_stall : sends a STALL on to the bus (though an host is not |
// supposed to send a STALL) |
// |
/////////////////////////////////////////////////////////////////////////////// |
task send_stall; |
begin |
in_out_buf[0] = CorruptHshk({~STALL, STALL}); |
in_out_buf_ptr = 1; |
SendData; |
end |
endtask |
|
|
/////////////////////////////////////////////////////////////////////////////// |
// |
// task wait_for_data : waits for a response on the bus and decodes the |
// data packet and returns a status indicating what |
// type of packet was received. |
// Output : PackType : 4'b0010 : ACK |
// 4'b1010 : NAK |
// 4'b1110 : STALL |
// 4'b0011 : DATA0 |
// 4'b1011 : DATA1 |
// 4'b1111 : Unknown |
// ByteCount : indicates the number of bytes of data present if |
// PackType is of DATA0 or DATA1 |
// Status : 0 : command executed successfully. |
// 3 : time out, no response. |
// 4 : invalid response, unknown packet type |
// 5 : CRC error on received data |
// 11 : corrupted ACK/NAK/STALL |
// 12 : corrupted DATA0/DATA1 pid, CRC correct |
// 13 : corrupted DATA0/DATA1 pid, CRC incorrect |
// |
// |
/////////////////////////////////////////////////////////////////////////////// |
task wait_for_data; |
output [31:0] ByteCount; |
output [3:0] PackType; |
output [3:0] Status; |
reg [15:0] tmpReg; |
reg [15:0] tmpCrc; |
reg [31:0] recv_bit_count; |
integer i; |
begin |
WaitForResp(recv_bit_count); |
PackType = 4'b1111; |
Status = 0; |
case (in_out_buf_ptr) |
0 : begin |
Status = 3; // timeout |
if (dec_bit_stuff_err == TRUE) usb_idle(RespTimeOutVal); |
end |
1 : begin |
tmpReg[7:0] = in_out_buf[0]; |
case (tmpReg[3:0]) |
ACK : PackType = ACK; |
NAK : PackType = NAK; |
STALL : PackType = STALL; |
default : PackType = 4'b1111; |
endcase |
if (((tmpReg == ACK) | (tmpReg == NAK) | (tmpReg == STALL)) & (~tmpReg[7:4] != tmpReg[3:0])) Status = 11; |
end |
2 : begin |
Status = 4; |
PackType = 4'b1111; |
end |
default : begin // since the number of bytes received is greater than 2 this |
// obviously should be a data packet |
tmpReg[7:0] = in_out_buf[0]; |
ByteCount = 0; |
tmpCrc = 16'hffff; |
if ((tmpReg[3:0] == DATA0) | (tmpReg[3:0] == DATA1)) begin |
for ( i = 1; i < (in_out_buf_ptr - 2); i = i + 1) begin |
tmpCrc = crc16(in_out_buf[i], tmpCrc); |
RecvBuffer[i - 1] = in_out_buf[i]; |
ByteCount = ByteCount + 1; |
end |
tmpCrc = ~{swap8(tmpCrc[15:8]), swap8(tmpCrc[7:0])}; |
if (tmpCrc != {in_out_buf[in_out_buf_ptr - 2], in_out_buf[in_out_buf_ptr - 1]}) Status = 5; |
if (~tmpReg[7:4] != tmpReg[3:0]) begin |
if (Status == 5) Status = 13; |
else Status = 12; |
end |
PackType = tmpReg[3:0]; |
end |
else PackType = 4'b1111; |
end |
endcase |
|
end |
endtask |
|
|
|
|
parameter MYACK = 4'b0000, |
MYNAK = 4'b0001, |
MYSTALL = 4'b0010, |
MYTOUT = 4'b0011, |
MYIVRES = 4'b0100, |
MYCRCER = 4'b0101; |
|
|
|
parameter OUT = 2'b00, |
IN = 2'b10, |
SOF = 2'b01, |
SETUP=2'b11; |
|
|
// Control Packet format; |
|
reg [24:0] ControlPkt; |
reg [3:0] Status; |
integer ByteCount; |
|
|
task printstatus; |
input [3:0] RecvdStatus; |
input [3:0] ExpStatus; |
begin |
$display(""); |
$display(" #######################################################"); |
if(RecvdStatus !== ExpStatus ) begin |
$display(" ERROR: Expected Status and Observed Status didn't match at %0d", $time); |
if(ExpStatus==4'b0000) |
$display(" Expected Status is ACK at %0d", $time); |
else if(ExpStatus==4'b0001) |
$display(" Expected Status is NACK at %0d", $time); |
else if(ExpStatus==4'b0010) |
$display(" Expected Status is STALL at %0d", $time); |
else if(ExpStatus==4'b0011) |
$display(" Expected Status is TIMEOUT at %0d", $time); |
else if(ExpStatus==4'b0100) |
$display(" Expected Status is INVALID RESPONSE at %0d", $time); |
else if(ExpStatus==4'b0101) |
$display(" Expected Status is CRC ERROR at %0d", $time); |
end |
|
if(RecvdStatus==4'b0000) |
$display(" Received Status is ACK at %0d", $time); |
else if(RecvdStatus==4'b0001) |
$display(" Received Status is NACK at %0d", $time); |
else if(RecvdStatus==4'b0010) |
$display(" Received Status is STALL at %0d", $time); |
else if(RecvdStatus==4'b011) |
$display(" Received Status is TIMEOUT at %0d", $time); |
else if(RecvdStatus==4'b0100) |
$display(" Received Status is INVALID RESPONSE at %0d", $time); |
else if(RecvdStatus==4'b0101) |
$display(" Received Status is CRC ERROR at %0d", $time); |
$display(" #######################################################"); |
$display(""); |
end |
endtask |
|
|
|
|
task dump_recv_buffer; |
|
input [31:0] NumBytes; |
integer i; |
begin |
|
|
for(i=0; i < NumBytes; i=i+1) |
$display("RecvBuffer[%0d] = %b : %0d", i, RecvBuffer[i], RecvBuffer[i]); |
end |
endtask |
|
|
|
task send_token; |
input [1:0] tkn; |
input [6:0] adr; |
input [3:0] ep; |
|
reg [2:0] Status; |
reg [15:0] tmpreg; |
begin |
|
XmitBuffer[0] = {~tkn,2'b10, tkn, 2'b01}; |
tmpreg = FillCrc5({ep, adr}); |
XmitBuffer[1] = tmpreg[7:0]; |
XmitBuffer[2] = tmpreg[15:8]; |
transfer_buf(3, 0, Status); |
end |
endtask |
|
task send_datapkt; |
input datatgl; |
input [10:0] numbytes; |
|
integer i; |
reg [15:0] tmpcrc; |
reg [2:0] Status; |
begin |
|
// Shifting the XmitBuffer Values to put the DataTkn in Byte0. |
for(i=numbytes; i > 0; i=i-1) begin |
XmitBuffer[i] = XmitBuffer[i-1]; |
end |
|
XmitBuffer[0] = {!datatgl, 3'b100, datatgl, 3'b011}; |
|
tmpcrc = crc16(XmitBuffer[1], 16'hffff); |
for(i=1; i < numbytes; i=i+1) begin |
tmpcrc = crc16(XmitBuffer[i+1], tmpcrc); |
end |
|
if(numbytes > 0) begin |
XmitBuffer[numbytes+1] = ~swap8(tmpcrc[15:8]); |
XmitBuffer[numbytes+2] = ~swap8(tmpcrc[7:0]); |
end |
else begin |
XmitBuffer[numbytes+1] = 8'b0000_0000; |
XmitBuffer[numbytes+2] = 8'b0000_0000; |
end |
|
transfer_buf(numbytes+3, 0, Status); |
|
end |
endtask |
|
|
task SetAddress; |
input [6:0] address; |
begin |
XmitBuffer[0] = 8'b0000_0000; |
XmitBuffer[1] = 8'b0000_0101; // SetAddress |
XmitBuffer[2] = {1'b0, address}; |
XmitBuffer[3] = 8'b0000_0000; |
XmitBuffer[4] = 8'b0000_0000; |
XmitBuffer[5] = 8'b0000_0000; |
XmitBuffer[6] = 8'b0000_0000; |
XmitBuffer[7] = 8'b0000_0000; |
end |
endtask |
|
|
task GetConfiguration; |
begin |
XmitBuffer[0] = 8'b1000_0000; |
XmitBuffer[1] = 8'b0000_1000; // get config. |
XmitBuffer[2] = 8'b0000_0000; |
XmitBuffer[3] = 8'b0000_0000; |
XmitBuffer[4] = 8'b0000_0000; |
XmitBuffer[5] = 8'b0000_0000; |
XmitBuffer[6] = 8'b0000_0001; |
XmitBuffer[7] = 8'b0000_0000; |
end |
endtask |
|
|
task SetConfiguration; |
input [1:0] cfg_val; |
begin |
XmitBuffer[0] = 8'b0000_0000; |
XmitBuffer[1] = 8'b0000_1001; // Set Configuration |
XmitBuffer[2] = {6'b000_000, cfg_val}; |
XmitBuffer[3] = 8'b0000_0000; |
XmitBuffer[4] = 8'b0000_0000; |
XmitBuffer[5] = 8'b0000_0000; |
XmitBuffer[6] = 8'b0000_0000; |
XmitBuffer[7] = 8'b0000_0000; |
end |
endtask |
|
task GetDescriptor; |
input [2:0] des_type_new; |
input [2:0] des_index; |
input [15:0] des_size; |
begin |
XmitBuffer[0] = 8'b1000_0000; |
XmitBuffer[1] = 8'b0000_0110; |
XmitBuffer[2] = {5'b00000, des_index}; |
XmitBuffer[3] = {5'b00000, des_type_new}; |
XmitBuffer[4] = 8'b0000_0000; |
XmitBuffer[5] = 8'b0000_0000; |
XmitBuffer[6] = des_size[7:0]; |
XmitBuffer[7] = des_size[15:8]; |
end |
endtask |
|
task SetDescriptor; |
input [2:0] des_type_new; |
input [2:0] des_index; |
input [15:0] des_size; |
begin |
XmitBuffer[0] = 8'b0000_0000; |
XmitBuffer[1] = 8'b0000_0111; |
XmitBuffer[2] = {5'b00000, des_index}; |
XmitBuffer[3] = {5'b00000, des_type_new}; |
XmitBuffer[4] = 8'b0000_0000; |
XmitBuffer[5] = 8'b0000_0000; |
XmitBuffer[6] = des_size[7:0]; |
XmitBuffer[7] = des_size[15:8]; |
end |
endtask |
|
task SynchFrame; |
begin |
XmitBuffer[0] = 8'b1000_0010; |
XmitBuffer[1] = 8'b0000_1100; |
XmitBuffer[2] = 8'b0000_0000; |
XmitBuffer[3] = 8'b0000_0000; |
XmitBuffer[4] = 8'b0000_0000; |
XmitBuffer[5] = 8'b0000_0000; |
XmitBuffer[6] = 8'b0000_0000; |
XmitBuffer[7] = 8'b0000_0000; |
end |
endtask |
|
|
task VenRegWordWr; |
input [6:0] address; |
input [31:0] reg_address; |
input [31:0] dataword; |
begin |
XmitBuffer[0] = 8'b0100_0000; |
XmitBuffer[1] = 8'b0001_0000; |
XmitBuffer[2] = reg_address[31:24]; |
XmitBuffer[3] = reg_address[23:16]; |
XmitBuffer[4] = reg_address[15:8]; |
XmitBuffer[5] = reg_address[7:0]; |
XmitBuffer[6] = 8'b0000_0100; |
XmitBuffer[7] = 8'b0000_0000; |
|
setup (address, 4'h0, Status); |
|
XmitBuffer[0] = dataword[31:24]; |
XmitBuffer[1] = dataword[23:16]; |
XmitBuffer[2] = dataword[15:8]; |
XmitBuffer[3] = dataword[7:0]; |
|
control_OUT(address, 4'h0, 4, Status); |
status_IN (address, 4'h0, Status); |
end |
endtask |
|
task VenRegWordRd; |
input [6:0] address; |
input [31:0] reg_address; |
output [31:0] dataword; |
reg [31:0] ByteCount; |
begin |
XmitBuffer[0] = 8'b1100_0000; |
XmitBuffer[1] = 8'b0001_0001; |
XmitBuffer[2] = reg_address[31:24]; |
XmitBuffer[3] = reg_address[23:16]; |
XmitBuffer[4] = reg_address[15:8]; |
XmitBuffer[5] = reg_address[7:0]; |
XmitBuffer[6] = 8'b0000_0100; |
XmitBuffer[7] = 8'b0000_0000; |
|
setup (address, 4'h0, Status); |
control_IN(address, 4'h0, ByteCount, Status); |
if (Status != MYACK) |
control_IN(address, 4'h0, ByteCount, Status); |
if (Status != MYACK) |
control_IN(address, 4'h0, ByteCount, Status); |
dataword[7:0] = RecvBuffer[3]; |
dataword[15:8] = RecvBuffer[2]; |
dataword[23:16] = RecvBuffer[1]; |
dataword[31:24] = RecvBuffer[0]; |
dump_recv_buffer(ByteCount); |
|
status_OUT (address, 4'h0, Status); |
end |
endtask |
|
task VenRegWordRdCmp; |
input [6:0] address; |
input [31:0] reg_address; |
input [31:0] dataword; |
output [31:0] ByteCount; |
begin |
XmitBuffer[0] = 8'b1100_0000; |
XmitBuffer[1] = 8'b0001_0001; |
XmitBuffer[2] = reg_address[31:24]; |
XmitBuffer[3] = reg_address[23:16]; |
XmitBuffer[4] = reg_address[15:8]; |
XmitBuffer[5] = reg_address[7:0]; |
XmitBuffer[6] = 8'b0000_0100; |
XmitBuffer[7] = 8'b0000_0000; |
|
setup (address, 4'h0, Status); |
control_IN(address, 4'h0, ByteCount, Status); |
if (Status != MYACK) |
control_IN(address, 4'h0, ByteCount, Status); |
if (Status != MYACK) |
control_IN(address, 4'h0, ByteCount, Status); |
if ((RecvBuffer[3] !== dataword[7:0]) || (RecvBuffer[2] !== dataword[15:8]) |
|| (RecvBuffer[1] !== dataword[23:16]) || (RecvBuffer[0] !== dataword[31:24])) |
begin |
-> tb.test_control.error_detected; |
$display( "usb_agent check: Register Read Byte Mismatch !!! Exp: %x ; Rxd: %x",dataword[31:0], {RecvBuffer[0],RecvBuffer[1], RecvBuffer[2],RecvBuffer[3]} ); |
dump_recv_buffer(ByteCount); |
end |
|
status_OUT (address, 4'h0, Status); |
end |
endtask |
task VenRegHalfWordRd; |
input [6:0] address; |
input [21:0] reg_address; |
input [15:0] dataword; |
output [31:0] ByteCount; |
begin |
XmitBuffer[0] = 8'b1100_0000; |
XmitBuffer[1] = {2'b00,reg_address[21:16]}; |
XmitBuffer[2] = reg_address[7:0]; |
XmitBuffer[3] = reg_address[15:8]; |
XmitBuffer[4] = 8'b0000_0000; |
XmitBuffer[5] = 8'b0000_0000; |
XmitBuffer[6] = 8'b0000_0010; |
XmitBuffer[7] = 8'b0000_0000; |
|
setup (address, 4'h0, Status); |
control_IN(address, 4'h0, ByteCount, Status); |
if (Status != MYACK) |
control_IN(address, 4'h0, ByteCount, Status); |
if (Status != MYACK) |
control_IN(address, 4'h0, ByteCount, Status); |
if ((RecvBuffer[0] !== dataword[7:0]) || (RecvBuffer[1] !== dataword[15:8])) |
begin |
-> tb.test_control.error_detected; |
$display( "usb_agent check: Register Read Byte Mismatch !!!"); |
dump_recv_buffer(ByteCount); |
end |
status_OUT (address, 4'h0, Status); |
end |
endtask |
|
task VenRegByteRd; |
input [6:0] address; |
input [21:0] reg_address; |
input [7:0] dataword; |
output [31:0] ByteCount; |
begin |
XmitBuffer[0] = 8'b1100_0000; |
XmitBuffer[1] = {2'b00,reg_address[21:16]}; |
XmitBuffer[2] = reg_address[7:0]; |
XmitBuffer[3] = reg_address[15:8]; |
XmitBuffer[4] = 8'b0000_0000; |
XmitBuffer[5] = 8'b0000_0000; |
XmitBuffer[6] = 8'b0000_0001; |
XmitBuffer[7] = 8'b0000_0000; |
|
setup (address, 4'h0, Status); |
control_IN(address, 4'h0, ByteCount, Status); |
if (Status != MYACK) |
control_IN(address, 4'h0, ByteCount, Status); |
if (Status != MYACK) |
control_IN(address, 4'h0, ByteCount, Status); |
if ((RecvBuffer[0] !== dataword[7:0])) |
begin |
-> tb.test_control.error_detected; |
$display( "usb_agent check: Register Read Byte Mismatch !!!"); |
dump_recv_buffer(ByteCount); |
end |
status_OUT (address, 4'h0, Status); |
end |
endtask |
|
task VenRegWr; |
input [21:0] reg_address; |
input [2:0] length; |
begin |
XmitBuffer[0] = 8'b0100_0000; |
XmitBuffer[1] = {2'b00,reg_address[21:16]}; |
XmitBuffer[2] = reg_address[7:0]; |
XmitBuffer[3] = reg_address[15:8]; |
XmitBuffer[4] = 8'b0000_0000; |
XmitBuffer[5] = 8'b0000_0000; |
XmitBuffer[6] = {5'b0000_0,length}; |
XmitBuffer[7] = 8'b0000_0000; |
|
end |
endtask |
|
task VenRegRd; |
input [21:0] reg_address; |
input [2:0] length; |
begin |
XmitBuffer[0] = 8'b1100_0000; |
XmitBuffer[1] = {2'b00,reg_address[21:16]}; |
XmitBuffer[2] = reg_address[7:0]; |
XmitBuffer[3] = reg_address[15:8]; |
XmitBuffer[4] = 8'b0000_0000; |
XmitBuffer[5] = 8'b0000_0000; |
XmitBuffer[6] = {5'b0000_0,length}; |
XmitBuffer[7] = 8'b0000_0000; |
end |
endtask |
|
task VenRegWrWordData; |
input [7:0] Byte0; |
input [7:0] Byte1; |
input [7:0] Byte2; |
input [7:0] Byte3; |
begin |
XmitBuffer[0] = Byte0; |
XmitBuffer[1] = Byte1; |
XmitBuffer[2] = Byte2; |
XmitBuffer[3] = Byte3; |
end |
endtask |
|
task VenRegWrHWordData; |
input [7:0] Byte0; |
input [7:0] Byte1; |
begin |
XmitBuffer[0] = Byte0; |
XmitBuffer[1] = Byte1; |
end |
endtask |
|
task VenRegWrByteData; |
input [7:0] Byte0; |
begin |
XmitBuffer[0] = Byte0; |
end |
endtask |
|
|
/*****************************************/ |
|
assign DPLS = zDPLS; |
assign DMNS = zDMNS; |
|
//instantiate the encoder |
usb_bfm_encoder u_usb_enc |
( |
.enable_in (enc_enbl), |
.reset_n (enc_reset_n), |
.clk (clk), |
.bit_count_out (enc_bit_count_out), |
.count_out (enc_count_out), |
.data_out_valid (enc_data_out_valid), |
.gen_bit_stuff_err (BitStuffErr), |
.last_byte (enc_last_byte), |
.start_bit (DeviceSpeed), |
.data_in (enc_data_in), |
.data_out (DPLS), |
.data_out_n (DMNS) |
); |
|
//instantiate the decoder |
usb_bfm_decoder u_usb_dec |
( |
.enable_in (dec_enbl), |
.ser_data_rdy (dec_ser_data_rdy), |
.par_data_rdy (dec_par_data_rdy), |
.reset_n (dec_reset_n), |
.clk (dpll_clk), |
.start_bit (DeviceSpeed), // 1'b1), |
.data_in (DPLS), |
.data_in_n (DMNS), |
.recv_bit_count (dec_recv_bit_count), |
.bit_stuff_err (dec_bit_stuff_err), |
.ser_data_out (), |
.par_data_out (dec_par_data_out) |
); |
|
usb_bfm_dpll dpll_inst |
( |
.clk48 (clk4x), |
.clk6 (clk4x), |
.switch (~DeviceSpeed), |
.reset_n (dpll_reset_n), |
.data_in (DPLS), |
.rec_clk (dpll_clk), |
.data_out () |
); |
|
|
always begin |
if (JitterOnOff == TRUE) begin |
if (tmpJitterCount > 0) begin |
#(PulseWidth - LowJitterTime) hs_clk = 1'b1; |
#(PulseWidth - HighJitterTime) hs_clk = 1'b0; |
tmpJitterCount = tmpJitterCount - 1; |
if (tmpJitterCount == 0) begin |
tmpJitterPeriod = JitterPeriod; |
end |
end |
else begin |
#PulseWidth hs_clk = 1'b1; |
#PulseWidth hs_clk = 1'b0; |
if (tmpJitterPeriod == 0) begin |
tmpJitterCount = JitterCount; |
end |
tmpJitterPeriod = tmpJitterPeriod - 1; |
end |
end |
else begin |
#PulseWidth hs_clk = 1'b1; |
#PulseWidth hs_clk = 1'b0; |
end |
end |
|
always begin |
if (JitterOnOff == TRUE) begin |
if (tmpJitterCount > 0) begin |
#((PulseWidth * 8) - LowJitterTime) ls_clk = 1'b1; |
#((PulseWidth * 8) - HighJitterTime) ls_clk = 1'b0; |
tmpJitterCount = tmpJitterCount - 1; |
if (tmpJitterCount == 0) begin |
tmpJitterPeriod = JitterPeriod; |
end |
end |
else begin |
#(PulseWidth * 8) ls_clk = 1'b1; |
#(PulseWidth * 8) ls_clk = 1'b0; |
if (tmpJitterPeriod == 0) begin |
tmpJitterCount = JitterCount; |
end |
tmpJitterPeriod = tmpJitterPeriod - 1; |
end |
end |
else begin |
#(PulseWidth * 8) ls_clk = 1'b1; |
#(PulseWidth * 8) ls_clk = 1'b0; |
end |
end |
|
initial // intialise pll clock signals |
begin |
tmpJitterPeriod = 0; |
tmpJitterCount = 0; |
dpll_reset_n = 1'b0; |
#1 dpll_reset_n = 1'b1; |
end |
|
initial // drive 6 MHz clock |
begin |
clk6 = 1'b0; |
forever #(PulseWidth * 2) clk6 = ~clk6; |
end |
|
initial // drive 48 MHz clock |
begin |
clk48 = 1'b0; |
HSClkComp = 1'b0; |
HSClkCompToggle = 1'b0; |
case ((PulseWidth) % 4) |
0 : HSClkComp = 1'b0; |
1 : HSClkComp = 1'b0; |
2 : HSClkComp = 1'b1; |
3 : HSClkComp = 1'b1; |
default : HSClkComp = 1'b0; |
endcase |
forever begin |
#((PulseWidth / 4) + HSClkComp) clk48 = 1'b1; |
case ((PulseWidth) % 4) |
0, 2 : begin |
#(PulseWidth / 4) clk48 = 1'b0; |
HSClkComp = ((PulseWidth % 4) == 0) ? 1'b0 : 1'b1; |
end |
1, 3 : begin |
if (HSClkCompToggle == 1'b0) begin |
#(PulseWidth / 4) clk48 = 1'b0; |
HSClkCompToggle = 1'b1; |
end |
else begin |
#((PulseWidth / 4) + HSClkCompToggle) clk48 = 1'b0; |
HSClkCompToggle = 1'b0; |
end |
HSClkComp = ((PulseWidth % 4) == 1) ? 1'b0 : 1'b1; |
end |
default : clk48 = 1'b1; |
endcase |
end |
end |
|
always @(dpll_clk) rec_clk = dpll_clk; |
|
//initialise the encoder signals |
initial |
begin |
hs_clk = 1'b1; |
ls_clk = 1'b1; |
enc_enbl = 1'b0; // active high |
enc_reset_n = 1'b0; // active low |
enc_data_in = 8'bZZZZZZZZ; |
zDPLS = 1'bZ; |
zDMNS = 1'bZ; |
dec_enbl = 1'b0; // active high |
dec_reset_n = 1'b0; // active low |
// dec_cnt; |
// user_commands; // Invoking the User Commands. |
end |
|
initial |
begin |
`ifdef USBF_DEBUG |
Debug = TRUE ; |
`else |
Debug = FALSE ; |
`endif |
sofOnFlag = FALSE ; |
//sofPeriod = 1_000_000 ; |
sofPeriod = 100_000 ; |
interruptOnFlag = FALSE ; |
interruptRequest = FALSE ; |
interruptTimer = 0 ; |
interruptPeriod = 0 ; |
controlRequest = FALSE ; |
controlGrant = FALSE ; |
bulkInOnFlag = FALSE ; |
bulkOutOnFlag = FALSE ; |
end |
|
|
endmodule |
|
|
module usb_bfm_decoder( |
enable_in, |
ser_data_rdy, |
par_data_rdy, |
reset_n, |
clk, |
start_bit, |
data_in, |
data_in_n, |
recv_bit_count, |
bit_stuff_err, |
ser_data_out, |
par_data_out |
); |
|
input enable_in; |
output ser_data_rdy; |
output par_data_rdy; |
input clk; |
input start_bit; |
input data_in; |
input data_in_n; |
output recv_bit_count; |
output bit_stuff_err; |
output ser_data_out; |
output [7:0] par_data_out; |
input reset_n; |
|
reg enable_out; |
reg [7:0] par_data_out; |
reg ser_data_out; |
reg prev_bit; |
reg prev_bit1; |
reg tmpDataOut1; |
reg [7:0] tmpDataOut; |
reg [31:0] recv_bit_count; |
reg bit_stuff_err; |
reg ser_data_rdy; |
reg par_data_rdy; |
reg JustEnabled; |
|
reg [3:0] bit_count; |
reg [3:0] count; |
reg SyncDetect; |
|
initial begin |
enable_out = 1; |
ser_data_out = 1'bz; |
ser_data_rdy = 1'b0; |
par_data_out = 8'b0000_0000; |
bit_count = 0; |
count = 0; |
tmpDataOut = 8'b00000000; |
tmpDataOut1 = 0; |
JustEnabled = 1; |
par_data_rdy = 1'b0; |
recv_bit_count = 32'h0000_0000; |
bit_stuff_err = 1'b0; |
end |
|
|
|
always @(posedge clk) #1 prev_bit1 <= data_in; |
|
always @(posedge clk) begin |
|
if (!reset_n) begin |
count <= 0; |
recv_bit_count <= 1'b0; |
bit_count <= 0; |
par_data_out <= 8'b0000_0000; |
end |
|
if (enable_in) begin |
if (count == 7 && !(bit_count==5 & (tmpDataOut1!=prev_bit))) begin |
par_data_rdy <= 1'b1; |
end |
if (bit_count < 5) begin |
if (count == 7) count <= 0; |
else count <= count + 1; |
par_data_out[count] <= tmpDataOut1; |
recv_bit_count <= recv_bit_count + 1; |
ser_data_rdy <= 1'b1; |
ser_data_out <= tmpDataOut1; |
end |
else begin |
if (tmpDataOut1 != 1'b0) begin |
bit_stuff_err <= 1'b1; |
end |
ser_data_rdy <= 1'b0; |
end |
end |
else begin |
bit_stuff_err <= 1'b0; |
par_data_rdy <= 1'b0; |
end |
|
prev_bit <= tmpDataOut1; |
|
if ((tmpDataOut1 == prev_bit) & (tmpDataOut1 == 1'b1)) begin |
bit_count <= bit_count + 1; |
end |
else begin |
bit_count <= 0; |
end |
|
if (bit_count == 5) bit_count <= 0; |
|
if (prev_bit1 == data_in) tmpDataOut1 <= 1'b1; |
else tmpDataOut1 <= 1'b0; |
|
if (par_data_rdy == 1'b1) par_data_rdy <= 1'b0; |
|
end |
|
|
endmodule |
|
module usb_bfm_encoder( enable_in, |
reset_n, |
clk, |
bit_count_out, |
count_out, |
data_out_valid, |
gen_bit_stuff_err, |
last_byte, |
start_bit, |
data_in, |
data_out, |
data_out_n |
); |
|
//enable_in : 0 disables the block |
// 1 enables the block |
//data_in : 8 bit wide register containing the parallel data |
//clk : Clock !! |
//not used//data_in_valid : the data in data_in is a valid next block of data |
//count_out : count[2] |
//data_out : serial data out |
//data_out_n : invert of data_out |
//data_out_valid : the data on data_out is valid and can be sampled |
//reset_n : synchronous reset of the block |
|
input enable_in; |
input clk; |
input gen_bit_stuff_err; |
input [7:0] data_in; |
input reset_n; |
input last_byte; |
input start_bit; |
|
output [3:0] bit_count_out; |
output count_out; |
output data_out; |
output data_out_n; |
output data_out_valid; |
|
reg [3:0] bit_count_out; |
reg count_out; |
reg data_out; |
reg data_out_n; |
reg data_out_valid; |
reg tmpDataOut1; |
reg tmpDataOut2; |
reg prev_bit; |
reg tmpDataOut; |
|
reg [3:0] count; |
reg [3:0] bit_count; |
reg [7:0] tmpDataIn; |
|
initial begin |
data_out = 1'bZ; |
data_out_n = 1'bZ; |
count = 0; |
bit_count = 0; |
bit_count_out = 0; |
count_out = 0; |
data_out_valid = 0; |
tmpDataOut1 = start_bit; |
tmpDataOut = 0; |
prev_bit = 0; |
end |
|
always @(posedge clk) begin |
if (enable_in) begin |
if (count == 0) tmpDataIn = data_in; |
if (count < 8) begin |
tmpDataOut = tmpDataIn[count]; |
if ((tmpDataOut) & (prev_bit)) begin |
bit_count = bit_count + 1; |
end |
else begin |
if (tmpDataOut) bit_count = 1; |
else begin |
if (bit_count == 6) bit_count = 7; |
else bit_count = 0; |
end |
end |
if (bit_count == 7) begin |
if (gen_bit_stuff_err == 1'b0) begin |
|
tmpDataOut1 = ~tmpDataOut1; |
prev_bit = 1'b0; |
end |
else begin |
tmpDataOut1 = tmpDataOut1; |
prev_bit = 1'b1; |
end |
bit_count = 0; |
end |
else begin |
if (tmpDataIn[count] == 0) tmpDataOut1 = ~tmpDataOut1; |
count = count + 1; |
prev_bit = tmpDataOut; |
end |
data_out = #1 tmpDataOut1; |
data_out_n = ~tmpDataOut1; |
data_out_valid = 1; |
end |
if (count == 8) count = 0; |
if (bit_count != 6) count_out = count[2]; |
bit_count_out = count; |
end |
else begin |
data_out = #1 1'bz; |
data_out_n = 1'bz; |
data_out_valid = 0; |
end |
|
if (!reset_n) begin |
count = 0; |
count_out = 0; |
bit_count = 0; |
data_out_valid = 0; |
tmpDataIn = 8'h00; |
tmpDataOut1 = start_bit; |
tmpDataOut = 0; |
prev_bit = 0; |
data_out = #1 1'bz; |
data_out_n = 1'bz; |
end |
end |
|
endmodule |
|
module usb_bfm_dpll (clk48, clk6, switch, reset_n, data_in, rec_clk, data_out); |
|
input clk48, clk6, switch, reset_n, data_in; |
|
output rec_clk, data_out; |
|
wire rec_clk; |
wire data_out; |
wire nrz; |
wire dpll_clk; |
|
assign data_out = nrz; |
|
wire diff_pulse; |
|
// Instance of the clock switch |
usb_bfm_clk_switch clk_switch (.clk1 (clk48), |
.clk2 (clk6), |
.switch (switch), |
.reset_n (reset_n), |
.clk_out (dpll_clk)); |
|
// Instance of NRZI to NRZ converter |
usb_bfm_nrzi2nrz nrzi2nrz_inst (.nrzi (data_in), |
.rec_clk (rec_clk), |
.reset_n (reset_n), |
.nrz (nrz)); |
|
// Instance of the phase detect |
usb_bfm_ph_detect ph_detect (.dpll_clk (dpll_clk), |
.rst_n (reset_n), |
.data_in (data_in), |
.rec_clk (rec_clk), |
.diff_pulse (diff_pulse)); |
|
// Instance of the pulse puller state machine |
usb_bfm_pulse_puller pulse_puller (.clk (dpll_clk), |
.diff_pulse (diff_pulse), |
.rst_n (reset_n), |
.rec_clk (rec_clk)); |
|
endmodule |
|
|
// The clock switch module for selecting a low/high speed PLL |
|
module usb_bfm_clk_switch (clk1, clk2, switch, reset_n, clk_out); |
|
input clk1, clk2, switch, reset_n; |
output clk_out; |
|
wire ff1set, ff1clr, ff3clr, clk_out; |
reg ff1out, ff2out_bar, ff3out, ff3out_bar, ff4out_bar; |
|
assign ff1set = ff4out_bar; |
assign ff1clr = reset_n; |
assign ff3clr = ff2out_bar; |
assign clk_out = ((ff1out | clk1) & (ff3out_bar | clk2)); |
|
parameter LOW = 1'b0; |
parameter HIGH = 1'b1; |
|
//Filp Flop # 1 |
|
always @ (posedge clk1 or negedge ff1set or negedge ff1clr) begin |
|
if (ff1clr === LOW) begin |
ff1out = LOW; |
end |
else if (ff1set === LOW) begin |
ff1out = HIGH; |
end |
else |
ff1out <= switch; |
end |
|
//Flip Flop # 2 |
|
always @ (posedge clk2) begin |
ff2out_bar <= (ff1out); |
end |
|
//Flip Flop #3 |
|
always @ (posedge clk2 or negedge ff3clr) begin |
|
if (ff3clr === LOW) begin |
ff3out <= LOW; |
ff3out_bar <= HIGH; |
end |
else begin |
ff3out <= switch; |
ff3out_bar <= !switch; |
end |
end |
|
//Flip Flop #4 |
|
always @ (posedge clk1) begin |
ff4out_bar <= ! (ff3out); |
end |
|
endmodule |
|
// The NRZI to NRZ converter |
|
module usb_bfm_nrzi2nrz (nrzi, rec_clk, reset_n, nrz); |
|
input nrzi, rec_clk, reset_n; |
output nrz; |
|
wire nrz; |
|
wire D1, D2, D0; |
reg Q1, Q2, Q0; |
reg del_rec_clk; |
|
assign D0 = nrzi; |
assign D1 = Q0; |
assign D2 = !(Q0^Q1); |
assign nrz = Q2; |
|
//NRZI to NRZ converter |
|
always @ (reset_n) begin |
if (!reset_n) begin |
Q0 <= 1'b0; |
Q1 <= 1'b0; |
Q2 <= 1'b0; |
end |
end |
|
always @ (rec_clk) begin |
del_rec_clk <= #21 rec_clk; |
end |
|
always @(posedge del_rec_clk) begin |
Q0 <= D0; |
Q1 <= D1; |
Q2 <= D2; |
end |
|
endmodule |
|
// The Phase detector |
|
module usb_bfm_ph_detect (dpll_clk, rst_n, data_in, rec_clk, diff_pulse); |
|
input dpll_clk, rst_n, data_in, rec_clk; |
output diff_pulse; |
|
wire diff_pulse; |
|
reg Q0; |
reg rec_clk_neg_edge; |
reg gate_control; |
|
assign diff_pulse = (Q0 ^ data_in) & gate_control; |
|
always @ (posedge dpll_clk or negedge rst_n) begin |
if (rst_n) begin |
if ((Q0 ^ data_in) & rec_clk_neg_edge) begin |
gate_control <= 1'b0; |
rec_clk_neg_edge <= 1'b0; |
end |
end |
else begin |
gate_control <= 1'b1; |
rec_clk_neg_edge <= 1'b0; |
end |
rec_clk_neg_edge <= 1'b0; |
end |
|
always @ (negedge rec_clk or negedge rst_n) begin |
if (rst_n) begin |
Q0 <= data_in; |
rec_clk_neg_edge <= 1'b1; |
gate_control <= 1'b1; |
end |
else begin |
Q0 <= 1'b0; |
end |
end |
endmodule |
|
// The State m/c which does the Phase Correction |
|
module usb_bfm_pulse_puller (clk, diff_pulse, rst_n, rec_clk); |
|
input clk, rst_n, diff_pulse; |
output rec_clk; |
|
reg rec_clk; |
|
reg [3:0] State; |
|
reg correct_pulse; |
|
reg Q0; |
|
parameter HIGH = 1'b1; |
parameter LOW = 1'b0; |
|
parameter S0 = 3'b000; |
parameter S1 = 3'b001; |
parameter S2 = 3'b010; |
parameter S3 = 3'b011; |
parameter S4 = 3'b100; |
|
// Generation of the correcting pulse from the Phase difference between the |
// data transition and negative edge of recovered clock |
|
always @ (posedge clk) begin |
Q0 <= diff_pulse; |
correct_pulse <= Q0 & diff_pulse; |
end |
|
// The pulse_puller state machine |
|
always @ (posedge clk or negedge rst_n) begin |
|
if (!rst_n) begin |
State <= S0; |
rec_clk <= LOW; |
end |
else begin |
|
case (State) |
|
S0 : begin |
State <= S1; |
rec_clk <= ~rec_clk; |
end |
|
S1 : if (correct_pulse) begin |
rec_clk <= ~rec_clk; |
State <= S3; |
end |
else begin |
rec_clk <= rec_clk; |
State <= S2; |
end |
|
S2 : begin |
if (correct_pulse) begin |
State <= S4; |
end |
else begin |
State <= S3; |
end |
rec_clk <= ~rec_clk; |
end |
|
S3 : if (correct_pulse) begin |
State <= S1; |
rec_clk <= ~rec_clk; |
end |
else begin |
rec_clk <= rec_clk; |
State <= S4; |
end |
|
S4 : begin |
if (correct_pulse) begin |
State <= S2; |
end |
else begin |
State <= S1; |
end |
rec_clk <= ~rec_clk; |
end |
|
default : |
$display ("Illegal State at ",$time); |
|
endcase |
end |
end |
|
endmodule |
|
|
usb2uart/trunk/verify/agents/usb/usb_agent.v
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: usb2uart/trunk/verify/agents/uart/uart_tasks.v
===================================================================
--- usb2uart/trunk/verify/agents/uart/uart_tasks.v (nonexistent)
+++ usb2uart/trunk/verify/agents/uart/uart_tasks.v (revision 3)
@@ -0,0 +1,138 @@
+
+task reg_write;
+input [15:0] addr;
+input [31:0] data;
+reg [7:0] read_data;
+reg flag;
+begin
+ fork
+ begin : loop_1
+ tb_top.tb_uart.write_char("w");
+ tb_top.tb_uart.write_char("m");
+ tb_top.tb_uart.write_char(" ");
+ tb_top.tb_uart.write_char(hex2char(addr[15:12]));
+ tb_top.tb_uart.write_char(hex2char(addr[11:8]));
+ tb_top.tb_uart.write_char(hex2char(addr[7:4]));
+ tb_top.tb_uart.write_char(hex2char(addr[3:0]));
+ tb_top.tb_uart.write_char(" ");
+ tb_top.tb_uart.write_char(hex2char(data[31:28]));
+ tb_top.tb_uart.write_char(hex2char(data[27:24]));
+ tb_top.tb_uart.write_char(hex2char(data[23:20]));
+ tb_top.tb_uart.write_char(hex2char(data[19:16]));
+ tb_top.tb_uart.write_char(hex2char(data[15:12]));
+ tb_top.tb_uart.write_char(hex2char(data[11:8]));
+ tb_top.tb_uart.write_char(hex2char(data[7:4]));
+ tb_top.tb_uart.write_char(hex2char(data[3:0]));
+ tb_top.tb_uart.write_char("\n");
+ end
+ begin : loop_2
+ // Wait for sucess command
+ flag = 0;
+ while(flag == 0)
+ begin
+ tb_top.tb_uart.read_char(read_data,flag);
+ //$write ("%c",read_data);
+ end
+ end
+ join
+end
+endtask
+
+task reg_read;
+input [15:0] addr;
+output [31:0] data;
+reg [7:0] read_data;
+reg flag;
+integer i;
+begin
+ fork
+ begin : loop_1
+ tb_top.tb_uart.write_char("r");
+ tb_top.tb_uart.write_char("m");
+ tb_top.tb_uart.write_char(" ");
+ tb_top.tb_uart.write_char(hex2char(addr[15:12]));
+ tb_top.tb_uart.write_char(hex2char(addr[11:8]));
+ tb_top.tb_uart.write_char(hex2char(addr[7:4]));
+ tb_top.tb_uart.write_char(hex2char(addr[3:0]));
+ tb_top.tb_uart.write_char(" ");
+ tb_top.tb_uart.write_char("\n");
+ end
+ begin : loop_2
+ // Wait for sucess command
+ flag = 0;
+ i = 0;
+ while(flag == 0)
+ begin
+ tb_top.tb_uart.read_char(read_data,flag);
+ //$write ("%d:%c",i,read_data);
+ case (i)
+ 8'd10 : data[31:28] = char2hex(read_data);
+ 8'd11 : data[27:24] = char2hex(read_data);
+ 8'd12 : data[23:20] = char2hex(read_data);
+ 8'd13 : data[19:16] = char2hex(read_data);
+ 8'd14 : data[15:12] = char2hex(read_data);
+ 8'd15 : data[11:8] = char2hex(read_data);
+ 8'd16 : data[7:4] = char2hex(read_data);
+ 8'd17 : data[3:0] = char2hex(read_data);
+ endcase
+ i = i+1;
+ end
+ end
+ join
+ //$display("Receoved Data: %x",data);
+
+end
+endtask
+
+// Character to hex number
+function [3:0] char2hex;
+input [7:0] data_in;
+case (data_in)
+ 8'h30: char2hex = 4'h0; // character '0'
+ 8'h31: char2hex = 4'h1; // character '1'
+ 8'h32: char2hex = 4'h2; // character '2'
+ 8'h33: char2hex = 4'h3; // character '3'
+ 8'h34: char2hex = 4'h4; // character '4'
+ 8'h35: char2hex = 4'h5; // character '5'
+ 8'h36: char2hex = 4'h6; // character '6'
+ 8'h37: char2hex = 4'h7; // character '7'
+ 8'h38: char2hex = 4'h8; // character '8'
+ 8'h39: char2hex = 4'h9; // character '9'
+ 8'h41: char2hex = 4'hA; // character 'A'
+ 8'h42: char2hex = 4'hB; // character 'B'
+ 8'h43: char2hex = 4'hC; // character 'C'
+ 8'h44: char2hex = 4'hD; // character 'D'
+ 8'h45: char2hex = 4'hE; // character 'E'
+ 8'h46: char2hex = 4'hF; // character 'F'
+ 8'h61: char2hex = 4'hA; // character 'a'
+ 8'h62: char2hex = 4'hB; // character 'b'
+ 8'h63: char2hex = 4'hC; // character 'c'
+ 8'h64: char2hex = 4'hD; // character 'd'
+ 8'h65: char2hex = 4'hE; // character 'e'
+ 8'h66: char2hex = 4'hF; // character 'f'
+ default : char2hex = 4'hF;
+ endcase
+endfunction
+
+// Hex to Asci Character
+function [7:0] hex2char;
+input [3:0] data_in;
+case (data_in)
+ 4'h0: hex2char = 8'h30; // character '0'
+ 4'h1: hex2char = 8'h31; // character '1'
+ 4'h2: hex2char = 8'h32; // character '2'
+ 4'h3: hex2char = 8'h33; // character '3'
+ 4'h4: hex2char = 8'h34; // character '4'
+ 4'h5: hex2char = 8'h35; // character '5'
+ 4'h6: hex2char = 8'h36; // character '6'
+ 4'h7: hex2char = 8'h37; // character '7'
+ 4'h8: hex2char = 8'h38; // character '8'
+ 4'h9: hex2char = 8'h39; // character '9'
+ 4'hA: hex2char = 8'h41; // character 'A'
+ 4'hB: hex2char = 8'h42; // character 'B'
+ 4'hC: hex2char = 8'h43; // character 'C'
+ 4'hD: hex2char = 8'h44; // character 'D'
+ 4'hE: hex2char = 8'h45; // character 'E'
+ 4'hF: hex2char = 8'h46; // character 'F'
+ endcase
+endfunction
Index: usb2uart/trunk/verify/agents/uart/uart_agent.v
===================================================================
--- usb2uart/trunk/verify/agents/uart/uart_agent.v (nonexistent)
+++ usb2uart/trunk/verify/agents/uart/uart_agent.v (revision 3)
@@ -0,0 +1,354 @@
+
+`timescale 1ns/1ps
+
+module uart_agent (
+ test_clk,
+ sin,
+ sout)
+ ;
+
+input test_clk;
+output sin;
+
+input sout;
+
+event uart_read_done, uart_write_done;
+event error_detected,uart_parity_error, uart_stop_error1, uart_stop_error2;
+event uart_timeout_error;
+event abort;
+
+reg [15:0] rx_count;
+reg [15:0] tx_count;
+reg [15:0] par_err_count;
+reg [15:0] stop_err1_cnt;
+reg [15:0] stop_err2_cnt;
+reg [15:0] timeout_err_cnt;
+reg [15:0] err_cnt;
+
+reg sin, read, write;
+wire test_rx_clk;
+reg test_tx_clk;
+reg stop_err_check;
+reg [15:0] cnt_16x;
+
+integer timeout_count;
+integer data_bit_number;
+reg [2:0] clk_count;
+
+reg error_ind; // 1 indicate error
+
+initial
+begin
+ sin = 1'b1;
+ test_tx_clk = 0;
+ clk_count = 0;
+ stop_err_check = 0;
+ error_ind = 0;
+ cnt_16x = 0;
+end
+
+always @(posedge test_clk)
+begin
+ if (clk_count == 3'h0) // Divide by 16 Counter
+ begin
+ if(cnt_16x >= control_setup.divisor) begin
+ test_tx_clk = ~test_tx_clk;
+ cnt_16x = 0;
+ end else begin
+ cnt_16x = cnt_16x+1;
+ end
+ end
+ clk_count = clk_count + 1;
+end
+assign test_rx_clk = ~test_tx_clk;
+
+always @(posedge test_clk) begin
+ timeout_count = timeout_count + 1;
+ if (timeout_count == (control_setup.maxtime * 16))
+ -> abort;
+end
+
+always @uart_read_done
+ rx_count = rx_count + 1;
+
+always @uart_write_done
+ tx_count = tx_count + 1;
+
+always @uart_parity_error begin
+ error_ind = 1;
+ par_err_count = par_err_count + 1;
+end
+
+always @uart_stop_error1 begin
+ error_ind = 1;
+ stop_err1_cnt = stop_err1_cnt + 1;
+end
+
+always @uart_stop_error2 begin
+ error_ind = 1;
+ stop_err2_cnt = stop_err2_cnt + 1;
+end
+
+always @uart_timeout_error begin
+ error_ind = 1;
+ timeout_err_cnt = timeout_err_cnt + 1;
+end
+
+
+always @error_detected begin
+ error_ind = 1;
+ err_cnt = err_cnt + 1;
+end
+
+
+////////////////////////////////////////////////////////////////////////////////
+task uart_init;
+begin
+ read = 0;
+ write = 0;
+ tx_count = 0;
+ rx_count = 0;
+ stop_err_check = 0;
+ par_err_count = 0;
+ stop_err1_cnt = 0;
+ stop_err2_cnt = 0;
+ timeout_err_cnt = 0;
+ err_cnt = 0;
+
+end
+endtask
+
+
+////////////////////////////////////////////////////////////////////////////////
+task read_char_chk;
+input expected_data;
+
+integer i;
+reg [7:0] expected_data;
+reg [7:0] data;
+reg parity;
+
+begin
+ data <= 8'h0;
+ parity <= 1;
+ timeout_count = 0;
+
+fork
+ begin : loop_1
+ @(abort)
+ $display (">>>>> Exceed time limit, uart no responce.\n");
+ ->uart_timeout_error;
+ disable loop_2;
+ end
+
+ begin : loop_2
+
+// start cycle
+ @(negedge sout)
+ disable loop_1;
+ read <= 1;
+
+// data cycle
+ @(posedge test_rx_clk);
+ for (i = 0; i < data_bit_number; i = i + 1)
+ begin
+ @(posedge test_rx_clk)
+ data[i] <= sout;
+ parity <= parity ^ sout;
+ end
+
+// parity cycle
+ if(control_setup.parity_en)
+ begin
+ @(posedge test_rx_clk);
+ if ((control_setup.even_odd_parity && (sout == parity)) ||
+ (!control_setup.even_odd_parity && (sout != parity)))
+// || (control_setup.stick_parity && (sout == control_setup.even_odd_parity)))
+ begin
+ $display (">>>>> Parity Error");
+ -> error_detected;
+ -> uart_parity_error;
+ end
+ end
+
+// stop cycle 1
+ @(posedge test_rx_clk);
+ if (!sout)
+ begin
+ $display (">>>>> Stop signal 1 Error");
+ -> error_detected;
+ -> uart_stop_error1;
+ end
+
+// stop cycle 2
+ if (control_setup.stop_bit_number)
+ begin
+ @(posedge test_rx_clk); // stop cycle 2
+ if (!sout)
+ begin
+ $display (">>>>> Stop signal 2 Error");
+ -> error_detected;
+ -> uart_stop_error2;
+ end
+ end
+
+/* Who Cares
+// the stop bits transmitted is one and a half if it is 5-bit
+ if (data_bit_number == 5)
+ begin
+ @(posedge test_rx_clk); // stop cycle for 5-bit/per char
+ if (!sout)
+ begin
+ $display (">>>>> Stop signal 2 Error (5-Bit)");
+ -> error_detected;
+ -> uart_stop_error2;
+ end
+ end
+ else
+*/
+
+// wait another half cycle for tx_done signal
+ @(negedge test_rx_clk);
+ read <= 0;
+ -> uart_read_done;
+
+ if (expected_data != data)
+ begin
+ $display ("Error! Data return is %h, expecting %h", data, expected_data);
+ -> error_detected;
+ end
+ else
+ $display ("(%m) Data match %h", expected_data);
+
+ $display ("... Read Data from UART done cnt :%d...",rx_count +1);
+ end
+join
+
+end
+
+endtask
+
+
+////////////////////////////////////////////////////////////////////////////////
+task write_char;
+input [7:0] data;
+
+integer i;
+reg parity; // 0: odd parity, 1: even parity
+
+begin
+ parity <= #1 0;
+
+// start cycle
+ @(posedge test_tx_clk)
+ begin
+ sin <= #1 0;
+ write <= #1 1;
+ end
+
+// data cycle
+ begin
+ for (i = 0; i < data_bit_number; i = i + 1)
+ begin
+ @(posedge test_tx_clk)
+ sin <= #1 data[i];
+ parity <= parity ^ data[i];
+ end
+ end
+
+// parity cycle
+ if (control_setup.parity_en)
+ begin
+ @(posedge test_tx_clk)
+ sin <= #1
+// control_setup.stick_parity ? ~control_setup.even_odd_parity :
+ control_setup.even_odd_parity ? parity : !parity;
+ end
+
+// stop cycle 1
+ @(posedge test_tx_clk)
+ sin <= #1 stop_err_check ? 0 : 1;
+
+// stop cycle 2
+ @(posedge test_tx_clk);
+ sin <= #1 1;
+ if (data_bit_number == 5)
+ @(negedge test_tx_clk);
+ else if (control_setup.stop_bit_number)
+ @(posedge test_tx_clk);
+
+ write <= #1 0;
+ $display ("... Write data %h to UART done cnt : %d ...\n", data,tx_count+1);
+ -> uart_write_done;
+end
+endtask
+
+
+////////////////////////////////////////////////////////////////////////////////
+task control_setup;
+input [1:0] data_bit_set;
+input stop_bit_number;
+input parity_en;
+input even_odd_parity;
+input stick_parity;
+input [15:0] maxtime;
+input [15:0] divisor;
+input fifo_enable;
+
+begin
+ data_bit_number = data_bit_set + 5;
+end
+endtask
+
+
+////////////////////////////////////////////////////////////////////////////////
+task report_status;
+output [15:0] rx_nu;
+output [15:0] tx_nu;
+begin
+ $display ("-------------------- Reporting Configuration --------------------");
+ $display (" Data bit number setting is : %0d", data_bit_number);
+ $display (" Stop bit number setting is : %0d", control_setup.stop_bit_number + 1);
+ $display (" Divisor of Uart clock is : %0d", control_setup.divisor);
+ if (control_setup.parity_en)
+ $display (" Parity is enable");
+ else
+ $display (" Parity is disable");
+
+ if (control_setup.even_odd_parity)
+ $display (" Even parity setting");
+ else
+ $display (" Odd parity setting");
+
+/*
+ if (control_setup.stick_parity)
+ $display (" Parity stick bit is on");
+ else
+ $display (" Parity stick bit is off");
+*/
+
+ if (control_setup.fifo_enable)
+ $display (" FIFO mode is enable");
+ else
+ $display (" FIFO mode is disable");
+
+ $display ("-----------------------------------------------------------------");
+
+ $display ("-------------------- Reporting Status --------------------\n");
+ $display (" Number of character received is : %d", rx_count);
+ $display (" Number of character sent is : %d", tx_count);
+ $display (" Number of parity error rxd is : %d", par_err_count);
+ $display (" Number of stop1 error rxd is : %d", stop_err1_cnt);
+ $display (" Number of stop2 error rxd is : %d", stop_err2_cnt);
+ $display (" Number of timeout error is : %d", timeout_err_cnt);
+ $display (" Number of error is : %d", err_cnt);
+ $display ("-----------------------------------------------------------------");
+
+ rx_nu = rx_count;
+ tx_nu = tx_count;
+end
+endtask
+
+
+////////////////////////////////////////////////////////////////////////////////
+endmodule
usb2uart/trunk/verify/agents/uart/uart_agent.v
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: usb2uart/trunk/verify/log/run.log
===================================================================
--- usb2uart/trunk/verify/log/run.log (nonexistent)
+++ usb2uart/trunk/verify/log/run.log (revision 3)
@@ -0,0 +1,5746 @@
+Reading D:/Microsemi/Libero_v10.1/Model/tcl/vsim/pref.tcl
+
+# 10.1b
+
+# vsim -do modelsim.do -c tb
+# // ModelSim ACTEL 10.1b Apr 27 2012
+# //
+# // Copyright 1991-2012 Mentor Graphics Corporation
+# // All Rights Reserved.
+# //
+# // THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION
+# // WHICH IS THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS
+# // LICENSORS AND IS SUBJECT TO LICENSE TERMS.
+# //
+# Loading work.tb
+# Loading work.core
+# Loading work.usb_phy
+# Loading work.usb_tx_phy
+# Loading work.usb_rx_phy
+# Loading work.usb1_core
+# Loading work.usb1_utmi_if
+# Loading work.usb1_pl
+# Loading work.usb1_pd
+# Loading work.usb1_crc5
+# Loading work.usb1_crc16
+# Loading work.usb1_pa
+# Loading work.usb1_idma
+# Loading work.usb1_fifo2
+# Loading work.usb1_pe
+# Loading work.usb1_ctrl
+# Loading work.usb1_rom1
+# Loading work.sync_fifo
+# Loading work.generic_fifo_sc_a
+# Loading work.generic_dpram
+# Loading work.uart_core
+# Loading work.uart_cfg
+# Loading work.generic_register
+# Loading work.stat_register
+# Loading work.clk_ctl
+# Loading work.uart_txfsm
+# Loading work.uart_rxfsm
+# Loading work.async_fifo
+# Loading work.double_sync_low
+# Loading work.usb_agent
+# Loading work.host_usb_bfm
+# Loading work.usb_bfm_encoder
+# Loading work.usb_bfm_decoder
+# Loading work.usb_bfm_dpll
+# Loading work.usb_bfm_clk_switch
+# Loading work.usb_bfm_nrzi2nrz
+# Loading work.usb_bfm_ph_detect
+# Loading work.usb_bfm_pulse_puller
+# Loading work.uart_agent
+# Loading work.test_control
+# Loading work.bit_register
+# ** Warning: (vsim-3017) ../tb/tb.v(211): [TFMPC] - Too few port connections. Expected 85, found 84.
+#
+# Region: /tb/dut
+# ** Warning: (vsim-3015) ../tb/tb.v(211): [PCDPC] - Port size (8 or 8) does not match connection size (1) for port 'ep1_din'. The port definition is at: ../../rtl/core/core.v(84).
+#
+# Region: /tb/dut
+# ** Warning: (vsim-3015) ../tb/tb.v(211): [PCDPC] - Port size (8 or 8) does not match connection size (1) for port 'ep2_dout'. The port definition is at: ../../rtl/core/core.v(97).
+#
+# Region: /tb/dut
+# ** Warning: (vsim-3015) ../tb/tb.v(211): [PCDPC] - Port size (8 or 8) does not match connection size (1) for port 'ep3_din'. The port definition is at: ../../rtl/core/core.v(104).
+#
+# Region: /tb/dut
+# ** Warning: (vsim-3015) ../tb/tb.v(211): [PCDPC] - Port size (8 or 8) does not match connection size (1) for port 'ep4_dout'. The port definition is at: ../../rtl/core/core.v(117).
+#
+# Region: /tb/dut
+# ** Warning: (vsim-3015) ../tb/tb.v(211): [PCDPC] - Port size (8 or 8) does not match connection size (1) for port 'ep5_din'. The port definition is at: ../../rtl/core/core.v(124).
+#
+# Region: /tb/dut
+# ** Warning: (vsim-3722) ../tb/tb.v(211): [TFMPC] - Missing connection for port 'usb_rst'.
+#
+# ** Warning: (vsim-3017) ../../rtl/uart_core/uart_core.v(236): [TFMPC] - Too few port connections. Expected 14, found 12.
+#
+# Region: /tb/dut/u_uart_core/u_rxfifo
+# ** Warning: (vsim-3722) ../../rtl/uart_core/uart_core.v(236): [TFMPC] - Missing connection for port 'afull'.
+#
+# ** Warning: (vsim-3722) ../../rtl/uart_core/uart_core.v(236): [TFMPC] - Missing connection for port 'aempty'.
+#
+# ** Warning: (vsim-3017) ../../rtl/uart_core/uart_core.v(252): [TFMPC] - Too few port connections. Expected 14, found 12.
+#
+# Region: /tb/dut/u_uart_core/u_txfifo
+# ** Warning: (vsim-3722) ../../rtl/uart_core/uart_core.v(252): [TFMPC] - Missing connection for port 'afull'.
+#
+# ** Warning: (vsim-3722) ../../rtl/uart_core/uart_core.v(252): [TFMPC] - Missing connection for port 'aempty'.
+#
+# do modelsim.do
+# 1200: USB Reset -----
+# 5418: Set Address = 1 -----
+# CntrlTransType = 11
+# In --> In task wait for response at time 17346000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 17651000
+# In --> Decoder enabled at time 18362000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 19163000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+#
+# #######################################################
+# Received Status is ACK at 19163
+# #######################################################
+#
+# Input Address:00, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:00;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 22386000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 22775000
+# In --> Decoder enabled at time 23486000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 25631000
+#
+# #######################################################
+# Received Status is ACK at 27510
+# #######################################################
+#
+# 32510: Set configuration -----
+# CntrlTransType = 11
+# In --> In task wait for response at time 44394000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 44699000
+# In --> Decoder enabled at time 45412000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 46211000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+#
+# #######################################################
+# Received Status is ACK at 46211
+# #######################################################
+#
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 49434000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 49739000
+# In --> Decoder enabled at time 50453000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 52595000
+#
+# #######################################################
+# Received Status is ACK at 54474
+# #######################################################
+#
+# 56474: Configuration done !!!!!!
+# CntrlTransType = 11
+# In --> In task wait for response at time 68334000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 68639000
+# In --> Decoder enabled at time 69334000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 70130000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 73374000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 00010111
+# In --> raw crc is 254 at time 73374
+# In --> sent crc is bfd5 at time 73374
+# In --> In task wait for response at time 79422000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 79706000
+# In --> Decoder enabled at time 80441000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 81239000
+# In --> bits received are 7
+# In --> ACK received at time 81239000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 84462000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 84851000
+# In --> Decoder enabled at time 85550000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 87686000
+# CntrlTransType = 11
+# In --> In task wait for response at time 101514000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 101798000
+# In --> Decoder enabled at time 102532000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 103331000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 106554000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 00001110
+# In --> raw crc is 8107 at time 106554
+# In --> sent crc is 7e1f at time 106554
+# In --> In task wait for response at time 112602000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 112907000
+# In --> Decoder enabled at time 113619000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 114419000
+# In --> bits received are 7
+# In --> ACK received at time 114419000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 117642000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 118031000
+# In --> Decoder enabled at time 118748000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 120887000
+#
+# ... Writing char 36 ...
+#
+# ... Reading the UART Status: xxxxxxxX ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 134694000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 134999000
+# In --> Decoder enabled at time 135712000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 136511000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 139650000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 139955000
+# In --> Decoder enabled at time 140669000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 02
+# In --> receive data = 7e
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 1a
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 145562000
+# In --> Data toggle recevied is 1001011 at time 145646000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000010
+# In --> calculated crc is 81a7 at time 145646000.
+# In --> received raw crc is 81a7 at time 145646000.
+# In --> received crc is 7e1a at time 145646000.
+# In --> tmpCrc 7e1a, at time 145646000
+# In --> sending ACK at time 147546000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000010 : 2
+# In --> In task wait for response at time 154098000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 154382000
+# In --> Decoder enabled at time 155114000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 155915000
+#
+# ... Reading the UART Status: 00000002 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 167790000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 168095000
+# In --> Decoder enabled at time 168803000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 169607000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 172746000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 173051000
+# In --> Decoder enabled at time 173763000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 02
+# In --> receive data = 7e
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 1a
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 178658000
+# In --> Data toggle recevied is 1001011 at time 178742000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000010
+# In --> calculated crc is 81a7 at time 178742000.
+# In --> received raw crc is 81a7 at time 178742000.
+# In --> received crc is 7e1a at time 178742000.
+# In --> tmpCrc 7e1a, at time 178742000
+# In --> sending ACK at time 180642000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000010 : 2
+# ... Write data 24 to UART done cnt : 1 ...
+#
+#
+# ... Writing char 129 ...
+# In --> In task wait for response at time 187194000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 187478000
+# In --> Decoder enabled at time 188208000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 188990000
+#
+# ... Reading the UART Status: 00000002 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 200886000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 201170000
+# In --> Decoder enabled at time 201897000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 202682000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 205842000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 206210000
+# In --> Decoder enabled at time 206943000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 211838000
+# In --> Data toggle recevied is 1001011 at time 211922000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 211922000.
+# In --> received raw crc is 24 at time 211922000.
+# In --> received crc is ffdb at time 211922000.
+# In --> tmpCrc ffdb, at time 211922000
+# In --> sending ACK at time 213822000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 220374000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 220658000
+# In --> Decoder enabled at time 221385000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 222170000
+# CntrlTransType = 10
+# In --> In task wait for response at time 234066000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 234350000
+# In --> Decoder enabled at time 235077000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 235862000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 239022000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 239390000
+# In --> Decoder enabled at time 240117000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 24
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = c0
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 244997000
+# In --> Data toggle recevied is 1001011 at time 245081000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00100100
+# In --> calculated crc is fc at time 245081000.
+# In --> received raw crc is fc at time 245081000.
+# In --> received crc is ffc0 at time 245081000.
+# In --> tmpCrc ffc0, at time 245081000
+# ... Write data 81 to UART done cnt : 2 ...
+#
+#
+# ... Writing char 9 ...
+# In --> sending ACK at time 247002000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00100100 : 36
+# In --> In task wait for response at time 253554000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 253859000
+# In --> Decoder enabled at time 254560000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 255371000
+# CntrlTransType = 11
+# In --> In task wait for response at time 267246000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 267551000
+# In --> Decoder enabled at time 268251000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 269063000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 272286000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 00100100
+# In --> raw crc is fc at time 272286
+# In --> sent crc is ffc0 at time 272286
+# In --> In task wait for response at time 278334000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 278639000
+# In --> Decoder enabled at time 279341000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 280151000
+# In --> bits received are 7
+# In --> ACK received at time 280151000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 283374000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 283763000
+# In --> Decoder enabled at time 284465000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 286598000
+#
+# ... Reading the UART Status: 00000026 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 300426000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 300710000
+# In --> Decoder enabled at time 301429000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 302222000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 305382000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 305750000
+# In --> Decoder enabled at time 306475000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# ... Write data 09 to UART done cnt : 3 ...
+#
+#
+# ... Writing char 99 ...
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 311357000
+# In --> Data toggle recevied is 1001011 at time 311441000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 311441000.
+# In --> received raw crc is 24 at time 311441000.
+# In --> received crc is ffdb at time 311441000.
+# In --> tmpCrc ffdb, at time 311441000
+# In --> sending ACK at time 313362000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 319914000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 320219000
+# In --> Decoder enabled at time 320917000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 321710000
+# CntrlTransType = 10
+# In --> In task wait for response at time 333606000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 333890000
+# In --> Decoder enabled at time 334609000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 335402000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 338562000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 338930000
+# In --> Decoder enabled at time 339652000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 24
+# ... Read Data from UART done cnt : 1...
+# In --> receive data = 00
+# In --> receive data = 81
+# In --> receive data = 3f
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = bb
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 344537000
+# In --> Data toggle recevied is 1001011 at time 344621000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 10000001
+# In --> calculated crc is 322 at time 344621000.
+# In --> received raw crc is 322 at time 344621000.
+# In --> received crc is 3fbb at time 344621000.
+# In --> tmpCrc 3fbb, at time 344621000
+# In --> sending ACK at time 346542000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 10000001 : 129
+# In --> In task wait for response at time 353094000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 353399000
+# In --> Decoder enabled at time 354115000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 354911000
+# CntrlTransType = 11
+# In --> In task wait for response at time 366786000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 367091000
+# In --> Decoder enabled at time 367807000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 368603000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 371826000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 10000001
+# In --> raw crc is 322 at time 371826
+# In --> sent crc is 3fbb at time 371826
+# ... Write data 63 to UART done cnt : 4 ...
+#
+#
+# ... Writing char 13 ...
+# In --> In task wait for response at time 377874000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 378179000
+# In --> Decoder enabled at time 378894000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 379691000
+# In --> bits received are 7
+# In --> ACK received at time 379691000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 382914000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 383303000
+# In --> Decoder enabled at time 384018000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 386159000
+#
+# ... Reading the UART Status: 00000083 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 399966000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 400271000
+# In --> Decoder enabled at time 400981000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 401783000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 404922000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 405311000
+# In --> Decoder enabled at time 406025000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 410918000
+# In --> Data toggle recevied is 1001011 at time 411002000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 411002000.
+# In --> received raw crc is 24 at time 411002000.
+# In --> received crc is ffdb at time 411002000.
+# In --> tmpCrc ffdb, at time 411002000
+# In --> sending ACK at time 412902000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 419454000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 419738000
+# In --> Decoder enabled at time 420467000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 421271000
+# CntrlTransType = 10
+# In --> In task wait for response at time 433146000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 433451000
+# In --> Decoder enabled at time 434159000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 434963000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# ... Write data 0d to UART done cnt : 5 ...
+#
+#
+# ... Writing char 141 ...
+# In --> In task wait for response at time 438102000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 438491000
+# In --> Decoder enabled at time 439202000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 09
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 81
+# ... Read Data from UART done cnt : 2...
+# In --> receive data = 3f
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = dd
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 444098000
+# In --> Data toggle recevied is 1001011 at time 444182000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00001001
+# In --> calculated crc is 344 at time 444182000.
+# In --> received raw crc is 344 at time 444182000.
+# In --> received crc is 3fdd at time 444182000.
+# In --> tmpCrc 3fdd, at time 444182000
+# In --> sending ACK at time 446082000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00001001 : 9
+# In --> In task wait for response at time 452634000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 452918000
+# In --> Decoder enabled at time 453647000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 454430000
+# CntrlTransType = 11
+# In --> In task wait for response at time 466326000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 466610000
+# In --> Decoder enabled at time 467336000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 468122000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 471366000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 00001001
+# In --> raw crc is 344 at time 471366
+# In --> sent crc is 3fdd at time 471366
+# In --> In task wait for response at time 477414000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 477698000
+# In --> Decoder enabled at time 478423000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 479210000
+# In --> bits received are 7
+# In --> ACK received at time 479210000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 482454000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 482822000
+# In --> Decoder enabled at time 483549000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 485678000
+#
+# ... Reading the UART Status: 0000000b ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 499506000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 499790000
+# In --> Decoder enabled at time 500516000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 501302000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# ... Write data 8d to UART done cnt : 6 ...
+#
+#
+# ... Writing char 101 ...
+# In --> In task wait for response at time 504462000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 504830000
+# In --> Decoder enabled at time 505556000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 510437000
+# In --> Data toggle recevied is 1001011 at time 510521000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 510521000.
+# In --> received raw crc is 24 at time 510521000.
+# In --> received crc is ffdb at time 510521000.
+# In --> tmpCrc ffdb, at time 510521000
+# In --> sending ACK at time 512442000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 518994000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 519299000
+# In --> Decoder enabled at time 519999000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 520811000
+# CntrlTransType = 10
+# In --> In task wait for response at time 532686000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 532991000
+# In --> Decoder enabled at time 533690000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 534503000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 537642000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 538031000
+# In --> Decoder enabled at time 538734000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 63
+# In --> receive data = bf
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = f2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 543617000
+# In --> Data toggle recevied is 1001011 at time 543701000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 01100011
+# In --> calculated crc is 2b0 at time 543701000.
+# In --> received raw crc is 2b0 at time 543701000.
+# In --> received crc is bff2 at time 543701000.
+# In --> tmpCrc bff2, at time 543701000
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 09
+# ... Read Data from UART done cnt : 3...
+# In --> sending ACK at time 545622000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 01100011 : 99
+# In --> In task wait for response at time 552174000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 552479000
+# In --> Decoder enabled at time 553176000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 553970000
+# ... Write data 65 to UART done cnt : 7 ...
+#
+#
+# ... Writing char 18 ...
+# CntrlTransType = 11
+# In --> In task wait for response at time 565866000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 566150000
+# In --> Decoder enabled at time 566868000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 567662000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 570906000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 01100011
+# In --> raw crc is 2b0 at time 570906
+# In --> sent crc is bff2 at time 570906
+# In --> In task wait for response at time 576954000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 577238000
+# In --> Decoder enabled at time 577955000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 578750000
+# In --> bits received are 7
+# In --> ACK received at time 578750000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 581994000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 582362000
+# In --> Decoder enabled at time 583084000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 585218000
+#
+# ... Reading the UART Status: 00000063 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 599046000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 599330000
+# In --> Decoder enabled at time 600066000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 600863000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 604002000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 604391000
+# In --> Decoder enabled at time 605088000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 609977000
+# In --> Data toggle recevied is 1001011 at time 610061000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 610061000.
+# In --> received raw crc is 24 at time 610061000.
+# In --> received crc is ffdb at time 610061000.
+# In --> tmpCrc ffdb, at time 610061000
+# In --> sending ACK at time 611982000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 618534000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 618839000
+# In --> Decoder enabled at time 619554000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 620351000
+# ... Write data 12 to UART done cnt : 8 ...
+#
+#
+# ... Writing char 1 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 632226000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 632531000
+# In --> Decoder enabled at time 633246000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 634043000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 637182000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 637571000
+# In --> Decoder enabled at time 638266000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 63
+# ... Read Data from UART done cnt : 4...
+# In --> receive data = 00
+# In --> receive data = 0d
+# In --> receive data = 3e
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 1e
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 643073000
+# In --> Data toggle recevied is 1001011 at time 643157000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00001101
+# In --> calculated crc is 8387 at time 643157000.
+# In --> received raw crc is 8387 at time 643157000.
+# In --> received crc is 3e1e at time 643157000.
+# In --> tmpCrc 3e1e, at time 643157000
+# In --> sending ACK at time 645078000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00001101 : 13
+# In --> In task wait for response at time 651630000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 651935000
+# In --> Decoder enabled at time 652648000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 653447000
+# CntrlTransType = 11
+# In --> In task wait for response at time 665322000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 665627000
+# In --> Decoder enabled at time 666340000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 667139000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 670362000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 00001101
+# In --> raw crc is 8387 at time 670362
+# In --> sent crc is 3e1e at time 670362
+# In --> In task wait for response at time 676326000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 676631000
+# In --> Decoder enabled at time 677341000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 678143000
+# In --> bits received are 7
+# In --> ACK received at time 678143000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 681366000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 681671000
+# In --> Decoder enabled at time 682384000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 684527000
+#
+# ... Reading the UART Status: 0000000f ...
+# ... Write data 01 to UART done cnt : 9 ...
+#
+#
+# ... Writing char 13 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 698334000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 698639000
+# In --> Decoder enabled at time 699348000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 700151000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 703290000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 703595000
+# In --> Decoder enabled at time 704308000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 709202000
+# In --> Data toggle recevied is 1001011 at time 709286000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 709286000.
+# In --> received raw crc is 24 at time 709286000.
+# In --> received crc is ffdb at time 709286000.
+# In --> tmpCrc ffdb, at time 709286000
+# In --> sending ACK at time 711186000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 717738000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 718022000
+# In --> Decoder enabled at time 718750000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 719534000
+# CntrlTransType = 10
+# In --> In task wait for response at time 731430000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 731714000
+# In --> Decoder enabled at time 732442000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 733226000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 736386000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 736754000
+# In --> Decoder enabled at time 737485000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 8d
+# In --> receive data = 3f
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 0d
+# ... Read Data from UART done cnt : 5...
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = be
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 742382000
+# In --> Data toggle recevied is 1001011 at time 742466000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 10001101
+# In --> calculated crc is 382 at time 742466000.
+# In --> received raw crc is 382 at time 742466000.
+# In --> received crc is 3fbe at time 742466000.
+# In --> tmpCrc 3fbe, at time 742466000
+# In --> sending ACK at time 744366000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 10001101 : 141
+# In --> In task wait for response at time 750918000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 751202000
+# In --> Decoder enabled at time 751930000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 752714000
+# ... Write data 0d to UART done cnt : 10 ...
+#
+#
+# ... Writing char 118 ...
+# CntrlTransType = 11
+# In --> In task wait for response at time 764610000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 764894000
+# In --> Decoder enabled at time 765619000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 766406000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 769650000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 10001101
+# In --> raw crc is 382 at time 769650
+# In --> sent crc is 3fbe at time 769650
+# In --> In task wait for response at time 775698000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 775982000
+# In --> Decoder enabled at time 776706000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 777494000
+# In --> bits received are 7
+# In --> ACK received at time 777494000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 780738000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 781106000
+# In --> Decoder enabled at time 781832000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 783962000
+#
+# ... Reading the UART Status: 0000008f ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 797790000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 798074000
+# In --> Decoder enabled at time 798799000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 799586000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 802746000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 803114000
+# In --> Decoder enabled at time 803839000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 808721000
+# In --> Data toggle recevied is 1001011 at time 808805000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 808805000.
+# In --> received raw crc is 24 at time 808805000.
+# In --> received crc is ffdb at time 808805000.
+# In --> tmpCrc ffdb, at time 808805000
+# In --> sending ACK at time 810726000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 817278000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 817583000
+# In --> Decoder enabled at time 818282000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 819095000
+# ... Write data 76 to UART done cnt : 11 ...
+#
+#
+# ... Writing char 61 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 830970000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 831275000
+# In --> Decoder enabled at time 831973000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 832787000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 835926000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 836315000
+# In --> Decoder enabled at time 837017000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 65
+# In --> receive data = 3f
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = f0
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 841901000
+# In --> Data toggle recevied is 1001011 at time 841985000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 01100101
+# In --> calculated crc is 3f0 at time 841985000.
+# In --> received raw crc is 3f0 at time 841985000.
+# In --> received crc is 3ff0 at time 841985000.
+# In --> tmpCrc 3ff0, at time 841985000
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 8d
+# ... Read Data from UART done cnt : 6...
+# In --> sending ACK at time 843906000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 01100101 : 101
+# In --> In task wait for response at time 850458000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 850763000
+# In --> Decoder enabled at time 851459000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 852254000
+# CntrlTransType = 11
+# In --> In task wait for response at time 864150000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 864434000
+# In --> Decoder enabled at time 865151000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 865946000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 869190000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 01100101
+# In --> raw crc is 3f0 at time 869190
+# In --> sent crc is 3ff0 at time 869190
+# In --> In task wait for response at time 875238000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 875522000
+# In --> Decoder enabled at time 876258000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 877055000
+# In --> bits received are 7
+# In --> ACK received at time 877055000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 880278000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 880667000
+# In --> Decoder enabled at time 881367000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 883502000
+#
+# ... Reading the UART Status: 00000067 ...
+# ... Write data 3d to UART done cnt : 12 ...
+#
+#
+# ... Writing char 237 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 897330000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 897614000
+# In --> Decoder enabled at time 898349000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 899147000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 902286000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 902675000
+# In --> Decoder enabled at time 903374000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 908261000
+# In --> Data toggle recevied is 1001011 at time 908345000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 908345000.
+# In --> received raw crc is 24 at time 908345000.
+# In --> received crc is ffdb at time 908345000.
+# In --> tmpCrc ffdb, at time 908345000
+# In --> sending ACK at time 910266000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 916818000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 917123000
+# In --> Decoder enabled at time 917837000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 918635000
+# CntrlTransType = 10
+# In --> In task wait for response at time 930510000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 930815000
+# In --> Decoder enabled at time 931529000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 932327000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 935466000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 935855000
+# In --> Decoder enabled at time 936569000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 65
+# ... Read Data from UART done cnt : 7...
+# In --> receive data = 00
+# In --> receive data = 12
+# In --> receive data = 7f
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d6
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 941462000
+# In --> Data toggle recevied is 1001011 at time 941546000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00010010
+# In --> calculated crc is 194 at time 941546000.
+# In --> received raw crc is 194 at time 941546000.
+# In --> received crc is 7fd6 at time 941546000.
+# In --> tmpCrc 7fd6, at time 941546000
+# In --> sending ACK at time 943446000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00010010 : 18
+# ... Write data ed to UART done cnt : 13 ...
+#
+#
+# ... Writing char 140 ...
+# In --> In task wait for response at time 949998000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 950282000
+# In --> Decoder enabled at time 951011000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 951815000
+# CntrlTransType = 11
+# In --> In task wait for response at time 963690000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 963995000
+# In --> Decoder enabled at time 964703000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 965507000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 968730000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 00010010
+# In --> raw crc is 194 at time 968730
+# In --> sent crc is 7fd6 at time 968730
+# In --> In task wait for response at time 974778000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 975083000
+# In --> Decoder enabled at time 975793000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 976595000
+# In --> bits received are 7
+# In --> ACK received at time 976595000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 979818000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 980207000
+# In --> Decoder enabled at time 980917000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 983063000
+#
+# ... Reading the UART Status: 00000012 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 996870000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 997175000
+# In --> Decoder enabled at time 997881000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 998687000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1001826000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1002215000
+# In --> Decoder enabled at time 1002924000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1007822000
+# In --> Data toggle recevied is 1001011 at time 1007906000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 1007906000.
+# In --> received raw crc is 24 at time 1007906000.
+# In --> received crc is ffdb at time 1007906000.
+# In --> tmpCrc ffdb, at time 1007906000
+# In --> sending ACK at time 1009806000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# ... Write data 8c to UART done cnt : 14 ...
+#
+#
+# ... Writing char 249 ...
+# In --> In task wait for response at time 1016358000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1016642000
+# In --> Decoder enabled at time 1017369000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1018154000
+# CntrlTransType = 10
+# In --> In task wait for response at time 1030050000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1030334000
+# In --> Decoder enabled at time 1031058000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1031846000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1035006000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1035374000
+# In --> Decoder enabled at time 1036104000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 01
+# In --> receive data = 3e
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 12
+# ... Read Data from UART done cnt : 8...
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 1b
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1040897000
+# In --> Data toggle recevied is 1001011 at time 1040981000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000001
+# In --> calculated crc is 8327 at time 1040981000.
+# In --> received raw crc is 8327 at time 1040981000.
+# In --> received crc is 3e1b at time 1040981000.
+# In --> tmpCrc 3e1b, at time 1040981000
+# In --> sending ACK at time 1042902000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000001 : 1
+# In --> In task wait for response at time 1049454000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1049759000
+# In --> Decoder enabled at time 1050463000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1051271000
+# CntrlTransType = 11
+# In --> In task wait for response at time 1063146000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1063451000
+# In --> Decoder enabled at time 1064152000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1064963000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 1068186000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 00000001
+# In --> raw crc is 8327 at time 1068186
+# In --> sent crc is 3e1b at time 1068186
+# In --> In task wait for response at time 1074150000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1074455000
+# In --> Decoder enabled at time 1075155000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1075967000
+# In --> bits received are 7
+# In --> ACK received at time 1075967000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# ... Write data f9 to UART done cnt : 15 ...
+#
+#
+# ... Writing char 198 ...
+# In --> In task wait for response at time 1079190000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1079579000
+# In --> Decoder enabled at time 1080285000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1082414000
+#
+# ... Reading the UART Status: 00000003 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 1096242000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1096526000
+# In --> Decoder enabled at time 1097246000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1098038000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1101198000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1101566000
+# In --> Decoder enabled at time 1102292000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1107173000
+# In --> Data toggle recevied is 1001011 at time 1107257000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 1107257000.
+# In --> received raw crc is 24 at time 1107257000.
+# In --> received crc is ffdb at time 1107257000.
+# In --> tmpCrc ffdb, at time 1107257000
+# In --> sending ACK at time 1109178000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 1115730000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1116035000
+# In --> Decoder enabled at time 1116734000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1117526000
+# CntrlTransType = 10
+# In --> In task wait for response at time 1129422000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1129706000
+# In --> Decoder enabled at time 1130426000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1131218000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1134378000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1134746000
+# In --> Decoder enabled at time 1135466000 in host
+# In --> receive data = 4b
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 01
+# ... Read Data from UART done cnt : 9...
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 0d
+# In --> receive data = 3e
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 1e
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1140269000
+# In --> Data toggle recevied is 1001011 at time 1140353000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00001101
+# In --> calculated crc is 8387 at time 1140353000.
+# In --> received raw crc is 8387 at time 1140353000.
+# In --> received crc is 3e1e at time 1140353000.
+# In --> tmpCrc 3e1e, at time 1140353000
+# ... Write data c6 to UART done cnt : 16 ...
+#
+#
+# ... Writing char 197 ...
+# In --> sending ACK at time 1142274000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00001101 : 13
+# In --> In task wait for response at time 1148826000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1149131000
+# In --> Decoder enabled at time 1149846000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1150643000
+# CntrlTransType = 11
+# In --> In task wait for response at time 1162518000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1162823000
+# In --> Decoder enabled at time 1163538000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1164335000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 1167558000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 00001101
+# In --> raw crc is 8387 at time 1167558
+# In --> sent crc is 3e1e at time 1167558
+# In --> In task wait for response at time 1173522000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1173827000
+# In --> Decoder enabled at time 1174541000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1175339000
+# In --> bits received are 7
+# In --> ACK received at time 1175339000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 1178562000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1178951000
+# In --> Decoder enabled at time 1179650000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1181786000
+#
+# ... Reading the UART Status: 0000000f ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 1195614000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1195898000
+# In --> Decoder enabled at time 1196632000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1197431000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1200570000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1200959000
+# In --> Decoder enabled at time 1201657000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# ... Write data c5 to UART done cnt : 17 ...
+#
+#
+# ... Writing char 170 ...
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1206545000
+# In --> Data toggle recevied is 1001011 at time 1206629000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 1206629000.
+# In --> received raw crc is 24 at time 1206629000.
+# In --> received crc is ffdb at time 1206629000.
+# In --> tmpCrc ffdb, at time 1206629000
+# In --> sending ACK at time 1208550000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 1215102000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1215407000
+# In --> Decoder enabled at time 1216120000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1216919000
+# CntrlTransType = 10
+# In --> In task wait for response at time 1228794000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1229099000
+# In --> Decoder enabled at time 1229812000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1230611000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1233750000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1234055000
+# In --> Decoder enabled at time 1234769000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 0d
+# ... Read Data from UART done cnt : 10...
+# In --> receive data = 76
+# In --> receive data = 7e
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 3d
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1239662000
+# In --> Data toggle recevied is 1001011 at time 1239746000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 01110110
+# In --> calculated crc is 8143 at time 1239746000.
+# In --> received raw crc is 8143 at time 1239746000.
+# In --> received crc is 7e3d at time 1239746000.
+# In --> tmpCrc 7e3d, at time 1239746000
+# In --> sending ACK at time 1241646000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 01110110 : 118
+# In --> In task wait for response at time 1248198000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1248482000
+# In --> Decoder enabled at time 1249214000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1250015000
+# CntrlTransType = 11
+# In --> In task wait for response at time 1261890000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1262195000
+# In --> Decoder enabled at time 1262903000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1263707000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 1266930000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 01110110
+# In --> raw crc is 8143 at time 1266930
+# In --> sent crc is 7e3d at time 1266930
+# ... Write data aa to UART done cnt : 18 ...
+#
+#
+# ... Writing char 229 ...
+# In --> In task wait for response at time 1272978000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1273283000
+# In --> Decoder enabled at time 1273990000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1274795000
+# In --> bits received are 7
+# In --> ACK received at time 1274795000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 1278018000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1278407000
+# In --> Decoder enabled at time 1279116000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1281263000
+#
+# ... Reading the UART Status: 00000076 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 1295070000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1295375000
+# In --> Decoder enabled at time 1296083000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1296887000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1300026000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1300415000
+# In --> Decoder enabled at time 1301123000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1306022000
+# In --> Data toggle recevied is 1001011 at time 1306106000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 1306106000.
+# In --> received raw crc is 24 at time 1306106000.
+# In --> received crc is ffdb at time 1306106000.
+# In --> tmpCrc ffdb, at time 1306106000
+# In --> sending ACK at time 1308006000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 1314558000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1314842000
+# In --> Decoder enabled at time 1315566000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1316354000
+# CntrlTransType = 10
+# In --> In task wait for response at time 1328250000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1328534000
+# In --> Decoder enabled at time 1329257000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1330046000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1333206000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1333574000
+# ... Write data e5 to UART done cnt : 19 ...
+#
+#
+# ... Writing char 119 ...
+# In --> Decoder enabled at time 1334301000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 3d
+# In --> receive data = 3e
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 0a
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1339097000
+# In --> Data toggle recevied is 1001011 at time 1339181000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00111101
+# In --> calculated crc is 83af at time 1339181000.
+# In --> received raw crc is 83af at time 1339181000.
+# In --> received crc is 3e0a at time 1339181000.
+# In --> tmpCrc 3e0a, at time 1339181000
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 76
+# ... Read Data from UART done cnt : 11...
+# In --> sending ACK at time 1341102000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00111101 : 61
+# In --> In task wait for response at time 1347654000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1347959000
+# In --> Decoder enabled at time 1348660000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1349471000
+# CntrlTransType = 11
+# In --> In task wait for response at time 1361346000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1361651000
+# In --> Decoder enabled at time 1362351000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1363163000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 1366386000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 00111101
+# In --> raw crc is 83af at time 1366386
+# In --> sent crc is 3e0a at time 1366386
+# In --> In task wait for response at time 1372350000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1372655000
+# In --> Decoder enabled at time 1373355000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1374167000
+# In --> bits received are 7
+# In --> ACK received at time 1374167000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 1377390000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1377779000
+# In --> Decoder enabled at time 1378482000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1380614000
+#
+# ... Reading the UART Status: 0000003f ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 1394442000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1394726000
+# In --> Decoder enabled at time 1395445000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1396238000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# ... Write data 77 to UART done cnt : 20 ...
+#
+#
+# ... Writing char 18 ...
+# In --> In task wait for response at time 1399398000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1399766000
+# In --> Decoder enabled at time 1400489000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1405373000
+# In --> Data toggle recevied is 1001011 at time 1405457000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 1405457000.
+# In --> received raw crc is 24 at time 1405457000.
+# In --> received crc is ffdb at time 1405457000.
+# In --> tmpCrc ffdb, at time 1405457000
+# In --> sending ACK at time 1407378000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 1413930000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1414235000
+# In --> Decoder enabled at time 1414931000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1415726000
+# CntrlTransType = 10
+# In --> In task wait for response at time 1427622000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1427906000
+# In --> Decoder enabled at time 1428623000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1429418000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1432578000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1432946000
+# In --> Decoder enabled at time 1433666000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 3d
+# ... Read Data from UART done cnt : 12...
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ed
+# In --> receive data = 3f
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 96
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1438553000
+# In --> Data toggle recevied is 1001011 at time 1438637000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 11101101
+# In --> calculated crc is 396 at time 1438637000.
+# In --> received raw crc is 396 at time 1438637000.
+# In --> received crc is 3f96 at time 1438637000.
+# In --> tmpCrc 3f96, at time 1438637000
+# In --> sending ACK at time 1440558000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 11101101 : 237
+# In --> In task wait for response at time 1447110000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1447415000
+# In --> Decoder enabled at time 1448129000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1448927000
+# CntrlTransType = 11
+# In --> In task wait for response at time 1460802000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1461107000
+# In --> Decoder enabled at time 1461821000 in host
+# ... Write data 12 to UART done cnt : 21 ...
+#
+#
+# ... Writing char 143 ...
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1462619000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 1465842000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 11101101
+# In --> raw crc is 396 at time 1465842
+# In --> sent crc is 3f96 at time 1465842
+# In --> In task wait for response at time 1471890000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1472195000
+# In --> Decoder enabled at time 1472908000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1473707000
+# In --> bits received are 7
+# In --> ACK received at time 1473707000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 1476930000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1477319000
+# In --> Decoder enabled at time 1478013000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1480154000
+#
+# ... Reading the UART Status: 000000ef ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 1493982000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1494266000
+# In --> Decoder enabled at time 1495001000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1495799000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1498938000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1499327000
+# In --> Decoder enabled at time 1500044000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1504934000
+# In --> Data toggle recevied is 1001011 at time 1505018000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 1505018000.
+# In --> received raw crc is 24 at time 1505018000.
+# In --> received crc is ffdb at time 1505018000.
+# In --> tmpCrc ffdb, at time 1505018000
+# In --> sending ACK at time 1506918000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 1513470000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1513754000
+# In --> Decoder enabled at time 1514483000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1515287000
+# ... Write data 8f to UART done cnt : 22 ...
+#
+#
+# ... Writing char 242 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 1527162000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1527467000
+# In --> Decoder enabled at time 1528178000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1528979000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1532118000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1532423000
+# In --> Decoder enabled at time 1533138000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 8c
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match ed
+# ... Read Data from UART done cnt : 13...
+# In --> receive data = fe
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 7e
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1538114000
+# In --> Data toggle recevied is 1001011 at time 1538198000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 10001100
+# In --> calculated crc is 8081 at time 1538198000.
+# In --> received raw crc is 8081 at time 1538198000.
+# In --> received crc is fe7e at time 1538198000.
+# In --> tmpCrc fe7e, at time 1538198000
+# In --> sending ACK at time 1540098000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 10001100 : 140
+# In --> In task wait for response at time 1546650000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1546934000
+# In --> Decoder enabled at time 1547661000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1548446000
+# CntrlTransType = 11
+# In --> In task wait for response at time 1560342000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1560626000
+# In --> Decoder enabled at time 1561353000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1562138000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 1565382000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 10001100
+# In --> raw crc is 8081 at time 1565382
+# In --> sent crc is fe7e at time 1565382
+# In --> In task wait for response at time 1571514000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1571798000
+# In --> Decoder enabled at time 1572523000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1573310000
+# In --> bits received are 7
+# In --> ACK received at time 1573310000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 1576554000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1576922000
+# In --> Decoder enabled at time 1577649000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1579778000
+#
+# ... Reading the UART Status: 0000008e ...
+# ... Write data f2 to UART done cnt : 23 ...
+#
+#
+# ... Writing char 206 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 1593606000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1593890000
+# In --> Decoder enabled at time 1594616000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1595402000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1598562000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1598930000
+# In --> Decoder enabled at time 1599656000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1604537000
+# In --> Data toggle recevied is 1001011 at time 1604621000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 1604621000.
+# In --> received raw crc is 24 at time 1604621000.
+# In --> received crc is ffdb at time 1604621000.
+# In --> tmpCrc ffdb, at time 1604621000
+# In --> sending ACK at time 1606542000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 1613094000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1613399000
+# In --> Decoder enabled at time 1614099000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1614911000
+# CntrlTransType = 10
+# In --> In task wait for response at time 1626786000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1627091000
+# In --> Decoder enabled at time 1627790000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1628603000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1631742000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1632131000
+# In --> Decoder enabled at time 1632834000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = f9
+# In --> receive data = 3f
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 99
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1637717000
+# In --> Data toggle recevied is 1001011 at time 1637801000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 11111001
+# In --> calculated crc is 366 at time 1637801000.
+# In --> received raw crc is 366 at time 1637801000.
+# In --> received crc is 3f99 at time 1637801000.
+# In --> tmpCrc 3f99, at time 1637801000
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 8c
+# ... Read Data from UART done cnt : 14...
+# In --> sending ACK at time 1639722000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 11111001 : 249
+# In --> In task wait for response at time 1646274000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1646579000
+# In --> Decoder enabled at time 1647276000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1648070000
+# ... Write data ce to UART done cnt : 24 ...
+#
+#
+# ... Writing char 232 ...
+# CntrlTransType = 11
+# In --> In task wait for response at time 1659966000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1660250000
+# In --> Decoder enabled at time 1660968000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1661762000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 1665006000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 11111001
+# In --> raw crc is 366 at time 1665006
+# In --> sent crc is 3f99 at time 1665006
+# In --> In task wait for response at time 1671054000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1671338000
+# In --> Decoder enabled at time 1672055000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1672850000
+# In --> bits received are 7
+# In --> ACK received at time 1672850000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 1676094000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1676462000
+# In --> Decoder enabled at time 1677184000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1679318000
+#
+# ... Reading the UART Status: 000000fb ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 1693146000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1693430000
+# In --> Decoder enabled at time 1694166000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1694963000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1698102000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1698491000
+# In --> Decoder enabled at time 1699188000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1704077000
+# In --> Data toggle recevied is 1001011 at time 1704161000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 1704161000.
+# In --> received raw crc is 24 at time 1704161000.
+# In --> received crc is ffdb at time 1704161000.
+# In --> tmpCrc ffdb, at time 1704161000
+# In --> sending ACK at time 1706082000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 1712634000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1712939000
+# In --> Decoder enabled at time 1713654000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1714451000
+# ... Write data e8 to UART done cnt : 25 ...
+#
+#
+# ... Writing char 197 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 1726326000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1726631000
+# In --> Decoder enabled at time 1727346000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1728143000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1731282000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1731671000
+# In --> Decoder enabled at time 1732366000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match f9
+# ... Read Data from UART done cnt : 15...
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = c6
+# In --> receive data = 7f
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 89
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1737257000
+# In --> Data toggle recevied is 1001011 at time 1737341000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 11000110
+# In --> calculated crc is 16e at time 1737341000.
+# In --> received raw crc is 16e at time 1737341000.
+# In --> received crc is 7f89 at time 1737341000.
+# In --> tmpCrc 7f89, at time 1737341000
+# In --> sending ACK at time 1739262000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 11000110 : 198
+# In --> In task wait for response at time 1745814000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1746119000
+# In --> Decoder enabled at time 1746829000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1747631000
+# CntrlTransType = 11
+# In --> In task wait for response at time 1759506000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1759811000
+# In --> Decoder enabled at time 1760520000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1761323000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 1764546000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 11000110
+# In --> raw crc is 16e at time 1764546
+# In --> sent crc is 7f89 at time 1764546
+# In --> In task wait for response at time 1770594000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1770899000
+# In --> Decoder enabled at time 1771607000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1772411000
+# In --> bits received are 7
+# In --> ACK received at time 1772411000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 1775634000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1775939000
+# In --> Decoder enabled at time 1776651000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1778795000
+#
+# ... Reading the UART Status: 000000c6 ...
+# ... Write data c5 to UART done cnt : 26 ...
+#
+#
+# ... Writing char 92 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 1792602000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1792907000
+# In --> Decoder enabled at time 1793614000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1794419000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1797558000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1797947000
+# In --> Decoder enabled at time 1798658000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1803554000
+# In --> Data toggle recevied is 1001011 at time 1803638000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 1803638000.
+# In --> received raw crc is 24 at time 1803638000.
+# In --> received crc is ffdb at time 1803638000.
+# In --> tmpCrc ffdb, at time 1803638000
+# In --> sending ACK at time 1805538000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 1812090000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1812374000
+# In --> Decoder enabled at time 1813100000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1813886000
+# CntrlTransType = 10
+# In --> In task wait for response at time 1825782000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1826066000
+# In --> Decoder enabled at time 1826792000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1827578000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1830738000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1831106000
+# In --> Decoder enabled at time 1831835000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = c5
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match c6
+# ... Read Data from UART done cnt : 16...
+# In --> receive data = 3f
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 88
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1836713000
+# In --> Data toggle recevied is 1001011 at time 1836797000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 11000101
+# In --> calculated crc is 3ee at time 1836797000.
+# In --> received raw crc is 3ee at time 1836797000.
+# In --> received crc is 3f88 at time 1836797000.
+# In --> tmpCrc 3f88, at time 1836797000
+# In --> sending ACK at time 1838718000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 11000101 : 197
+# In --> In task wait for response at time 1845270000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1845575000
+# ... Write data 5c to UART done cnt : 27 ...
+#
+#
+# ... Writing char 189 ...
+# In --> Decoder enabled at time 1846280000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1847087000
+# CntrlTransType = 11
+# In --> In task wait for response at time 1858962000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1859267000
+# In --> Decoder enabled at time 1859969000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1860779000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 1864002000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 11000101
+# In --> raw crc is 3ee at time 1864002
+# In --> sent crc is 3f88 at time 1864002
+# In --> In task wait for response at time 1870050000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1870355000
+# In --> Decoder enabled at time 1871056000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1871867000
+# In --> bits received are 7
+# In --> ACK received at time 1871867000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 1875090000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1875479000
+# In --> Decoder enabled at time 1876182000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1878314000
+#
+# ... Reading the UART Status: 000000c7 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 1892142000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1892426000
+# In --> Decoder enabled at time 1893149000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1893938000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1897098000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1897466000
+# In --> Decoder enabled at time 1898189000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1903073000
+# In --> Data toggle recevied is 1001011 at time 1903157000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 1903157000.
+# In --> received raw crc is 24 at time 1903157000.
+# In --> received crc is ffdb at time 1903157000.
+# In --> tmpCrc ffdb, at time 1903157000
+# In --> sending ACK at time 1905078000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# ... Write data bd to UART done cnt : 28 ...
+#
+#
+# ... Writing char 45 ...
+# In --> In task wait for response at time 1911630000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1911935000
+# In --> Decoder enabled at time 1912632000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1913426000
+# CntrlTransType = 10
+# In --> In task wait for response at time 1925322000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1925606000
+# In --> Decoder enabled at time 1926323000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1927118000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1930278000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1930646000
+# In --> Decoder enabled at time 1931367000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = aa
+# In --> receive data = 7f
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = a4
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1936253000
+# In --> Data toggle recevied is 1001011 at time 1936337000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 10101010
+# In --> calculated crc is 1da at time 1936337000.
+# In --> received raw crc is 1da at time 1936337000.
+# In --> received crc is 7fa4 at time 1936337000.
+# In --> tmpCrc 7fa4, at time 1936337000
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match c5
+# ... Read Data from UART done cnt : 17...
+# In --> sending ACK at time 1938258000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 10101010 : 170
+# In --> In task wait for response at time 1944810000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1945115000
+# In --> Decoder enabled at time 1945830000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1946627000
+# CntrlTransType = 11
+# In --> In task wait for response at time 1958502000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1958807000
+# In --> Decoder enabled at time 1959522000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1960319000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 1963542000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 10101010
+# In --> raw crc is 1da at time 1963542
+# In --> sent crc is 7fa4 at time 1963542
+# In --> In task wait for response at time 1969590000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1969895000
+# In --> Decoder enabled at time 1970608000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1971407000
+# In --> bits received are 7
+# In --> ACK received at time 1971407000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# ... Write data 2d to UART done cnt : 29 ...
+#
+#
+# ... Writing char 101 ...
+# In --> In task wait for response at time 1974630000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1975019000
+# In --> Decoder enabled at time 1975717000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1977854000
+#
+# ... Reading the UART Status: 000000aa ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 1991682000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1991966000
+# In --> Decoder enabled at time 1992699000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 1993499000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 1996638000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 1997027000
+# In --> Decoder enabled at time 1997721000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2002613000
+# In --> Data toggle recevied is 1001011 at time 2002697000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 2002697000.
+# In --> received raw crc is 24 at time 2002697000.
+# In --> received crc is ffdb at time 2002697000.
+# In --> tmpCrc ffdb, at time 2002697000
+# In --> sending ACK at time 2004618000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 2011170000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2011475000
+# In --> Decoder enabled at time 2012187000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2012987000
+# CntrlTransType = 10
+# In --> In task wait for response at time 2024862000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2025167000
+# In --> Decoder enabled at time 2025879000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2026679000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2029818000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2030123000
+# In --> Decoder enabled at time 2030839000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match aa
+# ... Read Data from UART done cnt : 18...
+# In --> receive data = 00
+# In --> receive data = e5
+# In --> receive data = 3e
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 50
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2035646000
+# In --> Data toggle recevied is 1001011 at time 2035730000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 11100101
+# In --> calculated crc is 83f5 at time 2035730000.
+# In --> received raw crc is 83f5 at time 2035730000.
+# In --> received crc is 3e50 at time 2035730000.
+# In --> tmpCrc 3e50, at time 2035730000
+# In --> sending ACK at time 2037630000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 11100101 : 229
+# ... Write data 65 to UART done cnt : 30 ...
+#
+#
+# ... Writing char 99 ...
+# In --> In task wait for response at time 2044182000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2044466000
+# In --> Decoder enabled at time 2045195000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2045999000
+# CntrlTransType = 11
+# In --> In task wait for response at time 2057874000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2058179000
+# In --> Decoder enabled at time 2058887000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2059691000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 2062914000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 11100101
+# In --> raw crc is 83f5 at time 2062914
+# In --> sent crc is 3e50 at time 2062914
+# In --> In task wait for response at time 2068878000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2069183000
+# In --> Decoder enabled at time 2069893000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2070695000
+# In --> bits received are 7
+# In --> ACK received at time 2070695000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 2073918000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2074307000
+# In --> Decoder enabled at time 2075017000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2077163000
+#
+# ... Reading the UART Status: 000000e7 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 2090970000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2091275000
+# In --> Decoder enabled at time 2091981000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2092787000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2095926000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2096315000
+# In --> Decoder enabled at time 2097024000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2101922000
+# In --> Data toggle recevied is 1001011 at time 2102006000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 2102006000.
+# In --> received raw crc is 24 at time 2102006000.
+# In --> received crc is ffdb at time 2102006000.
+# In --> tmpCrc ffdb, at time 2102006000
+# ... Write data 63 to UART done cnt : 31 ...
+#
+#
+# ... Writing char 10 ...
+# In --> sending ACK at time 2103906000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 2110458000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2110742000
+# In --> Decoder enabled at time 2111469000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2112254000
+# CntrlTransType = 10
+# In --> In task wait for response at time 2124150000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2124434000
+# In --> Decoder enabled at time 2125158000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2125946000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2129106000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2129474000
+# In --> Decoder enabled at time 2130204000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 77
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match e5
+# ... Read Data from UART done cnt : 19...
+# In --> receive data = bf
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = fd
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2135081000
+# In --> Data toggle recevied is 1001011 at time 2135165000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 01110111
+# In --> calculated crc is 240 at time 2135165000.
+# In --> received raw crc is 240 at time 2135165000.
+# In --> received crc is bffd at time 2135165000.
+# In --> tmpCrc bffd, at time 2135165000
+# In --> sending ACK at time 2137086000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 01110111 : 119
+# In --> In task wait for response at time 2143638000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2143943000
+# In --> Decoder enabled at time 2144643000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2145455000
+# CntrlTransType = 11
+# In --> In task wait for response at time 2157330000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2157635000
+# In --> Decoder enabled at time 2158338000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2159147000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 2162370000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 01110111
+# In --> raw crc is 240 at time 2162370
+# In --> sent crc is bffd at time 2162370
+# ... Write data 0a to UART done cnt : 32 ...
+#
+#
+# ... Writing char 128 ...
+# In --> In task wait for response at time 2168502000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2168807000
+# In --> Decoder enabled at time 2169505000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2170319000
+# In --> bits received are 7
+# In --> ACK received at time 2170319000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 2173542000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2173931000
+# In --> Decoder enabled at time 2174635000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2176766000
+#
+# ... Reading the UART Status: 00000077 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 2190594000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2190878000
+# In --> Decoder enabled at time 2191596000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2192390000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2195550000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2195918000
+# In --> Decoder enabled at time 2196642000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2201525000
+# In --> Data toggle recevied is 1001011 at time 2201609000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 2201609000.
+# In --> received raw crc is 24 at time 2201609000.
+# In --> received crc is ffdb at time 2201609000.
+# In --> tmpCrc ffdb, at time 2201609000
+# In --> sending ACK at time 2203530000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 2210082000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2210387000
+# In --> Decoder enabled at time 2211105000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2211899000
+# CntrlTransType = 10
+# In --> In task wait for response at time 2223774000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2224079000
+# In --> Decoder enabled at time 2224797000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2225591000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2228730000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2229119000
+# In --> Decoder enabled at time 2229816000 in host
+# ... Write data 80 to UART done cnt : 33 ...
+#
+#
+# ... Writing char 32 ...
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 12
+# In --> receive data = 7f
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d6
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2234705000
+# In --> Data toggle recevied is 1001011 at time 2234789000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00010010
+# In --> calculated crc is 194 at time 2234789000.
+# In --> received raw crc is 194 at time 2234789000.
+# In --> received crc is 7fd6 at time 2234789000.
+# In --> tmpCrc 7fd6, at time 2234789000
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 77
+# ... Read Data from UART done cnt : 20...
+# In --> sending ACK at time 2236710000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00010010 : 18
+# In --> In task wait for response at time 2243262000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2243567000
+# In --> Decoder enabled at time 2244279000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2245079000
+# CntrlTransType = 11
+# In --> In task wait for response at time 2256954000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2257259000
+# In --> Decoder enabled at time 2257974000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2258771000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 2261994000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 00010010
+# In --> raw crc is 194 at time 2261994
+# In --> sent crc is 7fd6 at time 2261994
+# In --> In task wait for response at time 2268042000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2268347000
+# In --> Decoder enabled at time 2269061000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2269859000
+# In --> bits received are 7
+# In --> ACK received at time 2269859000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 2273082000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2273471000
+# In --> Decoder enabled at time 2274185000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2276327000
+#
+# ... Reading the UART Status: 00000012 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 2290134000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2290439000
+# In --> Decoder enabled at time 2291149000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2291951000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# ... Write data 20 to UART done cnt : 34 ...
+#
+#
+# ... Writing char 170 ...
+# In --> In task wait for response at time 2295090000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2295395000
+# In --> Decoder enabled at time 2296108000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2301002000
+# In --> Data toggle recevied is 1001011 at time 2301086000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 2301086000.
+# In --> received raw crc is 24 at time 2301086000.
+# In --> received crc is ffdb at time 2301086000.
+# In --> tmpCrc ffdb, at time 2301086000
+# In --> sending ACK at time 2302986000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 2309538000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2309822000
+# In --> Decoder enabled at time 2310551000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2311355000
+# CntrlTransType = 10
+# In --> In task wait for response at time 2323230000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2323535000
+# In --> Decoder enabled at time 2324242000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2325047000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2328186000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2328575000
+# In --> Decoder enabled at time 2329286000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 12
+# ... Read Data from UART done cnt : 21...
+# In --> receive data = 00
+# In --> receive data = 8f
+# In --> receive data = be
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 7f
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2334182000
+# In --> Data toggle recevied is 1001011 at time 2334266000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 10001111
+# In --> calculated crc is 8201 at time 2334266000.
+# In --> received raw crc is 8201 at time 2334266000.
+# In --> received crc is be7f at time 2334266000.
+# In --> tmpCrc be7f, at time 2334266000
+# In --> sending ACK at time 2336166000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 10001111 : 143
+# In --> In task wait for response at time 2342718000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2343002000
+# In --> Decoder enabled at time 2343728000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2344514000
+# CntrlTransType = 11
+# In --> In task wait for response at time 2356410000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2356694000
+# In --> Decoder enabled at time 2357420000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2358206000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# ... Write data aa to UART done cnt : 35 ...
+#
+#
+# ... Writing char 157 ...
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 2361450000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 10001111
+# In --> raw crc is 8201 at time 2361450
+# In --> sent crc is be7f at time 2361450
+# In --> In task wait for response at time 2367498000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2367782000
+# In --> Decoder enabled at time 2368507000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2369294000
+# In --> bits received are 7
+# In --> ACK received at time 2369294000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 2372538000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2372906000
+# In --> Decoder enabled at time 2373636000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2375762000
+#
+# ... Reading the UART Status: 0000008f ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 2389590000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2389874000
+# In --> Decoder enabled at time 2390600000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2391386000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2394546000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2394914000
+# In --> Decoder enabled at time 2395643000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2400521000
+# In --> Data toggle recevied is 1001011 at time 2400605000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 2400605000.
+# In --> received raw crc is 24 at time 2400605000.
+# In --> received crc is ffdb at time 2400605000.
+# In --> tmpCrc ffdb, at time 2400605000
+# In --> sending ACK at time 2402526000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 2409078000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2409383000
+# In --> Decoder enabled at time 2410082000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2410895000
+# ... Write data 9d to UART done cnt : 36 ...
+#
+#
+# ... Writing char 150 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 2422770000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2423075000
+# In --> Decoder enabled at time 2423777000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2424587000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2427726000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2428115000
+# In --> Decoder enabled at time 2428818000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = f2
+# In --> receive data = 7e
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 8f
+# ... Read Data from UART done cnt : 22...
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 5e
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2433701000
+# In --> Data toggle recevied is 1001011 at time 2433785000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 11110010
+# In --> calculated crc is 8185 at time 2433785000.
+# In --> received raw crc is 8185 at time 2433785000.
+# In --> received crc is 7e5e at time 2433785000.
+# In --> tmpCrc 7e5e, at time 2433785000
+# In --> sending ACK at time 2435706000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 11110010 : 242
+# In --> In task wait for response at time 2442258000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2442563000
+# In --> Decoder enabled at time 2443260000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2444054000
+# CntrlTransType = 11
+# In --> In task wait for response at time 2455950000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2456234000
+# In --> Decoder enabled at time 2456952000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2457746000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 2460990000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 11110010
+# In --> raw crc is 8185 at time 2460990
+# In --> sent crc is 7e5e at time 2460990
+# In --> In task wait for response at time 2467038000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2467322000
+# In --> Decoder enabled at time 2468038000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2468834000
+# In --> bits received are 7
+# In --> ACK received at time 2468834000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 2472078000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2472446000
+# In --> Decoder enabled at time 2473168000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2475302000
+#
+# ... Reading the UART Status: 000000f2 ...
+# ... Write data 96 to UART done cnt : 37 ...
+#
+#
+# ... Writing char 19 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 2489130000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2489414000
+# In --> Decoder enabled at time 2490150000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2490947000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2494086000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2494475000
+# In --> Decoder enabled at time 2495175000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2500061000
+# In --> Data toggle recevied is 1001011 at time 2500145000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 2500145000.
+# In --> received raw crc is 24 at time 2500145000.
+# In --> received crc is ffdb at time 2500145000.
+# In --> tmpCrc ffdb, at time 2500145000
+# In --> sending ACK at time 2502066000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 2508618000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2508923000
+# In --> Decoder enabled at time 2509638000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2510435000
+# CntrlTransType = 10
+# In --> In task wait for response at time 2522310000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2522615000
+# In --> Decoder enabled at time 2523330000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2524127000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2527266000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2527655000
+# In --> Decoder enabled at time 2528349000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ce
+# In --> receive data = 7e
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 4f
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2533241000
+# In --> Data toggle recevied is 1001011 at time 2533325000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 11001110
+# In --> calculated crc is 810d at time 2533325000.
+# In --> received raw crc is 810d at time 2533325000.
+# In --> received crc is 7e4f at time 2533325000.
+# In --> tmpCrc 7e4f, at time 2533325000
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match f2
+# ... Read Data from UART done cnt : 23...
+# In --> sending ACK at time 2535246000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 11001110 : 206
+# In --> In task wait for response at time 2541798000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2542103000
+# In --> Decoder enabled at time 2542812000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2543615000
+# ... Write data 13 to UART done cnt : 38 ...
+#
+#
+# ... Writing char 13 ...
+# CntrlTransType = 11
+# In --> In task wait for response at time 2555490000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2555795000
+# In --> Decoder enabled at time 2556507000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2557307000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 2560530000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 11001110
+# In --> raw crc is 810d at time 2560530
+# In --> sent crc is 7e4f at time 2560530
+# In --> In task wait for response at time 2566578000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2566883000
+# In --> Decoder enabled at time 2567594000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2568395000
+# In --> bits received are 7
+# In --> ACK received at time 2568395000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 2571618000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2572007000
+# In --> Decoder enabled at time 2572718000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2574863000
+#
+# ... Reading the UART Status: 000000ce ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 2588670000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2588975000
+# In --> Decoder enabled at time 2589682000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2590487000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2593626000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2594015000
+# In --> Decoder enabled at time 2594725000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2599622000
+# In --> Data toggle recevied is 1001011 at time 2599706000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 2599706000.
+# In --> received raw crc is 24 at time 2599706000.
+# In --> received crc is ffdb at time 2599706000.
+# In --> tmpCrc ffdb, at time 2599706000
+# In --> sending ACK at time 2601606000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 2608158000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2608442000
+# In --> Decoder enabled at time 2609167000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2609954000
+# ... Write data 0d to UART done cnt : 39 ...
+#
+#
+# ... Writing char 83 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 2621850000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2622134000
+# In --> Decoder enabled at time 2622859000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2623646000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2626806000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2627174000
+# In --> Decoder enabled at time 2627905000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match ce
+# ... Read Data from UART done cnt : 24...
+# In --> receive data = 00
+# In --> receive data = e8
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 95
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2632865000
+# In --> Data toggle recevied is 1001011 at time 2632949000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 11101000
+# In --> calculated crc is 56 at time 2632949000.
+# In --> received raw crc is 56 at time 2632949000.
+# In --> received crc is ff95 at time 2632949000.
+# In --> tmpCrc ff95, at time 2632949000
+# In --> sending ACK at time 2634870000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 11101000 : 232
+# In --> In task wait for response at time 2641422000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2641727000
+# In --> Decoder enabled at time 2642428000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2643239000
+# CntrlTransType = 11
+# In --> In task wait for response at time 2655114000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2655419000
+# In --> Decoder enabled at time 2656119000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2656931000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 2660154000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 11101000
+# In --> raw crc is 56 at time 2660154
+# In --> sent crc is ff95 at time 2660154
+# In --> In task wait for response at time 2666286000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2666591000
+# In --> Decoder enabled at time 2667290000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2668103000
+# In --> bits received are 7
+# In --> ACK received at time 2668103000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 2671326000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2671715000
+# In --> Decoder enabled at time 2672416000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2674550000
+#
+# ... Reading the UART Status: 000000ea ...
+# ... Write data 53 to UART done cnt : 40 ...
+#
+# CntrlTransType = 10
+# In --> In task wait for response at time 2688378000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2688662000
+# In --> Decoder enabled at time 2689383000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2690174000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2693334000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2693702000
+# In --> Decoder enabled at time 2694423000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2699309000
+# In --> Data toggle recevied is 1001011 at time 2699393000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 2699393000.
+# In --> received raw crc is 24 at time 2699393000.
+# In --> received crc is ffdb at time 2699393000.
+# In --> tmpCrc ffdb, at time 2699393000
+# In --> sending ACK at time 2701314000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 2707866000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2708171000
+# In --> Decoder enabled at time 2708886000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2709683000
+# CntrlTransType = 10
+# In --> In task wait for response at time 2721558000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2721863000
+# In --> Decoder enabled at time 2722581000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2723375000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2726514000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2726903000
+# In --> Decoder enabled at time 2727601000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = c5
+# In --> receive data = 3f
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match e8
+# ... Read Data from UART done cnt : 25...
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 88
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2732489000
+# In --> Data toggle recevied is 1001011 at time 2732573000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 11000101
+# In --> calculated crc is 3ee at time 2732573000.
+# In --> received raw crc is 3ee at time 2732573000.
+# In --> received crc is 3f88 at time 2732573000.
+# In --> tmpCrc 3f88, at time 2732573000
+# In --> sending ACK at time 2734494000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 11000101 : 197
+# In --> In task wait for response at time 2741046000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2741351000
+# In --> Decoder enabled at time 2742064000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2742863000
+# CntrlTransType = 11
+# In --> In task wait for response at time 2754738000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2755043000
+# In --> Decoder enabled at time 2755755000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2756555000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 2759778000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 11000101
+# In --> raw crc is 3ee at time 2759778
+# In --> sent crc is 3f88 at time 2759778
+# In --> In task wait for response at time 2765826000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2766131000
+# In --> Decoder enabled at time 2766842000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2767643000
+# In --> bits received are 7
+# In --> ACK received at time 2767643000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 2770866000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2771255000
+# In --> Decoder enabled at time 2771972000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2774111000
+#
+# ... Reading the UART Status: 000000c7 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 2787918000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2788223000
+# In --> Decoder enabled at time 2788933000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2789735000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2792874000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2793179000
+# In --> Decoder enabled at time 2793893000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2798786000
+# In --> Data toggle recevied is 1001011 at time 2798870000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 2798870000.
+# In --> received raw crc is 24 at time 2798870000.
+# In --> received crc is ffdb at time 2798870000.
+# In --> tmpCrc ffdb, at time 2798870000
+# In --> sending ACK at time 2800770000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 2807322000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2807606000
+# In --> Decoder enabled at time 2808335000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2809139000
+# CntrlTransType = 10
+# In --> In task wait for response at time 2821014000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2821319000
+# In --> Decoder enabled at time 2822027000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2822831000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2825970000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2826275000
+# In --> Decoder enabled at time 2826987000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 5c
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = e2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2831882000
+# In --> Data toggle recevied is 1001011 at time 2831966000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 01011100
+# In --> calculated crc is b8 at time 2831966000.
+# In --> received raw crc is b8 at time 2831966000.
+# In --> received crc is ffe2 at time 2831966000.
+# In --> tmpCrc ffe2, at time 2831966000
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match c5
+# ... Read Data from UART done cnt : 26...
+# In --> sending ACK at time 2833866000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 01011100 : 92
+# In --> In task wait for response at time 2840418000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2840702000
+# In --> Decoder enabled at time 2841429000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2842214000
+# CntrlTransType = 11
+# In --> In task wait for response at time 2854110000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2854394000
+# In --> Decoder enabled at time 2855121000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2855906000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 2859150000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 01011100
+# In --> raw crc is b8 at time 2859150
+# In --> sent crc is ffe2 at time 2859150
+# In --> In task wait for response at time 2865198000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2865482000
+# In --> Decoder enabled at time 2866207000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2866994000
+# In --> bits received are 7
+# In --> ACK received at time 2866994000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 2870238000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2870606000
+# In --> Decoder enabled at time 2871337000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2873462000
+#
+# ... Reading the UART Status: 0000005e ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 2887290000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2887574000
+# In --> Decoder enabled at time 2888298000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2889086000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2892246000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2892614000
+# In --> Decoder enabled at time 2893344000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2898221000
+# In --> Data toggle recevied is 1001011 at time 2898305000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 2898305000.
+# In --> received raw crc is 24 at time 2898305000.
+# In --> received crc is ffdb at time 2898305000.
+# In --> tmpCrc ffdb, at time 2898305000
+# In --> sending ACK at time 2900226000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 2906778000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2907083000
+# In --> Decoder enabled at time 2907786000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2908595000
+# CntrlTransType = 10
+# In --> In task wait for response at time 2920470000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2920775000
+# In --> Decoder enabled at time 2921478000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2922287000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2925426000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2925815000
+# In --> Decoder enabled at time 2926518000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 5c
+# ... Read Data from UART done cnt : 27...
+# In --> receive data = 00
+# In --> receive data = bd
+# In --> receive data = 3f
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = aa
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2931401000
+# In --> Data toggle recevied is 1001011 at time 2931485000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 10111101
+# In --> calculated crc is 3aa at time 2931485000.
+# In --> received raw crc is 3aa at time 2931485000.
+# In --> received crc is 3faa at time 2931485000.
+# In --> tmpCrc 3faa, at time 2931485000
+# In --> sending ACK at time 2933406000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 10111101 : 189
+# In --> In task wait for response at time 2939958000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2940263000
+# In --> Decoder enabled at time 2940961000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2941754000
+# CntrlTransType = 11
+# In --> In task wait for response at time 2953650000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2953934000
+# In --> Decoder enabled at time 2954652000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2955446000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 2958690000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 10111101
+# In --> raw crc is 3aa at time 2958690
+# In --> sent crc is 3faa at time 2958690
+# In --> In task wait for response at time 2964738000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2965022000
+# In --> Decoder enabled at time 2965739000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2966534000
+# In --> bits received are 7
+# In --> ACK received at time 2966534000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 2969778000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2970146000
+# In --> Decoder enabled at time 2970869000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2973002000
+#
+# ... Reading the UART Status: 000000bf ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 2986830000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2987114000
+# In --> Decoder enabled at time 2987830000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2988626000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 2991786000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 2992154000
+# In --> Decoder enabled at time 2992876000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 2997761000
+# In --> Data toggle recevied is 1001011 at time 2997845000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 2997845000.
+# In --> received raw crc is 24 at time 2997845000.
+# In --> received crc is ffdb at time 2997845000.
+# In --> tmpCrc ffdb, at time 2997845000
+# In --> sending ACK at time 2999766000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 3006318000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3006623000
+# In --> Decoder enabled at time 3007339000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3008135000
+# CntrlTransType = 10
+# In --> In task wait for response at time 3020010000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3020315000
+# In --> Decoder enabled at time 3021028000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3021827000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3024966000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3025355000
+# In --> Decoder enabled at time 3026053000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 2d
+# In --> receive data = 3f
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match bd
+# ... Read Data from UART done cnt : 28...
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = c6
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3030941000
+# In --> Data toggle recevied is 1001011 at time 3031025000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00101101
+# In --> calculated crc is 39c at time 3031025000.
+# In --> received raw crc is 39c at time 3031025000.
+# In --> received crc is 3fc6 at time 3031025000.
+# In --> tmpCrc 3fc6, at time 3031025000
+# In --> sending ACK at time 3032946000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00101101 : 45
+# In --> In task wait for response at time 3039498000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3039803000
+# In --> Decoder enabled at time 3040516000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3041315000
+# CntrlTransType = 11
+# In --> In task wait for response at time 3053190000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3053495000
+# In --> Decoder enabled at time 3054208000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3055007000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 3058230000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 00101101
+# In --> raw crc is 39c at time 3058230
+# In --> sent crc is 3fc6 at time 3058230
+# In --> In task wait for response at time 3064278000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3064583000
+# In --> Decoder enabled at time 3065295000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3066095000
+# In --> bits received are 7
+# In --> ACK received at time 3066095000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 3069318000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3069623000
+# In --> Decoder enabled at time 3070338000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3072479000
+#
+# ... Reading the UART Status: 0000002f ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 3086286000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3086591000
+# In --> Decoder enabled at time 3087302000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3088103000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3091242000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3091547000
+# In --> Decoder enabled at time 3092262000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3097154000
+# In --> Data toggle recevied is 1001011 at time 3097238000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 3097238000.
+# In --> received raw crc is 24 at time 3097238000.
+# In --> received crc is ffdb at time 3097238000.
+# In --> tmpCrc ffdb, at time 3097238000
+# In --> sending ACK at time 3099138000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 3105690000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3105974000
+# In --> Decoder enabled at time 3106704000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3107486000
+# CntrlTransType = 10
+# In --> In task wait for response at time 3119382000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3119666000
+# In --> Decoder enabled at time 3120396000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3121178000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3124338000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3124706000
+# In --> Decoder enabled at time 3125439000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 65
+# In --> receive data = 3f
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = f0
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3130334000
+# In --> Data toggle recevied is 1001011 at time 3130418000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 01100101
+# In --> calculated crc is 3f0 at time 3130418000.
+# In --> received raw crc is 3f0 at time 3130418000.
+# In --> received crc is 3ff0 at time 3130418000.
+# In --> tmpCrc 3ff0, at time 3130418000
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 2d
+# ... Read Data from UART done cnt : 29...
+# In --> sending ACK at time 3132318000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 01100101 : 101
+# In --> In task wait for response at time 3138870000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3139154000
+# In --> Decoder enabled at time 3139878000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3140666000
+# CntrlTransType = 11
+# In --> In task wait for response at time 3152562000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3152846000
+# In --> Decoder enabled at time 3153573000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3154358000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 3157602000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 01100101
+# In --> raw crc is 3f0 at time 3157602
+# In --> sent crc is 3ff0 at time 3157602
+# In --> In task wait for response at time 3163650000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3163934000
+# In --> Decoder enabled at time 3164660000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3165446000
+# In --> bits received are 7
+# In --> ACK received at time 3165446000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 3168690000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3169058000
+# In --> Decoder enabled at time 3169784000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3171914000
+#
+# ... Reading the UART Status: 00000067 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 3185742000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3186026000
+# In --> Decoder enabled at time 3186748000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3187538000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3190698000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3191066000
+# In --> Decoder enabled at time 3191791000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3196673000
+# In --> Data toggle recevied is 1001011 at time 3196757000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 3196757000.
+# In --> received raw crc is 24 at time 3196757000.
+# In --> received crc is ffdb at time 3196757000.
+# In --> tmpCrc ffdb, at time 3196757000
+# In --> sending ACK at time 3198678000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 3205230000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3205535000
+# In --> Decoder enabled at time 3206233000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3207047000
+# CntrlTransType = 10
+# In --> In task wait for response at time 3218922000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3219227000
+# In --> Decoder enabled at time 3219925000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3220739000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3223878000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3224267000
+# In --> Decoder enabled at time 3224971000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 65
+# ... Read Data from UART done cnt : 30...
+# In --> receive data = 63
+# In --> receive data = bf
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = f2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3229853000
+# In --> Data toggle recevied is 1001011 at time 3229937000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 01100011
+# In --> calculated crc is 2b0 at time 3229937000.
+# In --> received raw crc is 2b0 at time 3229937000.
+# In --> received crc is bff2 at time 3229937000.
+# In --> tmpCrc bff2, at time 3229937000
+# In --> sending ACK at time 3231858000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 01100011 : 99
+# In --> In task wait for response at time 3238410000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3238715000
+# In --> Decoder enabled at time 3239413000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3240206000
+# CntrlTransType = 11
+# In --> In task wait for response at time 3252102000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3252386000
+# In --> Decoder enabled at time 3253105000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3253898000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 3257142000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 01100011
+# In --> raw crc is 2b0 at time 3257142
+# In --> sent crc is bff2 at time 3257142
+# In --> In task wait for response at time 3263190000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3263474000
+# In --> Decoder enabled at time 3264210000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3265007000
+# In --> bits received are 7
+# In --> ACK received at time 3265007000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 3268230000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3268619000
+# In --> Decoder enabled at time 3269316000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3271454000
+#
+# ... Reading the UART Status: 00000063 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 3285282000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3285566000
+# In --> Decoder enabled at time 3286303000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3287099000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3290238000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3290627000
+# In --> Decoder enabled at time 3291323000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3296213000
+# In --> Data toggle recevied is 1001011 at time 3296297000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 3296297000.
+# In --> received raw crc is 24 at time 3296297000.
+# In --> received crc is ffdb at time 3296297000.
+# In --> tmpCrc ffdb, at time 3296297000
+# In --> sending ACK at time 3298218000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 3304770000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3305075000
+# In --> Decoder enabled at time 3305786000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3306587000
+# CntrlTransType = 10
+# In --> In task wait for response at time 3318462000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3318767000
+# In --> Decoder enabled at time 3319477000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3320279000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3323418000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3323807000
+# In --> Decoder enabled at time 3324521000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 0a
+# In --> receive data = 7f
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = dc
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 63
+# ... Read Data from UART done cnt : 31...
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3329414000
+# In --> Data toggle recevied is 1001011 at time 3329498000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00001010
+# In --> calculated crc is 1c4 at time 3329498000.
+# In --> received raw crc is 1c4 at time 3329498000.
+# In --> received crc is 7fdc at time 3329498000.
+# In --> tmpCrc 7fdc, at time 3329498000
+# In --> sending ACK at time 3331398000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00001010 : 10
+# In --> In task wait for response at time 3337950000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3338234000
+# In --> Decoder enabled at time 3338963000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3339767000
+# CntrlTransType = 11
+# In --> In task wait for response at time 3351642000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3351947000
+# In --> Decoder enabled at time 3352655000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3353459000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 3356682000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 00001010
+# In --> raw crc is 1c4 at time 3356682
+# In --> sent crc is 7fdc at time 3356682
+# In --> In task wait for response at time 3362730000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3363035000
+# In --> Decoder enabled at time 3363742000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3364547000
+# In --> bits received are 7
+# In --> ACK received at time 3364547000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 3367770000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3368159000
+# In --> Decoder enabled at time 3368871000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3371015000
+#
+# ... Reading the UART Status: 0000000a ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 3384822000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3385127000
+# In --> Decoder enabled at time 3385835000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3386639000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3389778000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3390167000
+# In --> Decoder enabled at time 3390875000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3395774000
+# In --> Data toggle recevied is 1001011 at time 3395858000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 3395858000.
+# In --> received raw crc is 24 at time 3395858000.
+# In --> received crc is ffdb at time 3395858000.
+# In --> tmpCrc ffdb, at time 3395858000
+# In --> sending ACK at time 3397758000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 3404310000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3404594000
+# In --> Decoder enabled at time 3405317000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3406106000
+# CntrlTransType = 10
+# In --> In task wait for response at time 3418002000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3418286000
+# In --> Decoder enabled at time 3419009000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3419798000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3422958000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3423326000
+# In --> Decoder enabled at time 3424053000 in host
+# In --> receive data = 4b
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 0a
+# ... Read Data from UART done cnt : 32...
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 80
+# In --> receive data = fe
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 7b
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3428933000
+# In --> Data toggle recevied is 1001011 at time 3429017000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 10000000
+# In --> calculated crc is 8021 at time 3429017000.
+# In --> received raw crc is 8021 at time 3429017000.
+# In --> received crc is fe7b at time 3429017000.
+# In --> tmpCrc fe7b, at time 3429017000
+# In --> sending ACK at time 3430938000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 10000000 : 128
+# In --> In task wait for response at time 3437490000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3437795000
+# In --> Decoder enabled at time 3438495000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3439307000
+# CntrlTransType = 11
+# In --> In task wait for response at time 3451182000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3451487000
+# In --> Decoder enabled at time 3452187000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3452999000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 3456222000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 10000000
+# In --> raw crc is 8021 at time 3456222
+# In --> sent crc is fe7b at time 3456222
+# In --> In task wait for response at time 3462270000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3462575000
+# In --> Decoder enabled at time 3463273000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3464087000
+# In --> bits received are 7
+# In --> ACK received at time 3464087000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 3467310000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3467699000
+# In --> Decoder enabled at time 3468403000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3470534000
+#
+# ... Reading the UART Status: 00000082 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 3484362000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3484646000
+# In --> Decoder enabled at time 3485364000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3486158000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3489318000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3489686000
+# In --> Decoder enabled at time 3490410000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3495293000
+# In --> Data toggle recevied is 1001011 at time 3495377000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 3495377000.
+# In --> received raw crc is 24 at time 3495377000.
+# In --> received crc is ffdb at time 3495377000.
+# In --> tmpCrc ffdb, at time 3495377000
+# In --> sending ACK at time 3497298000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 3503850000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3504155000
+# In --> Decoder enabled at time 3504873000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3505667000
+# CntrlTransType = 10
+# In --> In task wait for response at time 3517542000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3517847000
+# In --> Decoder enabled at time 3518565000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3519359000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3522498000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3522887000
+# In --> Decoder enabled at time 3523584000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 80
+# ... Read Data from UART done cnt : 33...
+# In --> receive data = 20
+# In --> receive data = fe
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 03
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3528473000
+# In --> Data toggle recevied is 1001011 at time 3528557000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00100000
+# In --> calculated crc is 803f at time 3528557000.
+# In --> received raw crc is 803f at time 3528557000.
+# In --> received crc is fe03 at time 3528557000.
+# In --> tmpCrc fe03, at time 3528557000
+# In --> sending ACK at time 3530478000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00100000 : 32
+# In --> In task wait for response at time 3537030000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3537335000
+# In --> Decoder enabled at time 3538047000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3538847000
+# CntrlTransType = 11
+# In --> In task wait for response at time 3550722000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3551027000
+# In --> Decoder enabled at time 3551742000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3552539000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 3555762000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 00100000
+# In --> raw crc is 803f at time 3555762
+# In --> sent crc is fe03 at time 3555762
+# In --> In task wait for response at time 3561810000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3562115000
+# In --> Decoder enabled at time 3562829000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3563627000
+# In --> bits received are 7
+# In --> ACK received at time 3563627000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 3566850000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3567239000
+# In --> Decoder enabled at time 3567953000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3570095000
+#
+# ... Reading the UART Status: 00000022 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 3583902000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3584207000
+# In --> Decoder enabled at time 3584917000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3585719000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3588858000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3589163000
+# In --> Decoder enabled at time 3589876000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3594770000
+# In --> Data toggle recevied is 1001011 at time 3594854000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 3594854000.
+# In --> received raw crc is 24 at time 3594854000.
+# In --> received crc is ffdb at time 3594854000.
+# In --> tmpCrc ffdb, at time 3594854000
+# In --> sending ACK at time 3596754000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 3603306000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3603590000
+# In --> Decoder enabled at time 3604319000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3605123000
+# CntrlTransType = 10
+# In --> In task wait for response at time 3616998000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3617303000
+# In --> Decoder enabled at time 3618010000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3618815000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3621954000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3622343000
+# In --> Decoder enabled at time 3623054000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = aa
+# In --> receive data = 7f
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = a4
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3627950000
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 20
+# ... Read Data from UART done cnt : 34...
+# In --> Data toggle recevied is 1001011 at time 3628034000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 10101010
+# In --> calculated crc is 1da at time 3628034000.
+# In --> received raw crc is 1da at time 3628034000.
+# In --> received crc is 7fa4 at time 3628034000.
+# In --> tmpCrc 7fa4, at time 3628034000
+# In --> sending ACK at time 3629934000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 10101010 : 170
+# In --> In task wait for response at time 3636486000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3636770000
+# In --> Decoder enabled at time 3637496000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3638282000
+# CntrlTransType = 11
+# In --> In task wait for response at time 3650178000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3650462000
+# In --> Decoder enabled at time 3651188000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3651974000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 3655218000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 10101010
+# In --> raw crc is 1da at time 3655218
+# In --> sent crc is 7fa4 at time 3655218
+# In --> In task wait for response at time 3661266000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3661550000
+# In --> Decoder enabled at time 3662275000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3663062000
+# In --> bits received are 7
+# In --> ACK received at time 3663062000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 3666306000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3666674000
+# In --> Decoder enabled at time 3667404000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3669530000
+#
+# ... Reading the UART Status: 000000aa ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 3683358000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3683642000
+# In --> Decoder enabled at time 3684368000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3685154000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3688314000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3688682000
+# In --> Decoder enabled at time 3689408000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3694289000
+# In --> Data toggle recevied is 1001011 at time 3694373000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 3694373000.
+# In --> received raw crc is 24 at time 3694373000.
+# In --> received crc is ffdb at time 3694373000.
+# In --> tmpCrc ffdb, at time 3694373000
+# In --> sending ACK at time 3696294000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 3702846000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3703151000
+# In --> Decoder enabled at time 3703850000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3704663000
+# CntrlTransType = 10
+# In --> In task wait for response at time 3716538000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3716843000
+# In --> Decoder enabled at time 3717542000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3718355000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3721494000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3721883000
+# In --> Decoder enabled at time 3722586000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match aa
+# ... Read Data from UART done cnt : 35...
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 9d
+# In --> receive data = 3e
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 72
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3727385000
+# In --> Data toggle recevied is 1001011 at time 3727469000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 10011101
+# In --> calculated crc is 83b1 at time 3727469000.
+# In --> received raw crc is 83b1 at time 3727469000.
+# In --> received crc is 3e72 at time 3727469000.
+# In --> tmpCrc 3e72, at time 3727469000
+# In --> sending ACK at time 3729390000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 10011101 : 157
+# In --> In task wait for response at time 3735942000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3736247000
+# In --> Decoder enabled at time 3736944000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3737738000
+# CntrlTransType = 11
+# In --> In task wait for response at time 3749634000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3749918000
+# In --> Decoder enabled at time 3750639000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3751430000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 3754674000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 10011101
+# In --> raw crc is 83b1 at time 3754674
+# In --> sent crc is 3e72 at time 3754674
+# In --> In task wait for response at time 3760638000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3760922000
+# In --> Decoder enabled at time 3761640000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3762434000
+# In --> bits received are 7
+# In --> ACK received at time 3762434000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 3765678000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3766046000
+# In --> Decoder enabled at time 3766766000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3768902000
+#
+# ... Reading the UART Status: 0000009f ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 3782730000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3783014000
+# In --> Decoder enabled at time 3783733000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3784526000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3787686000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3788054000
+# In --> Decoder enabled at time 3788773000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3793661000
+# In --> Data toggle recevied is 1001011 at time 3793745000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 3793745000.
+# In --> received raw crc is 24 at time 3793745000.
+# In --> received crc is ffdb at time 3793745000.
+# In --> tmpCrc ffdb, at time 3793745000
+# In --> sending ACK at time 3795666000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 3802218000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3802523000
+# In --> Decoder enabled at time 3803236000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3804035000
+# CntrlTransType = 10
+# In --> In task wait for response at time 3815910000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3816215000
+# In --> Decoder enabled at time 3816931000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3817727000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3820866000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3821255000
+# In --> Decoder enabled at time 3821951000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 96
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 9d
+# ... Read Data from UART done cnt : 36...
+# In --> receive data = 7f
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = b5
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3826841000
+# In --> Data toggle recevied is 1001011 at time 3826925000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 10010110
+# In --> calculated crc is 152 at time 3826925000.
+# In --> received raw crc is 152 at time 3826925000.
+# In --> received crc is 7fb5 at time 3826925000.
+# In --> tmpCrc 7fb5, at time 3826925000
+# In --> sending ACK at time 3828846000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 10010110 : 150
+# In --> In task wait for response at time 3835398000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3835703000
+# In --> Decoder enabled at time 3836414000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3837215000
+# CntrlTransType = 11
+# In --> In task wait for response at time 3849090000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3849395000
+# In --> Decoder enabled at time 3850106000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3850907000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 3854130000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 10010110
+# In --> raw crc is 152 at time 3854130
+# In --> sent crc is 7fb5 at time 3854130
+# In --> In task wait for response at time 3860178000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3860483000
+# In --> Decoder enabled at time 3861192000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3861995000
+# In --> bits received are 7
+# In --> ACK received at time 3861995000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 3865218000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3865523000
+# In --> Decoder enabled at time 3866236000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3868379000
+#
+# ... Reading the UART Status: 00000096 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 3882186000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3882491000
+# In --> Decoder enabled at time 3883199000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3884003000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3887142000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3887447000
+# In --> Decoder enabled at time 3888159000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3893054000
+# In --> Data toggle recevied is 1001011 at time 3893138000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 3893138000.
+# In --> received raw crc is 24 at time 3893138000.
+# In --> received crc is ffdb at time 3893138000.
+# In --> tmpCrc ffdb, at time 3893138000
+# In --> sending ACK at time 3895038000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 3901590000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3901874000
+# In --> Decoder enabled at time 3902602000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3903386000
+# CntrlTransType = 10
+# In --> In task wait for response at time 3915282000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3915566000
+# In --> Decoder enabled at time 3916293000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3917078000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3920238000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3920606000
+# In --> Decoder enabled at time 3921337000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 13
+# In --> receive data = be
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 16
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3926150000
+# In --> Data toggle recevied is 1001011 at time 3926234000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00010011
+# In --> calculated crc is 8297 at time 3926234000.
+# In --> received raw crc is 8297 at time 3926234000.
+# In --> received crc is be16 at time 3926234000.
+# In --> tmpCrc be16, at time 3926234000
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 96
+# ... Read Data from UART done cnt : 37...
+# In --> sending ACK at time 3928134000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00010011 : 19
+# In --> In task wait for response at time 3934686000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3934970000
+# In --> Decoder enabled at time 3935695000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3936482000
+# CntrlTransType = 11
+# In --> In task wait for response at time 3948378000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3948662000
+# In --> Decoder enabled at time 3949387000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3950174000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 3953418000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 00010011
+# In --> raw crc is 8297 at time 3953418
+# In --> sent crc is be16 at time 3953418
+# In --> In task wait for response at time 3959382000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3959666000
+# In --> Decoder enabled at time 3960391000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3961178000
+# In --> bits received are 7
+# In --> ACK received at time 3961178000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 3964422000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3964790000
+# In --> Decoder enabled at time 3965517000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3967646000
+#
+# ... Reading the UART Status: 00000013 ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 3981474000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3981758000
+# In --> Decoder enabled at time 3982484000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3983270000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 3986430000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 3986798000
+# In --> Decoder enabled at time 3987525000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 3992405000
+# In --> Data toggle recevied is 1001011 at time 3992489000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 3992489000.
+# In --> received raw crc is 24 at time 3992489000.
+# In --> received crc is ffdb at time 3992489000.
+# In --> tmpCrc ffdb, at time 3992489000
+# In --> sending ACK at time 3994410000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 4000962000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4001267000
+# In --> Decoder enabled at time 4001967000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4002779000
+# CntrlTransType = 10
+# In --> In task wait for response at time 4014654000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4014959000
+# In --> Decoder enabled at time 4015659000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4016471000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 4019610000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4019999000
+# In --> Decoder enabled at time 4020702000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 13
+# ... Read Data from UART done cnt : 38...
+# In --> receive data = 00
+# In --> receive data = 0d
+# In --> receive data = 3e
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 1e
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4025501000
+# In --> Data toggle recevied is 1001011 at time 4025585000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00001101
+# In --> calculated crc is 8387 at time 4025585000.
+# In --> received raw crc is 8387 at time 4025585000.
+# In --> received crc is 3e1e at time 4025585000.
+# In --> tmpCrc 3e1e, at time 4025585000
+# In --> sending ACK at time 4027506000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00001101 : 13
+# In --> In task wait for response at time 4034058000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4034363000
+# In --> Decoder enabled at time 4035061000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4035854000
+# CntrlTransType = 11
+# In --> In task wait for response at time 4047750000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4048034000
+# In --> Decoder enabled at time 4048752000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4049546000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 4052790000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 00001101
+# In --> raw crc is 8387 at time 4052790
+# In --> sent crc is 3e1e at time 4052790
+# In --> In task wait for response at time 4058754000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4059038000
+# In --> Decoder enabled at time 4059759000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4060550000
+# In --> bits received are 7
+# In --> ACK received at time 4060550000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 4063794000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4064162000
+# In --> Decoder enabled at time 4064883000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4067018000
+#
+# ... Reading the UART Status: 0000000f ...
+# CntrlTransType = 10
+# In --> In task wait for response at time 4080846000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4081130000
+# In --> Decoder enabled at time 4081846000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4082642000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 4085802000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4086170000
+# In --> Decoder enabled at time 4086890000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = ff
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = db
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4091777000
+# In --> Data toggle recevied is 1001011 at time 4091861000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 00000000
+# In --> calculated crc is 24 at time 4091861000.
+# In --> received raw crc is 24 at time 4091861000.
+# In --> received crc is ffdb at time 4091861000.
+# In --> tmpCrc ffdb, at time 4091861000
+# In --> sending ACK at time 4093782000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 00000000 : 0
+# In --> In task wait for response at time 4100334000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4100639000
+# In --> Decoder enabled at time 4101353000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4102151000
+# CntrlTransType = 10
+# In --> In task wait for response at time 4114026000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4114331000
+# In --> Decoder enabled at time 4115044000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4115843000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# CntrlTransType = 10
+# In --> In task wait for response at time 4118982000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4119371000
+# In --> Decoder enabled at time 4120067000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 00
+# In --> receive data = 53
+# In --> receive data = bf
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 0d
+# ... Read Data from UART done cnt : 39...
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = e6
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4124957000
+# In --> Data toggle recevied is 1001011 at time 4125041000
+# In --> received byte[1] = 00000000
+# In --> received byte[2] = 00000000
+# In --> received byte[3] = 00000000
+# In --> received byte[4] = 01010011
+# In --> calculated crc is 298 at time 4125041000.
+# In --> received raw crc is 298 at time 4125041000.
+# In --> received crc is bfe6 at time 4125041000.
+# In --> tmpCrc bfe6, at time 4125041000
+# In --> sending ACK at time 4126962000
+# RecvBuffer[0] = 00000000 : 0
+# RecvBuffer[1] = 00000000 : 0
+# RecvBuffer[2] = 00000000 : 0
+# RecvBuffer[3] = 01010011 : 83
+# In --> In task wait for response at time 4133514000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4133819000
+# In --> Decoder enabled at time 4134530000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4135331000
+# CntrlTransType = 11
+# In --> In task wait for response at time 4147206000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4147511000
+# In --> Decoder enabled at time 4148222000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4149023000
+# In --> in_out_buf[0] = 11010010, in_out_buf_ptr = 1
+# In host --> address = 01, EndPt = 0, crc5 = 1d, tmpReg = e801
+# In --> DataToggle is 1
+# In --> DataToggle is 4b at time 4152246000.
+# In --> sending byte[1] = 00000000
+# In --> sending byte[2] = 00000000
+# In --> sending byte[3] = 00000000
+# In --> sending byte[4] = 01010011
+# In --> raw crc is 298 at time 4152246
+# In --> sent crc is bfe6 at time 4152246
+# In --> In task wait for response at time 4158294000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4158599000
+# In --> Decoder enabled at time 4159309000 in host
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = d2
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4160111000
+# In --> bits received are 7
+# In --> ACK received at time 4160111000.
+# Input Address:01, EndPt:0
+# i : 1, CntrlTransType:3; CntrlTransAddr:01;CntrlTransEndP:0
+# In CntrlTransType = 11, WRITE = 11
+# In --> In task wait for response at time 4163334000
+# In --> DPLS = 0 , DeviceSpeed = 1 at time 4163639000
+# In --> Decoder enabled at time 4164352000 in host
+# In --> receive data = 4b
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> receive data = 00
+# In --> StopTime = x, SE0StartTime = x
+# In --> EOP asserted for 2 bit time at time 4166495000
+# (tb.u_uart_agent.read_char_chk.loop_2) Data match 53
+# ... Read Data from UART done cnt : 40...
+# -------------------- Reporting Configuration --------------------
+# Data bit number setting is : 8
+# Stop bit number setting is : 1
+# Divisor of Uart clock is : 15
+# Parity is enable
+# Even parity setting
+# FIFO mode is disable
+# -----------------------------------------------------------------
+# -------------------- Reporting Status --------------------
+#
+# Number of character received is : 40
+# Number of character sent is : 40
+# Number of parity error rxd is : 0
+# Number of stop1 error rxd is : 0
+# Number of stop2 error rxd is : 0
+# Number of timeout error is : 0
+# Number of error is : 0
+# -----------------------------------------------------------------
+# ** Note: $finish : ../tb/tb.v(246)
+# Time: 4225639240 ps Iteration: 0 Instance: /tb
Index: usb2uart/trunk/verify/log/compile.log
===================================================================
--- usb2uart/trunk/verify/log/compile.log (nonexistent)
+++ usb2uart/trunk/verify/log/compile.log (revision 3)
@@ -0,0 +1,53 @@
+** Note: (vlog-1901) OptionFile "//dm5/sqatest5/releases/production/Mentor/ModelSim/pc/modelsim_AE_10.1b/modeltech/win32acoem/vlog.opt" not found. Ignored.
+
+Model Technology ModelSim ACTEL vlog 10.1b Compiler 2012.04 Apr 27 2012
+-- Compiling module tb
+-- Compiling module test_control
+-- Compiling module uart_agent
+-- Compiling module usb_agent
+-- Compiling module host_usb_bfm
+-- Compiling module usb_bfm_decoder
+-- Compiling module usb_bfm_encoder
+-- Compiling module usb_bfm_dpll
+-- Compiling module usb_bfm_clk_switch
+-- Compiling module usb_bfm_nrzi2nrz
+-- Compiling module usb_bfm_ph_detect
+-- Compiling module usb_bfm_pulse_puller
+-- Compiling module usb1_core
+-- Compiling module usb1_crc16
+-- Compiling module usb1_crc5
+-- Compiling module usb1_ctrl
+-- Compiling module usb1_fifo2
+-- Compiling module usb1_idma
+-- Compiling module usb1_pa
+-- Compiling module usb1_pd
+-- Compiling module usb1_pe
+-- Compiling module usb1_pl
+-- Compiling module usb1_rom1
+-- Compiling module usb1_utmi_if
+-- Compiling module usb_phy
+-- Compiling module usb_rx_phy
+-- Compiling module usb_tx_phy
+-- Compiling module generic_fifo_sc_a
+-- Compiling module generic_dpram
+-- Compiling module sync_fifo
+-- Compiling module async_fifo
+-- Compiling module uart_core
+-- Compiling module uart_txfsm
+-- Compiling module uart_rxfsm
+-- Compiling module uart_cfg
+-- Compiling module clk_ctl
+-- Compiling module double_sync_high
+-- Compiling module double_sync_low
+-- Compiling module bit_register
+-- Compiling module req_register
+-- Compiling module stat_register
+-- Compiling module generic_register
+-- Compiling module generic_intr_stat_reg
+-- Compiling module core
+
+Top level modules:
+ tb
+ double_sync_high
+ req_register
+ generic_intr_stat_reg
Index: usb2uart/trunk/verify/tests/usb_test3.v
===================================================================
--- usb2uart/trunk/verify/tests/usb_test3.v (nonexistent)
+++ usb2uart/trunk/verify/tests/usb_test3.v (revision 3)
@@ -0,0 +1,114 @@
+`define usbbfm tb.u_usb_agent.bfm_inst
+task usb_test3;
+
+reg [6:0] address;
+reg [3:0] endpt;
+reg [3:0] Status;
+reg [31:0] ByteCount;
+reg [31:0] ReadData;
+integer i,j,k;
+
+
+reg [1:0] data_bit ;
+reg stop_bits ; // 0: 1 stop bit; 1: 2 stop bit;
+reg stick_parity ; // 1: force even parity
+reg parity_en ; // parity enable
+reg even_odd_parity ; // 0: odd parity; 1: even parity
+reg [15:0] divisor ; // divided by (n+1) * 16
+reg [15:0] timeout ;// wait time limit
+reg fifo_enable ; // fifo mode disable
+
+reg [7:0] write_data [0:39];
+reg [15:0] rx_nu;
+reg [15:0] tx_nu;
+
+
+parameter MYACK = 4'b0000,
+ MYNAK = 4'b0001,
+ MYSTALL = 4'b0010,
+ MYTOUT = 4'b0011,
+ MYIVRES = 4'b0100,
+ MYCRCER = 4'b0101;
+
+ begin
+ address = 7'b000_0001;
+ endpt = 4'b0000;
+
+ $display("%0d: USB Reset -----", $time);
+ `usbbfm.usb_reset(48);
+
+ $display("%0d: Set Address = 1 -----", $time);
+ `usbbfm.SetAddress (address);
+ `usbbfm.setup(7'h00, 4'h0, Status);
+ `usbbfm.printstatus(Status, MYACK);
+ `usbbfm.status_IN(7'h00, endpt, Status);
+ `usbbfm.printstatus(Status, MYACK);
+ #5000;
+
+ $display("%0d: Set configuration -----", $time);
+ `usbbfm.SetConfiguration(2'b01);
+ `usbbfm.setup(address, 4'b0000, Status);
+ `usbbfm.printstatus(Status, MYACK);
+ `usbbfm.status_IN(address, 4'b0000, Status);
+ `usbbfm.printstatus(Status, MYACK);
+ #2000;
+
+ $display("%0d: Configuration done !!!!!!", $time);
+
+ // write UART registers through USB
+
+ //////////////////////////////////////////////////////////////////
+ data_bit = 2'b11;
+ stop_bits = 0; // 0: 1 stop bit; 1: 2 stop bit;
+ stick_parity = 0; // 1: force even parity
+ parity_en = 1; // parity enable
+ even_odd_parity = 1; // 0: odd parity; 1: even parity
+ divisor = 15; // divided by (n+1) * 16
+ timeout = 500;// wait time limit
+ fifo_enable = 0; // fifo mode disable
+
+ tb.u_uart_agent.uart_init;
+ `usbbfm.VenRegWordWr (address, 32'h0, {27'h0,2'b10,1'b1,1'b1,1'b1});
+ // Baud Clock 16x, Master Clock/ (2+cfg_value)
+ `usbbfm.VenRegWordWr (address, 32'h8, divisor-1);
+ tb.u_uart_agent.control_setup (data_bit, stop_bits, parity_en, even_odd_parity, stick_parity, timeout, divisor, fifo_enable);
+
+ for (i=0; i<40; i=i+1)
+ write_data[i] = $random;
+
+ fork
+ begin
+ for (i=0; i<40; i=i+1)
+ begin
+ $display ("\n... Writing char %d ...", write_data[i]);
+ tb.u_uart_agent.write_char (write_data[i]);
+ end
+ end
+
+ begin
+ for (j=0; j<40; j=j+1)
+ begin
+ tb.u_uart_agent.read_char_chk(write_data[j]);
+ end
+ end
+
+ // Read through the USB and check the UART RX Fifo Status;
+ // If Available, then loop it back
+ begin
+ for (k=0; k<40; k=k+1)
+ begin
+ ReadData[1]= 1'b1;
+ while(ReadData[1] == 1'b1 ) begin // Check for UART RX fifo not empty
+ $display ("\n... Reading the UART Status: %x ...", ReadData);
+ `usbbfm.VenRegWordRd (address, 32'hC, ReadData);
+ end
+ `usbbfm.VenRegWordRd (address, 32'h14, ReadData); // Read the UART RXD Data
+ `usbbfm.VenRegWordWr (address, 32'h10, ReadData); // Write Back to UART TXD
+ end
+ end
+ join
+
+ #100
+ tb.u_uart_agent.report_status(rx_nu, tx_nu);
+end
+endtask
usb2uart/trunk/verify/tests/usb_test3.v
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: usb2uart/trunk/verify/tests/usb_test1.v
===================================================================
--- usb2uart/trunk/verify/tests/usb_test1.v (nonexistent)
+++ usb2uart/trunk/verify/tests/usb_test1.v (revision 3)
@@ -0,0 +1,56 @@
+`define usbbfm tb.u_usb_agent.bfm_inst
+task usb_test1;
+
+reg [6:0] address;
+reg [3:0] endpt;
+reg [3:0] Status;
+reg [31:0] ByteCount;
+
+integer i,j;
+reg [7:0] startbyte;
+reg [15:0] mask;
+integer MaxPktSize;
+reg [3:0] PackType;
+
+
+parameter MYACK = 4'b0000,
+ MYNAK = 4'b0001,
+ MYSTALL = 4'b0010,
+ MYTOUT = 4'b0011,
+ MYIVRES = 4'b0100,
+ MYCRCER = 4'b0101;
+
+
+
+ begin
+
+
+ $display("%0d: USB Reset -----", $time);
+ tb.u_usb_agent.bfm_inst.usb_reset(48);
+
+ address = 1;
+ endpt = 0;
+ $display("%0d: Set Address = %x -----", $time,address);
+ `usbbfm.SetAddress (address);
+ $display("%0d: Sending Setup Command ", $time);
+ `usbbfm.setup(7'h00, 4'h0, Status);
+ `usbbfm.printstatus(Status, MYACK);
+ $display("%0d: Sending Status Command ", $time);
+ `usbbfm.status_IN(7'h00, endpt, Status);
+ `usbbfm.printstatus(Status, MYACK);
+ #5000;
+
+ $display("%0d: Set configuration -----", $time);
+ `usbbfm.SetConfiguration(2'b01);
+ `usbbfm.setup(address, 4'b0000, Status);
+ `usbbfm.printstatus(Status, MYACK);
+ `usbbfm.status_IN(address, 4'b0000, Status);
+ `usbbfm.printstatus(Status, MYACK);
+ #2000;
+
+ $display("%0d: Configuration done !!!!!!", $time);
+ tb.test_control.finish_test;
+
+ end
+
+endtask
usb2uart/trunk/verify/tests/usb_test1.v
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: usb2uart/trunk/verify/tests/usb_test2.v
===================================================================
--- usb2uart/trunk/verify/tests/usb_test2.v (nonexistent)
+++ usb2uart/trunk/verify/tests/usb_test2.v (revision 3)
@@ -0,0 +1,70 @@
+`define usbbfm tb.u_usb_agent.bfm_inst
+task usb_test2;
+
+reg [6:0] address;
+reg [3:0] endpt;
+reg [3:0] Status;
+ reg [31:0] ByteCount;
+
+ integer i,j;
+ reg [7:0] startbyte;
+ reg [15:0] mask;
+ integer MaxPktSize;
+ reg [3:0] PackType;
+
+
+parameter MYACK = 4'b0000,
+ MYNAK = 4'b0001,
+ MYSTALL = 4'b0010,
+ MYTOUT = 4'b0011,
+ MYIVRES = 4'b0100,
+ MYCRCER = 4'b0101;
+
+ begin
+ address = 7'b000_0001;
+ endpt = 4'b0000;
+
+ $display("%0d: USB Reset -----", $time);
+ `usbbfm.usb_reset(48);
+
+ $display("%0d: Set Address = 1 -----", $time);
+ `usbbfm.SetAddress (address);
+ `usbbfm.setup(7'h00, 4'h0, Status);
+ `usbbfm.printstatus(Status, MYACK);
+ `usbbfm.status_IN(7'h00, endpt, Status);
+ `usbbfm.printstatus(Status, MYACK);
+ #5000;
+
+ $display("%0d: Set configuration -----", $time);
+ `usbbfm.SetConfiguration(2'b01);
+ `usbbfm.setup(address, 4'b0000, Status);
+ `usbbfm.printstatus(Status, MYACK);
+ `usbbfm.status_IN(address, 4'b0000, Status);
+ `usbbfm.printstatus(Status, MYACK);
+ #2000;
+
+ $display("%0d: Configuration done !!!!!!", $time);
+
+ // write UART registers through USB
+
+ //////////////////////////////////////////////////////////////////
+
+
+ // register word write
+ $display("%0d: Performing Register Word Write------------", $time);
+ `usbbfm.VenRegWordWr (address, 32'h8, 32'h123);
+ #500;
+
+ // register word Read
+ $display("%0d: Performing Register Word Read------------", $time);
+ `usbbfm.VenRegWordRdCmp (address, 32'h8, 32'h123, ByteCount);
+ #500
+
+
+
+ $display ("USB doing register writes and reads to USB block end \n");
+
+ tb.test_control.finish_test;
+ end
+
+endtask
usb2uart/trunk/verify/tests/usb_test2.v
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: usb2uart/trunk/verify/run/filelist.f
===================================================================
--- usb2uart/trunk/verify/run/filelist.f (nonexistent)
+++ usb2uart/trunk/verify/run/filelist.f (revision 3)
@@ -0,0 +1,39 @@
++define+USBF_DEBUG \
++defin+USB_VERBOSE_DEBUG \
+-l ../log/complile.log \
++incdir+../../rtl/usb1_core \
++incdir+../tests \
++incdir+../../rtl/lib \
+timescale.v \
+../tb/tb.v \
+../tb/test_control.v \
+../agents/uart/uart_agent.v \
+../agents/usb/usb_agent.v \
+../../rtl/usb1_core/usb1_core.v \
+../../rtl/usb1_core/usb1_crc16.v \
+../../rtl/usb1_core/usb1_crc5.v \
+../../rtl/usb1_core/usb1_ctrl.v \
+../../rtl/usb1_core/usb1_fifo2.v \
+../../rtl/usb1_core/usb1_idma.v \
+../../rtl/usb1_core/usb1_pa.v \
+../../rtl/usb1_core/usb1_pd.v \
+../../rtl/usb1_core/usb1_pe.v \
+../../rtl/usb1_core/usb1_pl.v \
+../../rtl/usb1_core/usb1_rom1.v \
+../../rtl/usb1_core/usb1_utmi_if.v \
+../../rtl/usb1_phy/usb_phy.v \
+../../rtl/usb1_phy/usb_rx_phy.v \
+../../rtl/usb1_phy/usb_tx_phy.v \
+../../rtl/lib/generic_fifo_sc_a.v \
+../../rtl/lib/generic_dpram.v \
+../../rtl/lib/sync_fifo.v \
+../../rtl/lib/async_fifo.v \
+../../rtl/uart_core/uart_core.v \
+../../rtl/uart_core/uart_txfsm.v \
+../../rtl/uart_core/uart_rxfsm.v \
+../../rtl/uart_core/uart_cfg.v \
+../../rtl/lib/clk_ctl.v \
+../../rtl/lib/double_sync_high.v \
+../../rtl/lib/double_sync_low.v \
+../../rtl/lib/registers.v \
+../../rtl/core/core.v
usb2uart/trunk/verify/run/filelist.f
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: usb2uart/trunk/verify/run/modelsim.do
===================================================================
--- usb2uart/trunk/verify/run/modelsim.do (nonexistent)
+++ usb2uart/trunk/verify/run/modelsim.do (revision 3)
@@ -0,0 +1 @@
+run -all
usb2uart/trunk/verify/run/modelsim.do
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: usb2uart/trunk/verify/run/timescale.v
===================================================================
--- usb2uart/trunk/verify/run/timescale.v (nonexistent)
+++ usb2uart/trunk/verify/run/timescale.v (revision 3)
@@ -0,0 +1 @@
+`timescale 1ns / 10ps
usb2uart/trunk/verify/run/timescale.v
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: usb2uart/trunk/verify/run/readme
===================================================================
--- usb2uart/trunk/verify/run/readme (nonexistent)
+++ usb2uart/trunk/verify/run/readme (revision 3)
@@ -0,0 +1,4 @@
+1. To run the simulation
+ ./run_modelsim
+ Result: simulation log file available at ./log/run.log
+ Test : 40 character is loop-back through UART
usb2uart/trunk/verify/run/readme
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: usb2uart/trunk/verify/run/run_modelsim
===================================================================
--- usb2uart/trunk/verify/run/run_modelsim (nonexistent)
+++ usb2uart/trunk/verify/run/run_modelsim (revision 3)
@@ -0,0 +1,15 @@
+#!/bin/csh
+#
+# test for uart
+#
+
+echo " Compiling with MODELSIM "
+
+if(! -e work) then
+ vlib work
+endif
+
+vlog -work work -f filelist.f | tee ../log/compile.log
+
+
+vsim -do modelsim.do -c tb | tee ../log/run.log
usb2uart/trunk/verify/run/run_modelsim
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: usb2uart/trunk/verify/tb/test_control.v
===================================================================
--- usb2uart/trunk/verify/tb/test_control.v (nonexistent)
+++ usb2uart/trunk/verify/tb/test_control.v (revision 3)
@@ -0,0 +1,82 @@
+
+module test_control();
+
+ event error_detected;
+ integer error_count;
+ reg verbose_msg;
+
+ // initialize debug variables
+ initial
+ begin
+ error_count = 0;
+ verbose_msg = 0;
+ end
+
+
+ // count the number error
+ always @(error_detected)
+ begin
+ error_count = error_count + 1;
+ end
+
+
+ // enabling/disabling message
+ task msg_enable;
+ input [20*8:1] msg_src;
+ input msg_enable;
+ begin
+ verbose_msg = msg_enable;
+ if (msg_enable)
+ $display(" At time %t ** %s: enabling messages",$time, msg_src);
+ else
+ $display(" At time %t ** %s: disabling messages",$time, msg_src);
+ end
+ endtask // msg
+
+ // generating message
+ task msg;
+ input [20*8:1] msg_src;
+ input [40*8:1] msg_text;
+ begin
+ if (verbose_msg)
+ $display(" At time %t ** %s: Msg: %s",$time, msg_src, msg_text);
+ end
+ endtask // msg
+
+ // generating long message
+ task msgl;
+ input [40*8:1] msg_src;
+ input [80*8:1] msg_text;
+ begin
+ if (verbose_msg)
+ $display(" At time %t ** %s: Msg: %s",$time, msg_src, msg_text);
+ end
+ endtask // msg
+
+ // generating the error message
+ task err;
+ input [20*8:1] err_src;
+ input [40*8:1] err_text;
+ begin
+ -> error_detected;
+ $display("Time %0d, %s Error: %s",$time, err_src, err_text);
+ end
+ endtask // err
+
+
+task finish_test;
+begin
+
+ $display("****************************************");
+ if ( error_count == 0 )
+ $display("* TEST: PASSED");
+ else
+ $display("* TEST: FAILED\n*\tError(s) = %d", error_count);
+
+ $display("****************************************");
+end
+endtask
+
+
+endmodule // debug_proc
+
usb2uart/trunk/verify/tb/test_control.v
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: usb2uart/trunk/verify/tb/tb.v
===================================================================
--- usb2uart/trunk/verify/tb/tb.v (nonexistent)
+++ usb2uart/trunk/verify/tb/tb.v (revision 3)
@@ -0,0 +1,252 @@
+//////////////////////////////////////////////////////////////////////
+//// ////
+//// ////
+//// This file is part of the USB2UART project ////
+//// http://www.opencores.org/cores/usb2uart/ ////
+//// ////
+//// Description ////
+//// ////
+//// To Do: ////
+//// nothing ////
+//// ////
+// Version :0.1 - ////
+//// Author(s): ////
+//// - Dinesh Annayya, dinesha@opencores.org ////
+//// ////
+//////////////////////////////////////////////////////////////////////
+//// ////
+//// Copyright (C) 2000 Authors and OPENCORES.ORG ////
+//// ////
+//// This source file may be used and distributed without ////
+//// restriction provided that this copyright statement is not ////
+//// removed from the file and that any derivative work contains ////
+//// the original copyright notice and the associated disclaimer. ////
+//// ////
+//// This source file is free software; you can redistribute it ////
+//// and/or modify it under the terms of the GNU Lesser General ////
+//// Public License as published by the Free Software Foundation; ////
+//// either version 2.1 of the License, or (at your option) any ////
+//// later version. ////
+//// ////
+//// This source is distributed in the hope that it will be ////
+//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
+//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
+//// PURPOSE. See the GNU Lesser General Public License for more ////
+//// details. ////
+//// ////
+//// You should have received a copy of the GNU Lesser General ////
+//// Public License along with this source; if not, download it ////
+//// from http://www.opencores.org/lgpl.shtml ////
+//// ////
+//////////////////////////////////////////////////////////////////////
+
+
+`timescale 1ns/10ps
+
+`include "usb1_defines.v"
+module tb;
+
+wire usb_txoe,usb_txdp,usb_txdn;
+
+wire dpls = (usb_txoe == 1'b0) ? usb_txdp : 1'bz;
+wire dmns = (usb_txoe == 1'b0) ? usb_txdn : 1'bz;
+
+pullup(dpls); // Full Speed Device Indication
+//pulldown(dmns);
+
+parameter SYS_BP_PER = 2.5;
+parameter USB_BP_PER = 10.4167;
+reg sys_clk,resetn;
+reg usb_48mhz_clk;
+
+//-----------------------------------
+// Register Interface
+// ----------------------------------
+wire [31:0] reg_addr; // Register Address
+wire reg_rdwrn; // 0 -> write, 1-> read
+wire reg_req; // Register Req
+wire [31:0] reg_wdata; // Register write data
+reg [31:0] reg_rdata; // Register Read Data
+reg reg_ack; // Register Ack
+
+always begin
+ #SYS_BP_PER sys_clk <= 1'b0;
+ #SYS_BP_PER sys_clk <= 1'b1;
+end
+
+always begin
+ #USB_BP_PER usb_48mhz_clk <= 1'b0;
+ #USB_BP_PER usb_48mhz_clk <= 1'b1;
+end
+
+wire usb_rxd = ((dpls == 1) && (dmns == 0)) ? 1'b1:
+ ((dpls == 0) && (dmns == 1)) ? 1'b0: 1'b0;
+
+core dut(
+ .clk_i (usb_48mhz_clk),
+ .rst_i (resetn),
+
+ // USB PHY Interface
+ .usb_txdp (usb_txdp),
+ .usb_txdn (usb_txdn),
+ .usb_txoe (usb_txoe),
+ .usb_rxd (usb_rxd),
+ .usb_rxdp (dpls),
+ .usb_rxdn (dmns),
+
+ // USB Misc
+ .phy_tx_mode(1'b1),
+
+ // Interrupts
+ .dropped_frame(),
+ .misaligned_frame(),
+ .crc16_err(),
+
+ // Vendor Features
+ .v_set_int(),
+ .v_set_feature(),
+ .wValue(),
+ .wIndex(),
+ .vendor_data(),
+
+ // USB Status
+ .usb_busy(),
+ .ep_sel(),
+
+ // End point 1 configuration
+ .ep1_cfg( `ISO | `IN | 14'd0256 ),
+ // End point 1 'OUT' FIFO i/f
+ .ep1_dout( ),
+ .ep1_we( ),
+ .ep1_full( 1'b0 ),
+ // End point 1 'IN' FIFO i/f
+ .ep1_din( ep1_us_din ),
+ .ep1_re( ep1_us_re ),
+ .ep1_empty( ep1_us_empty ),
+ .ep1_bf_en( 1'b0 ),
+ .ep1_bf_size( 7'h0 ),
+
+ // End point 2 configuration
+ .ep2_cfg( `ISO | `OUT | 14'd0256 ),
+ // End point 2 'OUT' FIFO i/f
+ .ep2_dout( ep2_us_dout ),
+ .ep2_we( ep2_us_we ),
+ .ep2_full( ep2_us_full ),
+ // End point 2 'IN' FIFO i/f
+ .ep2_din( 8'h0 ),
+ .ep2_re( ),
+ .ep2_empty( 1'b0 ),
+ .ep2_bf_en( 1'b0 ),
+ .ep2_bf_size( 7'h0 ),
+
+ // End point 3 configuration
+ .ep3_cfg( `BULK | `IN | 14'd064 ),
+ // End point 3 'OUT' FIFO i/f
+ .ep3_dout( ),
+ .ep3_we( ),
+ .ep3_full( 1'b0 ),
+ // End point 3 'IN' FIFO i/f
+ .ep3_din( ep3_us_din ),
+ .ep3_re( ep3_us_re ),
+ .ep3_empty( ep3_us_empty ),
+ .ep3_bf_en( 1'b0 ),
+ .ep3_bf_size( 7'h0 ),
+
+ // End point 4 configuration
+ .ep4_cfg( `BULK | `OUT | 14'd064 ),
+ // End point 4 'OUT' FIFO i/f
+ .ep4_dout( ep4_us_dout ),
+ .ep4_we( ep4_us_we ),
+ .ep4_full( ep4_us_full ),
+ // End point 4 'IN' FIFO i/f
+ .ep4_din( 8'h0 ),
+ .ep4_re( ),
+ .ep4_empty( 1'b0 ),
+ .ep4_bf_en( 1'b0 ),
+ .ep4_bf_size( 7'h0 ),
+
+ // End point 5 configuration
+ .ep5_cfg( `INT | `IN | 14'd064 ),
+ // End point 5 'OUT' FIFO i/f
+ .ep5_dout( ),
+ .ep5_we( ),
+ .ep5_full( 1'b0 ),
+ // End point 5 'IN' FIFO i/f
+ .ep5_din( ep5_us_din ),
+ .ep5_re( ep5_us_re ),
+ .ep5_empty( ep5_us_empty ),
+ .ep5_bf_en( 1'b0 ),
+ .ep5_bf_size( 7'h0 ),
+
+ // End point 6 configuration
+ .ep6_cfg( 14'h00 ),
+ // End point 6 'OUT' FIFO i/f
+ .ep6_dout( ),
+ .ep6_we( ),
+ .ep6_full( 1'b0 ),
+ // End point 6 'IN' FIFO i/f
+ .ep6_din( 8'h0 ),
+ .ep6_re( ),
+ .ep6_empty( 1'b0 ),
+ .ep6_bf_en( 1'b0 ),
+ .ep6_bf_size( 7'h0 ),
+
+ // End point 7 configuration
+ .ep7_cfg( 14'h00 ),
+ // End point 7 'OUT' FIFO i/f
+ .ep7_dout( ),
+ .ep7_we( ),
+ .ep7_full( 1'b0 ),
+ // End point 7 'IN' FIFO i/f
+ .ep7_din( 8'h0 ),
+ .ep7_re( ),
+ .ep7_empty( 1'b0 ),
+ .ep7_bf_en( 1'b0 ),
+ .ep7_bf_size( 7'h0 ),
+
+ // Uart Line Interface
+ .uart_txd (uart_txd),
+ .uart_rxd (uart_rxd)
+
+ );
+
+
+
+usb_agent u_usb_agent(
+ .dpls (dpls),
+ .dmns (dmns)
+ );
+
+uart_agent u_uart_agent(
+ .test_clk (usb_48mhz_clk),
+ .sin (uart_rxd),
+ .sout (uart_txd)
+ );
+test_control test_control();
+
+always @(posedge usb_48mhz_clk)
+ reg_ack <= reg_req;
+
+always @(posedge usb_48mhz_clk)
+ if(reg_req)
+ reg_rdata <= reg_wdata;
+
+
+
+initial
+begin
+ resetn = 1;
+ #100 resetn = 0;
+ #100 resetn = 1;
+ #1000
+ //usb_test1;
+ //usb_test2;
+ usb_test3;
+
+ $finish;
+end
+
+`include "usb_test1.v"
+`include "usb_test2.v"
+`include "usb_test3.v"
+endmodule
usb2uart/trunk/verify/tb/tb.v
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property