CN106168934B - A kind of data transmission method and device - Google Patents

A kind of data transmission method and device Download PDF

Info

Publication number
CN106168934B
CN106168934B CN201610494157.3A CN201610494157A CN106168934B CN 106168934 B CN106168934 B CN 106168934B CN 201610494157 A CN201610494157 A CN 201610494157A CN 106168934 B CN106168934 B CN 106168934B
Authority
CN
China
Prior art keywords
bus
programming device
processing unit
central processing
business 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
Application number
CN201610494157.3A
Other languages
Chinese (zh)
Other versions
CN106168934A (en
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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN201610494157.3A priority Critical patent/CN106168934B/en
Publication of CN106168934A publication Critical patent/CN106168934A/en
Application granted granted Critical
Publication of CN106168934B publication Critical patent/CN106168934B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/36Handling requests for interconnection or transfer for access to common bus or bus system
    • G06F13/362Handling requests for interconnection or transfer for access to common bus or bus system with centralised access control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0016Inter-integrated circuit (I2C)

Abstract

The embodiment of the present invention provides a kind of data transmission method and device, is related to the communications field, accesses operation to business module simultaneously for main control module.It include: main control module include central processing unit and programming device, programming device includes logic gates, logic gates is used to control the state machine of programming device, and central processing unit sends access request to programming device, and access request is write access or read access;Logic gates controls the state machine of programming device according to access request;Central processing unit simultaneously accesses operation at least two business modules by the link between main control module and each business module.

Description

A kind of data transmission method and device
Technical field
The present invention relates to the communications field more particularly to a kind of data transmission methods and device.
Background technique
Currently, distributed network communication equipment include by I2C bus (Inter-IC bus) connection main control module with Business module.I2C bus means " specification or agreement of completing information exchange between integrated circuit or functional unit ", provides Communication line between integrated circuit (ICs).I2C bus is released by Philips company earliest, using a data line (English Full name: SerialData, English abbreviation: SDA), add a clock lines (full name in English: clock line, English abbreviation: SCL) The transmission of data and the extension of peripheral components are completed, is the two-way continuous bus of two lines.
As shown in Figure 1a, a kind of distributed network communication device structure schematic diagram is provided for the prior art.Main control module packet The central processing unit (full name in English: Central Processing Unit, English abbreviation: CPU) included passes through I2C interface, connection Multipath I 2 C extended function module, to realize that main control module can connect multiple business modules, to carry out read access or write access.By It is a kind of Serial Extension technology in I2C bus, what main control module also can only be serial carries out read access or write access to business module, Read access or write access cannot be carried out simultaneously to multiple business modules parallel.
As shown in Figure 1 b, device structure schematic diagram is communicated for another distributed network that the prior art provides.Master control mould Block connects programming device, designs multiple I2C controllers on programming device, each I2C controller and business module IC bus (full name in English: Inter-Integrated Circuit, English abbreviation: IIC) interface is connected.Although Can be realized to multiple business modules while carrying out read access or write access, still, due to programming device contain it is more The internal resource consumption of I2C controller, programming device is more, and carries out read access or write access simultaneously to multiple business modules Efficiency it is lower.
So, how to realize that the high efficiency read access of distributed network communication each business module of equipment or write access be one A urgent problem to be solved.
Summary of the invention
The purpose of the present invention is to provide a kind of data transmission method and devices, can be patrolled using less programming device Resource is collected, realizes the high efficiency read access to distributed network communication each business module of equipment or write access.
Above-mentioned target and other targets will be reached by the feature in independent claims.Further implementation exists It is embodied in dependent claims, the description and the appended drawings.
In a first aspect, providing a kind of data transmission method, it is applied to distributed network and communicates equipment, distributed network communication Equipment includes a main control module and N number of business module, and N is integer more than or equal to 2, main control module include central processing unit and Programming device, programming device include logic gates, and logic gates is used to control the state machine of programming device, described Method includes:
Central processing unit sends access request to programming device, and access request is write access or read access;Logic gate electricity Road controls the state machine of programming device according to access request, so that main control module establishes the chain between each business module Road;Central processing unit simultaneously visits at least two business modules by the link between main control module and each business module Ask operation.
The data transmission method that above-mentioned first aspect provides may be programmed by increasing programming device newly in main control module The shape for the access request control programming device that the logic gates that device includes is issued according to the central processing unit of main control module State machine, i.e. link between control main control module and each business module, in order to which the central processing unit of main control module passes through master Link between control module and each business module simultaneously accesses operation to business module, thus, it is possible to less in utilization Programming device logical resource, while the universal I2C Standard Interface of central processing unit of main control module can be used, and use rule The I2C access operation of model realizes the high efficiency read access to distributed network communication each business module of equipment or write access.
With reference to first aspect, can be in realization mode at the first, central processing unit is total by the first I2C with programming device Line connection, main control module are connect by N number of I2C bus with N number of business module, i.e., each business module passes through an I2C bus It is connect with main control module, the state machine of programming device is in first state, and first state is inside programming device by the One logical signal line realizes that the logical connection with N number of I2C bus and the first I2C bus, the access request are write access,
Central processing unit simultaneously accesses to business module by the link between main control module and each business module Operation includes: central processing unit by the first I2C bus, the first logical signal line and N number of I2C bus while at least two A business module carries out write access;Central processing unit is received by the first I2C bus, the first logical signal line and N number of I2C bus The response that the business module of write access is sent.So, main control module is by first logical signal line to each Business module sends write access, so that main control module can carry out write access at least two business modules simultaneously.
With reference to first aspect, in second of achievable mode, central processing unit is total by the first I2C with programming device Line connection, main control module are connect by N number of I2C bus with N number of business module, and the state machine of programming device is in the first shape State, first state are to be realized and N number of I2C bus and the first I2C inside the programming device by the first logical signal line The logical connection of bus, programming device further include N-1 data register, and the access request is read access,
Logic gates includes: logic gates according to read access according to the state machine that access request controls programming device The state machine for controlling programming device is changed into the second state from first state, and the second state is inside programming device by the One logical signal line realizes that the logical connection with the 2nd I2C bus and the first I2C bus, the 2nd I2C bus are connection The bus of main control module and the first business module, and realized and N-1 by the second logical signal line to N logical signal line The one-to-one logical connection of I2C bus, it is total with the one-to-one connection of N-1 business module that N-1 I2C bus is main control module Line, and the second logical signal line to N logical signal line respectively with the one-to-one logical connection of N-1 data register;Centre Reason device includes: simultaneously centre to the business module operation that accesses by the link between main control module and each business module It manages device and read access is carried out to the first business module by the first I2C bus, the first logical signal line and the 2nd I2C bus, The I2C bus and logic that each business module is connected by corresponding data register in N-1 business module simultaneously are believed Number line sends data to corresponding data register.To which main control module can simultaneously read at least two business modules Access.
In conjunction with second of achievable mode, described the can be passed through in the central processing unit in realization mode at the third One I2C bus, the first logical signal line and the 2nd I2C bus carry out read access to first business module, together Each business module is connected by the corresponding data register in Shi Suoshu N-1 business module I2C bus and Logical signal line is sent data to after the corresponding data register, the method also includes:
The state machine that logic gates controls the programming device is changed into the third state from second state, described The third state is that the N-1 data register head and the tail are logically contiguous, and patrol inside the programming device by described first Collect the logical connection of signal wire realization and the first I2C bus and the first data register;Central processing unit is continuously read Take the data in the N-1 data register.
Mode can be realized in conjunction with the third, in the 4th kind of achievable mode, continuously read institute in the central processing unit After stating the data in N-1 data register, the method also includes: the state machine of logic gates control programming device It is changed into the first state from the third state, central processing unit passes through the first I2C bus, the first logical signal line Response is sent to N number of business module with N number of I2C bus.
Mode or the 4th kind of achievable mode can be realized in conjunction with the first, in the 6th kind of achievable mode, in described Central processor is by the link between the main control module and each business module simultaneously at least two business moulds Block accesses before operation, the method also includes:
Central processing unit sends the address of business module, locator service module;Central processing unit is total by the first I2C Line, the first logical signal line and N number of I2C bus receive the response that the business module being addressed is sent.
In conjunction with the first can realize mode into the 5th kind of achievable mode any one, in the 6th kind of achievable mode In, at least two business modules are carried out simultaneously by the link between main control module and each business module in central processing unit After access operation, the method also includes:
Central processing unit is sent by the first I2C bus, the first logical signal line and N number of I2C bus to N number of business module It stops operation.
Second aspect provides a kind of distributed network communication equipment, and it includes a master control mould that distributed network, which communicates equipment, Block and N number of business module, N are integer more than or equal to 2, and main control module includes central processing unit and programming device, it is described can Programming device includes logic gates, and the logic gates is used to control the state machine of programming device,
Central processing unit, for sending access request to programming device, access request is write access or read access;Logic Gate circuit, for controlling the state machine of programming device according to access request, so that main control module is established and each business module Between link;Central processing unit is also used to through the link between main control module and each business module simultaneously at least two A business module accesses operation.Concrete implementation mode can be with reference to specific in the data transmission method that first aspect provides Behavioral function.
In the present invention, the name pair of central processing unit, programming device, main control module, business module and logic gates Equipment itself does not constitute restriction, and in practical implementations, these equipment can occur with other titles.As long as the function of each equipment It is similar with the present invention, within the scope of the claims of the present invention and its equivalent technology.
The aspects of the invention or other aspects can more straightforwards in the following description.
Detailed description of the invention
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 technical 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 It obtains other drawings based on these drawings.
Fig. 1 a is that a kind of distributed network that the prior art provides communicates device structure schematic diagram;
Fig. 1 b is that another distributed network that the prior art provides communicates device structure schematic diagram;
Fig. 2 is that a kind of distributed network provided in an embodiment of the present invention communicates device structure schematic diagram;
Fig. 3 is a kind of first state schematic diagram of the state machine of programming device provided in an embodiment of the present invention;
Fig. 4 is a kind of data transmission method flow chart provided in an embodiment of the present invention;
Fig. 5 is another data transmission method flow chart provided in an embodiment of the present invention;
Fig. 6 is that a kind of state machine of programming device provided in an embodiment of the present invention and the corresponding relationship of write access process show It is intended to;
Fig. 7 is another data transmission method flow chart provided in an embodiment of the present invention;
Fig. 8 is that a kind of state machine of programming device provided in an embodiment of the present invention and the corresponding relationship of read access process show It is intended to;
Fig. 9 is a kind of second status diagram of the state machine of programming device provided in an embodiment of the present invention;
Figure 10 is a kind of third state schematic diagram of the state machine of programming device provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention is clearly retouched It states.
Basic principle of the invention is: accessing operation, visits to business module for main control module in the prior art It asks in the lower situation of efficiency, of the invention by increasing programming device newly in main control module, what programming device included patrols Collect the state machine for the access request control programming device that gate circuit is issued according to the central processing unit of main control module, i.e. control master The link between module and each business module is controlled, in order to which the central processing unit of main control module passes through main control module and each industry Link between business module simultaneously accesses operation to business module, thus, it is possible to patrol using less programming device Resource, while the I2C Standard Interface that can be used the central processing unit of main control module universal are collected, and the I2C of operating specification accesses behaviour Make, realizes the high efficiency read access to distributed network communication each business module of equipment or write access.
The embodiment of the present invention provides a kind of distributed network communication device structure schematic diagram, as shown in Figure 2, comprising: one Main control module and N number of business module, main control module are connect by N number of I2C bus with N number of business module, i.e., each business module It is connect by an I2C bus with main control module, N is the integer more than or equal to 2, wherein main control module includes central processing unit And programming device, central processing unit are connect with programming device by the first I2C bus, programming device includes logic gate electricity Road, logic gates are used to control the state machine of programming device.
Wherein, central processing unit, for sending access request to programming device, access request is write access or reads to visit It asks;Logic gates, for controlling the state machine of programming device according to access request, so that main control module is established and each industry Link between module of being engaged in;Central processing unit, it is right simultaneously by the link between main control module and each business module to be also used to At least two business modules access operation.
It should be noted that when central processing unit does not send access request to programming device, the shape of programming device State machine is in first state, first state be inside programming device by the first logical signal line realize with N number of I2C bus with And the logical connection of the first I2C bus, the first state of the state machine of programming device are equivalent to original state, that is, Distributed network communication equipment does not carry out the state of any access operation.As shown in figure 3, the of the state machine of programming device One state.
Specifically, logic gates judgement is programmable after central processing unit sends write access request to programming device The state machine of device is original state, i.e. first state, and first state is to pass through the first logical signal line inside programming device Realize the logical connection with N number of I2C bus and the first I2C bus, central processing unit passes through main control module when first state Link between each business module carries out write access to business module simultaneously, that is, is patrolled by the first I2C bus, first It collects signal wire and N number of I2C bus carries out write access at least two business modules simultaneously, finally, central processing unit passes through first I2C bus, the first logical signal line and N number of I2C bus are stopped operation to the transmission of N number of business module.
After central processing unit sends read access request to programming device, logic gates judges the shape of programming device State machine is original state, i.e. first state, the main control module and each business module when central processing unit passes through first state it Between link be addressed to operate, if addressed successfully, central processing unit receive read access business module send response Response;Then, logic gates is changed into the second state from first state according to the state machine that read access controls programming device, Second state is to be realized and the 2nd I2C bus and the first I2C bus inside programming device by the first logical signal line Logical connection, the 2nd I2C bus are to connect the bus of main control module and the first business module, and pass through the second logical signal line Realize that the one-to-one logical connection with N-1 I2C bus, N-1 I2C bus are main control module and N-1 to N logical signal line The bus of a one-to-one connection of business module, and the second logical signal line to N logical signal line respectively with N-1 data register The one-to-one logical connection of device, central processing unit is by the first I2C bus, the first logical signal line and the 2nd I2C bus to first Business module carries out read access, while each business module is connected by corresponding data register in N-1 business module The I2C bus and logical signal line connect sends data to corresponding data register;Again, logic gates control is programmable The state machine of device is changed into the third state from the second state, and the third state is logically contiguous for N-1 data register head and the tail, and The logical connection with the first I2C bus and first data register is realized by the first logical signal line inside programming device, Central processing unit continuously reads the data in N-1 data register;Finally, the state of logic gates control programming device Machine is changed into first state from the third state, and central processing unit is total by the first I2C bus, the first logical signal line and N number of I2C Line sends response to N number of business module, and central processing unit passes through the first I2C bus, the first logical signal line and N number of I2C Bus is stopped operation to the transmission of N number of business module.
It should be noted that design I2C host or I2C slave are not needed inside programming device, only comprising in part The logic and partial data register (I2C DAT2~I2C DATN) of portion's signal connection state of a control machine.Programming device root According to the difference for the central processing unit access process that main control module includes, programming device switches different state machines, realizes concurrent I2C read access or write access.Unified status information address distribution, i.e. a home address are realized inside each business module The a certain characteristic monitor state information of corresponding business module, and the information type definition of all business modules is consistent.
Embodiment 1
The embodiment of the present invention provides a kind of data transmission method, communicates equipment based on distributed network shown in Fig. 2, such as schemes Shown in 4, comprising:
Step 201, central processing unit send access request to programming device.
Access request is write access or read access.
Step 202, programming device control the state machine of programming device according to access request, so that main control module is established With the link between each business module.
Link between main control module and each business module includes the entity between main control module and each business module Logical links between link and main control module and each business module, i.e. programming device and main control module and business mould The link of I2C bus between block.
Step 203, central processing unit are by the link between main control module and each business module simultaneously at least two Business module accesses operation.
So, by increasing programming device, the logic gates root that programming device includes newly in main control module According to the state machine for the access request control programming device that the central processing unit of main control module issues, i.e. control main control module and every Link between a business module, in order to which the central processing unit of main control module passes through between main control module and each business module Link access operation to business module simultaneously, thus, it is possible in the less programming device logical resource of utilization, simultaneously The universal I2C Standard Interface of central processing unit of main control module, and the I2C access operation of operating specification can be used, realize to point The high efficiency read access of each business module of cloth network communication equipment or write access.
Embodiment 2
The embodiment of the present invention provides a kind of data transmission method, communicates equipment based on distributed network shown in Fig. 2, can compile The state machine of journey device is in first state, and first state is inside programming device by the realization of the first logical signal line and N The logical connection of a I2C bus and the first I2C bus, main control module initiate the write access to business module, as shown in figure 5, The described method includes:
Step 301, central processing unit send access startup operation symbol (STA) to programming device.
Step 302, central processing unit send the address of business module, locator service module.
Step 303, central processing unit are sought by the first I2C bus, the first logical signal line and the reception of N number of I2C bus The response that the business module of location is sent.
Step 304, central processing unit are by the first I2C bus, the first logical signal line and N number of I2C bus simultaneously to extremely Few two business modules carry out write access.
Step 305, central processing unit write visit by the first I2C bus, the first logical signal line and the reception of N number of I2C bus The response that the business module asked is sent.
Step 306, central processing unit pass through the first I2C bus, the first logical signal line and N number of I2C bus to N number of business Module transmission stops operation.
Write access refers to the data transmission that host is initiated to slave, which can be listened to by slave and be stored in inside slave Register in realize specific function.Central processing unit may include I2C host, and business module includes I2C slave.
As shown in fig. 6, the correspondence diagram of the state machine of programming device and write access process.
The I2C host for the central processing unit that main control module includes initiates startup operation (S);I2C host sending device address (DEVICE ADDRESS) addresses the I2C slave to be accessed;I2C host sends read and write control bit, read and write control bit Numerical value be " 0 " when indicate write access, the numerical value of read and write control bit indicates read access when being " 1 ";I2C slave listen to addressing with The address of equipment of itself is consistent, and feeding back ACK responds (A), and numerical value is that " 0 " indicates effective ACK;I2C host listens to effective response The data (DATA) of write access are sent afterwards, and each data conveying length is 8bit;After I2C slave receives 8bit data, feedback One response (A);It can also continue to write a data, response condition and I2C master of the I2C host according to I2C slave herein The access of machine itself is arranged, and judges whether to terminate access, initiation, which stops operation, terminates this access (P).
It should be noted that main control module, which can also be arranged, carries out write access to which specific business module.
Particularly, if not listen to addressing consistent with the address of equipment of itself for I2C slave, feeding back ACK is not rung I2C slave It answers (A), or feedback NACK response (NA), numerical value is that " 1 " indicates invalid ACK.
So, by increasing programming device, the logic gates root that programming device includes newly in main control module According to the state machine for the write access control programming device that the central processing unit of main control module issues, i.e. control main control module and each Link between business module, in order to which the central processing unit of main control module passes through between main control module and each business module Link carries out write access to business module simultaneously, thus, it is possible to utilizing less programming device logical resource, while can make With the I2C Standard Interface that the central processing unit of main control module is universal, and the I2C access operation of operating specification, it realizes to distribution The high efficiency write access of each business module of network communication equipment.
Embodiment 3
The embodiment of the present invention provides a kind of data transmission method, communicates equipment based on distributed network shown in Fig. 2, can compile The state machine of journey device is in first state, and first state is to be realized inside the programming device by the first logical signal line With the logical connection of N number of I2C bus and the first I2C bus, main control module initiates the read access to business module, As shown in Figure 7, which comprises
Step 401, central processing unit send access startup operation symbol (STA) to programming device.
Step 402, central processing unit send the address of business module, locator service module.
Step 403, central processing unit are sought by the first I2C bus, the first logical signal line and the reception of N number of I2C bus The response that the business module of location is sent.
Read access refers to behaviors that host is actively initiated, that control slave is to host transmission data.Central processing unit can be with Including I2C host, business module includes I2C slave.
As shown in figure 8, the corresponding relationship of the state machine of programming device and read access process.
When the state machine of programming device is first state, firstly, the I2C master for the central processing unit that main control module includes Machine initiates startup operation (S);I2C host sending device address (DEVICE ADDRESS) addresses the I2C slave to be accessed;I2C Host sends read and write control bit, the numerical value of read and write control bit is " 0 " when indicate write access, the numerical value of read and write control bit For " 1 " when indicate read access;It is consistent with the address of equipment of itself that I2C slave listens to addressing, and feeding back ACK responds (A), numerical value For " 0 " the effective ACK of expression.Read access is carried out again, i.e. execution step 404 to step 411.
Particularly, if not listen to addressing consistent with the address of equipment of itself for I2C slave, feeding back ACK is not rung I2C slave It answers (A), or feedback NACK response (NA), numerical value is that " 1 " indicates invalid ACK.
Step 404, logic gates are changed into the from first state according to the state machine that read access controls programming device Two-state.
As shown in figure 9, the second state is to be realized and the 2nd I2C bus inside programming device by the first logical signal line And the first I2C bus logical connection, i.e. the first logical signal line not only carried out logical connection with the 2nd I2C bus but also with first I2C bus carries out logical connection, and the 2nd I2C bus be to connect the bus of main control module and the first business module, and pass through the Two logical signal lines realize that the one-to-one logical connection with N-1 I2C bus, N-1 I2C bus are to N logical signal line The bus of main control module and the one-to-one connection of N-1 business module other than the first business module, i.e. a business module are logical It crosses an I2C bus to connect with programming device, and the second logical signal line is a with N-1 respectively to the N logical signal line The one-to-one logical connection of data register.For example, the second business module passes through the 3rd I2C bus and the second logical signal line and the The connection of one data register.
Step 405, central processing unit are by the first I2C bus, the first logical signal line and the 2nd I2C bus to the first industry Module of being engaged in carries out read access.
When executing step 405, it is performed simultaneously step 406.
The I2C that each business module is connected by corresponding data register in step 406, N-1 business module Bus and logical signal line send data to corresponding data register.
For example, the second business module sends data to corresponding by the 3rd I2C bus and the second logical signal line One data register.
The state machine that step 407, logic gates control programming device is changed into the third state from the second state.
As shown in Figure 10, the third state is that N-1 data register head and the tail are logically contiguous, and pass through inside programming device First logical signal line realizes the logical connection with the first I2C bus and first data register.
Step 408, central processing unit continuously read the data in N-1 data register.
N-1 data are sent, and execute step 409.
The state machine that step 409, logic gates control programming device is changed into first state from the third state.
Step 410, central processing unit pass through the first I2C bus, the first logical signal line and N number of I2C bus to N number of business Module sends response.
Step 411, central processing unit pass through the first I2C bus, the first logical signal line and N number of I2C bus to N number of business Module transmission stops operation.
Specifically, as shown in figure 8, the correspondence diagram of the state machine of programming device and read access process.
The I2C slave of first business module transfers data to the I2C host of the central processing of main control module, remaining business The I2C slave of module transfers data to the preservation of the corresponding data register inside programming device.
Data (SDA) signal is kept high-impedance state (non-driven state) by the I2C host of the central processing of main control module, driving The high low state of clock (SCL) signal switches, and height cycle of states switches 8 times, slave driving data when clock signal is low The logic state of signal keeps the logic state of data-signal when clock signal is high, will be in accessed I2C address register Address corresponding inside 1 byte data is transferred to I2C host, realizes the read operation of 1 byte.
Optionally, after 1 byte data is read, what I2C host was sent by the first I2C bus to the first business module Response.
Therefore, in first read operation, the data of the first business module are read successfully by I2C host, remaining business mould The reading data of block are saved in the data register inside programming device.
After the first character joint number evidence that I2C slave is transmitted to I2C host is transmitted, all business modules and main control module Link disconnect, each internal data registers are finished up interconnection in order, the stem connection I2C host of data register can Data register data inside programming device are then continuously by I2C host read access.
Therefore, the 2nd access to n-th data byte that I2C host is continuously initiated, really in programming device The temporary data information in portion is read out.
Each byte of N that I2C host one-time continuous is read, the I2C slave same internal address of the corresponding N number of business module of sequence Data information.Realize the high efficiency I2C read operation to multiple channels I2C.
Until the I2C host read access of the central processing unit of main control module is completed, I2C host actively initiates to stop operation. During stopping operation, the state machine of programming device is restored to first state.
Finally, the initiation of I2C host stops operation (STP), the I2C slave of all business modules listens to STP operation, I2C access terminates.
So, by increasing programming device, the logic gates root that programming device includes newly in main control module According to the state machine for the read access control programming device that the central processing unit of main control module issues, i.e. control main control module and each Link between business module, in order to which the central processing unit of main control module passes through between main control module and each business module Link carries out read access to business module simultaneously, thus, it is possible to utilizing less programming device logical resource, while can make With the I2C Standard Interface that the central processing unit of main control module is universal, and the I2C access operation of operating specification, it realizes to distribution The high efficiency read access of each business module of network communication equipment.
It should be noted that for the ease of clearly describing the technical solution of the embodiment of the present invention, in the embodiment of the present invention In, it uses the printed words such as " first ", " second " and function and the essentially identical identical entry of effect or similar item is distinguished, ability Field technique personnel are understood that the printed words such as " first ", " second " are not defined quantity and execution order.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description It with the specific work process of unit, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that the independent physics of each unit includes, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can be stored in a computer readable storage medium, the program When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: that (English is complete for read-only memory Claim: Read-Only Memory, English abbreviation: ROM), random access memory (full name in English: Random-Access Memory, English abbreviation: RAM), the various media that can store program code such as magnetic or disk.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.

Claims (10)

1. a kind of data transmission method is applied to distributed network and communicates equipment, the distributed network communication equipment includes one A main control module and N number of business module, N are the integer more than or equal to 2, which is characterized in that the main control module includes centre Managing device and programming device, the programming device includes logic gates, and the logic gates described can be compiled for controlling The state machine of journey device, which comprises
The central processing unit sends access request to the programming device, and the access request is write access or read access;
The logic gates controls the state machine of the programming device according to the access request, so that the main control module Establish the link between each business module;
The central processing unit is by the link between the main control module and each business module simultaneously at least two The business module accesses operation;
Wherein, the central processing unit is connect with the programming device by the first I2C bus, and the main control module passes through N A I2C bus is connect with N number of business module, and the state machine of the programming device is in first state, first shape State is total with N number of I2C bus and the first I2C by the realization of the first logical signal line inside the programming device The logical connection of line, the programming device further include N-1 data register, and the access request is read access,
The logic gates includes: according to the state machine that the access request controls the programming device
The logic gates changes according to the state machine that the read access controls the programming device from the first state For the second state, second state is to be realized and second inside the programming device by the first logical signal line The logical connection of I2C bus and the first I2C bus, the 2nd I2C bus are to connect the main control module and first The bus of business module, and a pair with N-1 I2C bus is realized by the second logical signal line to N logical signal line One logical connection, the N-1 I2C bus are the bus of the main control module and the one-to-one connection of N-1 business module, and institute State the second logical signal line to the N logical signal line respectively with the one-to-one logical connection of N-1 data register;
The central processing unit is by the link between the main control module and each business module simultaneously at least two The business module operation that accesses includes:
The central processing unit is by the first I2C bus, the first logical signal line and the 2nd I2C bus to institute It states the first business module and carries out read access, while each business module passes through corresponding institute in the N-1 business module The I2C bus and logical signal line for stating data register connection send data to the corresponding data register.
2. the method according to claim 1, wherein the central processing unit and the programming device pass through the The connection of one I2C bus, the main control module are connect by N number of I2C bus with N number of business module, the programming device State machine be in first state, the first state be inside the programming device by the first logical signal line realize with The logical connection of N number of I2C bus and the first I2C bus, the access request are write access,
The central processing unit is by the link between the main control module and each business module simultaneously to the business The module operation that accesses includes:
The central processing unit by the first I2C bus, the first logical signal line and N number of I2C bus simultaneously Write access is carried out at least two business modules;
The central processing unit is received by the first I2C bus, the first logical signal line and N number of I2C bus The response that the business module of the write access is sent.
3. the method according to claim 1, wherein the central processing unit by the first I2C bus, The first logical signal line and the 2nd I2C bus carry out read access, while the N-1 to first business module The I2C bus and logical signal line that each business module is connected by the corresponding data register in business module will Data are transmitted to after the corresponding data register, the method also includes:
The state machine that the logic gates controls the programming device is changed into the third state from second state, described The third state is that the N-1 data register head and the tail are logically contiguous, and patrol inside the programming device by described first Collect the logical connection of signal wire realization and the first I2C bus and the first data register;
The central processing unit continuously reads the data in the N-1 data register.
4. according to the method described in claim 3, it is characterized in that, continuously reading the N-1 number in the central processing unit After the data in register, the method also includes:
The state machine that the logic gates controls the programming device is changed into the first state from the third state;
The central processing unit is by the first I2C bus, the first logical signal line and N number of I2C bus to institute It states N number of business module and sends response.
5. method according to claim 2 or 4, which is characterized in that pass through the main control module in the central processing unit Link between each business module simultaneously accesses before operation at least two business modules, the side Method further include:
The central processing unit sends the address of business module, addresses the business module;
The central processing unit is received by the first I2C bus, the first logical signal line and N number of I2C bus The response that the business module being addressed is sent.
6. a kind of distributed network communicates equipment, the distributed network communication equipment includes a main control module and N number of business Module, N are the integer more than or equal to 2, which is characterized in that the main control module includes central processing unit and programming device, institute Stating programming device includes logic gates, and the logic gates is used to control the state machine of the programming device,
The central processing unit, for sending access request to the programming device, the access request is write access or reading Access;
The logic gates, for controlling the state machine of the programming device according to the access request, so that the master Control the link that module is established between each business module;
The central processing unit is also used to through the link between the main control module and each business module simultaneously to extremely Few two business modules access operation;
Wherein, the central processing unit is connect with the programming device by the first I2C bus, and the main control module passes through N A I2C bus is connect with N number of business module, and the state machine of the programming device is in first state, first shape State is total with N number of I2C bus and the first I2C by the realization of the first logical signal line inside the programming device The logical connection of line, the programming device further include N-1 data register, and the access request is read access,
The logic gates, specifically for controlling the state machine of the programming device according to the read access from described first State is changed into the second state, and second state is to be realized inside the programming device by the first logical signal line With the logical connection of the 2nd I2C bus and the first I2C bus, the 2nd I2C bus is to connect the main control module With the bus of the first business module, and by the second logical signal line to N logical signal line realize with N-1 I2C bus One-to-one logical connection, the N-1 I2C bus is the total of the main control module and the one-to-one connection of N-1 business module Line, and the second logical signal line to the N logical signal line respectively with the one-to-one logic of N-1 data register Connection;
The central processing unit is specifically used for passing through the first I2C bus, the first logical signal line and described second I2C bus to first business module carry out read access, while in the N-1 business module each business module by with The I2C bus and logical signal line of its corresponding data register connection send data to the corresponding data register Device.
7. distributed network according to claim 6 communicates equipment, which is characterized in that the central processing unit and it is described can Programming device is connected by the first I2C bus, and the main control module is connect by N number of I2C bus with N number of business module, The state machine of the programming device is in first state, and the first state is to patrol inside the programming device by first The logical connection of signal wire realization and N number of I2C bus and the first I2C bus is collected, the access request is to write visit It asks,
The central processing unit is specifically used for passing through the first I2C bus, the first logical signal line and N number of I2C Bus carries out write access at least two business modules simultaneously;
The central processing unit is also used to total by the first I2C bus, the first logical signal line and N number of I2C Line receives the response that the business module of the write access is sent.
8. distributed network according to claim 6 communicates equipment, which is characterized in that
The logic gates, the state machine specifically for controlling the programming device are changed into third from second state State, the third state are that the N-1 data register head and the tail are logically contiguous, and pass through institute inside the programming device State the logical connection of the first logical signal line realization and the first I2C bus and the first data register;
The central processing unit is also used to continuously read the data in the N-1 data register.
9. distributed network according to claim 8 communicates equipment, which is characterized in that
The logic gates, the state machine specifically for controlling the programming device are changed into the first state;
The central processing unit is also used to total by the first I2C bus, the first logical signal line and N number of I2C Line sends response to N number of business module.
10. the distributed network according to claim 7 or 9 communicates equipment, which is characterized in that
The central processing unit is also used to send the address of business module, addresses the business module;
The central processing unit is also used to total by the first I2C bus, the first logical signal line and N number of I2C Line receives the response that the business module being addressed is sent.
CN201610494157.3A 2016-06-29 2016-06-29 A kind of data transmission method and device Active CN106168934B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610494157.3A CN106168934B (en) 2016-06-29 2016-06-29 A kind of data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610494157.3A CN106168934B (en) 2016-06-29 2016-06-29 A kind of data transmission method and device

Publications (2)

Publication Number Publication Date
CN106168934A CN106168934A (en) 2016-11-30
CN106168934B true CN106168934B (en) 2018-12-14

Family

ID=58064633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610494157.3A Active CN106168934B (en) 2016-06-29 2016-06-29 A kind of data transmission method and device

Country Status (1)

Country Link
CN (1) CN106168934B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107402899A (en) * 2017-08-02 2017-11-28 湖南利能科技股份有限公司 A kind of extended method of IIC interfaces
CN107239423A (en) * 2017-08-02 2017-10-10 湖南利能科技股份有限公司 A kind of device based on extension IIC interfaces
CN110764444A (en) 2019-10-10 2020-02-07 苏州浪潮智能科技有限公司 Control system, switch, and method for controlling execution device
CN112698614B (en) * 2021-03-25 2021-06-15 之江实验室 User side logic controller for reading and writing any byte
CN113641606B (en) * 2021-08-09 2024-04-19 国家计算机网络与信息安全管理中心 Access method, device and equipment of service board and readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581026A (en) * 2004-05-19 2005-02-16 中兴通讯股份有限公司 Device and method for operating multiple I2C sub device in communication equipment
CN101140556A (en) * 2007-09-11 2008-03-12 中兴通讯股份有限公司 Method and device for realizing accessing multiple I2C slave device by programmable device
CN102023953A (en) * 2009-09-17 2011-04-20 研祥智能科技股份有限公司 Control method of system having many inter-integrated circuit (I2C) buses
CN102193889A (en) * 2011-06-08 2011-09-21 杭州国芯科技股份有限公司 I2C bus repeater and read-write method thereof
CN103530261A (en) * 2013-10-30 2014-01-22 广东威创视讯科技股份有限公司 Circuit and management method for access to multiple slaves having same I2C address
CN103577356A (en) * 2013-11-06 2014-02-12 杭州华三通信技术有限公司 Equipment and method for achieving IIC interface address extension
CN104199796A (en) * 2014-09-18 2014-12-10 歌尔声学股份有限公司 IIC communication method and embedded system for implementing IIC communication
CN105117319A (en) * 2015-08-25 2015-12-02 烽火通信科技股份有限公司 Method for realizing real-time monitoring of multi-channel MDIO (Management Data Input Output) devices based on FPGA
CN105279130A (en) * 2015-10-22 2016-01-27 北方工业大学 Method for operating multiple I2C devices with same address

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581026A (en) * 2004-05-19 2005-02-16 中兴通讯股份有限公司 Device and method for operating multiple I2C sub device in communication equipment
CN101140556A (en) * 2007-09-11 2008-03-12 中兴通讯股份有限公司 Method and device for realizing accessing multiple I2C slave device by programmable device
CN102023953A (en) * 2009-09-17 2011-04-20 研祥智能科技股份有限公司 Control method of system having many inter-integrated circuit (I2C) buses
CN102193889A (en) * 2011-06-08 2011-09-21 杭州国芯科技股份有限公司 I2C bus repeater and read-write method thereof
CN103530261A (en) * 2013-10-30 2014-01-22 广东威创视讯科技股份有限公司 Circuit and management method for access to multiple slaves having same I2C address
CN103577356A (en) * 2013-11-06 2014-02-12 杭州华三通信技术有限公司 Equipment and method for achieving IIC interface address extension
CN104199796A (en) * 2014-09-18 2014-12-10 歌尔声学股份有限公司 IIC communication method and embedded system for implementing IIC communication
CN105117319A (en) * 2015-08-25 2015-12-02 烽火通信科技股份有限公司 Method for realizing real-time monitoring of multi-channel MDIO (Management Data Input Output) devices based on FPGA
CN105279130A (en) * 2015-10-22 2016-01-27 北方工业大学 Method for operating multiple I2C devices with same address

Also Published As

Publication number Publication date
CN106168934A (en) 2016-11-30

Similar Documents

Publication Publication Date Title
CN106168934B (en) A kind of data transmission method and device
CN100568211C (en) Realize method and the device of a plurality of I2C of visit with programming device from device
CN102866971B (en) Device, the system and method for transmission data
CN101208681B (en) Communication system
CN100566278C (en) Slave unit in the communication system of using serial data transfer bus
CN106959935A (en) A kind of method that compatible I2C communications communicate with IPMB
CN105573951B (en) A kind of ahb bus interface system for data stream transmitting
CN101425966A (en) Network-on-chip and use network-on-chip carry out the method for data processing
CN100533417C (en) Method for transferring data of systems on chip, and direct memory access controller
CN101719110A (en) Real-time monitoring method of multipath I2C device in optical communication device
CN102291423A (en) Method for controlling physical layer (PHY) chip and control circuit
CN102664953B (en) High flux distributed type simulation support platform, system and simulation method based on high level architecture (HLA)
CN106933753A (en) The control method and device of intelligent interface card
CN105117319A (en) Method for realizing real-time monitoring of multi-channel MDIO (Management Data Input Output) devices based on FPGA
CN105790830A (en) Optical module in-situ detection method and device
CN102636987B (en) Dual control device
CN104798010A (en) Serial storage protocol compatible frame conversion, at least in part
CN105359122B (en) enhanced data transmission in multi-CPU system
CN108280041A (en) A kind of communication means and device of internal integrated circuit host
CN105487403A (en) Establishment of motion control system based on CAN and simulation modeling method
CN105528314B (en) A kind of data processing method and control equipment
CN105718396B (en) A kind of I of big data master transmissions2C bus units and its means of communication
CN103995789B (en) A kind of direct memory access realizes system and method
CN102147739B (en) Multi-mainboard server system and network-driving method thereof
CN103699461A (en) Double-host machine mutual redundancy hot backup method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant