CN102981950B - A kind of transfer method of optical module firmware visualization - Google Patents
A kind of transfer method of optical module firmware visualization Download PDFInfo
- Publication number
- CN102981950B CN102981950B CN201210429411.3A CN201210429411A CN102981950B CN 102981950 B CN102981950 B CN 102981950B CN 201210429411 A CN201210429411 A CN 201210429411A CN 102981950 B CN102981950 B CN 102981950B
- Authority
- CN
- China
- Prior art keywords
- communication interface
- interface information
- firmware
- address
- optical module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Abstract
The invention discloses a kind of transfer method of optical module firmware visualization, belong to fiber optic communication field.The method comprising the steps of: A, create and include the configuration file of all communication interface information of optical module; B, configuration file is converted to communication interface information code file; C, complete the specific implementation function of firmware communication interface information, and be compiled into executable firmware.Transfer method of optical module firmware visualization of the present invention, the configuration file including all communication interface information of optical module is first created before carrying out firmware research and development, and configuration file is converted to communication interface information code file, firmware research and development slip-stick artist and firmware testing slip-stick artist directly can check the communication interface information code in communication interface information code file, realize the visual research and development of optical module firmware and test, improve research and development and the testing efficiency of firmware, highly shortened the firmware R&D cycle.
Description
Technical field
The present invention relates to fiber optic communication field, particularly a kind of transfer method of optical module firmware visualization.
Background technology
Optical module is the device realizing opto-electronic conversion, is made up of optoelectronic device, functional circuit and optical interface.Optical module firmware (Firmware) is solidificated in the executable program in PROM or EEPROM of optical module inside or FLASH ROM, is responsible for the various devices coordinating and control whole optical module inside, makes it normally work according to predetermined function.In existing optical module firmware R&D process, optical module firmware is is normally researched and developed by multiple firmware engineering teacher collaborate, and everyone is only responsible for a part wherein.The associated firmware information be responsible for owing to often needing intersection acquisition the other side between firmware engineering teacher, and in existing optical module firmware R&D process, directly cannot check cross one another firmware information, therefore in the whole process of firmware research and development, the final research and development that just can complete whole firmware through a large amount of communications are needed between firmware engineering teacher, the speed which results in firmware research and development is had a strong impact on, and the quality of firmware also cannot obtain effective guarantee.
Summary of the invention
The object of the invention is to overcome the deficiency that the firmware efficiency of research and development caused because optical module firmware research and development are linked up existing in existing method is low, a kind of transfer method of optical module firmware visualization is provided, the visual research and development of optical module firmware can be realized by the method.
In order to realize foregoing invention object, the invention provides following technical scheme:
A kind of transfer method of optical module firmware visualization, it comprises step:
A, create and comprise the configuration file of all communication interface information of optical module, described communication interface information comprises: name of the information, message address, information format, and information describes;
B, configuration file is converted to communication interface information code file;
C, complete the programming of the specific implementation function of firmware communication interface information, and be compiled into executable firmware.
According to the embodiment of the present invention, described step B specifically comprises the following steps:
B1, reading configuration file, obtaining communication interface message;
The communication interface information that B2, parsing obtain, and be converted into communication interface information code;
B3, communication interface information code according to conversion, generate communication interface information code file.Described communication interface information code file is the file comprising all communication interface information codes.
According to the embodiment of the present invention, described step B2 specifically comprises the following steps:
B2-1, judge if address pattern is block mode, then to enter the address pattern of communication interface information step B2-2, if address pattern is byte mode, then enter step B2-3, if address pattern is bit pattern, then enter step B2-4;
B2-2, judge whether the address of communication interface information matches with the block address form of specifying, if coupling, be converted to communication interface information code, otherwise send error report information;
B2-3, judge whether the address of communication interface information matches with the byte address form of specifying, if coupling, be converted to communication interface information code, otherwise send error report information;
B2-4, judge whether the address of communication interface information matches with the bit address form of specifying, if coupling, be converted to communication interface information code, otherwise send error report information.
Compared with prior art, beneficial effect of the present invention: transfer method of optical module firmware visualization of the present invention, the configuration file including all communication interface information of optical module is first created before carrying out firmware research and development, again this configuration file is converted to communication interface information code, and generate communication interface information code file, firmware research and development slip-stick artist views communication interface information code by communication interface information code file, and code is visual.Slip-stick artist is by checking that this configuration file or communication interface information code file can understand the communication interface information relevant to oneself completely clearly in firmware research and development, and based on communication interface information code, add the specific implementation function of information, be compiled into again and can perform firmware, namely achieve the research and development of optical module firmware code visualization.Meanwhile, firmware testing slip-stick artist by directly checking this configuration file or communication interface information code file, understands firmware code information, saves the time for communication that slip-stick artist researched and developed by a large amount of and firmware, achieves visual testing, improve the testing efficiency of firmware.The inventive method can realize the visual research and development of optical module firmware and visual testing, under the prerequisite ensureing firmware quality, highly shortened the firmware R&D cycle.
Accompanying drawing illustrates:
Fig. 1 is the inventive method FB(flow block).
Fig. 2 is the FB(flow block) of translation-profile.
Fig. 3 is the FB(flow block) of resolving communication interface information.
Embodiment
Below in conjunction with test example and embodiment, the present invention is described in further detail.But this should be interpreted as that the scope of the above-mentioned theme of the present invention is only limitted to following embodiment, all technology realized based on content of the present invention all belong to scope of the present invention.
Optical module and system can realize information transmission by various communication interface, such as I
2c interface, SPI interface, UART interface, MDIO interface etc., with I in the present embodiment
2c interface is that example describes the inventive method in detail.
Transfer method of optical module firmware visualization of the present invention is: before writing firmware program, first create all I comprising optical module
2c communication interface information (i.e. I
2c information) configuration file, described I
2c information comprises: I
2c name of the information, I
2c message address, I
2c information format, I
2c information description etc.Slip-stick artist is by checking that this configuration file can understand the communication interface information relevant to oneself completely clearly in firmware research and development.
Further, will containing I
2the configuration file of C communication interface information is converted to I
2c communication interface information code, and add I based on this
2the specific implementation function of C communication interface information, what save firmware code writes the time.The inventive method achieves the research and development of optical module firmware code visualization, shortens the firmware R&D cycle.In like manner, can directly revise containing I
2the configuration file of C communication interface information, more amended configuration file is converted to I
2c communication interface information code, and then realize amendment firmware code, namely achieve the function of dynamic-configuration (or adjustment) firmware demand, reach the object of the visual research and development of firmware.
With reference to figure 1, Fig. 2, Fig. 3, concrete, the inventive method comprises the following steps:
A, according to fixed format establishment include I
2the configuration file of C communication interface information, such as, the I inserted successively in order in EXCEL table (or other configurable documents etc.)
2c communication interface (i.e. I
2c information) information is: I
2c name of the information, I
2c message address (this address 16 system numbers represent, the address in configuration file is only the expression formula that 16 system numbers combine according to certain format), I
2c information format, I
2c information describes.Such as shown in following table:
Wherein the implication of Address A2.60-61 is: I
2c Address 0xA2, DIRECT Page, Offset0x60-0x61.
B, configuration file is converted to communication interface information code file, its step comprises:
B1, reading configuration file, obtain I
2c communication interface information;
B2, parsing I
2c communication interface information, and be converted into I
2c communication interface information code, such as, I
2i in C communication interface information
2c message address is A2.60-61, and the address after parsing is: I
2c address 0xA2, side-play amount 0x60-0x61, the I after conversion
2c communication interface information code is: " RT_TEMP, I
2c Address0xA2, Offset 0x60-0x61,16-bit signed, Internally measured module temperature ", contain the I after parsing
2all the elements of C communication interface information.
Resolving is specially:
B2-1, judge I
2the address pattern of C communication interface information, if address pattern is block mode, then enters step B2-2, if address pattern is byte mode, then enters step B2-3, if address pattern is bit pattern, then enters step B2-4;
B2-2, judge I
2whether the address of C communication interface information matches with the block address form (as A2.60-61) of specifying, if coupling, is converted to I
2c communication interface information code, otherwise send error report information;
B2-3, judge I
2whether the address of C communication interface information matches with the byte address form (as A2.70) of specifying, if coupling, is converted to I
2c communication interface information code, otherwise send error report information;
B2-4, judge I
2whether the address of C communication interface information matches with the bit address form (as A2.70.6) of specifying, if coupling, is converted to I
2c communication interface information code, otherwise send error report information.
B3, according to conversion after I
2c communication interface information code, generates I automatically
2c communication interface information code file, described I
2c communication interface information code file contains all I
2c communication interface information code, the I namely in configuration file
2c communication interface information and I
2i in C communication interface information code file
2c communication interface information code maps mutually.
C, firmware engineering teacher are according to the I of conversion
2c communication interface information code, completes firmware I
2the programming of the specific implementation function of C communication interface information, is finally compiled into executable firmware.
After the optical module that compiling generates can perform firmware, need in its PROM or EEPROM by corresponding programmable device programming light inlet inside modules or FLASH ROM, and then test by firmware testing slip-stick artist the function whether this firmware can satisfy the demands.In test process, firmware testing slip-stick artist can directly check configuration file and I
2i in C communication interface information code file
2c communication interface information code, achieves visual testing, saves the time for communication that slip-stick artist researched and developed by a large amount of and firmware, improves the testing efficiency of firmware.
The inventive method can realize visual research and development and visual testing, under the prerequisite ensureing firmware quality, highly shortened the firmware R&D cycle.
Claims (1)
1. a transfer method of optical module firmware visualization, the method comprises the following steps:
A, create and comprise the configuration file of all communication interface information of optical module, described communication interface information comprises: name of the information, message address, information format, and information describes;
B, configuration file is converted to communication interface information code file;
C, complete the programming of firmware communication interface information realization of functions, and be compiled into executable firmware;
Described step B comprises the following steps:
B1, reading configuration file, obtaining communication interface message;
The communication interface information that B2, parsing obtain, and be converted into communication interface information code;
B3, communication interface information code according to conversion, generate communication interface information code file;
Described step B2 comprises the following steps:
B2-1, judge if address pattern is block mode, then to enter the address pattern of communication interface information step B2-2, if address pattern is byte mode, then enter step B2-3, if address pattern is bit pattern, then enter step B2-4;
B2-2, judge whether the address of communication interface information matches with the block address form of specifying, if coupling, be converted to communication interface information code, otherwise send error report information;
B2-3, judge whether the address of communication interface information matches with the byte address form of specifying, if coupling, be converted to communication interface information code, otherwise send error report information;
B2-4, judge whether the address of communication interface information matches with the bit address form of specifying, if coupling, be converted to communication interface information code, otherwise send error report information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210429411.3A CN102981950B (en) | 2012-10-31 | 2012-10-31 | A kind of transfer method of optical module firmware visualization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210429411.3A CN102981950B (en) | 2012-10-31 | 2012-10-31 | A kind of transfer method of optical module firmware visualization |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102981950A CN102981950A (en) | 2013-03-20 |
CN102981950B true CN102981950B (en) | 2015-09-09 |
Family
ID=47856004
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210429411.3A Active CN102981950B (en) | 2012-10-31 | 2012-10-31 | A kind of transfer method of optical module firmware visualization |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102981950B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101354686A (en) * | 2008-09-24 | 2009-01-28 | 北京中星微电子有限公司 | Method and apparatus for supporting different inductors of firmware |
CN102033762A (en) * | 2010-11-02 | 2011-04-27 | 浪潮电子信息产业股份有限公司 | Method for quickly setting firmware parameters by utilizing configuration file |
CN102479265A (en) * | 2010-11-25 | 2012-05-30 | 上海华虹集成电路有限责任公司 | Method for modifying wrong function of firmware of hard mask product |
-
2012
- 2012-10-31 CN CN201210429411.3A patent/CN102981950B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101354686A (en) * | 2008-09-24 | 2009-01-28 | 北京中星微电子有限公司 | Method and apparatus for supporting different inductors of firmware |
CN102033762A (en) * | 2010-11-02 | 2011-04-27 | 浪潮电子信息产业股份有限公司 | Method for quickly setting firmware parameters by utilizing configuration file |
CN102479265A (en) * | 2010-11-25 | 2012-05-30 | 上海华虹集成电路有限责任公司 | Method for modifying wrong function of firmware of hard mask product |
Also Published As
Publication number | Publication date |
---|---|
CN102981950A (en) | 2013-03-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108664239B (en) | Cross-technology-stack web front-end development system and method based on micro-service | |
CN102289378A (en) | Method for automatically generating APP (Application) | |
CN106970820A (en) | Code storage method and code storage | |
CN101963915A (en) | Building method of compilation and system thereof | |
US8756407B2 (en) | Configuration rule prototyping tool | |
CN103942137A (en) | Browser compatibility testing method and device | |
CN102662648A (en) | Embedded software development simulation platform of communication terminal and application thereof | |
CN103868421B (en) | A kind of method showing electric detonator positional information on main control system screen | |
CN104268074A (en) | Application software online debugging method based on DCS | |
CN102014118A (en) | Method for reading multiple electric energy meters generally | |
CN106095376A (en) | A kind of implementation method of quick configuration monitoring picture | |
CN106528184A (en) | App development method based on cordova platform | |
CN104050085A (en) | Forced code standard inspection method and system | |
CN102707979A (en) | Special refreshing tool and refreshing method for automobile controller software | |
CN104991810B (en) | Method and processing system in automatic addition APK to Android system | |
CN102902624A (en) | Software debugging system and method | |
CN102591787B (en) | The data processing method of JAVA card and device | |
CN102495552A (en) | Real-time simulation system oriented to space-borne electronic system | |
CN105302616A (en) | Software remote immediate updating and upgrading system and method | |
CN102981950B (en) | A kind of transfer method of optical module firmware visualization | |
CN104503767A (en) | System and method for automatically generating codes based on LIN protocol | |
CN103677790A (en) | Software function modifying method | |
CN104007980A (en) | Achieving method for mobile application based on application describing file parsing | |
CN103677909A (en) | Method and device for achieving mask card patch mechanism | |
CN113687814A (en) | Automation realization method of model framework and interface file based on AUTOSAR (automotive open system architecture) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |