Summary of the invention
Technical matters to be solved by this invention provides a kind of method and apparatus according to bit value generation data path, can generate the needed various paths links of user fast, improve the verification efficiency of chip, and the user operates intuitive, clear.
In order to address the above problem, the invention discloses a kind of method according to bit value generation data path, comprising:
Each functional module option is presented on the user interface; Wherein, each functional module correspondence is given different bit values;
According to the selection of user, will sue for peace with the corresponding bit value of selected function module to the functional module option;
The bit value that the bit value sum of being asked is corresponding with each functional module respectively carries out logic and operation;
When non-vanishing, driving the data path of the functional module of opening current bit value correspondence, generate the path link with operation result.
Preferably, described each functional module is under the jurisdiction of different functional units; Then, each functional module option is presented on the user interface successively according to the execution sequencing of functional unit.
Preferably, according to the execution sequencing of functional unit, give corresponding bit value at different functional modules is ascending; Then ascending according to bit value, the data path of the functional module that driving is opened links to each other in turn, generates the path link.
Preferably,, travel through each functional module in each functional unit, carry out logic and operation according to the execution sequencing of functional unit; Then according to the sequencing of traversal, the data path of the functional module that driving is opened links to each other in turn, generates the path link.
Preferably, at each functional unit, the type of each functional module option that is represented comprises: multiselect one or multiselect are many.
In addition, the invention also discloses a kind of device, comprising according to bit value generation data path:
Module represents the unit, is used for each functional module option is presented in user interface; Wherein, each functional module correspondence is given different bit values;
The bit value sum unit is used for the selection to the functional module option according to the user, will sue for peace with the corresponding bit value of selected function module;
The logic and operation unit, corresponding with each functional module respectively bit value of bit value sum that is used for being asked carries out logic and operation;
The path generation unit is used for generating the path link when when non-vanishing, driving the data path of the functional module of opening current bit value correspondence with operation result.
Preferably, described each functional module is under the jurisdiction of different functional units; Then described module represents the execution sequencing of unit according to functional unit, and each functional module option is presented on the user interface successively.
Preferably, according to the execution sequencing of functional unit, give corresponding bit value at different functional modules is ascending; Then described path generation unit is ascending according to bit value, and the data path of the functional module that driving is opened links to each other in turn, generates the path link.
Preferably, described and arithmetic element travel through each functional module in each functional unit according to the execution sequencing of functional unit, carry out logic and operation; Then described path generation unit is according to the sequencing of traversal, and the data path of the functional module that driving is opened links to each other in turn, generates the path link.
Preferably, at each functional unit, the type of each functional module option that is represented comprises: multiselect one or multiselect are many.
Compared with prior art, the present invention has the following advantages:
The present invention can be according to the bit value that the difference in functionality module is given, and the user sues for peace and logic and operation accordingly to the selection of functional module, and generates the various paths links of user's needs automatically according to operation result.By user interface and Drive Layer are separated, the user only need carry out the selection operation of option, and Drive Layer can be set up path link, user relatively by series of algorithms automatically, only pay close attention to the functional module option that represents on the interface, the user is simple to operate, simple and clear.
Further, the present invention can be applicable in the checking of chip, selects can be easy to cover all chip paths by the interface, be difficult for makeing mistakes, formation speed is fast, has improved the checking and the testing efficiency of chip, makes checking and tester clear to the path setting of chip.In addition, the present invention can also be applied in the concrete use of chip, and for the client provides the multiple implementation of chip, the client can formulate corresponding data path according to the demand of oneself, provide a cover flexibly, effective path generation method.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
With reference to Fig. 1, show that the present invention is a kind of to generate the process flow diagram of the method embodiment one of data path according to bit value, comprising:
Step 101 is presented in each functional module option on the user interface; Wherein, each functional module correspondence is given different bit values;
Chip is made up of a plurality of functional modules, and each functional module is responsible for realizing a kind of data processing function.In an embodiment of the present invention, all be illustrated with a PC Camera chip.For example, this chip includes various functional modules such as YUV422 Zoom module, RGB88 Zoom module, RGB565 Zoom module, JPEG compression module.When the user need be provided with data path, then each functional module option is presented on the user interface, select accordingly for the user.
In a preferred embodiment of the invention, described each functional module is under the jurisdiction of different functional units; Then, each functional module option is presented on the user interface successively according to the execution sequencing of functional unit.In addition, at each functional unit, the type of each functional module option that is represented comprises: multiselect one or multiselect are many.
As shown in Figure 2, be the synoptic diagram that represents of each functional module option of a kind of PC Camera of the present invention chip; Wherein, Fig. 2 (a) is user's synoptic diagram of non-selected option still; Fig. 2 (b) selects synoptic diagram behind the option for the user.As can be seen from the figure, the SIF functional unit comprises BP and two functional modules of YUV422; The ISP functional unit comprises ISP1 and two functional modules of ISP2; The IPP functional unit comprises: YUV422, RGB88, RGB565 and four functional modules of IppBP; The Compress functional unit comprises LBUF, JPEG and three functional modules of ADPCM.According to the execution sequencing of functional unit, the division of each functional module option according to functional unit is presented on the user interface successively.Wherein, the functional module option that the ISP functional unit is represented is a check box, then can select one or more module; The functional module option that other functional unit represented is a radio box, then is merely able to select one of them functional module.
Need to prove that for each functional module in the functional unit, it puts in order and can show at random, and the front and back order is not done qualification.
In embodiments of the present invention, give different bit values respectively with each functional module that is possessed on the chip in advance, can choose different bit values successively according to descending order, correspondence is given different functional modules; Also can different, the unconnected bit value of picked at random, correspondence is given different functional modules.
For example, in the embodiment of the invention, represent current functional module with the title combination of functional unit and functional module, it is as follows then to give bit value to each functional module:
SIF_BP =?BIT0 =?00000000001,
SIF_YUV =?BIT1 =?00000000010,
ISP_ISP1 =?BIT2 =?00000000100,
ISP_ISP2 =?BIT3 =?00000001000,
IPP_YUV422 =?BIT4 =?00000010000,
IPP_RGB888 =?BIT5 =?00000100000,
IPP_RGB565 =?BIT6 =?00001000000,
IPP_BP =?BIT7 =?00010000000,
COMP_LBUF420 =?BIT8 =?00100000000,
COMP_JPEG =?BIT9 =?01000000000,
COMP_ADPCM =?BIT10?=?10000000000。
Step 102 according to the selection of user to the functional module option, will be sued for peace with the corresponding bit value of selected function module;
As shown in Figure 2, can directly click corresponding button and select frame to realize the selection of functional module option (connection of corresponding chip data path), in embodiments of the present invention, the corresponding bit value of each button, be that each button represents that with one the bit value realizes with enumerating.When the user need open the data path of which functional module, then select functional module option corresponding with it.Then according to user-selected a plurality of options, with the corresponding bit value summation of functional module.In embodiments of the present invention, the bit value sum of being tried to achieve is expressed as mode.Then select according to the user shown in Fig. 2 (b),
mode=SIF_BP+ISP_ISP1+ISP_ISP2+IPP_YUV422+COMP_JPEG
=BIT0+BIT2+BIT3+BIT4+BIT9
=1000011101。
Step 103, the bit value that the bit value sum of being asked is corresponding with each functional module respectively carries out logic and operation;
The user can call SetMode (int mode) function when being provided with, call the path function of each module respectively by the SetMode function, the bit value of each functional module correspondence is carried out and computing with the mode value respectively, wherein, described logic and operation promptly: the mode value is carried out logical and respectively with the corresponding position of current bit value.Then:
mode&SIF_BP =00000000001,
mode&SIF_YUV =00000000000,
mode&ISP_ISP1 =00000000100,
mode&ISP_ISP2 =00000001000,
mode&IPP_YUV422 =00000010000,
mode&IPP_RGB888 =00000000000,
mode&IPP_RGB565 =00000000000,
mode&IPP_BP =00000000000,
mode&COMP_LBUF420?=00000000000,
mode&COMP_JPEG =01000000000,
mode&COMP_ADPCM =00000000000。
Step 104 when when non-vanishing, driving the data path of the functional module of opening current bit value correspondence with operation result, generates the path link.
When being zero with operation result, represent that then the user does not select this functional module, comprise the module of SIF_YUV, RGB888, IPP_RGB565, IPP_BP, COMP_LBUF420 and COMP_ADPCM correspondence; When non-vanishing (its operation result is the corresponding bit value of current functional module), drive the data path of the functional module of opening current bit value correspondence with operation result.Then, drive the data path of SIF_BP, ISP_ISP1, ISP_ISP2, IPP_YUV422 and COMP_JPEG corresponding function module, and generate a complete path link according to above-mentioned each data path according to above-mentioned logic and operation result.
The embodiment of the invention can be according to the bit value of difference in functionality module, and the user carries out corresponding calculated and handle the selection of functional module, generates the various paths links that the user needs automatically.In the specific implementation, user interface and Drive Layer are separated, the user only need carry out the selection operation of option, Drive Layer can be set up the path link by series of algorithms automatically, the user only pays close attention to the functional module option that represents on the interface relatively, the user is operated intuitive, clear.The present invention can be applicable in the checking of chip, can be easy to cover all chip paths, has improved the checking and the testing efficiency of chip, makes checking and tester very directly perceived and clear to the path of chip.In addition, the present invention can also be applied in the use of chip, and for the client provides the multiple scheme of chip, the client can formulate corresponding data path scheme according to the demand of oneself, provide a cover flexibly, effective path generation method.
Provide the process flow diagram of the concrete operations step of the inventive method embodiment one below, as shown in Figure 3, comprising:
Step 301 is presented in each functional module option on the user interface;
Step 302 receives the selection of user to the functional module option, carries out the setting of data path;
Step 303, whether the setting of judgment data path finishes; If then carry out 304; If not, then return step 302, continue to receive the selection of user the functional module option;
Step 304, the bit value summation with the selected function module obtains the mode value;
Step 305, Mode makes logic and operation with the bit value of each functional module respectively;
Step 306 judges whether operation result is zero; If not, execution in step 307 then; If then execution in step 308;
Step 307 is called the data path that this functional module correspondence is opened in corresponding driving;
Step 308 judges whether all finishing with computing of all functions module; If not, then execution in step 309, carry out the logic and operation of next functional module, and return step 306; If, end operation then.
With reference to Fig. 4, show that the present invention is a kind of to generate the process flow diagram of the method embodiment two of data path according to bit value, comprising:
Step 401 is presented in each functional module option on the user interface; Wherein, according to the execution sequencing of functional unit, give corresponding bit value at different functional modules is ascending;
For the sequencing of the data path that guarantees to generate is normal, in embodiments of the present invention,, give corresponding bit value to functional module according to the execution sequencing of functional unit.Execution sequence functional unit the preceding then, its corresponding functional module bit value is less; Execution sequence after functional unit, its corresponding functional module bit value is bigger.As described in above-mentioned embodiment one, the bit value of giving of each functional module is followed successively by BIT0, BIT1, BIT2, BIT3.......
Step 402 according to the selection of user to the functional module option, will be sued for peace with the corresponding bit value of selected function module;
Step 403, the bit value that the bit value sum of being asked is corresponding with each functional module respectively carries out logic and operation;
Step 404 is when when non-vanishing, driving the data path of the functional module of opening current bit value correspondence with operation result;
Step 405, ascending according to bit value, the data path of the functional module that driving is opened links to each other in turn, generates the path link.
When the user selected this functional module, the result by the logic and operation gained was the pairing bit value of current functional module; When the user did not select this functional module, the result by the logic and operation gained was 0.Sequencing is ascending to be provided with the bit value that each functional module is given according to carrying out, so it is ascending according to bit value, the data path of the functional module that driving is opened links to each other in turn, also promptly according to the execution sequencing of each functional module, generates a path and links.
For example, according to the logic and operation result, drive the data path of SIF_BP, ISP_ISP1, ISP_ISP2, IPP_YUV422 and COMP_JPEG corresponding function module, ascending according to its corresponding bit value, data path with SIF_BP, ISP_ISP1, ISP_ISP2, IPP_YUV422 and COMP_JPEG links to each other successively, generates a complete path link with sequencing.In embodiments of the present invention, selection according to the user, the path chained representation that generates is: the data class that is entered the BP type by SIF, ISP1 and ISP2 through ISP carries out Flame Image Process then, pass through the YUV422 Zoom module of IPP again, through the compression of JPEG module, the data that link last output through above-mentioned path transfer to PC by USB afterwards.
With reference to Fig. 5, show that the present invention is a kind of to generate the process flow diagram of the method embodiment three of data path according to bit value, comprising:
Step 501 according to the execution sequencing of functional unit, is presented in each functional module option on the user interface; Wherein, each functional module correspondence is given different bit values, and each functional module is under the jurisdiction of different functional units;
In embodiments of the present invention, the size of the bit value that each functional module is given is not done qualification, can enumerate assignment that yet can be at random in a certain order.
Step 502 according to the selection of user to the functional module option, will be sued for peace with the corresponding bit value of selected function module;
Step 503 according to the execution sequencing of functional unit, travels through each functional module in each functional unit, and the bit value that the bit value sum is corresponding with each functional module is respectively made logic and operation;
In logic and operation, travel through according to the execution sequencing of functional unit, promptly the bit value of functional module correspondence carries out and computing at carrying out the preceding earlier, again to carry out after the bit value of functional module correspondence carry out and computing.
As in embodiments of the present invention, at first to by the Compress compression unit view data be compressed at last by SIF interface unit input data, therebetween, need to carry out Flame Image Process, convergent-divergent processing through ISP and IPP unit.Then, travel through wherein each functional module successively according to the order of SIF, ISP, IPP, Compress functional unit.
Step 504 is when when non-vanishing, driving the data path of the functional module of opening current bit value correspondence with operation result;
Step 505, according to the sequencing of traversal, the data path of the functional module that driving is opened links to each other in turn, generates the path link.
Traversal order according to SIF, ISP, IPP, Compress functional unit, link to each other in turn wherein driving the functional module of opening, user as shown in Figure 2 selects, data path with SIF_BP, ISP_ISP1, ISP_ISP2, IPP_YUV422 and COMP_JPEG links to each other successively, generates a complete path link with sequencing.
Need to prove, if when the eurypalynous functional module option of multiselect is arranged in the functional unit, can be in conjunction with the embodiments two, to the execution of difference in functionality module choosing back order give by little to bit value, many each functional modules of selecting at user in the functional unit then,, successively its corresponding data path is linked to each other in turn by reaching big for a short time according to bit value, generate the path link.
With reference to Fig. 6, show that the present invention is a kind of to generate the structural drawing of the device embodiment of data path according to bit value, comprising:
Module represents unit 601, is used for each functional module option is presented in user interface; Wherein, each functional module correspondence is given different bit values;
Bit value sum unit 602 is used for the selection to the functional module option according to the user, will sue for peace with the corresponding bit value of selected function module;
Logic and operation unit 603, corresponding with each functional module respectively bit value of bit value sum that is used for being asked carries out logic and operation;
Path generation unit 604 is used for generating the path link when when non-vanishing, driving the data path of the functional module of opening current bit value correspondence with operation result.
In a preferred embodiment of the invention, described each functional module is under the jurisdiction of different functional units; Then described module represents the execution sequencing of unit according to functional unit, and each functional module option is presented on the user interface successively.
For the sequencing that guarantees that each data path connects, in a preferred embodiment of the invention,, give corresponding bit value at different functional modules is ascending according to the execution sequencing of functional unit; Then described path generation unit is ascending according to bit value, and the data path of the functional module that driving is opened links to each other in turn, generates the path link.
In another preferred embodiment of the present invention, described and arithmetic element travel through each functional module in each functional unit according to the execution sequencing of functional unit, carry out logic and operation; Then described path generation unit is according to the sequencing of traversal, and the data path of the functional module that driving is opened links to each other in turn, generates the path link.
Preferably, at each functional unit, the type of each functional module option that is represented comprises: multiselect one or multiselect are many.Then the user can correspondence be provided with a data path in a functional unit, and many data paths perhaps are set.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed all is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.For device embodiment, because it is similar substantially to method embodiment, so description is fairly simple, relevant part gets final product referring to the part explanation of method embodiment.
More than to a kind of method and apparatus that generates data path according to bit value provided by the present invention, be described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.