A kind of ID chips based on FLASH devicesTechnical field
The present invention relates to a kind of chip, specifically a kind of ID chips based on FLASH devices.
Background technology
ID chips have to be widely applied very much, on the market existing encryption chip, such as the ID encryption chips of e-bank,Its internal cryptographic algorithm structure is complex, and chip has very strong security performance.In addition to this complicated encryption chip demand,In the market also has the application demand of many relative low sides such as, and the ID identifications of some consumer electronics products, their requirement is mainIt is that cost is low, it is simple in construction, in the SOC easy of integration to microcontroller.FLASH device of the present invention based on low cost, FLASH devicesPart is often used among microcontroller SOC in itself, therefore this programme is more easily integrated to the SOC of microcontroller.The present invention also has the advantages that simple for structure, and the chip area needed for realizing chip functions is smaller, thus has a relatively low cost,Meet the demand in the consumer application of many low costs.The present invention also has the advantages that low-power consumption.In summary, the present invention veryMeet the demand for the ID identification chips that disclosure satisfy that some consumer electronics products of in the market well, with stronger practicality.
The content of the invention
It is an object of the invention to provide a kind of ID chips based on FLASH devices, to solve to carry in above-mentioned background technologyThe problem of going out.
To achieve the above object, the present invention provides following technical scheme:
Communications codes outside a kind of ID chips based on FLASH devices, the reception of ID chips, by being decoded in ID chip internalsAnd proofread, when proofreading successfully, the data accordingly to be replied are exported to outside ID chips by the I/O management module of ID chipsPortion, so as to complete the encryption ID processes with ID chip exteriors.
It is used as further scheme of the invention:Managed including FLASH memory, configuration information management module CONFIG, IOManage module I O_CTRL, ID control module ID_CTRL, serial sending module STX and serial received module SRX, I/O management moduleDuring the serial communication data rx_di received from chip exterior is input to serial received module SRX by IO_CTRL, serial receivedModule SRX will obtain decoded bit stream rx_bit, be transported to by being decoded to serial communication data rx_diIn serial received buffer RX_BUF in ID control modules ID_CTRL, and stored in order, while to decoded ratioSpy's stream rx_bit is delivered to the correction verification module RX_VRF received in ID control modules ID_CTRL and verified, when serial received mouldWhen block SRX receives 1 complete byte, pass through the triggering serial received counter RX_CNT in ID control modules ID_CTRLAccumulated counts are carried out, when serial received module SRX obtains sign off position from serial communication data rx_di decodings, serial interfaceModule from service is received, meanwhile, receive correction verification module RX_VRF and complete checking procedure, verification consequential signal vrf_result is led toKnow ID control module ID_CTRL, when check results signal vrf_result is low level disarmed state, ID control modules ID_CTRL does not start serial sending module STX, then notifies serial received module SRX to be ready for receiving next time;When verification knotWhen fruit signal vrf_result is high level effective status, ID control modules ID_CTRL will carry out further proof-reading, whenID control modules ID_CTRL is carried out after proofreading successfully to receiving communications codes, and request FLASH is read back corresponding to the communications codesReply content, while serial sending module STX will be delivered to from the FLASH data read back, and starts transmission flow.
Compared with prior art, the beneficial effects of the invention are as follows:FLASH device of the present invention based on low cost, Yong HuIn use, can be as needed by the FLASH devices in authentication code programming to chip, when needing the authentication code of more new chipWhen, also the FLASH in chip can be subjected to programming again.
Brief description of the drawings
Fig. 1 is the structural representation of the ID chips based on FLASH devices.
The operation principle that Fig. 2 is ID control modules ID_CTRL in the ID chips based on FLASH devices.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, completeSite preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based onEmbodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not madeEmbodiment, belongs to the scope of protection of the invention.
Refer in Fig. 1~2, the embodiment of the present invention, a kind of ID chips based on FLASH devices, ID chips receive outsideCommunications codes, by being decoded and being proofreaded in ID chip internals, when proofreading successfully, the data accordingly to be replied are passed throughThe I/O management module of ID chips is exported to ID chip exteriors, so as to complete the encryption ID processes with ID chip exteriors.
ID chips based on FLASH devices include FLASH memory, configuration information management module CONFIG, IO management mouldBlock IO_CTRL, ID control module ID_CTRL, serial sending module STX and serial received module SRX, I/O management module IO_During the serial communication data rx_di received from chip exterior is input to serial received module SRX by CTRL, serial received moduleSRX will obtain decoded bit stream rx_bit by being decoded to serial communication data rx_di, be transported to ID controlsIn serial received buffer RX_BUF in molding block ID_CTRL, and stored in order, while to decoded bit streamRx_bit is delivered to the correction verification module RX_VRF received in ID control modules ID_CTRL and verified, as serial received module SRXWhen receiving 1 complete byte, tired out by the triggering serial received counter RX_CNT in ID control modules ID_CTRLPlus count, when serial received module SRX obtains sign off position from serial communication data rx_di decodings, serial received moduleIt is stopped, meanwhile, receive correction verification module RX_VRF and complete checking procedure, verification consequential signal vrf_result is notified into ID controlsMolding block ID_CTRL, when check results signal vrf_result is low level disarmed state, ID control modules ID_CTRL is notStart serial sending module STX, then notify serial received module SRX to be ready for receiving next time;When check results signalWhen vrf_result is high level effective status, ID control modules ID_CTRL will carry out further proof-reading, when ID controlsModule I D_CTRL is carried out after proofreading successfully to receiving communications codes, and request FLASH is read back corresponding in the reply of the communications codesHold, while serial sending module STX will be delivered to from the FLASH data read back, and start transmission flow.
ID control modules ID_CTRL operation principle is as shown in Figure 2.Receive the first byte of communications codes logical for identifyingBelieve the type coding of code, the identifier that it is referred to as receiving communications codes by we.Reception decoding in ID control modules ID_CTRLIn module RX_DEC, the first byte of reception communications codes will be taken out from serial received buffer RX_BUF and the items of chip are matched somebody with somebodyEach ID codes are proofreaded one by one in confidence breath cfg, if the first byte of communications codes and a certain ID code-phases etc., i.e., further with respectivelyThe corresponding length of each ID codes and receipts counter RX_CNT count value are proofreaded in configuration information cfg, if both it is equal,ID control modules ID_CTRL will be by from selecting corresponding first address ADDR_BASE, and since first address, and request is from FLASHIn read back corresponding to the contents to be replied of this ID.When ID control modules ID_CTRL often reads back 1 byte from FLASH, it will touchSend out summary counter REQ_CNT and carry out accumulated counts.The value of summary counter carries out add operation with first address ADDR_BASEAfterwards, the corresponding address values of next reading FLASH are obtained, untill corresponding data are by complete read.Read back from FLASHData will be cached by sending buffer TX_RX_BUF, and be delivered to serial sending module STX, while and starting hairSend flow.
It is obvious to a person skilled in the art that the invention is not restricted to the details of above-mentioned one exemplary embodiment, Er QieIn the case of without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matterFrom the point of view of which point, embodiment all should be regarded as exemplary, and be nonrestrictive, the scope of the present invention is by appended powerProfit is required rather than described above is limited, it is intended that all in the implication and scope of the equivalency of claim by fallingChange is included in the present invention.Any reference in claim should not be considered as to the claim involved by limitation.
Moreover, it will be appreciated that although the present specification is described in terms of embodiments, not each embodiment is only wrappedContaining an independent technical scheme, this narrating mode of specification is only that for clarity, those skilled in the art shouldUsing specification as an entirety, the technical solutions in the various embodiments may also be suitably combined, forms those skilled in the artIt may be appreciated other embodiment.