Fig. 1 shows a part that is included in the signal processing system in the live satellite video signal processing system with the block diagram form.An example of this type systematic is thomson consumer electronics joint-stock company (Thomson Consumer Electronics, Inc.) Kai Fa the DSS by Indianapolis, state of Indiana cityTM(direct broadcast satellite system).Fig. 1 shows the parts of system, comprising: comprise the system controller 130 of microcomputer, comprise the part of system storage 110 and " transmission " integrated circuit (TIC) 100 that with dashed lines is summarized of SRAM.TIC100 handles an input data signal " Data-In ", and " Data-In " represents the information that comprises in the TV signal, for example vedio data.TV signal is not by a tuner tuning (shown in Figure 1).
Signal Data-In comprises " packing " data, and promptly data are arranged in the multibyte data bag.Each includes the content of a non-title division of definition, or claims " title " part of " service load " part of bag.For example, title can show that this includes the video data of playing in channel 5.In Fig. 1,122 pairs of title datas of the title code translator of TIC100 are deciphered to determine the how service load of pack processing.For example, effective load data can be stored among the RAM110 by the following method.122 pairs of titles of title code translator are deciphered and are controlled 120 one signals in (DMAC) unit, request msg storage operation to direct memory access (DMA).DMAC120 responds by control multiplexer (MUX) 118 and RAM DCU data control unit 114, signal Data-In is connected to the data input pin of RAM110.DMAC120 also provides the address input by MUX116 to RAM110.
Another function of TIC100 provides one at system and the interface between the smart card (or claiming integrated circuit (IC) card) of the smart card among Fig. 1 180.Smart card 180 provides the data-handling capacity relevant with access control.Intelligent card interface among the TIC100 formats communicating by letter between system and the smart card 180 according to specific communication protocol of intelligent card.For example, TIC100 provides one as defined complete type T=0 asynchronous half-duplex character transportation protocol in iso standard 7816-3 the 5th to 8 joint.Each is sent to or comprises one or more characters from the transmission of smart card.A character comprises 1 start bit, 8 data bit and 1 parity check bit.Just as will be described in greater detail below, the intelligent card interface of the TIC100 among Fig. 1 comprises intelligent card interface (SCI)unit 140 and smart card direct memory access (DMA) interface (DMAI) unit 160.
TIC100 is connected with smart card 180 by card reader 170.When using smart card, but smart card 180 removals be installed on the card reader 170.Card reader 170 is connected the intelligent card interface signal between the contact onSCI unit 140 among the TIC100 and smart card 180 surfaces.Contact position on intelligent card interface signal and the smart card is stipulated by iso standard 7816-2.The IC that is installed on the smart card 180 is connected on the contact with the receiving interface signal.
The operation of TIC100 is by the system controller of TIC100 outside and microcontroller (μ C) 132 unit controls of TIC100 inside, and system controller comprises microprocessor (μ P) 130.Control signal control MUX134 that is produced by μ C132 and DCU data control unit 136 are with the source of decision from the data-signal of TIC100 to μ P130.Possible data source comprises RAM110 and for example about " application " data from status information of SCI140 and so on of intelligent card interface state.Application data, for example the intelligent card interface status information is sent to μ P130 by DCU data control unit 154.The control procedure of being carried out by system controller can comprise the address that produces RAM110 by MUX116.
The control data that is used to control intelligent card interface is sent to SCI140 by the application data path that comprises MUX152 from μ P130.Application controls unit 150 control MUX152 are to select the source of " sending " (from TIC100 output) application data.Selectable other the possible source of sending application data of MUX152 comprises Data-In signal and the RAM110 by MUX118.
Under the communication protocol of intelligent card of the above-mentioned type T=0, the data between all smart cards 180 and the system transmit and are started by system controller.For example, μ P130 indicates it to carry out a specific operation to 180 orders of smart card, as producing decruption key.μ P130 sends another order indication smart card 180 to system's transferring status data, as the state of current operation.When status information shows that operation has been finished and μ P130 when being ready to receive data from smart card 180, μ P130 sends Next Command, and indication smart card 180 is to TIC100 transmit operation result, as the key of deciphering.
Before beginning to transmit, μ P130 carries out initialization to the controlled variable in the command register of the memory mapped that is stored in SCI140.By application address and data bus command register is carried out addressing and read or write by μ P130.SCI140 comprises that also the status register of memory mapped is to store the data of the state of representing SCI140.System controller with to the same mode of command register to the state of status register visit with the decision intelligent card interface.
After carrying out initialization by μ P130, the data that the parts that comprise DMAI160 and SCI140 shown in Fig. 1 allow to finish between a smart card 180 and the RAM110 transmit, and do not need the intervention of μ P130 in the transport process.In the data to smart card 180 transmitted, SCI140 received data from DMAI160, produces a parity check bit, and with clock data is outputed to smart card.On the contrary, SCI140 receives the data from smart card 180, carries out a parity checking, and data are offered DMAI160.DMAI160 directly transmits data or receive data from RAM110 to RAM110.Data between DMAI160 and the SCI140 transmit by exchange (handshake) signal controlling.
As shown in Figure 1, DMAI160 comprises smart card control module 161, and this smart card control module links to each other with 164 with two counter registers 162, links to each other with 168 with two pointer registers 166 again.Register 162 is write count registers, and the count value of the data word joint number on the RAM110 is write in its storage.Whenever, write a byte to RAM, smart card controller 161 adds 1 (or subtracting 1) with regard to the counting in the control register 162.Finish when all bytes are transmitted, smart card control module 161 is also estimated identification to count value.Equally, under smart card control module 161 control, the count value of the data word joint number that register 164 storages are read from RAM110.At the smart card duration of work, register 166 and 168 is respectively RAM110 the address of writing and reading is provided.When smart card transmitted beginning, the address pointer register that it is suitable that the initial address value is packed into, byte of every transmission was upgraded by 161 pairs of address pointer registers of smart card control module, for example, added 1 or subtract 1.
Fig. 2 illustrates the block diagram of the embodiment of SCI140.In Fig. 2, when smart card 180 is inserted in the card reader 170, receive in the intelligent card reading 170 ofSCI control module 210 from Fig. 1 that signal SC-DETECT is as the expression of having inserted.Unit 210 responds the smart card 180 that just is being inserted into by μ P130 is produced an interruption.If μ P130 does not startSCI control module 210 as yet, μ P130 just carries out this operation at this moment.In response,unit 210 startup smart cards activate/do not activateunit 220 and activate smart card 180.
Unit 220 is in response to the startup that is produced by signal SC-VCC-ENABLE, to start smart card supply voltage VCC, VCC is included in the card reader 170, enough postponing with after guaranteeing that power supply is added to smart card 180 through one,unit 220 places " reception " mode to the smart card of TIC100 serial i/O impact damper (pad), so that can passing through serial i/O signal SC-IO, SCI140 receives serial data from smart card 180, in addition,unit 220 controlVPP control modules 250 are to produce one " free time " state on the control signal SC-VPP-SELECT ofunit 250 outputs.Provide an EPROM program voltage VPP by the voltage source in the card reader 170 of signal SC-VPP-SELECT control to smart card 180.The idle condition of signal SC-VPP-SELECT causes voltage source to be set at a magnitude of voltage, and this magnitude of voltage is forbidden theEPROM programming.Unit 220 also provides smart card clock signal SC-CLK to smart card 180, and produces signal SC-RESET so that smart card is resetted.Smart card 180 comes response signal SC-RESET by " answer resets (the answer-to-reset) " data sequence that produces an iso standard 7816-3 the 6th joint regulation on the signal SC-IC.
Intelligentcard data receiver 230 is connected on the I/O impact damper 260 and imports to the serial data of TIC100 to receive and to cushion from smart card 180 biographies, for example answershoming sequence.Receiver 230 comprises a shift register, and this shift register receives serial data stream and serial data is converted to data word, and this data word is suitable for transmitting to RAM110 by the parallel data path in the TIC100.Before SCI140 began to receive data from smart card 180, the control register of all memory mapped in DMAI160 and theSCI control module 210 carried out initialization.The data word that is produced byreceiver 230 is written into RAM110 by DMAI160, MUX118 and data direction control module 114.DMAI160 among Fig. 1 is connected on thereceiver 230, just produces write address for RAM110 in case receive data.DMAI160 also preserves the count value of a number of words that receives.Promptly transmit when finishing when receive all data from smart card 180, smartcard control module 210 just produces an interruption to μ P130.
Data from RAM110, TIC100 send are sent in the smart card 180 by intelligentcard data transmitter 240, data direction control module 114, MUX152, application data bus and SCI control module 210.Each data word that reads from RAM110 is loaded into a shift register the unit 240.Data in the shift register shift out from TIC100 by I/O impact damper 260, to produce the serial data stream among the signal SC-IO.Data transmitter 240 is connected on the DMAI160 of Fig. 1, and the latter produces the address of reading of data from RAM110 and preserves a count value to the data number of words of smart card 180 transmission.After smart card 180 transmission finished, 210 couples of μ P130 of control module produced an interruption in all data.
According to the type T=0 agreement of iso standard 7816-3 regulation, the embodiment of the SCI140 shown in Fig. 2 supports multibyte and byte to transmit.As mentioned above, the transmission of each data, no matter byte or multibyte are that μ P130 starts by system controller all.Below system illustrated in figures 1 and 2 is described according to the example of type T=0 agreement operation.
When μ P130 decision will transmit, μ P130 as described above was to the control register initialization among the SCI140.SCI140 produces a serial data stream that comprises control data and message data, and this data stream transmits between SCI140 and smart card 180 by serial data signal SC-IO.The control data that SCI140 produces comprises an order of assigning at the data stream section start " title ", and the order title comprises the data of the successive byte of 5 appointments: CLA, INS, P1, P2, P3.The value of CLA (first byte of title) has defined an instruction " class ".The INS byte has defined this instruction.P1, P2 and P3 are parameters, and wherein P1 and P2 can be addresses, and P3 has specified the number of the data byte in the message part that is included in data stream, i.e. data word joint number after title.
SCI140 has transmitted after the title of 5 bytes, and smart card 180 is answered with the 8.2.2 joint of iso standard 7816-3 and one " process " byte of table 9 definition.For example, in SCI140, will be called " affirmation ", or the value of the value and instruction byte INS of the process byte of ACK relatively.If ACK equals INS or INS+1, then transmit remaining all data bytes, the multibyte transfer capability is provided thus.If ACK equals the logical complement of INS or INS+1, then only transmit next data byte, the byte transfer capability is provided thus.Though any transmission, the byte number counting of the counter among SCI140 to transmitting, and compare with the count value of byte number of message of parameter P3 definition in the title.When all bytes transmission finished, smart card 180 transport process byte SW1 and SW2 showed " order finishes " end transmission then.The value of process byte SW1 and SW2 provides end of message status information, for example " normal termination " or " incorrect message-length " of being stipulated by ISO7816-3 8.2.2.3 joint.
SCI140 also provides the parity checking of the transmission data of ISO7816-3 6.1.3 joint defined to handle.In the multibyte data transport process from smart card 180, SCI140 checks the parity of each byte of received data, and produces an error signal according to bad parity according to the joint of the 8.2nd among the ISO7816-3 and Fig. 8 in signal SC-IO.Smart card 180 is by retransmitting this this error signal of byte response of makeing mistakes.Fig. 3 A shows zero defect situation (waveform of Fig. 3 A top) and the type signal waveform among the signal SC-IO under the odd even error situation (waveform of Fig. 3 A below) is arranged.When smart card 180 transmits data, SCI140 produces an appropriate parity check bit to each byte, and these parity check bit are inserted serial data stream.If smart card 180 detects from a bad parity in the data of SCI140, then smart card 180 is producing an error signal shown in the waveform below the figure A on the signal SC-IO.SCI140 responds error signal by retransmitting this byte of makeing mistakes.
Byte data and order transmit in the same way.Output transmits (to smart card 180) for byte, and SCI140 receives a data byte from DMAI160, produces a parity check bit, and character is sent to smart card 180.Input transmits (from smart card 180) for byte, and SCI140 receives a character from smart card 180, checks bad parity, and provides data byte to DMAI160.Point out to transmit under the wrong situation being produced an error signal by receiving trap, smart card 180 provides character to repeat.6.1.4.4 joint and table 6 as ISO7816-3 are pointed, and for all transmission, transfer rate is programmable.
Order transmits and in the SCI command register direction of transfer to be set with system controller and to be masked as the beginning, is sent to smart card 180 or from smart card 180 with designation data.System controller also is provided with the command process beginning flag, and this sign shows that the next one is first byte of order title from the byte that DMAI160 is sent to SCI140.Transmit for an output, promptly from the transmission of TIC100 to smart card 180, SCI140 transmits each byte of order title and each byte of data, and each byte all receives from DMAI160, up to having transmitted P3 data byte.An input is transmitted, and promptly from the transmission of smart card 180 to TIC100, SCI140 receives the byte from smart card 180 right quantities, and sends each data byte to DMAI160, up to receiving P3 byte.
Except aforesaid decoding to ACK and SW1, SW2 process byte, SCI140 is also to " NULL " (attonity) proword abridged translation sign indicating number, and is to activate or the free time according to the value decision vpp voltage (being used for the EPROM programming to smart card) of ACK process byte.The table 9 of iso standard 7816-3 shows the corresponding state of ACK byte value and VPP.As mentioned above, voltage VPP is controlled by the signal SC-VPP-Select that VPP control module among Fig. 2 250 produces.Signal SC-VPP-Select produces according to the information from the decoding of ACK byte.
Only some is stored in the RAM110 data that receive from smart card 180.SCI140 " filtration " is from the data stream of smart card 180, with the control information of deletion such as certain process byte.Particularly, when transmitting generation, by the transmission of ACK and NULL process byte control data.These process bytes no longer need after finishing transmission.After transmission finishes, SW1 and SW2 process byte are analyzed, whether the state when transmitting end with decision for example transmits and successfully finishes.Therefore, SW1, SW2 process byte and message data are stored in together and are used for the further analysis of μ P130 do among the RAM110.
Fig. 3 B shows for deleting unnecessary control byte, by the filter operation of SCI execution.The upper section of Fig. 3 B has been described the typical data stream from smart card 180, and this data stream comprises the diffusing process byte that is inserted in the data byte.The below of figure B partly shows the data stream from smart card 180, and this data stream has been passed through the processing of SCI140 and DMAI160 and flowed with the filtered data that generation is stored among the RAM110.Process byte outside SW1 and the SW2 is deleted from data stream by filter operation.
When data byte and SW1 and SW2 process byte have been sent to DMAI160 and have entered SRAM110, μ P130 is produced an interruption.System controller by on demand from RAM110 reading of data and deal with data respond interruption.reportedly send since a number (to the initialization of SCI140 command register) to finish (generation interrupt identification) during in, all communications between system and smart card do not need the intervention of system controller.
Except the utilization factor that improves system controller, SCI140 and DMAI160 also provide above-mentioned " filtration " feature.With known direct memory access (DMA) feature different, the filter operation that is provided by SCI140 has improved the integrality of the data of the efficient of RAM110 storage data and storage.As mentioned above, not unnecessary data byte is left out in filter operation from data stream, as control data.Therefore, the quantity that must be stored in the intelligent card data among the RAM110 has reduced.By above-mentioned be used to detect wrong parity checking processing feature and be used to eliminate wrong data byte transmit feature once more, the integrality that is stored in the intelligent card data of RAM110 improves.