[go: up one dir, main page]

CN108804036A - Optical mode data processing method in the block, optical module and data processing system - Google Patents

Optical mode data processing method in the block, optical module and data processing system Download PDF

Info

Publication number
CN108804036A
CN108804036A CN201810510598.7A CN201810510598A CN108804036A CN 108804036 A CN108804036 A CN 108804036A CN 201810510598 A CN201810510598 A CN 201810510598A CN 108804036 A CN108804036 A CN 108804036A
Authority
CN
China
Prior art keywords
areas
data
ram
written
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.)
Pending
Application number
CN201810510598.7A
Other languages
Chinese (zh)
Inventor
马晓东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Huagong Genuine Optics Tech Co Ltd
Original Assignee
Wuhan Huagong Genuine Optics Tech Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Wuhan Huagong Genuine Optics Tech Co Ltd filed Critical Wuhan Huagong Genuine Optics Tech Co Ltd
Priority to CN201810510598.7A priority Critical patent/CN108804036A/en
Publication of CN108804036A publication Critical patent/CN108804036A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • G06F3/0622Securing storage systems in relation to access
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention provides a kind of optical mode data processing method in the block, optical module and data processing system, methods to include:Target matrix is determined from the areas FLASH of optical module, and target matrix is directed into the areas RAM of optical module;The target matrix that the areas RAM import is sent to host by data/address bus, wherein all tables of data of optical module are stored in the areas FLASH of optical module, and target matrix is host tables of data to be read;After having detected the areas data write-in RAM, judge whether the areas data write-in FLASH that the areas RAM will be written, if it is, the areas data write-in FLASH that the areas RAM will be written.Using technical solution provided in an embodiment of the present invention, the versatility and stability of optical module are improved.

Description

