Line 1... |
Line 1... |
/*
|
/*
|
Author: Sebastien Riou (acapola)
|
Author: Sebastien Riou (acapola)
|
Creation date: 22:16:42 01/10/2011
|
Creation date: 22:16:42 01/10/2011
|
|
|
$LastChangedDate: 2011-02-09 13:34:14 +0100 (Wed, 09 Feb 2011) $
|
$LastChangedDate: 2011-02-10 16:40:57 +0100 (Thu, 10 Feb 2011) $
|
$LastChangedBy: acapola $
|
$LastChangedBy: acapola $
|
$LastChangedRevision: 13 $
|
$LastChangedRevision: 14 $
|
$HeadURL: file:///svn/iso7816_3_master/iso7816_3_master/trunk/test/tbIso7816_3_Master.v $
|
$HeadURL: file:///svn/iso7816_3_master/iso7816_3_master/trunk/test/tbIso7816_3_Master.v $
|
|
|
This file is under the BSD licence:
|
This file is under the BSD licence:
|
Copyright (c) 2011, Sebastien Riou
|
Copyright (c) 2011, Sebastien Riou
|
|
|
Line 226... |
Line 226... |
reg [7:0] byteFromCard;
|
reg [7:0] byteFromCard;
|
initial begin
|
initial begin
|
tbTestSequenceDone=1'b0;
|
tbTestSequenceDone=1'b0;
|
//receiveAndCheckHexBytes("3B00");
|
//receiveAndCheckHexBytes("3B00");
|
receiveByte(byteFromCard);//3B or 3F, so we don't check (Master and Spy do)
|
receiveByte(byteFromCard);//3B or 3F, so we don't check (Master and Spy do)
|
receiveAndCheckHexBytes("9497801F42BABEBABE");
|
//receiveAndCheckHexBytes("9497801F42BABEBABE");
|
|
//TODO: handle TCK-->receiveAndCheckHexBytes("9E 97 80 1F C7 80 31 E0 73 FE 21 1B 66 D0 00 28 24 01 00 0D");
|
|
receiveAndCheckHexBytes("9E 97 80 1F C7 80 31 E0 73 FE 21 1B 66 D0 00 28 24 01 00");
|
sendHexBytes("FF109778");
|
sendHexBytes("FF109778");
|
receiveAndCheckHexBytes("FF109778");
|
receiveAndCheckHexBytes("FF109778");
|
cyclesPerEtu=8-1;
|
cyclesPerEtu=8-1;
|
sendHexBytes("000C000001");
|
sendHexBytes("000C000001");
|
receiveAndCheckHexBytes("0C");
|
receiveAndCheckHexBytes("0C");
|
sendHexBytes("55");
|
sendHexBytes("55");
|
receiveAndCheckHexBytes("9000");
|
receiveAndCheckHexBytes("9000");
|
tbTestSequenceDone=1'b1;
|
tbTestSequenceDone=1'b1;
|
$display("SUCCESS: test sequence completed.");
|
|
#(CLK_PERIOD*372*12);
|
#(CLK_PERIOD*372*12);
|
|
if(0===tbErrorCnt) $display("SUCCESS: test sequence completed.");
|
$finish;
|
$finish;
|
end
|
end
|
initial begin
|
initial begin
|
// timeout
|
// timeout
|
#10000000;
|
#10000000;
|