Summary of the invention
In view of this, the object of the present invention is to provide a kind of chip module adaption system and method, change to solve existing wifi module, difficulty is higher when adaptive, software maintenance amount is larger, the problem of easily makeing mistakes.
For this reason, openly following technical scheme of the present invention:
A kind of chip module adaption system, comprises trigger module, modular converter, judge module, determination module and load-on module, wherein:
Described trigger module, for based on treating that adaptive objective chip module chooses regulating resistor, and utilizes described regulating resistor to produce trigger voltage;
Described modular converter, for described trigger voltage is carried out to analog-to-digital conversion process, obtains the corresponding digital information of described trigger voltage;
Described judge module, for obtaining described digital information, and judges the voltage range under described trigger voltage according to described digital information;
Described determination module, for the mapping relations according to predefined voltage range and driver module, utilize the affiliated voltage range of described trigger voltage from an integrated in advance N driver module, to determine the driver module that need enable, wherein, described N is greater than 1 natural number;
Described load-on module, for loading definite described driver module, and loads described objective chip module based on described driver module.
Said system, preferred, described chip module is specially wifi module, and described wifi module comprises wifi chip and printing board PCB.
Said system, preferred, described driver module is specially wifi and drives.
Said system, preferred, described modular converter specifically comprises AD conversion unit and memory cell, wherein:
Described AD conversion unit, is converted to digital signal for the analog voltage signal that utilizes A/D converter that described regulating resistor is produced, and obtains the represented digital information of described digital signal;
Described memory cell, for storing described digital information.
A kind of chip module adaptation method, comprising:
Based on treating that adaptive objective chip module chooses regulating resistor, and utilize described regulating resistor to produce trigger voltage;
Described trigger voltage is carried out to analog-to-digital conversion process, obtain the corresponding digital information of described trigger voltage;
Obtain described digital information, and judge the voltage range under described trigger voltage according to described digital information;
According to the mapping relations of predefined voltage range and driver module, utilize the affiliated voltage range of described trigger voltage from an integrated in advance N driver module, to determine the driver module that need enable, wherein, described N is greater than 1 natural number;
Load the described driver module of determining, and load described objective chip module based on described driver module.
Said method, preferred, describedly described trigger voltage is carried out to analog-to-digital conversion process obtain the corresponding digital information of described trigger voltage, specifically comprise:
The analog voltage signal that utilizes A/D converter that described regulating resistor is produced is converted to digital signal, and obtains the represented digital information of described digital signal;
Described digital information is stored.
To sum up, the chip module adaption system that the embodiment of the present invention provides has comprised trigger module, modular converter, judge module, determination module and load-on module.Described system for example, for different chip modules (wifi module) demand of different user, multiple drivings (for example wifi drives) corresponding to integrated each chip module in advance, simultaneously, pre-establish the mapping relations between each driving and voltage range, for the adaptation procedure of follow-up chip module provides support.On this basis, each module that described system comprises is by for treating that adaptive objective chip module chooses suitable regulating resistor, and the selector switch that regulating resistor need be enabled to driving as objective chip module completes adaptation, specifically utilize regulating resistor to produce trigger voltage, and judge the voltage range under trigger voltage, determine the driver module that need to enable according to this voltage range, the adaptation procedure of subsequent load driving and objective chip module realize target chip module.
Thereby, utilize system of the present invention, producing the debug phase, in the time that needs are Set Top Box or ott network player replacing wifi module, only being required to be wifi module chooses suitable regulating resistor and changes, without the code information of amendment wifi driving and other related softwares, reduce engineer's workload, reduce error rate.
Embodiment
For quote and know for the purpose of, hereinafter use technical term, write a Chinese character in simplified form or abridge sum up be explained as follows:
A/D converter: i.e. analog to digital converter, be called for short ADC, the electronic component that to refer to analog-signal transitions be digital signal, common analog to digital converter is the digital signal that an input voltage signal is converted to an output.
UBOOT: be a kind of software, it generally carries out at first in embedded system, can liken pc(personal computer to, personal computer) BIOS(Basic Input Output System on mainboard, basic input output system).
Kernel: refer to operating system nucleus, i.e. the core of operating system, it is made up of those parts for diode-capacitor storage, file, peripheral hardware and system resource in operating system.Operating system nucleus moves process conventionally, and the communication between process is provided.
Wifi module: the chip and the PCB(Printed Circuit Board that are wifi), printed circuit board) combination of plank.
Wifi drives: be a kind of software, realize wifi module is driven.
ARM: i.e. arm processor is the first item RISC(Reduced Instruction Set Computer of Acorn computer Co., Ltd towards low budget Market Design, Reduced Instruction Set Computer) microprocessor.
For making object, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
The present invention discloses a kind of chip module adaption system and method, below the adaptation procedure taking wifi module in Set Top Box or ott network multimedia player is elaborated to system and method for the present invention as example.
Embodiment mono-
The embodiment of the present invention one discloses a kind of chip module adaption system, refers to Fig. 1, and this system comprises trigger module 100, modular converter 200, judge module 300, determination module 400 and load-on module 500.
Trigger module 100, for based on treating that adaptive objective chip module chooses regulating resistor, and utilizes described regulating resistor to produce trigger voltage.
Wherein, objective chip module is specially wifi module, and correspondingly, driver module is specially wifi and drives.
Modular converter 200, for described trigger voltage is carried out to analog-to-digital conversion process, obtains the corresponding digital information of described trigger voltage.
Wherein, as shown in Figure 2, modular converter 200 specifically comprises AD conversion unit 201 and memory cell 202.AD conversion unit 201 is for utilizing A/D(Analog/Digital, analog/digital) transducer analog voltage signal that described regulating resistor is produced is converted to digital signal, and obtains the represented digital information of described digital signal; Memory cell 202 is for storing described digital information.
Particularly, the regulating resistor of choosing is added between the ARM chip of Set Top Box or ott network player and the input pin pin of A/D converter.
In the present embodiment, be set as 0-1V with reference to voltage range.
Suppose that above-mentioned A/D converter is specially the voltage-mode number converter of 4, the altogether corresponding 16 kinds of codings of each output signal of this A/D converter: 0000,0001,0010,0011,0100,0101,0110,0111,1000,1001,1010,1011,1100,1101,1110,1111, the input voltage range of each coded representation is respectively: 0V-0.0625V, 0.0626V-0.125V ... 0.9376V-1V, there are mapping relations one to one in the coding of 16 grades and 16 voltage ranges (1V voltage is carried out to 16 to be divided equally).
In the time that Set Top Box or ott network player power up, regulating resistor produces trigger voltage, and A/D converter reads resistance voltage value scope, selects corresponding passage output data, and the data of output are stored in self register.For example, when voltage signal when input of a 0.8V, A/D converter output data 1100, and data 1100 are stored in self register.
Judge module 300, for obtaining described digital information, and judges the voltage range under described trigger voltage according to described digital information.
Determination module 400, for the mapping relations according to predefined voltage range and driver module, utilize the affiliated voltage range of described trigger voltage from an integrated in advance N driver module, to determine the driver module that need enable, wherein, described N is greater than 1 natural number.
Load-on module 500, for loading definite described driver module, and loads described objective chip module based on described driver module.
Wherein, the function of judge module 300, determination module 400 and load-on module 500 can be realized by the UBOOT in Set Top Box and kernel, particularly, UBOOT and kernel are from adc(AD transducer) read converter is changed the transformation result data of gained to trigger voltage register, and judge the voltage range under trigger voltage according to the transformation result data that read, for example, if the result data that UBOOT reads from register is 1100, can judge the affiliated voltage range of trigger voltage is 0.75-0.8125.Afterwards, the mapping relations that UBOOT and kernel drive according to the voltage range of setting up in advance and wifi, load the wifi corresponding with this voltage range and drive, carry out corresponding scripts file and mark and start this wifi driving, and then loaded targets wifi module, so far, realize the adaptation of wifi module.
When concrete enforcement, can modify by the program code that existing wifi is driven, in existing wifi drives, add the corresponding identification condition that drives and select code to realize the function that loads respective drive according to trigger voltage scope.
To sum up, the chip module adaption system that the embodiment of the present invention provides has comprised trigger module, modular converter, judge module, determination module and load-on module.Described system for example, for different chip modules (wifi module) demand of different user, multiple drivings (for example wifi drives) corresponding to integrated each chip module in advance, simultaneously, pre-establish the mapping relations between each driving and voltage range, for the adaptation procedure of follow-up chip module provides support.On this basis, each module that described system comprises is by for treating that adaptive objective chip module chooses suitable regulating resistor, and the selector switch that regulating resistor need be enabled to driving as objective chip module completes adaptation, specifically utilize regulating resistor to produce trigger voltage, and judge the voltage range under trigger voltage, determine the driver module that need to enable according to this voltage range, the adaptation procedure of subsequent load driving and objective chip module realize target chip module.
Thereby, utilize system of the present invention, producing the debug phase, in the time that needs are Set Top Box or ott network player replacing wifi module, only being required to be wifi module chooses suitable regulating resistor and changes, without the code information of amendment wifi driving and other related softwares, reduce engineer's workload, reduce error rate.
Embodiment bis-
The embodiment of the present invention two discloses a kind of chip module adaptation method, refers to Fig. 3, and the method comprises the steps:
S301: based on treating that adaptive objective chip module chooses regulating resistor, and utilize described regulating resistor to produce trigger voltage.
S302: described trigger voltage is carried out to analog-to-digital conversion process, obtain the corresponding digital information of described trigger voltage.
S303: obtain described digital information, and judge the voltage range under described trigger voltage according to described digital information.
Wherein, this step S303 specifically comprises: the analog voltage signal that utilizes A/D converter that described regulating resistor is produced is converted to digital signal, and obtains the represented digital information of described digital signal; Described digital information is stored.
S304: according to the mapping relations of predefined voltage range and driver module, utilize the affiliated voltage range of described trigger voltage to determine the driver module that need enable from an integrated in advance N driver module, wherein, described N is greater than 1 natural number.
S305: load the described driver module of determining, and load described objective chip module based on described driver module.
For the disclosed chip module adaptation method of the embodiment of the present invention two, because it is corresponding with the disclosed chip module adaption system of above embodiment mono-, so that describes is fairly simple, relevant similarity refers to the explanation of embodiment mono-chips module adaption system part, no longer describes in detail herein.
In sum, the present invention matches with circuit design by software, carry out the configuration of wifi module, specifically using resistance as the switch of selecting wifi to drive, be aided with A/D converter by resistance voltage and select wifi to drive, in the time changing wifi module, only corresponding replacing resistance carries out pressure regulation, the workload that has reduced engineer, has reduced error rate.And function provided by the invention is a kind of extendible application function, is not limited only to the configuration of wifi module, also can be applied in other hardware circuit board, realize the chip module of selecting other.
It should be noted that, each embodiment in this specification all adopts the mode of going forward one by one to describe, and what each embodiment stressed is and the difference of other embodiment, between each embodiment identical similar part mutually referring to.
For convenience of description, while describing above device, be divided into various modules with function or unit is described respectively.Certainly, in the time implementing the application, the function of each module, unit can be realized in same or multiple software and/or hardware.
As seen through the above description of the embodiments, those skilled in the art can be well understood to the mode that the application can add essential general hardware platform by software and realizes.Based on such understanding, the part that the application's technical scheme contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions (can be personal computers in order to make a computer equipment, server, or the network equipment etc.) carry out the method described in some part of each embodiment of the application or embodiment.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.