Optical mode data processing method in the block, optical module and data processing system
Technical field
The present invention relates to optical module technical field more particularly to a kind of optical mode data processing method in the block, optical module and Data processing system.
Background technology
Optical module is the device for realizing opto-electronic conversion, is made of opto-electronic device, functional circuit and optical interface, in optical module It usually requires to store multiple tables of data, including:Tables of data as defined in agreement (such as SFF-8472 agreements, INF-8077 agreements etc.), The tune-up data table of optical module manufacturer internal, calibration data table, offset data table etc..
Optical module and host can be communicated by data/address bus, for example, host can read light by data/address bus Mould tables of data in the block can also be written data to optical module by data/address bus, realize to optical mode data in the block Reason.In general, the memory block of optical module can be divided into the areas FLASH and the areas RAM, the data that host passes through data/address bus read/write It is the data in the areas RAM of optical module, and the data in the areas RAM are usually easy for losing after a power failure, in order to protect after a loss of power Card data are not lost, and the areas data write-in FLASH that the areas RAM will be written are needed, to realize the persistence of data.
The existing method handled optical mode data in the block is mainly:All tables of data of optical module are deposited in advance The areas Chu RAM, host read the tables of data in the areas optical module RAM by data/address bus, realize the reading to data in optical module; After the command byte that receiving host is sent, the areas FLASH are written in the data in the areas host write-in RAM by optical module.
However, inventor has found in the implementation of the present invention, at least there are the following problems for the prior art:
For different application scenarios, optical module needs the tables of data stored to be differed from several tables to tens tables, uses Existing method causes same optical module can not since the tables of data sum that optical module can store is limited by the areas RAM size Meet different application scenarios, therefore the versatility of optical module is not strong, and can interrupt optical module and master due to sending command byte Communication between machine is easy to happen loss of data, therefore the stability of optical module is not high.
It is therefore desirable to design a kind of new optical mode data processing method in the block, to overcome the above problem.
Invention content
It is an object of the invention to overcome the defect of the prior art, provide a kind of optical mode data processing method in the block, Optical module and data processing system, to realize the versatility and stability that improve optical module.
The invention is realized in this way:
In a first aspect, the present invention provides a kind of optical mode data processing method in the block, the method includes:
Target matrix is determined from the areas FLASH of optical module, and the target matrix is directed into the optical module The areas RAM;The target matrix that the areas RAM import is sent to host by data/address bus, wherein the optical module owns Tables of data is stored in the areas FLASH of the optical module, and the target matrix is host tables of data to be read;
After having detected that the areas RAM are written in data, judge whether to be written described in the data write-in in the areas RAM The areas FLASH, if it is, the areas FLASH are written in the data that the areas RAM are written.
Optionally, target matrix is determined in the areas FLASH from optical module, including:
Optical module after the power is turned on, the default data table in the areas FLASH is determined as target matrix, wherein described Default data table is preset for giving tacit consent to the tables of data for importing the areas RAM in all tables of data that the areas FLASH store;
In the data for detecting that the host is written by the data/address bus at the default identification byte in the areas RAM After table numbering, the tables of data with obtained data table numbering in all tables of data of the areas FLASH storage is determined as Target matrix, wherein data table numbering is used for unique identification data table.
Optionally, the areas RAM include the default fixed area and the default multiplexing area, and the target matrix is led Enter to the areas RAM of the optical module, including:
When the target matrix is default data table, a part of target matrix is imported to the default fixation of optical module Another part target matrix is imported the default multiplexing area of optical module by area;
When the target matrix for tables of data with the data table numbering obtained when, the target matrix is led Enter to the default multiplexing area.
Optionally, the default fixed area that a part of default data table is imported to optical module, by another part default data table The default multiplexing area of optical module is imported, including:
According to data table numbering from small to large/sequence from big to small, each default data table is imported successively described pre- It, will be not imported after the total size of imported default data table is equal to the size of the default fixed area if fixed area Default data table imports default multiplexing area successively.
Optionally, the target matrix is directed into the areas RAM of the optical module, including:
Determine the target matrix the areas FLASH storage address, according to preset RAM regional address and FLASH The correspondence of regional address imports address, by the target using the corresponding RAM regional address of identified storage address as target Tables of data is directed into the target and imports address;
The areas FLASH are written in the data by the areas said write RAM, including:
Writing address of the data in the areas RAM for determining the areas said write RAM, according to preset RAM regional address with The correspondence of FLASH regional address will using the corresponding FLASH regional address of identified writing address as target writing address The target writing address is written in the data that the areas RAM are written.
Optionally, the default fixed area is preset low byte area in the areas RAM, and the default multiplexing area is described Preset high byte area in the areas RAM, the default identification byte are in the default fixed area.
Optionally, in the following way, judge whether that the areas FLASH are written in the data that the areas RAM will be written:
When starting timer, whether detection still has data that the areas RAM are written in preset timing duration;
If it is, the areas FLASH are not written in the data that the areas RAM are written by judgement;
If it is not, then the areas FLASH are written in the data that the areas RAM are written by judgement.
Optionally, after the areas FLASH are not written in the data that the areas RAM are written by judgement, the method further includes:
Reset timer restarts timing, returns and executes whether detection still has data write-in in preset timing duration The step of areas RAM;
After judging the data that the areas RAM the are written areas FLASH are written, the method further includes:
Shut down the timer.
Second aspect, the present invention provide a kind of optical module, including:
The target matrix is directed by reading unit for determining target matrix from the areas FLASH of optical module The areas RAM of the optical module;The target matrix that the areas RAM import is sent to host by data/address bus, wherein described All tables of data of optical module are stored in the areas FLASH of the optical module, and the target matrix is that the host continues The tables of data taken;
Writing unit, for after having detected that the areas RAM are written in data, judging whether that the areas RAM will be written The areas FLASH are written in data, if it is, the areas FLASH are written in the data that the areas RAM are written.
Optionally, reading unit includes:
First determination subelement, for optical module after the power is turned on, the default data table in the areas FLASH is determined as number of targets According to table, wherein default data table is preset for giving tacit consent to the data for importing the areas RAM in all tables of data that the areas FLASH store Table;
Second determination subelement, for being write at the default identification byte in the areas RAM by data/address bus detecting host After the data table numbering entered, the tables of data with obtained data table numbering is true in all tables of data that the areas FLASH are stored It is set to target matrix, wherein data table numbering is used for unique identification data table.
Optionally, the areas RAM include default fixed area and default multiplexing area, and reading unit includes:
First imports subelement, for when target matrix is default data table, a part of target matrix to be imported Another part target matrix is imported the default multiplexing area of optical module by the default fixed area of optical module;
Second imports subelement, for when target matrix is tables of data with the data table numbering obtained, general Target matrix is directed into default multiplexing area.
Optionally, the first importing subelement is specifically used for:
According to data table numbering from small to large/sequence from big to small, each default data table is imported successively default solid Determine area, it, will not imported default data after the total size of imported default data table is equal to the size of default fixed area Table imports default multiplexing area successively.
Optionally, target matrix is directed into the areas RAM of optical module by reading unit, specially:
Determine target matrix the areas FLASH storage address, according to preset RAM regional address and FLASH regional address Correspondence imports address using the corresponding RAM regional address of identified storage address as target, target matrix is directed into Target imports address;
The areas data write-in FLASH in the areas RAM will be written in writing unit, specially:
Writing address of the data in the areas RAM for determining the areas write-in RAM, according to preset RAM regional address and FLASH regional address Correspondence the areas RAM will be written using the corresponding FLASH regional address of identified writing address as target writing address Target writing address is written in data.
Optionally, it is preset low byte area in the areas RAM to preset fixed area, and it is preset height in the areas RAM to preset multiplexing area Byte regions are preset identification byte and are in default fixed area.
Optionally, writing unit is specifically used for:
In the following way, judge whether that the areas FLASH are written in the data that the areas RAM will be written:
When starting timer, whether detection still has the areas data write-in RAM in preset timing duration;
If it is, the areas data write-in FLASH in the areas RAM will be written in judgement;
If it is not, then the areas data write-in FLASH in the areas RAM will be written in judgement.
Optionally, optical module further includes:
Reset unit, for after will not the areas data write-in FLASH in the areas RAM be written in judgement, reset timer to be opened again Beginning timing returns and executes whether detection still has the areas data write-in RAM in preset timing duration;
Unit is shut down, for after judging the data that the areas RAM the are written areas FLASH are written, shutting down the meter When device.
The third aspect, the present invention provide a kind of data processing system, including host, data/address bus and optical module, the light Module is the optical module for including above-mentioned reading unit and above-mentioned writing unit, and the optical module and the host pass through the data Bus is communicated.
The invention has the advantages that:Using technical solution provided by the invention, due to all data of optical module Table is stored in the areas FLASH of optical module, and the memory space in the usually areas FLASH is sufficient, the tables of data sum that can be stored More than the tables of data sum stored needed for optical module in various application scenarios, therefore same optical module disclosure satisfy that different applied fields Scape improves versatility, and optical module can be after judging the areas data write-in FLASH in the areas RAM will to be written, by said write The areas FLASH are written in the data in the areas RAM, are not necessarily to the transmission command byte of receiving host, avoid due to sending command byte The communication between optical module and host is interrupted, reduces the possibility of loss of data, improves the stability of optical module.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of flow diagram of optical mode provided in an embodiment of the present invention data processing method in the block;
Fig. 2 is a kind of structural schematic diagram of optical module provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of data processing system provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts all other Embodiment shall fall within the protection scope of the present invention.
It should be noted that optical mode data processing method in the block provided by the present invention can be applied to electronic equipment, Wherein, in a particular application, which can be optical module, MCU (Micro Control Unit, micro-control unit) etc. Deng this is all reasonable.Moreover, it is achieved that the functional software of optical mode data processing method in the block provided by the present invention can be Special optical mode data processing software in the block, or existing optical mode data processing software in the block or other with data Plug-in unit in the software of processing function.
Referring to Fig. 1, the embodiment of the present invention provides a kind of optical mode data processing method in the block, and method includes the following steps:
S101, target matrix is determined from the areas FLASH of optical module, target matrix is directed into the RAM of optical module Area;The target matrix that the areas RAM import is sent to host by data/address bus.
Wherein, all tables of data of optical module are stored in the areas FLASH of optical module, and target matrix continues for host The tables of data taken.
Data/address bus can be I2C (Inter-Integrated Circuit) bus, and I2C buses are by Philips public affairs A kind of simple, bidirectional two-line synchronous serial bus of department's exploitation, it only needs the device that both threads can be on being connected to bus Information is transmitted between part, host and optical module can be communicated by I2C buses.
In a kind of realization method, target matrix is determined from the areas FLASH of optical module, including:
Optical module after the power is turned on, the default data table in the areas FLASH is determined as target matrix;
It, will after detecting the data table numbering that host is written by data/address bus at the default identification byte in the areas RAM The tables of data with obtained data table numbering is determined as target matrix in all tables of data of the areas FLASH storage.
Wherein, default data table is preset for giving tacit consent to the data for importing the areas RAM in all tables of data in the areas FLASH Table, data table numbering are used for unique identification data table.
Some tables of data can be selected as default data table from all tables of data in the areas FLASH in advance, for example, can be with In advance in tables of data, the tune-up data table of optical module manufacturer internal, calibration data table, offset data table as defined in selection agreement etc. One or more as each default data table.
Specifically, the every data table size stored in the areas FLASH can be identical, and store needed for all default data tables Storage total capacity can be equal to the size in the areas RAM, after the areas Gu RAM size is determining and every data table size determines, acquiescence The sum of tables of data can determine.For example, the size in the areas RAM is 256 bytes, the size of every tables of data is 128 bytes, then writes from memory It is 2 to recognize tables of data, if the size in the areas RAM is 512 bytes, the size of every tables of data is 128 bytes, then default data table is 4.
As can be seen that optical module after the power is turned on, default data table can directly be imported into the areas RAM of optical module, therefore give tacit consent to Tables of data is to be imported into the tables of data of optical module at first.
Theoretically, the areas RAM can correspond to a storage address by byte addressing, each byte, and the byte in the areas RAM is got over More, the memory space in the areas RAM is bigger.Specifically, a byte can be set from each byte in the areas RAM in advance as default Identification byte, host can be counted as tables of data by the data that data/address bus is written at the default identification byte in the areas RAM Number, and the tables of data number-mark is host tables of data to be read, it is thus possible to all numbers that the areas FLASH are stored It is determined as target matrix according to the tables of data with obtained data table numbering in table.
In a kind of realization method, the areas RAM may include default fixed area and default multiplexing area, and target matrix is directed into The areas RAM of optical module, including:
When target matrix is default data table, a part of target matrix is imported to the default fixed area of optical module, Another part target matrix is imported to the default multiplexing area of optical module;
When target matrix for tables of data with the data table numbering obtained when, target matrix is directed into default It is multiplexed area.
Default fixed area can be preset low byte area in the areas RAM, and it can be preset height in the areas RAM to preset multiplexing area The efficiency that target matrix is directed into default multiplexing area is improved in byte regions in order to reduce the occupancy to default multiplexing area, pre- to be marked with Character learning section may be in default fixed area.
In addition, in order to improve the read-write efficiency of data, every data table size in the areas FLASH is identical, and every data The size of table is the greatest common divisor of default fixed area size and default multiplexing area's size, for example, default fixed area size and pre- If multiplexing area's size is respectively:128 bytes and 384 bytes, since 128 and 384 greatest common divisor is 128, then every data Table size can be 128 bytes.
The I2C mailing addresses of optical module are A0/A2, and host can once access the number of 256 bytes by the addresses A0/A2 According to, therefore in order to save the space in the areas RAM, the production cost of optical module is saved, the size in the areas RAM can be 256 byte addresses, when So, in other embodiment, the size in the areas RAM may be 512 bytes, 382 bytes etc., the present invention to the size in the areas RAM not It limits.
The areas RAM are segmented into multiple regions, do not limit the size in each region, for example, the size in each region can Think 128 bytes, 256 bytes etc..
Specifically, when the size in the areas RAM is 256 bytes, the size in each region is 128 byte, the areas RAM are segmented into 2 pieces of regions, the areas Di Ban (the 0th~127 byte) and the areas Gao Ban (the 128th~255 byte), and can be using the areas Di Ban as default Fixed area, using the areas Gao Ban as default multiplexing area, using the 127th byte of default fixed area as default identification byte;For another example, when When the size in the areas RAM is 512 bytes, the size in each region is 128 byte, the areas RAM are segmented into 4 pieces of regions, each region Bytes range be respectively:0th~127 byte, the 128th~255 byte, the 256th~383 byte, the 384th~511 byte, and And it can be using the 0th~127 byte as default fixed area, the 128th~255 byte, the 256th~383 byte, the 384th~511 word Section presets multiplexing areas as three, and using the 127th byte of default fixed area as default identification byte.
In a kind of realization method, a part of default data table is imported to the default fixed area of optical module, another part is write from memory Recognize the default multiplexing area that tables of data imports optical module, including:
According to data table numbering from small to large/sequence from big to small, each default data table is imported successively default solid Determine area, it, will not imported default data after the total size of imported default data table is equal to the size of default fixed area Table imports default multiplexing area successively.
Each default data table all has data table numbering, to illustrate according to the sequence of data table numbering from small to large Illustrate, for example, the data table numbering of default data table is respectively 1,2,3,4, the size of every default data table is 128 bytes, The size of default fixed area is 128 bytes, and the size for presetting multiplexing area is 384 bytes, the then data for being first 1 by data table numbering Table, which imports, presets fixed area, and the tables of data that data table numbering is 2,3,4 is then imported default multiplexing area successively.
In another implementation, target matrix is directed into the areas RAM of optical module, including:
Determine target matrix the areas FLASH storage address, according to preset RAM regional address and FLASH regional address Correspondence imports address using the corresponding RAM regional address of identified storage address as target, target matrix is directed into Target imports address.
For each tables of data in the areas FLASH, it can determine the tables of data in the storage address in the areas FLASH, sheet Invention does not limit method of determination, for example, can utilize default corresponding between data table numbering and the areas FLASH storage address Relationship determines the corresponding areas the FLASH storage address of target data table numbering, using the identified areas FLASH storage address as mesh Storage address of the mark tables of data in the areas FLASH.
For example, target matrix is stored in the third page (areas FLASH are stored by page) in the areas FLASH, according to preset The third page of the correspondence of RAM regional address and FLASH regional address, the areas FLASH corresponds to the 128th~255 byte in the areas RAM, then Address is imported using the 128th~255 byte in the areas RAM as target, and target matrix is imported to the 128th~255 word in the areas RAM Section.
In a kind of realization method, the corresponding areas RAM of each default data table can also be previously set and import address, for every One default data table can directly obtain the corresponding default areas RAM of the default data table and import address, and by the default data table It is directed into the corresponding default areas RAM of the default data table and imports address, a part of target matrix is imported into optical mode to realize Another part target matrix is imported the default multiplexing area of optical module by the default fixed area of block.
S102, after having detected data write-in RAM areas, judge whether that the areas FLASH are written in the data that the areas RAM will be writtens, If it is, the areas data write-in FLASH that the areas RAM will be written.
It is understood that when data are written to optical module by data/address bus in host, optical module can detect RAM areas are written in data, in turn, it can be determined that whether will be written the areas data write-in FLASH in the areas RAM, it, can in a kind of realization method , to judge whether that the areas data write-in FLASH in the areas RAM will be written in the following way:
When starting timer, whether detection still has the areas data write-in RAM in preset timing duration;
If it is, the areas data write-in FLASH in the areas RAM will be written in judgement;
If it is not, then the areas data write-in FLASH in the areas RAM will be written in judgement.
Timing duration can be previously set, such as can be 250 milliseconds, 300 milliseconds, 400 milliseconds etc., in preset meter In Shi Shichang, if having detected the areas data write-in RAM again, showing host, there is still a need for data, host and light is written to optical module Data communication between module should not be interrupted, and communication between host and optical module can be interrupted by writing data into the areas FLASH, Therefore in order to keep the data between host and optical module to communicate, loss of data is reduced, it is possible to determine that the number in the areas RAM will not be written According to the areas write-in FLASH;In preset timing duration, if detecting the areas no data write-in RAM, show host temporarily without to Data are written in optical module, and the data communication between host and optical module can be interrupted, therefore can be determined that will be written the number in the areas RAM According to the areas write-in FLASH.
In order to simplify deterministic process, and the areas FLASH are successfully write data into, in a kind of realization method, will in judgement After the areas data write-in FLASH in the areas RAM are written, method can also include:Reset timer restarts timing, and return executes inspection Whether survey still has the step of areas RAM are written in data in preset timing duration.
It can restart timing by reset timer, and return to whether still execution detects in preset timing duration There is the step of areas RAM are written in data, to realize simplified deterministic process, and can be in detection in preset timing duration After there is no the areas data write-in RAM, the areas data write-in FLASH in the areas RAM will be written, realize the persistence of data.
In order to economize on resources, in a kind of realization method, the FLASH is written in the data that the areas RAM will be written in judgement Qu Hou, the method further include:
Shut down the timer.
After shutting down timer, timer no longer timing, therefore saved the resource of optical module.
Illustratively, a length of 250 milliseconds when preset timing, optical module, can be with after having detected data write-in RAM areas Start timer and start timing, if having detected the areas data write-in RAM again in 250 milliseconds, can be determined that will not write Enter the areas data write-in FLASH in the areas RAM, and timing can be restarted with reset timer, returns and execute when reaching pre-designed After duration, detect whether still there is the step of areas RAM are written in data;If the areas data write-in RAM have been not detected in 250 milliseconds, Then can be determined that will be written the areas data write-in FLASH in the areas RAM, and then FLASH can be written in the data that the areas RAM are written Area, and timer can be shut down.
Specifically, the areas data write-in FLASH that the areas RAM will be written, may include:
Writing address of the data in the areas RAM for determining the areas write-in RAM, according to preset RAM regional address and FLASH regional address Correspondence the areas RAM will be written using the corresponding FLASH regional address of identified writing address as target writing address Target writing address is written in data.
When data are written to optical module by data/address bus in host, optical module can detect the areas data write-in RAM, And after having detected the areas data write-in RAM, optical module can determine the writing address of the data in the areas RAM in the areas write-in RAM, It in turn, can be according to preset RAM regional address and FLASH after judging the areas data write-in FLASH in the areas RAM will to be written The correspondence of regional address, using the corresponding FLASH regional address of identified writing address as target writing address, and will write-in Target writing address is written in the data in the areas RAM.
Illustratively, determine that the data in write-in RAM areas in the writing address in the areas RAM are the 128th~255 byte, according to The correspondence of preset RAM regional address and FLASH regional address, the 128th~255 byte in the areas RAM correspond to the third in the areas FLASH Then using the third page in the areas FLASH as target writing address, and the third in the areas data write-in FLASH in the areas RAM will be written in page Page.
Using technical solution provided in an embodiment of the present invention, since all tables of data of optical module are stored in optical module In the areas FLASH, and the memory space in the usually areas FLASH is sufficient, and the tables of data sum that can be stored is more than in various application scenarios The tables of data sum stored needed for optical module, therefore same optical module disclosure satisfy that different application scenarios, improve versatility, and And after judging the areas data write-in FLASH in the areas RAM will to be written FLASH can be written in the data that the areas RAM are written by optical module Area is not necessarily to the transmission command byte of receiving host, avoids and interrupts leading between optical module and host because sending command byte Letter, reduces the possibility of loss of data, improves the stability of optical module.
Corresponding with above-mentioned embodiment of the method, the embodiment of the present invention also provides a kind of optical module.
Referring to Fig. 2, a kind of structural schematic diagram for optical module that Fig. 2 is provided by the embodiment of the present invention, including:
Target matrix is directed by reading unit 201 for determining target matrix from the areas FLASH of optical module The areas RAM of optical module;The target matrix that the areas RAM import is sent to host by data/address bus, wherein optical module owns Tables of data is stored in the areas FLASH of optical module, and target matrix is host tables of data to be read;
Writing unit 202, for after having detected the areas data write-in RAM, judging whether to write the data that the areas RAM are written Enter the areas FLASH, if it is, the areas data write-in FLASH that the areas RAM will be written.
Using technical solution provided in an embodiment of the present invention, since all tables of data of optical module are stored in optical module In the areas FLASH, and the memory space in the usually areas FLASH is sufficient, and the tables of data sum that can be stored is more than in various application scenarios The tables of data sum stored needed for optical module, therefore same optical module disclosure satisfy that different application scenarios, improve versatility, and And after judging the areas data write-in FLASH in the areas RAM will to be written FLASH can be written in the data that the areas RAM are written by optical module Area is not necessarily to the transmission command byte of receiving host, avoids and interrupts leading between optical module and host because sending command byte Letter, reduces the possibility of loss of data, improves the stability of optical module.
Optionally, reading unit 201 includes:
First determination subelement, for optical module after the power is turned on, the default data table in the areas FLASH is determined as number of targets According to table, wherein default data table is preset for giving tacit consent to the data for importing the areas RAM in all tables of data that the areas FLASH store Table;
Second determination subelement, for being write at the default identification byte in the areas RAM by data/address bus detecting host After the data table numbering entered, the tables of data with obtained data table numbering is true in all tables of data that the areas FLASH are stored It is set to target matrix, wherein data table numbering is used for unique identification data table.
Optionally, the areas RAM include presetting fixed area and default multiplexing area, reading unit 201, including:
First imports subelement, for when target matrix is default data table, a part of target matrix to be imported Another part target matrix is imported the default multiplexing area of optical module by the default fixed area of optical module;
Second imports subelement, for when target matrix is tables of data with the data table numbering obtained, general Target matrix is directed into default multiplexing area.
Optionally, the first importing subelement is specifically used for:
According to data table numbering from small to large/sequence from big to small, each default data table is imported successively default solid Determine area, it, will not imported default data after the total size of imported default data table is equal to the size of default fixed area Table imports default multiplexing area successively.
Optionally, target matrix is directed into the areas RAM of optical module by reading unit 201, specially:
Determine target matrix the areas FLASH storage address, according to preset RAM regional address and FLASH regional address Correspondence imports address using the corresponding RAM regional address of identified storage address as target, target matrix is directed into Target imports address;
The areas data write-in FLASH in the areas RAM will be written in writing unit 202, specially:
Writing address of the data in the areas RAM for determining the areas write-in RAM, according to preset RAM regional address and FLASH regional address Correspondence the areas RAM will be written using the corresponding FLASH regional address of identified writing address as target writing address Target writing address is written in data.
Optionally, it is preset low byte area in the areas RAM to preset fixed area, and it is preset height in the areas RAM to preset multiplexing area Byte regions are preset identification byte and are in default fixed area.
Optionally, writing unit 202 is specifically used for:
In the following way, judge whether that the areas FLASH are written in the data that the areas RAM will be written:
When starting timer, whether detection still has the areas data write-in RAM in preset timing duration;
If it is, the areas data write-in FLASH in the areas RAM will be written in judgement;
If it is not, then the areas data write-in FLASH in the areas RAM will be written in judgement.
Optionally, optical module further includes:
Reset unit, for after will not the areas data write-in FLASH in the areas RAM be written in judgement, reset timer to be opened again Beginning timing returns and executes whether detection still has the areas data write-in RAM in preset timing duration;
Unit is shut down, for after judging the data that the areas RAM the are written areas FLASH are written, shutting down the meter When device.
Corresponding with above-mentioned method and apparatus embodiment, the embodiment of the present invention also provides a kind of data processing system.
Referring to Fig. 3, a kind of structural schematic diagram for data processing system that Fig. 3 is provided by the embodiment of the present invention, including:Number According to processing system, including host 301, data/address bus 302 and optical module 303, the optical module 303 be include above-mentioned reading unit With the optical module of above-mentioned writing unit, the optical module 303 and the host 301 are communicated by the data/address bus 302.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention With within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention god.

