Line 1... |
Line 1... |
/*
|
/*
|
Author: Sebastien Riou (acapola)
|
Author: Sebastien Riou (acapola)
|
Creation date: 22:22:43 01/10/2011
|
Creation date: 22:22:43 01/10/2011
|
|
|
$LastChangedDate: 2011-04-17 23:31:29 +0200 (Sun, 17 Apr 2011) $
|
$LastChangedDate: 2011-04-18 12:57:36 +0200 (Mon, 18 Apr 2011) $
|
$LastChangedBy: acapola $
|
$LastChangedBy: acapola $
|
$LastChangedRevision: 19 $
|
$LastChangedRevision: 20 $
|
$HeadURL: file:///svn/iso7816_3_master/iso7816_3_master/trunk/test/iso7816_3_t0_analyzer.v $
|
$HeadURL: file:///svn/iso7816_3_master/iso7816_3_master/trunk/test/iso7816_3_t0_analyzer.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 252... |
Line 252... |
if(4'h0==tdiCnt) begin//this is T0
|
if(4'h0==tdiCnt) begin//this is T0
|
atrK <= dataOut[3:0];
|
atrK <= dataOut[3:0];
|
end
|
end
|
tempBytesCnt <= 2'h0;
|
tempBytesCnt <= 2'h0;
|
tdiStruct <= {tdiCnt+1'b1,dataOut};
|
tdiStruct <= {tdiCnt+1'b1,dataOut};
|
//if(12'h0=={dataOut,atrK}) begin
|
|
// atrCompleted <= 1'b1;
|
|
// {waitCardTx,waitTermTx}<=2'b01;
|
|
//end
|
|
if((1'b0==tdiStruct[7]) |//we just received the last interface byte
|
if((1'b0==tdiStruct[7]) |//we just received the last interface byte
|
(4'b0==dataOut[7:4])) begin //or new TDi indicate no further interface bytes
|
(4'b0==dataOut[7:4])) begin //or new TDi indicate no further interface bytes
|
//fsmState <= (4'b0!=earlyAtrK) ? ATR_HISTORICAL :
|
|
// atrHasTck ? ATR_TCK : T0_HEADER;
|
|
if(4'b0!=earlyAtrK) begin
|
if(4'b0!=earlyAtrK) begin
|
fsmState <= ATR_HISTORICAL;
|
fsmState <= ATR_HISTORICAL;
|
end else if(atrHasTck) begin
|
end else if(atrHasTck) begin
|
fsmState <= ATR_TCK;
|
fsmState <= ATR_TCK;
|
end else begin
|
end else begin
|