URL
https://opencores.org/ocsvn/iso7816_3_master/iso7816_3_master/trunk
Subversion Repositories iso7816_3_master
Compare Revisions
- This comparison shows the changes necessary to convert path
/iso7816_3_master
- from Rev 19 to Rev 20
- ↔ Reverse comparison
Rev 19 → Rev 20
/trunk/test/DummyCard.v
7,26 → 7,26
$LastChangedRevision$ |
$HeadURL$ |
|
This file is under the BSD licence: |
Copyright (c) 2011, Sebastien Riou |
|
All rights reserved. |
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
|
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
The names of contributors may not be used to endorse or promote products derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
This file is under the BSD licence: |
Copyright (c) 2011, Sebastien Riou |
|
All rights reserved. |
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
|
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
The names of contributors may not be used to endorse or promote products derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
`default_nettype none |
73,7 → 73,7
.clocksPerBit(cyclesPerEtu), |
.stopBit2(stopBit2), |
.oddParity(oddParity), |
.msbFirst(msbFirst), |
.msbFirst(msbFirst), |
.dataOut(uart_dataOut), |
.nCsDataOut(nCsDataOut), |
.statusOut(statusOut), |
189,7 → 189,7
sendHexBytes("3F"); |
else |
sendHexBytes("3B"); |
sendHexBytes("90974020"); |
sendHexBytes("90974020"); |
//sendHexBytes("9497801F42BABEBABE"); |
//sendHexBytes("9E 97 80 1F C7 80 31 E0 73 FE 21 1B 66 D0 00 28 24 01 00 0D"); |
//sendHexBytes("9E 97 80 1F C7 80 31 E0 73 FE 21 1B 66 D0 00 28 24 01 00 "); |
/trunk/test/tbIso7816_3_Master.v
7,26 → 7,26
$LastChangedRevision$ |
$HeadURL$ |
|
This file is under the BSD licence: |
Copyright (c) 2011, Sebastien Riou |
|
All rights reserved. |
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
|
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
The names of contributors may not be used to endorse or promote products derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
This file is under the BSD licence: |
Copyright (c) 2011, Sebastien Riou |
|
All rights reserved. |
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
|
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
The names of contributors may not be used to endorse or promote products derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
`default_nettype none |
120,7 → 120,6
.tsReceived(tsReceived), |
.atrIsEarly(atrIsEarly), |
.atrIsLate(atrIsLate), |
//.isoSio(isoSioTerm), |
.isTx(isTxTerm), |
.isoSioIn(isoSioInTerm), |
.isoSioOut(isoSioOutTerm), |
235,7 → 234,6
end |
end |
//T=0 tpdu stimuli |
//reg [7:0] byteFromCard; |
reg [8*256:0] bytesFromCard; |
initial begin |
tbTestSequenceDone=1'b0; |
280,13 → 278,13
if(0===tbErrorCnt) $display("SUCCESS: test sequence completed."); |
$finish; |
end |
initial begin |
// timeout |
initial begin |
// timeout |
#10000000; |
tbErrorCnt=tbErrorCnt+1; |
$display("ERROR: timeout expired"); |
#10; |
$finish; |
#10; |
$finish; |
end |
always |
#(CLK_PERIOD/2) clk = ! clk; |
/trunk/test/iso7816_3_t0_analyzer.v
7,26 → 7,26
$LastChangedRevision$ |
$HeadURL$ |
|
This file is under the BSD licence: |
Copyright (c) 2011, Sebastien Riou |
|
All rights reserved. |
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
|
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
The names of contributors may not be used to endorse or promote products derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
This file is under the BSD licence: |
Copyright (c) 2011, Sebastien Riou |
|
All rights reserved. |
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
|
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
The names of contributors may not be used to endorse or promote products derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
`default_nettype none |
132,26 → 132,26
RxCoreSelfContained #( |
.DIVIDER_WIDTH(DIVIDER_WIDTH), |
.CLOCK_PER_BIT_WIDTH(CLOCK_PER_BIT_WIDTH), |
.PRECISE_STOP_BIT(1'b1)) |
rxCore ( |
.dataOut(rxData), |
.overrunErrorFlag(overrunError), |
.dataOutReadyFlag(bufferFull), |
.frameErrorFlag(frameError), |
.PRECISE_STOP_BIT(1'b1)) |
rxCore ( |
.dataOut(rxData), |
.overrunErrorFlag(overrunError), |
.dataOutReadyFlag(bufferFull), |
.frameErrorFlag(frameError), |
.endOfRx(endOfRx), |
.run(rxRun), |
.run(rxRun), |
.startBit(rxStartBit), |
.stopBit(guardTime), |
.clkPerCycle(clkPerCycle), |
.clocksPerBit(safeClocksPerBit), |
.stopBit2(stopBit2), |
.stopBit(guardTime), |
.clkPerCycle(clkPerCycle), |
.clocksPerBit(safeClocksPerBit), |
.stopBit2(stopBit2), |
.oddParity(oddParity), |
.msbFirst(msbFirst), |
.ackFlags(ackFlags), |
.serialIn(isoSio), |
.comClk(isoClk), |
.clk(clk), |
.nReset(rxCore_nReset) |
.msbFirst(msbFirst), |
.ackFlags(ackFlags), |
.serialIn(isoSio), |
.comClk(isoClk), |
.clk(clk), |
.nReset(rxCore_nReset) |
); |
|
TsAnalyzer tsAnalyzer( |
254,14 → 254,9
end |
tempBytesCnt <= 2'h0; |
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 |
(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 |
fsmState <= ATR_HISTORICAL; |
end else if(atrHasTck) begin |