Claims (10)

1. a kind of optical mode data processing method in the block, which is characterized in that the method includes:
Target matrix is determined from the areas FLASH of optical module, and the target matrix is directed into the RAM of the optical module Area;The target matrix that the areas RAM import is sent to host by data/address bus, wherein all numbers of the optical module It is stored in the areas FLASH of the optical module according to table, the target matrix is host tables of data to be read;
After having detected that the areas RAM are written in data, judge whether that the FLASH is written in the data that the areas RAM will be written Area, if it is, the areas FLASH are written in the data that the areas RAM are written.
2. according to the method described in claim 1, it is characterized in that, determining target data in the areas FLASH from optical module Table, including:
Optical module after the power is turned on, the default data table in the areas FLASH is determined as target matrix, wherein the acquiescence Tables of data is preset for giving tacit consent to the tables of data for importing the areas RAM in all tables of data that the areas FLASH store;
In the tables of data volume for detecting that the host is written by the data/address bus at the default identification byte in the areas RAM After number, the tables of data with obtained data table numbering in all tables of data of the areas FLASH storage is determined as target Tables of data, wherein data table numbering is used for unique identification data table.
3. according to the method described in claim 2, it is characterized in that, the areas RAM include the default fixed area and described pre- If being multiplexed area, the target matrix is directed into the areas RAM of the optical module, including:
When the target matrix is default data table, a part of target matrix is imported to the default fixed area of optical module, Another part target matrix is imported to the default multiplexing area of optical module;
When the target matrix for tables of data with the data table numbering obtained when, the target matrix is directed into The default multiplexing area.
4. according to the method described in claim 3, it is characterized in that, a part of default data table is imported the default solid of optical module Determine area, another part default data table is imported to the default multiplexing area of optical module, including:
According to data table numbering from small to large/sequence from big to small, each default data table is imported successively described default solid Determine area, it, will not imported acquiescence after the total size of imported default data table is equal to the size of the default fixed area Tables of data imports default multiplexing area successively.
5. according to the method described in claim 1, it is characterized in that, the target matrix is directed into the optical module The areas RAM, including:
Determine the target matrix the areas FLASH storage address, according to preset RAM regional address and the areas FLASH The correspondence of location imports address, by the target data using the corresponding RAM regional address of identified storage address as target Table is directed into the target and imports address;
The areas FLASH are written in the data by the areas said write RAM, including:
Writing address of the data in the areas RAM for determining the areas said write RAM, according to preset RAM regional address and the areas FLASH RAM will be written using the corresponding FLASH regional address of identified writing address as target writing address in the correspondence of address The target writing address is written in the data in area.
6. according to the method described in claim 3, it is characterized in that, the default fixed area is preset low in the areas RAM Byte regions, the default multiplexing area are preset high byte area in the areas RAM, and the default identification byte is in described default In fixed area.
7. according to the method described in claim 1, it is characterized in that, in the following way, judging whether that the areas RAM will be written Data the areas FLASH are written:
When starting timer, whether detection still has data that the areas RAM are written in preset timing duration;
If it is, the areas FLASH are not written in the data that the areas RAM are written by judgement;
If it is not, then the areas FLASH are written in the data that the areas RAM are written by judgement.
8. the method according to the description of claim 7 is characterized in that institute is not written in the data that the areas RAM are written in judgement After stating the areas FLASH, the method further includes:
Reset timer restarts timing, returns and executes whether detection still has in preset timing duration described in data write-in The step of areas RAM;
After judging the data that the areas RAM the are written areas FLASH are written, the method further includes:
Shut down the timer.
9. a kind of optical module, which is characterized in that including:
The target matrix is directed into described by reading unit for determining target matrix from the areas FLASH of optical module The areas RAM of optical module;The target matrix that the areas RAM import is sent to host by data/address bus, wherein the optical mode All tables of data of block are stored in the areas FLASH of the optical module, and the target matrix is that the host is to be read Tables of data;
Writing unit, for after having detected that the areas RAM are written in data, judging whether the data that the areas RAM will be written The areas FLASH are written, if it is, the areas FLASH are written in the data that the areas RAM are written.
10. a kind of data processing system, including host, data/address bus and optical module, which is characterized in that the optical module is right It is required that the optical module described in 9, the optical module and the host are communicated by the data/address bus.
CN201810510598.7A 2018-05-24 2018-05-24 Optical mode data processing method in the block, optical module and data processing system Pending CN108804036A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810510598.7A CN108804036A (en) 2018-05-24 2018-05-24 Optical mode data processing method in the block, optical module and data processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810510598.7A CN108804036A (en) 2018-05-24 2018-05-24 Optical mode data processing method in the block, optical module and data processing system

Publications (1)

Publication Number Publication Date
CN108804036A true CN108804036A (en) 2018-11-13

Family

ID=64091843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810510598.7A Pending CN108804036A (en) 2018-05-24 2018-05-24 Optical mode data processing method in the block, optical module and data processing system

Country Status (1)

Country Link
CN (1) CN108804036A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110635849A (en) * 2019-10-23 2019-12-31 青岛海信宽带多媒体技术有限公司 Optical module

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105094742A (en) * 2014-05-09 2015-11-25 华为技术有限公司 Data writing method and device
US20160284323A1 (en) * 2015-03-27 2016-09-29 Nook Digital, Llc Electrophoretic display drive techniques
CN106227680A (en) * 2016-07-26 2016-12-14 成都三零嘉微电子有限公司 A kind of data process and power fail preventing data guard method
CN106406752A (en) * 2016-08-29 2017-02-15 深圳新飞通光电子技术有限公司 Method for integrally migrating and storing batch test data by optical module
CN107861883A (en) * 2017-10-27 2018-03-30 四川天邑康和通信股份有限公司 Based on optical drive UX3320 without plug-in EEPROM processing methods

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105094742A (en) * 2014-05-09 2015-11-25 华为技术有限公司 Data writing method and device
US20160284323A1 (en) * 2015-03-27 2016-09-29 Nook Digital, Llc Electrophoretic display drive techniques
CN106227680A (en) * 2016-07-26 2016-12-14 成都三零嘉微电子有限公司 A kind of data process and power fail preventing data guard method
CN106406752A (en) * 2016-08-29 2017-02-15 深圳新飞通光电子技术有限公司 Method for integrally migrating and storing batch test data by optical module
CN107861883A (en) * 2017-10-27 2018-03-30 四川天邑康和通信股份有限公司 Based on optical drive UX3320 without plug-in EEPROM processing methods

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110635849A (en) * 2019-10-23 2019-12-31 青岛海信宽带多媒体技术有限公司 Optical module

Similar Documents

Publication Publication Date Title
EP1764703B1 (en) A system for providing access to multiple data buffers of a data retaining and processing device
CN101399654A (en) Serial communication method and apparatus
US5892929A (en) Avoiding non-unique identifiers for bus devices
CN103077147B (en) A kind of global function 1553B bus IP Core based on chained list
CN102169463B (en) Inter-integrated circuit (IIC) bus-based manufacturing information acquisition method and equipment
JP2010205124A (en) Method of configuration processing of pci device on virtualization apparatus and computer system
CN103488600A (en) Universal auxiliary machine synchronous serial interface circuit
CN1516014A (en) Test method of peripheral component interconnection bus
CN102830982A (en) Processor configuring method, device and processor
JPH0519183B2 (en)
CN108804036A (en) Optical mode data processing method in the block, optical module and data processing system
CN103412838A (en) Expansion system, communication method, address configuration method, equipment and device
US6128718A (en) Apparatus and method for a base address register on a computer peripheral device supporting configuration and testing of address space size
GB2422697A (en) Serial communication between master and slave devices
CN101189577B (en) Method and device of accessing configuration registers by automatically changing an index
CN100498731C (en) Method for supporting vertical card by basic input output system
CN112231251B (en) Board card slot identification method and device, communication equipment and readable storage medium
CN110795373A (en) Method for converting I2C bus into parallel bus, terminal and storage medium
US7636797B2 (en) LPC configuration sharing method
CN116578519A (en) Communication method, device, equipment and medium
CN112559402B (en) PCI slave interface control circuit based on FPGA and FPGA
CN111579973B (en) Chip synchronous testing method, chip, electronic equipment and storage medium
CN102902647B (en) Be arranged on I2C from the asic chip of machine printed circuit board (PCB) and printed circuit board (PCB)
CN108334337B (en) Low-delay instruction dispatcher with automatic management function and filtering guess access method
CN109144578B (en) Display card resource allocation method and device based on Loongson computer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181113