WO2023028741A1 - 一种高级扩展接口总线及片上系统 - Google Patents
一种高级扩展接口总线及片上系统 Download PDFInfo
- Publication number
- WO2023028741A1 WO2023028741A1 PCT/CN2021/115272 CN2021115272W WO2023028741A1 WO 2023028741 A1 WO2023028741 A1 WO 2023028741A1 CN 2021115272 W CN2021115272 W CN 2021115272W WO 2023028741 A1 WO2023028741 A1 WO 2023028741A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- index number
- interface
- slave
- data stream
- channel
- Prior art date
Links
- 238000011144 upstream manufacturing Methods 0.000 claims description 19
- 238000012545 processing Methods 0.000 claims description 11
- 230000004044 response Effects 0.000 claims description 8
- 230000007246 mechanism Effects 0.000 abstract description 9
- 230000003247 decreasing effect Effects 0.000 abstract 1
- 230000006870 function Effects 0.000 description 69
- 230000002159 abnormal effect Effects 0.000 description 41
- 238000013507 mapping Methods 0.000 description 14
- 230000005540 biological transmission Effects 0.000 description 10
- 238000013461 design Methods 0.000 description 9
- 238000000034 method Methods 0.000 description 9
- 230000005856 abnormality Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 7
- 238000012546 transfer Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 4
- 230000007488 abnormal function Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- MHABMANUFPZXEB-UHFFFAOYSA-N O-demethyl-aloesaponarin I Natural products O=C1C2=CC=CC(O)=C2C(=O)C2=C1C=C(O)C(C(O)=O)=C2C MHABMANUFPZXEB-UHFFFAOYSA-N 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000012806 monitoring device Methods 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
Definitions
- the present application relates to the field of chip technology, in particular to an advanced expansion interface bus and a system on chip.
- the International Organization for Standardization divides the chips in the automotive industry into quality management (quality manager, QM), automotive safety integrity level (automotive safety integrity level, ASIL) A, There are five levels of ASIL B, ASIL C and ASIL D. Among them, the QM chip is suitable for safety-related functional modules, and the safety levels from ASIL A to ASIL D increase in turn.
- SPFM single-point fault metric
- LFM latent-fault metric
- SM targeted safety mechanism
- the advanced extensible interface (AXI) bus is a typical interconnection unit, which implements the interconnection of multiple masters and slaves in the form of a crossbar.
- AXI bus needs to set up corresponding security mechanisms for its failure modes, so that the AXI bus can meet the safety level requirements in the circuit.
- the corresponding security mechanism is usually: adopt a dual-core interlock mechanism, that is, the AXI bus
- the input of the AXI bus is connected to both the main AXI bus and the backup AXI bus, as shown in Figure 1.
- the comparison module performs real-time comparison of the output of the main AXI bus and the backup AXI bus. If the outputs of the two are inconsistent, the comparison module reports the exception to the safety island of the chip, and the safety island is responsible for the handling of the AXI bus function abnormality.
- the embodiment of the present application provides an advanced expansion interface bus and a system-on-a-chip, which are used to provide a corresponding security mechanism against the abnormal function of the advanced expansion interface bus, and reduce hardware overhead and circuit area at the same time.
- an embodiment of the present application provides an advanced expansion interface bus, where the advanced expansion interface bus includes a first host interface, an AXI bridge, and a first slave interface.
- the first host interface is used to receive the first data stream through the first address channel; then, obtain the first index number according to the first address information in the first data stream, and output the first data stream and the first index number To the AXI bridge;
- the AXI bridge is coupled with the first host interface for routing the first data flow and the first index number to the first slave interface;
- the first slave interface judges the first index number and its own index number (ie Whether the index numbers of the first slave interfaces) are the same, and output the first judgment result.
- the AXI bridge can route the first data flow and the first index number to the first slave interface according to the first address information.
- the first host interface decodes the first address information to obtain the first index number, and the first index number is used to indicate the slave that requests access when the first host sends the first data stream index number. Then, after the AXI bridge routes the first data flow and the first index number to the first slave interface according to the first address information, the first slave interface can determine whether the first index number is the same as its own index number, if two If the two are not the same, it means that the AXI bus function is abnormal; if the two are the same, it means that the AXI bus function is not abnormal.
- the host and the host interface are connected in a one-to-one correspondence, and the first host interface is correspondingly connected to the first host, that is, the first data stream is the data stream sent by the first host, and the first The host sends the first data stream to the first host interface through the first address channel, the first host interface sends the first data stream to the AXI bridge, and the AXI bridge routes the first data stream to a certain slave based on its own function.
- the slaves are connected to the slave interfaces in a one-to-one correspondence, that is, the first slave interface is correspondingly connected to the first slave. Since the first slave interface is correspondingly connected to the first slave, the first slave can receive the first data stream and the first index number through the second address channel between the first slave and the first slave interface. That is, the first data stream is actually sent to the first slave.
- the master has the same index number as the correspondingly connected master interface
- the slave has the same index number as the correspondingly connected slave interface.
- the index number of the first slave interface is the index number of the first slave.
- the AXI bridge routes the first data flow according to the first address information, not according to the first index number. Therefore, if the function of the AXI bridge is abnormal, the AXI bridge will route the first data flow to the wrong slave, and the first slave receiving the first data flow is not the slave indicated by the first index number, then the first The first index number received by a slave interface is not the same as its own index number.
- the first slave interface can determine that the function of the AXI bridge is abnormal; if the function of the AXI bridge is normal, the AXI bridge will route the first data stream to To the correct slave, the first slave that receives the first data stream is the slave indicated by the first index number, then the first index number received by the first slave interface is the same as its own index number, At this time, the first slave interface can determine that the function of the AXI bridge is not abnormal.
- the first address channel is the first read address channel, and the second address channel is the second read address channel; or, the first address channel is the first write address channel, and the second address channel is the second address channel.
- Write address channel is the first address channel.
- the first host interface may also save the correspondence between the first service identifier and the first index number in the first data stream.
- the address channel and the write data channel are used to transmit the data stream from the host to the slave; for the address channel, the data stream transmitted includes address information and business identification, and the host interface can decode the address information to obtain the index number, and then the index
- the index number is transmitted to the AXI bridge together with the data stream, and the output index number can be used by the slave interface receiving the data stream to judge whether the function of the AXI bridge is abnormal; but for the write data channel, the transmitted data stream includes the service identification , but does not include address information, so the host interface cannot obtain the index number only based on the data flow; at this time, using the above scheme, the host interface can use the service identifier in the data flow and the corresponding relationship between the service identifier and the index number stored in the host interface Obtain the corresponding index number, and then transmit the index number together with the data stream to the AXI bridge.
- the first host interface may also receive the second data stream through the first write data channel, and then, according to the locally saved correspondence between the second service identifier and the second index number in the second data stream, relationship, to obtain the second index number; then, output the second data stream and the second index number to the AXI bridge; the AXI bridge routes the second data stream and the second index number to the second slave interface; in addition, the advanced expansion interface
- the second slave interface in the bus can be used to judge whether the second index number is the same as its own index number (that is, the index number of the second slave interface), and output a second judgment result.
- the first host interface is correspondingly connected to the first host. That is to say, the second data stream is a data stream sent by the first host, the first host sends the second data stream to the first host interface through the first write data channel, and the first host interface sends the second data stream To the AXI bridge, the AXI bridge routes the second data stream to a certain slave based on its own capabilities.
- the second slave interface is correspondingly connected to the second slave, then the second slave can receive the second data stream and the second index number through the second write data channel between the second slave and the second slave interface . That is, the second data stream is actually sent to the second slave.
- the index number of the second slave interface is the same as the index number of the second slave.
- the AXI bridge may route the second data flow and the second index number to the second slave interface according to the second service identifier.
- the AXI bridge since the AXI bridge routes the second data stream according to the second service identifier, not according to the second index number. Therefore, if the function of the AXI bridge is abnormal, the AXI bridge will route the second data stream to the wrong slave, and the second slave receiving the second data stream is not the slave indicated by the second index number, then, the second slave that receives the second data stream is not the slave indicated by the second index number.
- the second index number received by the second slave interface is different from its own index number.
- the second slave interface can determine that the function of the AXI bridge is abnormal; if the function of the AXI bridge is normal, the AXI bridge will route the second data flow To the correct slave, the second slave that receives the second data stream is the slave indicated by the second index number, then the second index number received by the second slave interface is the same as its own index number, At this time, the second slave interface can determine that the function of the AXI bridge is not abnormal.
- the first slave interface can also receive the third data stream through the first read-back data channel or the first write response channel, and then, the first slave interface obtains the third data stream in the third data stream.
- the third index number in the three business identifiers, then the third data flow and the third index number are output to the AXI bridge; the AXI bridge routes the third data flow and the third index number to the second host interface; and then, the advanced expansion interface
- the second host interface in the bus can judge whether the third index number is the same as its own index number (ie, the index number of the second host interface), and output a third judgment result.
- the first slave interface is correspondingly connected to the first slave, that is, the third data stream is the data stream sent by the first slave, and the first slave passes through the first read-back data channel or the first write-in response channel
- the third data stream is sent to the first slave interface
- the first slave interface sends the third data stream to the AXI bridge
- the AXI bridge routes the third data stream to a certain master based on its own function.
- the second host interface is correspondingly connected to the second host, and the index number of the second host interface is the same as the index number of the second host.
- the second host can receive the third data stream and the second data stream through the second readback data channel or the second write response channel between the second host and the second host interface.
- Three index numbers That is, the third data stream is actually sent to the second host.
- the AXI bridge may route the third data flow and the third index number to the second host interface according to the third service identifier.
- the AXI bridge since the AXI bridge routes the third data flow according to the third service identifier, not according to the third index number. Therefore, if the function of the AXI bridge is abnormal, the AXI bridge will route the third data flow to the wrong master, and the second master receiving the third data flow is not the slave indicated by the third index number, then the second master The third index number received by the interface is different from its own index number.
- the second host interface can determine that the function of the AXI bridge is abnormal; if the function of the AXI bridge is normal, the AXI bridge will route the third data stream to the correct host. , the second host receiving the third data stream is the host indicated by the third index number, then the third index number received by the second host interface is the same as its own index number, at this time the second host interface can determine The AXI bridge functions without exception.
- the first host interface when the first host interface outputs the first data stream and the first index number to the AXI bridge, it can be implemented in the following manner: the first host interface saves the first index number in the user-defined data stream in the first data stream.
- Information bit the first host interface outputs the first data stream to the AXI bridge, and the first index number is stored in the user-defined information bit of the first data stream.
- the first index number can be transmitted through user-defined information bits.
- corresponding functional modules may be added to the host interface and the slave interface to realize the above functions.
- the first host interface may include: a downstream decoder, configured to obtain the first index number according to the first address information; output the first index number to the AXI bridge;
- the first slave interface may include an upstream monitor for judging whether the first index number is the same as the index number of the first slave interface, and outputting a first judging result.
- the first host interface may further include a register for storing the correspondence between the first service identifier and the first index number in the first data stream.
- the first slave interface may also include an upstream decoder for obtaining the third index number in the third service identifier in the third data stream; then, output the third index number to the AXI bridge; advanced
- the expansion interface bus may further include a second host interface, the second host interface includes a downstream monitor, and the downstream monitor is used to judge whether the third index number is the same as that of the second host interface, and output a third judgment result.
- the first slave interface when the first slave interface outputs the first judgment result, it can be realized in the following manner: when the first index number is different from its own index number, output the first judgment result to
- the error management unit EMU is configured to classify the errors indicated by the first judgment result and report to the central processing unit CPU and the safety island.
- the first slave interface can report the abnormality to the EMU in the case of judging that the bus function of the advanced expansion interface is abnormal.
- the EMU can receive the exceptions reported by each host interface and slave interface, and classify the errors, and then the CPU and the safety island process the exceptions.
- the first host interface may output the first data stream and the first index number to the AXI bridge when the first valid bit information in the first data stream is valid.
- the first host interface will only transmit the data stream to the AXI bridge when the valid bit information (valid) carried by the first data stream is valid, and when the valid bit information carried by the data stream is invalid, it means that the first host If the initiated transfer is invalid, the first host interface will not transfer the data stream to the AXI bridge.
- valid bit information may also be carried in the second data stream and the third data stream, which will not be repeated here.
- the embodiment of the present application also provides a system-on-a-chip, which includes a first host, a first slave, and the advanced expansion interface bus provided in the above-mentioned first aspect and any possible design thereof; the first host Coupled with the first host interface of the advanced expansion interface bus, the first slave is coupled with the first slave interface of the advanced expansion interface bus; the advanced expansion interface bus is used to transmit the first data stream sent by the first host to the first slave machine.
- FIG. 1 is a schematic structural diagram of a system-on-a-chip provided by the prior art
- FIG. 2 is a schematic structural diagram of a system-on-a-chip provided by an embodiment of the present application
- FIG. 3 is a schematic structural diagram of the first advanced expansion interface bus provided by the embodiment of the present application.
- FIG. 4 is a schematic structural diagram of a second advanced expansion interface bus provided by an embodiment of the present application.
- FIG. 5 is a schematic structural diagram of a third advanced expansion interface bus provided by an embodiment of the present application.
- FIG. 6 is a schematic flow chart of an advanced extended interface bus reporting an exception provided by an embodiment of the present application.
- FIG. 7 is a schematic structural diagram of a system on chip provided by an embodiment of the present application.
- the embodiment of the present application may be applied to the system on chip shown in FIG. 2 .
- the system-on-chip shown in FIG. 2 includes multiple masters, multiple slaves, and an AXI bus for connecting the masters and slaves.
- the master can write data to the slave through the AXI bus, and can also read data back from the slave through the AXI bus.
- the host includes but not limited to central processing unit (central processing unit, CPU), graphics processing unit (graphics processing unit, GPU), direct memory access controller (direct memory access controller, DMAC), etc.
- the slave includes but not limited to Peripheral bus (advanced peripheral bus, APB), memory controller, etc.
- the AXI bus implements the interconnection of multiple master devices and slave devices in the form of a crossbar.
- multiple host interfaces and multiple slave interfaces are included; multiple host interfaces correspond to multiple hosts one by one, and each host interface is used to receive data streams transmitted by corresponding hosts; multiple slaves The interface is in one-to-one correspondence with multiple slaves, and each slave interface is used to receive the data stream transmitted by the corresponding slave.
- hosts and host interfaces are connected in one-to-one correspondence, for example, the first host interface is correspondingly connected to the first host.
- the first slave machine interface is correspondingly connected to the first slave machine.
- the index number of the master is the same as the index number of the correspondingly connected master interface
- the index number of the slave is the same as the index number of the correspondingly connected slave interface.
- the index number of the first master is the same as the index number of the first master interface
- the index number of the first slave is the same as the index number of the first slave interface.
- the first host when the first host transmits the data stream a to the first slave, the first host first transmits the data stream a to the correspondingly connected first host interface, and then the first host interface transmits the data stream a to the AXI bridge, The AXI bridge transmits the data stream a to the first slave interface based on its own function. Since the first slave interface is correspondingly connected to the first slave, the data stream a is transmitted to the first slave interface, which is equivalent to being transmitted to the first slave, and the first slave interface will transmit the data stream a to the corresponding connection of the first slave.
- AW write address
- AR read address
- W write date
- W write response
- R read back data
- the AW channel and the AR channel may also be collectively referred to as an address channel.
- AW channel, AR channel and W channel are used to transmit data flow from the host to the slave, for the data transmitted by the AW channel and AR channel between the host and the host interface
- the AXI bus judges which slave to route the data flow to according to the access address of the master.
- the AXI bus judges and routes the data flow to Which slave
- the B channel and the R channel are used to transmit the data stream from the slave to the master.
- the AXI bus is based on the Transaction ID. Certain fixed bits (generally high or low) determine which host to route the data stream to.
- AWUSER ARUSER
- WUSER WUSER
- BUSER RUSER
- the AXI bridge routes the data streams in the AW channel, AR channel, W channel, B channel, and R channel based on its own function, the routing methods of different channels are different.
- the data stream sent by the host carries address information and service identification, and the address information is used to indicate the destination address of the host requesting access , the service identifier is used to refer to the service number corresponding to the access request initiated by the host (for example, the service number corresponding to the access request initiated by the master to slave 1 is 0, and the service number corresponding to the access request initiated by the master to slave 2 is 1 ); after the AXI bridge receives the data flow transmitted by the host interface, it can determine which slave interface (slave) to route the data flow to according to the address information.
- the data stream sent by the host only carries the service identifier and does not carry address information.
- the data streams of the AW channel and the W channel are usually transmitted at the same time, and the AW channel It is the same as the service identifier in the W channel. Therefore, when the AXI bridge judges which slave the data flow of the AW channel needs to be routed to according to the address information, it can record the corresponding relationship between the service identifier and the slave. Then, the AXI bridge When judging to which slave the data flow of the W channel needs to be routed, it may be determined which slave the data flow of the W channel is routed to according to the service identifier of the data flow in the W channel and the above correspondence.
- the slave When the slave transmits the data stream to the master, for the B channel and the R channel between the slave and the slave interface, since the slave has received the data stream transmitted by the corresponding master before the slave transmits the data stream to the master, therefore, the slave The machine can record the corresponding relationship between the service identifier in the data flow transmitted by a certain host and the host.
- the slave machine Before transmitting the data flow to the interface of the slave machine through the B channel and the R channel, the slave machine can splicing the service identification and the host index number corresponding to the service identification to form a new service identification, and use the new service identification as the data stream Part of it is sent to the slave interface through the B channel and the R channel; after the slave interface sends the data flow to the AXI bridge, the AXI bridge can determine which host to route the data flow to according to the host index number in the new service identifier.
- the advanced expansion interface bus 300 includes a first host interface 301 , an AXI bridge 302 and a first slave interface 303 .
- the first host interface 301 is coupled to the first host
- the first slave interface 303 is coupled to the first slave.
- the first host interface 301 is configured to: receive the first data stream through the first address channel; obtain the first index number according to the first address information in the first data stream; output to the AXI bridge 302.
- the first data stream is a data stream transmitted by the first host to the first host interface 301 through the first address channel.
- the AXI bridge 302 is coupled with the first master interface 301 for routing the first data stream and the first index number to the first slave interface 303 .
- the first slave interface 303 is coupled to the AXI bridge 302, and is used to judge whether the first index number is the same as its own index number (ie, the index number of the first slave interface 303), and output a first judgment result.
- the host and the host interface are connected in a one-to-one correspondence, and the slave and the slave interfaces are connected in a one-to-one correspondence. Then, after the first data stream is sent to the first slave interface 303, it means that the first data stream is finally transmitted to the first slave connected to the first slave interface 303, that is, the first slave interface 303 After receiving the first data stream, the first data stream may be sent to the correspondingly connected first slave through the second address channel.
- the read address channel and the write address channel may be collectively referred to as an address channel. Then, if the first address channel is the read address channel, then the second address channel is the second read address channel, that is, the first address channel and the second address channel are the aforementioned AR channels; if the first address channel is the first write address channel , then the second address channel is the second write address channel, that is, the first address channel and the second address channel are the aforementioned AW channels.
- the AXI bridge 302 can be connected with multiple host interfaces and multiple slave interfaces
- the first host interface 301 is any one of the multiple host interfaces
- the first slave interface 303 is Any of several slave interfaces.
- each host interface corresponds to a host, and the index number of the host is consistent with the index number of the corresponding host interface.
- the first host is connected to the first host interface, so that the index number of the first host is the same as the index number of the first host interface; for another example, the advanced expansion interface bus 300 includes M host interfaces, and the index numbers are 0 ⁇ M-1, then, the index numbers of the M hosts connected to the interfaces of the M hosts are also 0 to M-1.
- the host interface can obtain the index number of the corresponding connected host as its own index number.
- each slave interface is connected to a slave, and the index number of the slave is also consistent with the index number of the correspondingly connected slave interface.
- the slave interface can obtain the index number of the correspondingly connected slave as its own index number, which will not be repeated here.
- the first address information in the first data stream received by the first host interface 301 is used to indicate the address that the first host requests to access, such as the address of the data requested to be read, or the address requested to write data.
- the AXI bridge 302 can route the first data flow and the first index number according to the first address information.
- the first host interface 301 obtains the first index number according to the first address information (decoding), and the first index number is used to indicate that when the first host sends the first data stream, The index number of the slave requesting access. Then, after the AXI bridge 302 routes the first data stream and the first index number to the first slave interface 303 according to the first address information, the first slave interface 303 can determine whether the first index number is the same as its own index number , if the two are not the same, it means that the function of the advanced expansion interface bus 300 is abnormal; if the two are the same, it means that the function of the advanced expansion interface bus 300 is not abnormal.
- the AXI bridge 302 routes the first data flow according to the first address information, not according to the first index number. Therefore, if the function of the AXI bridge 302 is abnormal, the AXI bridge 302 will route the first data stream to the wrong slave, and finally the first slave that receives the first data stream is not the slave indicated by the first index number, Then, the first index number received by the first slave interface 303 is different from its own index number, and now the first slave interface 303 can determine that the function of the AXI bridge 302 is abnormal; if the function of the AXI bridge 302 is normal, the AXI bridge The first data stream will be routed to the correct slave, and the first slave that finally receives the first data stream is the slave indicated by the first index number. Then, the first slave interface 303 receives the first The index number is the same as its own index number. At this time, the first slave interface 303 can determine that the function of the AXI bridge 302 is not abnormal.
- the first host interface 301 may also save the correspondence between the first service identifier and the first index number in the first data stream.
- the AW channel, AR channel and W channel are used to transmit the data stream from the master to the slave; for the AW channel and the AR channel, the transmitted data stream includes address information and service identification,
- the host interface can obtain the index number according to the address information, and then transmit the index number together with the data stream to the AXI bridge 302, and the output index number can be used by the slave interface receiving the data stream to judge whether the function of the AXI bridge 302 is abnormal; but
- the W channel the data stream it transmits includes the service identifier, but does not include address information, so the host interface cannot obtain the index number only based on the data stream transmitted in the W channel; and the W channel and the AW channel usually transmit data streams at the same time Yes, the AW channel is used to transmit the address of the written data, and the W channel is used to transmit the written data, and the service identifiers transmitted in the AW channel and the W channel are the same, both being the first service identifier.
- the first host interface 301 saves the corresponding relationship between the first service identifier and the first index number after obtaining the corresponding first index number according to the first address information of the data flow transmitted in the AW channel, then after receiving the W channel After the data flow, the first index number can be determined according to the first service identifier in the data flow in the W channel and the above-mentioned corresponding relationship, and then the first index number and the first data flow are transmitted to the AXI bridge 302.
- the first index The signal can be used by the slave interface receiving the first data stream to judge whether the function of the AXI bridge 302 is abnormal.
- the first host interface 301 when the first host interface 301 processes the data flow of the address channel (including the address channel AW and the address channel write AR), it can save the corresponding relationship between the service identifier and the index number;
- the corresponding index number can be obtained according to the service identifier of the data stream in the W channel, so that the receiver of the data stream can judge whether the function of the advanced expansion interface bus 300 is abnormal.
- the first host interface 301 can also receive the second data stream through the first write data channel, wherein the second data stream is sent to the first host interface 301 by the first host through the first write data channel ; the first host interface 301 obtains the second index number according to the correspondence between the second service identifier and the second index number in the locally stored second data. Then, the first host interface 301 transmits the second data stream and the second index number to the AXI bridge 302 .
- the AXI bridge 302 routes the second data flow and the second index number to the second slave interface in the advanced expansion interface bus 300, and the second slave interface can judge the second index number and its own when receiving the second index number. Whether the index numbers are the same, output the second judgment result. Wherein, since the second slave is correspondingly connected to the second slave interface, the second slave can receive the second data stream and the second index through the second write data channel between the second slave and the second slave interface number, that is, the second data stream is actually sent to the second slave.
- the AXI bridge 302 may route the second data flow and the second index number to the second slave interface according to the second service identifier.
- routing methods refer to the descriptions in the foregoing application scenarios, and details are not repeated here.
- the AXI bridge 302 obtains the second index number by means of table lookup according to the second service identifier, and the second index number is used to indicate the slave device that the first master requests to access when sending the second data stream.
- the index number The AXI bridge 302 routes the second data flow according to the second service identifier, not according to the second index number. Therefore, if the function of the AXI bridge 302 is abnormal, the AXI bridge will route the second data stream to the wrong slave, and the second slave receiving the second data stream is not the slave indicated by the second index number, then, The second index number received by the second slave machine interface is different from its own index number.
- the second slave machine interface can determine that the function of the AXI bridge 302 is abnormal;
- the data stream is routed to the correct slave, and the second slave that receives the second data stream is the slave indicated by the second index number.
- the second index number received by the second slave interface and its own index number is the same, at this time, the second slave interface can determine that the function of the AXI bridge 302 is not abnormal.
- the above describes how to detect whether the function of the AXI bridge 302 is abnormal when the master transmits data streams to the slave; in the embodiment of the present application, it is also possible to detect whether the function of the AXI bridge 302 is abnormal when the slave transmits data streams to the master.
- the first slave interface 303 can also receive the third data stream through the first read-back data channel (that is, the B channel) or the first write response channel (that is, the R channel), wherein the third data stream is generated by the first A slave passes the data stream transmitted to the first slave interface 303 through the first read-back data channel (i.e. the B channel) or the first write response channel (i.e. the R channel); then, the first slave interface 303 obtains the third The third index number in the third service identifier in the data stream, where the third index number is used to indicate the index number of the master that requests access when the first slave sends the third data stream.
- the first slave interface 303 outputs the third data stream and the third index number to the AXI bridge 302; then, the AXI bridge 302 can route the third data stream and the third index number to the advanced expansion interface bus 300 The second host interface.
- the second host interface can judge whether the third index number is the same as its own index number, and output a third judgment result, thereby indicating whether the function of the AXI bridge 302 is abnormal. Since the second host is correspondingly connected to the second host interface, the second host interface can send the third The data stream, that is, the third data stream is actually sent to the second host.
- the AXI bridge 302 when the AXI bridge 302 routes the third data flow and the third index number to the second host interface, it may perform routing according to the third service identifier.
- routing methods refer to the descriptions in the foregoing application scenarios, and details are not repeated here.
- the AXI bridge 302 routes the third data flow according to the third service identifier, not according to the third index number. Therefore, if the function of the AXI bridge 302 is abnormal, the AXI bridge will route the third data stream to the wrong host, and the second host receiving the third data stream is not the host indicated by the third index number, then the second host The third index number received by the interface is different from its own index number.
- the second host interface can determine that the function of the AXI bridge 302 is abnormal; if the function of the AXI bridge 302 is normal, the AXI bridge will route the third data flow to the correct host, the second host receiving the third data stream is the host indicated by the third index number, then, the third index number received by the second host interface is the same as its own index number, and at this time the second host interface It can be confirmed that there is no abnormality in the function of the AXI bridge 302 .
- the method for detecting whether the function of the AXI bridge 302 is abnormal is: (1) at the ingress side of the data flow, a corresponding identifier (index number) is generated for each data flow, and the identifier is used to indicate that the data flow should Which host (slave) to transmit to; (2) transmit the data stream and identifier through the AXI bridge 302, and the AXI bridge 302 transmits the data stream according to the information in the data stream (such as address information or service identification) , instead of transmitting according to the identifier generated by the ingress side; (3) On the egress side of the data flow, the interface receiving the data flow compares its own identifier with the received identifier, if they are inconsistent, there is a transmission exception, If they are consistent, the transmission function is normal.
- each host there are five transmission channels between each host and the corresponding host interface, including an AW channel, an AR channel, a W channel, a B channel, and an R channel.
- the transmission channels involved in the aforementioned detection of whether the function of the AXI bridge 302 is abnormal may be as shown in FIG. 4 .
- the first host interface 301 when the first host interface 301 outputs the first data stream and the first index number to the AXI bridge 302, it can store the first index number in the user-defined information bit in the first data stream, and then the first host interface 301 may output the first data stream to the AXI bridge 302, and the first index number is stored in the user-defined information bit of the first data stream.
- the first index number is transmitted to the first slave interface 303 along with the first data stream.
- the second index number when transmitting the second data stream, can also be transmitted in the same manner; when transmitting the third data stream, the third index number can also be transmitted in the same manner. I won't repeat them here.
- the first data stream may also carry first valid bit information (valid), which is used to indicate whether the access initiated by the first host is valid.
- valid first valid bit information
- the first host when the first host actively initiates data access, it may set valid to a high level to indicate that the access is a valid access actively initiated by the first host.
- electromagnetic noise in the external environment will interfere with the advanced expansion interface bus 300 , causing disturbances to the chip, thereby generating data.
- Electromagnetic noise usually only causes data disturbance on a very small part of the information bits, and the possibility of causing disturbance to valid information is extremely small. Therefore, when the valid in the data stream received by the first host interface 301 is invalid, it can be considered that the The access is not initiated by the first host, and is an invalid access (data access generated by external disturbance).
- the second The information in each information bit of the address channel is set to the default initial value. For example, the first valid bit information is set to 0, and the first address information is set to 0.
- the default initial value of the user-defined information bit can be the first preset index number
- the first preset index number is the index of any slave coupled to the advanced expansion interface bus 300 numbers are not the same.
- the index numbers of the N slaves coupled to the advanced expansion interface bus 300 are 1-N respectively, so the first preset index number can be 0.
- ambient noise can perturb the chip and thus generate data.
- the second slave interface 303 will not further process the data generated by the disturbance; if the data generated by the disturbance causes the valid information in the second address channel If set high, the first slave interface 303 will compare the first preset index number with its own index number. If they are not the same, then the comparison result of the first slave interface 303 must be that the two index numbers are inconsistent, and at this time, the first slave interface 303 will not further process the data generated by the disturbance. Therefore, setting the default initial value of the user-defined information bit as the first preset index number can prevent environmental interference from affecting the function of the advanced expansion interface bus 300 and causing incorrect data transmission.
- the corresponding functions of the host interface and the slave interface may be realized by different functional modules.
- the first host interface 301 may include a downstream decoder.
- the downstream decoder is used for decoding according to the first address information to obtain the first index number, and output the first index number to the AXI bridge 302 .
- the first slave interface 303 may include an upstream monitor for judging whether the first index number is the same as the index number of the first slave interface, and outputting a first judging result.
- the first host interface 301 may further include a register for storing the correspondence between the first service identifier and the first index number in the first data stream.
- the first slave interface 303 may also include an upstream decoder, which is used to obtain the third index number in the third service identifier in the third data stream, and output the third index number to the AXI Bridge 302.
- the advanced expansion interface bus 300 further includes a second host interface, and the second host interface includes a downstream monitor for judging whether the third index number is the same as the index number of the second host interface, and outputting a third judging result.
- the decoder on the data stream inlet side is used to obtain the corresponding index number according to the data stream, and output the index number, so as to transmit the data stream and the index number to the data stream outlet side together;
- the monitor at the output side of the data flow is used to detect whether the function of the AXI bridge 302 is abnormal.
- a register may also be included in the host interface, which is used to store the corresponding relationship between the service identifier and the index number, so that after the decoder in the host interface receives the data stream written into the data channel, it can And the above corresponding relationship determines the index number.
- the above-mentioned downstream decoders and registers are only newly added functional modules in the first host interface 301 in the embodiment of the present application.
- the first host interface 301 also includes other functional modules, such as a module for processing and transmitting the first data stream, and these modules will not be introduced in this embodiment of the present application.
- the above-mentioned upstream monitor and upstream decoder are only newly added functional modules in the first slave interface 303 in the embodiment of the present application, and other original functional modules in the first slave interface 303 will not be detailed here. introduce.
- the advanced expansion interface bus 300 provided by the embodiment of the present application, it is possible to detect whether the function of the advanced expansion interface bus 300 is abnormal during the transmission of the data stream. This solution does not need to add an additional backup AXI bus, compared with the prior art The hardware overhead is reduced and the circuit area is reduced.
- Unit error management unit
- the EMU can classify the errors indicated by multiple judgment results, and report to the local CPU and the safety island. Inter-core communication is performed by the local CPU and the safety island, and error handling is performed.
- the first host interface 301 obtains the first index number according to the first address information, and the first index number is used to indicate when the first host sends the first data stream, request The index number of the slave being accessed. Then, after the first data stream and the first index number are routed by the AXI bridge 302, the first slave interface 303 receiving the first data stream can compare whether the first index number is the same as its own index number, and if the two are not the same , it means that the function of the advanced expansion interface bus 300 is abnormal; if the two are the same, it means that the function of the advanced expansion interface bus 300 is not abnormal.
- abnormal function detection can be performed during the transmission of the data stream.
- This solution does not need to add an additional backup AXI bus, and compared with the prior art, the hardware overhead is reduced. The circuit area is reduced.
- FIG. 5 is a schematic structural diagram of an advanced expansion interface bus provided by an embodiment of the present application.
- AXI bus (100) includes AXI bridge (101), downstream monitor dn_monitor (102), history mapping record table History Mapping Table (103), downstream decoder dn_decoder (104), upstream monitor up_monitor (105) and upstream translator Encoder up_monitor (106).
- downstream monitor dn_monitor (102), the history mapping record table History Mapping Table (103), the downstream decoder dn_decoder (104) are modules in the host interface (M0 interface) corresponding to Master0
- the upstream monitor up_monitor (105 ) and the upstream decoder up_monitor (106) are modules in the slave interface (S1 interface) corresponding to Slave1.
- each host interface in the AXI bus (100) needs to be configured with three functional modules of the downstream monitor dn_monitor, the history mapping record table History Mapping Table and the downstream decoder dn_monitor, and each slave in the AXI bus (100) Both machine interfaces need to be configured with two functional modules, the upstream monitor up_monitor and the upstream decoder up_monitor.
- AXI bridge (101) According to the AXI protocol, realize the interconnection and routing function of the original multiple Master devices and multiple Slave devices.
- Downstream decoder dn_decoder (104) When the read and write access of the AR channel (AW channel) of the M0 interface is valid, the address of the AR channel (AW channel) is decoded to obtain the Slave index number to be accessed by the current address, and the The Slave index number is spliced to the high bit of the ARUSER signal (AWUSER signal), and the ARUSER signal (AWUSER signal) will be transmitted to a certain Slave interface by the AXI bridge (101) based on its own function.
- the downstream decoder dn_decoder (104) saves the corresponding relationship between the decoded Slave index number and the Transaction ID of the current AR channel (AW channel) in the History Mapping Table (103).
- the AXI bridge (101) transmits the ARUSER signal (AWUSER signal) to a Slave interface based on its own function
- the AXI bridge (101) also transmits the data stream of the AR channel (AW channel) to the Slave interface based on its own function.
- the same Slave interface can determine which Slave interface to transfer the data flow and the ARUSER signal (AWUSER signal) according to the address information in the AR channel (AWUSER signal).
- History Mapping Table (103) When the data of the W channel of the M0 interface is valid, the History Mapping Table (103) will find its correspondence in the History Mapping Table (103) according to the Transaction ID of the W channel The Slave index number of the WUSER signal is spliced to the high bit of the WUSER signal, and then sent to the AXI bridge (101), and the AXI bridge (101) will route the current transmission to A slave port.
- the AXI bridge (101) When the AXI bridge (101) is routing the data flow of the AW channel, the corresponding relationship between the Transaction ID of the AW channel and the Slave index number is recorded, because the AW channel and the W channel are usually transmitted simultaneously, and the data in the two channels The business identifiers of the streams are the same, so the AXI bridge (101) can obtain the corresponding Slave index number according to the Transaction ID in the W channel, thereby determining which Slave the data flow of the W channel and the WUSER signal are routed to.
- Upstream monitor up_monitor (105) When the read and write access of the AR channel of the S1 interface is valid, judge whether the high bit of the received AWUSER (the field of the Slave index number) is the same as its own number, if the same, the AXI bridge route is correct; If they are different, the AXI bridge routing function is abnormal; the self-number refers to the number corresponding to the Slave interface, for example, the number of the S1 interface is 1.
- the processing of the AW channel (W channel) of the S1 interface is also similar, and will not be repeated here.
- the connection relationship between the modules is as follows: the downstream decoder dn_decoder (104) in the M0 interface is coupled with the AW channel and the AR channel, and is used to receive the valid signal and address information of the AW channel and the AR channel ,
- the downstream decoder dn_decoder (104) also splices the Slave index number to the high bit of the USER signal of the AW channel and the AR channel of the M0 interface; ) coupling, for writing the corresponding relationship of Slave index number and Transaction ID to the history mapping record table History Mapping Table (103);
- the history mapping record table History Mapping Table (103) is coupled with the W channel of the M0 interface, for receiving For the valid signal and Transaction ID of the W channel, after reading the Slave index number corresponding to the Transaction ID, splice the Slave index number to the high bit of the WUSER signal of the W channel, and connect the WUSER signal to the M0 interface of the A
- Upstream decoder up_decoder (106) When the B channel (R channel) of the S1 interface is valid, copy the Master index number corresponding to the Transaction ID to the high bit of BUSER (RUSER), and BUSER (RUSER) will be read by the AXI bridge ( 101) Routing to a certain Master interface based on its own function. It should be noted that while the AXI bridge (101) transfers the BUSER (RUSER) to a certain Master interface based on its own function, the AXI bridge (101) also transfers the data stream of the B channel (R channel) to the same master interface based on its own function. Master interface. Specifically, the AXI bridge (101) can determine which Master interface to transfer the data flow and the BUSER (RUSER) to according to the Transaction ID (the Transaction ID includes the Master index number) in the B channel (R channel).
- Downstream monitor dn_monitor (102) When the data of the B channel (R channel) of the M0 interface is valid, it judges whether the high bit (the field of the Master index number) of the received BUSER (RUSER) is the same as its own number, and if it is the same, Then the routing of the AXI bridge (101) is correct; if not, the routing function of the AXI bridge (101) is abnormal.
- the self-number refers to the number of the Master corresponding to the Master interface, for example, the number of the M0 interface is 0.
- the connection relationship between the modules is as follows: the upstream decoder up_decoder (106) is coupled with the B channel and the R channel of the S0 interface, and is used to receive the valid signal and Transaction ID of the B channel (R channel) , and copy the Master index number field corresponding to the Transaction ID to the high bit of BUSER (RUSER), and connect the high bit of BUSER (RUSER) to the B channel (R channel) of the S0 interface.
- the upstream decoder up_decoder (106) is coupled with the B channel and the R channel of the S0 interface, and is used to receive the valid signal and Transaction ID of the B channel (R channel) , and copy the Master index number field corresponding to the Transaction ID to the high bit of BUSER (RUSER), and connect the high bit of BUSER (RUSER) to the B channel (R channel) of the S0 interface.
- the downstream monitor dn_monitor (102) is coupled with the B channel (R channel) of the M0 interface, and is used to receive the valid signal and the BUSER (RUSER) signal of the B channel and the R channel of the M0 interface, and the downstream monitor dn_monitor (102) will receive Compare the BUSER (RUSER) signal with its own number, and output the judgment result int_safety_m0 of the M0 interface.
- the number of interfaces of the Master and Slave in the AXI bus is not limited in the embodiment of the present application.
- the number of Master and Slave interfaces can be freely configured according to project requirements.
- the processing of each Master interface is similar to the M0 interface, and the processing of each Slave interface is similar to the S1 interface. If there are N slave interfaces, the index numbers of the slave interfaces are 1 to N. If there are M master interfaces, the index numbers of the master interfaces are 0 to M-1.
- a timeout (Timeout) mechanism can also be added in the AXI bridge (101), if a certain transmission in the AXI bridge (101) is not completed within a certain period of time, then the Timeout interrupt is set to a high level .
- the AXI bridge (101) After the AXI bridge (101) detects its own abnormality, it reports the abnormal interrupt to the EMU, as shown in FIG. 6 .
- the EMU classifies and recognizes the errors, and then reports the abnormality to the local CPU and the safety island of the chip at the same time, and then the local CPU and the safety island negotiate a software solution for the abnormal function of the AXI bridge (101) through inter-core communication.
- the SoC 700 includes a first master 701 , a first slave 702 and the aforementioned advanced expansion interface bus 300 .
- the first host 701 is coupled with the first host interface of the advanced expansion interface bus 300
- the first slave 702 is coupled with the first slave interface of the advanced expansion interface bus 300;
- the advanced expansion interface bus 300 is used to send the first host 701
- the first data stream is transmitted to the first slave 702 .
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multi Processors (AREA)
- Information Transfer Systems (AREA)
Abstract
一种高级扩展接口总线及片上系统,用以针对高级扩展接口总线的功能异常提供对应的安全机制,同时减少硬件开销、减小电路面积。高级扩展接口总线包括第一主机接口、AXI桥和第一从机接口。第一主机接口用于通过第一地址通道接收第一数据流;根据第一数据流中的第一地址信息得到第一索引号,并将第一数据流和第一索引号输出至AXI桥;AXI桥与第一主机接口耦合,用于将第一数据流和第一索引号路由至第一从机接口;第一从机接口与AXI桥耦合,用于判断第一索引号与自身的索引号是否相同,并输出第一判断结果。
Description
本申请涉及芯片技术领域,尤其涉及一种高级扩展接口总线及片上系统。
为了实现汽车的功能安全目标,国际标准化组织(international organization for standardization,ISO)将汽车行业的芯片分为质量管理(quality manager,QM)、汽车安全完整性等级(automotive safety integrity level,ASIL)A、ASIL B、ASIL C和ASIL D五个等级。其中,QM芯片适用于安全无关的功能模块,ASIL A至ASIL D的安全等级依次增高。比如,对于ASIL D安全等级的电路,它的单点故障覆盖率(single-point fault metric,SPFM)和潜在故障覆盖率(latent-fault metric,LFM)分别大于或等于99%和90%,即电路中单点故障被诊断出的概率不低于99%,潜在故障被诊断出的概率不低于90%。
为了满足电路的SPFM和LFM目标,需要分析电路的失效模式(failure mode,FM),并针对FM提出针对性的安全机制(safety mechanism,SM)。通过电路各个层级(如软件、硬件系统、子系统及硬件模块等)的SM的相互配合,完成对电路中单点和潜在故障的诊断,最终达成某一ASIL等级的SPFM和LFM目标。
高级扩展接口(advanced extensible interface,AXI)总线是一种典型的互联单元,以交叉开关矩阵(crossbar)的形式实现多个主机(master)和从机(slave)的互联。AXI总线作为电路中的硬件模块,需要针对其失效模式设置对应的安全机制,使得AXI总线能满足电路中的安全等级要求。
现有技术中,针对AXI功能异常(比如AXI总线无法提供互连功能,或者AXI总线产生了不正确的路由)这类失效模式,对应的安全机制通常是:采用双核互锁机制,即AXI总线的输入同时连接至主AXI总线和备份AXI总线,如图1所示。比较模块对主AXI总线和备份AXI总线的输出进行实时比较,若二者输出不一致,则比较模块上报异常至芯片的安全岛,由安全岛负责AXI总线功能异常的处理。
采用图1所示的安全机制,需要引入另一备份AXI总线。因此,现有技术中针对AXI总线功能异常的安全机制,会增加硬件开销、增大电路面积。
发明内容
本申请实施例提供了一种高级扩展接口总线及片上系统,用以针对高级扩展接口总线的功能异常提供对应的安全机制,同时减少硬件开销、减小电路面积。
第一方面,本申请实施例提供一种高级扩展接口总线,该高级扩展接口总线包括第一主机接口、AXI桥和第一从机接口。其中,第一主机接口用于通过第一地址通道接收第一数据流;然后,根据第一数据流中的第一地址信息得到第一索引号,并将第一数据流和第一索引号输出至AXI桥;AXI桥与第一主机接口耦合,用于将第一数据流和第一索引号路由至第一从机接口;第一从机接口判断第一索引号与自身的索引号(即第一从机接口的索引号)是否相同,并输出第一判断结果。
具体地,AXI桥可以根据第一地址信息将第一数据流和第一索引号路由至第一从机接 口。
采用第一方面提供的高级扩展接口总线,第一主机接口根据第一地址信息译码得到第一索引号,第一索引号用于指示第一主机发送第一数据流时,请求访问的从机的索引号。那么,AXI桥在根据第一地址信息将第一数据流和第一索引号路由至第一从机接口之后,第一从机接口可以判断第一索引号与自身的索引号是否相同,若二者不相同,则说明AXI总线功能异常;若二者相同,则说明AXI总线功能未出现异常。
这里,需要说明的是,本申请实施例中,主机与主机接口是一一对应连接的,第一主机接口对应连接第一主机,即第一数据流是第一主机发送的数据流,第一主机通过第一地址通道将第一数据流发送至第一主机接口,第一主机接口将第一数据流发送至AXI桥,AXI桥基于自身功能将第一数据流路由至某个从机。同样地,从机与从机接口是一一对应连接的,即第一从机接口对应连接第一从机。由于第一从机接口与第一从机对应连接,那么第一从机可以通过第一从机与第一从机接口之间的第二地址通道接收到第一数据流和第一索引号。即第一数据流实际上是发送到了第一从机。
此外,本申请实施例中,主机与对应连接的主机接口的索引号相同,从机与对应连接的从机接口的索引号相同。那么,第一从机接口的索引号即第一从机的索引号。
应理解,AXI桥是根据第一地址信息对第一数据流进行路由的,而并非根据第一索引号路由。因此,若AXI桥的功能异常,那么AXI桥会将第一数据流路由至错误的从机,接收到第一数据流的第一从机并非第一索引号所指示的从机,那么,第一从机接口接收到的第一索引号和自身的索引号不相同,此时第一从机接口可以确定AXI桥的功能异常;若AXI桥的功能正常,AXI桥会将第一数据流路由至正确的从机,接收到第一数据流的第一从机即为第一索引号所指示的从机,那么,第一从机接口接收到的第一索引号和自身的索引号相同,此时第一从机接口可以确定AXI桥的功能未出现异常。
在一种可能的设计中,第一地址通道为第一读地址通道,第二地址通道为第二读地址通道;或者,第一地址通道为第一写地址通道,第二地址通道为第二写地址通道。
在一种可能的设计中,第一主机接口还可以保存第一数据流中的第一业务标识与第一索引号的对应关系。
地址通道和写入数据通道用于传输主机到从机的数据流;对于地址通道,其传输的数据流中包括地址信息和业务标识,主机接口可以根据地址信息译码得到索引号,进而将索引号与数据流一同传输至AXI桥,其输出的索引号可供接收到数据流的从机接口对AXI桥功能是否异常进行判断;但是对于写入数据通道,其传输的数据流中包括业务标识、但不包括地址信息,因而主机接口仅根据数据流无法获取索引号;此时,采用上述方案,主机接口可以根据数据流中的业务标识以及主机接口中保存的业务标识与索引号的对应关系获取对应索引号,进而将索引号与数据流一同传输至AXI桥。
在一种可能的设计中,第一主机接口还可以通过第一写入数据通道接收第二数据流,然后根据本地保存的、第二数据流中的第二业务标识与第二索引号的对应关系,获取第二索引号;然后,将第二数据流和第二索引号输出至AXI桥;AXI桥将第二数据流和第二索引号路由至第二从机接口;此外,高级扩展接口总线中的第二从机接口可用于判断第二索引号与自身的索引号(即第二从机接口的索引号)是否相同,并输出第二判断结果。
如前所述,第一主机接口对应连接第一主机。也就是说,该第二数据流是第一主机发送的数据流,第一主机通过第一写入数据通道将第二数据流发送至第一主机接口,第一主 机接口将第二数据流发送至AXI桥,AXI桥基于自身功能将第二数据流路由至某个从机。此外,第二从机接口对应连接第二从机,那么第二从机可以通过第二从机与第二从机接口之间的第二写入数据通道接收第二数据流和第二索引号。即第二数据流实际上是发送到了第二从机。
此外,第二从机接口的索引号与第二从机的索引号相同。
采用上述方案,可以在通过写入数据通道传输数据流时,对高级扩展接口总线的功能是否异常进行检测。
进一步地,AXI桥在将第二数据流和第二索引号路由至第二从机接口时,可以根据第二业务标识将第二数据流和第二索引号路由至第二从机接口。
采用上述方案,由于AXI桥是根据第二业务标识对第二数据流进行路由的,而并非根据第二索引号路由。因此,若AXI桥的功能异常,那么AXI桥会将第二数据流路由至错误的从机,接收到第二数据流的第二从机并非第二索引号所指示的从机,那么,第二从机接口接收到的第二索引号和自身的索引号不相同,此时第二从机接口可以确定AXI桥的功能异常;若AXI桥的功能正常,AXI桥会将第二数据流路由至正确的从机,接收到第二数据流的第二从机即为第二索引号所指示的从机,那么,第二从机接口接收到的第二索引号和自身的索引号相同,此时第二从机接口可以确定AXI桥的功能未出现异常。
在一种可能的设计中,第一从机接口还可以通过第一读回数据通道或第一写入响应通道接收第三数据流,然后,第一从机接口获取第三数据流中的第三业务标识中的第三索引号,然后将第三数据流和第三索引号输出至AXI桥;AXI桥将第三数据流和第三索引号路由至第二主机接口;进而,高级扩展接口总线中的第二主机接口可判断第三索引号与自身的索引号(即第二主机接口的索引号)是否相同,并输出第三判断结果。
如前所述,第一从机接口对应连接第一从机,即第三数据流是第一从机发送的数据流,第一从机通过第一读回数据通道或第一写入响应通道将第三数据流发送至第一从机接口,第一从机接口将第三数据流发送至AXI桥,AXI桥基于自身功能将第三数据流路由至某个主机。此外,第二主机接口对应连接第二主机,第二主机接口的索引号与第二主机的索引号相同。由于第二主机接口与第二主机对应连接,那么,第二主机可以通过第二主机与第二主机接口之间的第二读回数据通道或第二写入响应通道接收第三数据流和第三索引号。即第三数据流实际上是发送到了第二主机。
采用上述方案,可以在第一从机传输数据流时对高级扩展接口总线的功能是否异常进行检测。
进一步地,AXI桥在将第三数据流和第三索引号路由至第二主机接口时,可以根据第三业务标识将第三数据流和第三索引号路由至第二主机接口。
采用上述方案,由于AXI桥是根据第三业务标识对第三数据流进行路由的,而并非根据第三索引号路由。因此,若AXI桥的功能异常,那么AXI桥会将第三数据流路由至错误的主机,接收到第三数据流的第二主机并非第三索引号所指示的从机,那么,第二主机接口接收到的第三索引号和自身的索引号不相同,此时第二主机接口可以确定AXI桥的功能异常;若AXI桥的功能正常,AXI桥会将第三数据流路由至正确的主机,接收到第三数据流的第二主机即为第三索引号所指示的主机,那么,第二主机接口接收到的第三索引号和自身的索引号相同,此时第二主机接口可以确定AXI桥的功能未出现异常。
具体地,第一主机接口在将第一数据流和第一索引号输出至AXI桥时,可以通过如下 方式实现:第一主机接口将第一索引号保存在第一数据流中的用户自定义信息位;第一主机接口将第一数据流输出至AXI桥,第一数据流的用户自定义信息位中保存有第一索引号。
采用上述方案,可以通过用户的自定义信息位传输第一索引号。
本申请实施例中,可以在主机接口和从机接口中增设相应的功能模块,以实现上述功能。
具体地,第一主机接口可以包括:下游译码器,用于根据第一地址信息得到第一索引号;将第一索引号输出至AXI桥;
第一从机接口可以包括上游监控器,用于判断第一索引号与第一从机接口的索引号是否相同,输出第一判断结果。
此外,第一主机接口中还可以包括寄存器,用于保存第一数据流中的第一业务标识与第一索引号的对应关系。
进一步地,第一从机接口中还可以包括上游译码器,用于获取第三数据流中的第三业务标识中的第三索引号;然后,将第三索引号输出至AXI桥;高级扩展接口总线中还可以包括第二主机接口,第二主机接口中包括下游监控器,下游监控器用于判断第三索引号与第二主机接口的索引号是否相同,输出第三判断结果。
在一种可能的设计中,第一从机接口在输出第一判断结果时,可以通过如下方式实现:在第一索引号与自身的索引号不相同的情况下,将第一判断结果输出至错误管理单元EMU,错误管理单元EMU用于对第一判断结果所指示的错误进行分类并上报至中央处理器CPU和安全岛。
采用上述方案,第一从机接口可以在判断高级扩展接口总线功能异常的情况下将异常上报至EMU。EMU可以收到各个主机接口和从机接口上报的异常,并对错误进行分类,进而由CPU和安全岛对异常进行处理。
在一种可能的设计中,第一主机接口可以在第一数据流中的第一有效位信息有效时,将第一数据流和第一索引号输出至AXI桥。
也就是说,第一主机接口只有在第一数据流携带的有效位信息(valid)有效时,才会将数据流传输至AXI桥,在数据流携带的有效位信息无效时,说明第一主机发起的传输无效,第一主机接口则不会将该数据流传输至AXI桥。
同样地,第二数据流和第三数据流中也可以携带有效位信息,此处不再赘述。
第二方面,本申请实施例还提供一种片上系统,该片上系统包括第一主机、第一从机以及上述第一方面及其任一可能的设计中提供的高级扩展接口总线;第一主机与高级扩展接口总线的第一主机接口耦合,第一从机与高级扩展接口总线的第一从机接口耦合;高级扩展接口总线用于将第一主机发送的第一数据流传输至第一从机。
另外,应理解,第二方面及其任一种可能设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。
图1为现有技术提供的一种片上系统的结构示意图;
图2为本申请实施例提供的一种片上系统的结构示意图;
图3为本申请实施例提供的第一种高级扩展接口总线的结构示意图;
图4为本申请实施例提供的第二种高级扩展接口总线的结构示意图;
图5为本申请实施例提供的第三种高级扩展接口总线的结构示意图;
图6为本申请实施例提供的一种高级扩展接口总线上报异常的流程示意图;
图7为本申请实施例提供的一种片上系统的结构示意图。
下面,首先对本申请实施例的应用场景进行介绍。
本申请实施例可应用于图2所示的片上系统。在图2所示的片上系统中包括多个主机(master)、多个从机(slave)以及用于连接主机和从机的AXI总线。主机可以通过AXI总线向从机写入数据,也可以通过AXI总线从从机读回数据。
其中,主机包括但不限于中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)、直接存储器访问控制器(direct memory access controller,DMAC)等,从机包括但不限于外围总线(advanced peripheral bus,APB)、内存控制器等。
在图2所示的片上系统中,AXI总线以交叉开关矩阵(Crossbar)的形式实现多个主机设备和从机设备的互联。具体地,在AXI总线中,包括多个主机接口和多个从机接口;多个主机接口与多个主机一一对应,每个主机接口用于接收对应主机传输的数据流;多个从机接口与多个从机一一对应,每个从机接口用于接收对应从机传输的数据流。
实际应用中,主机与主机接口是一一对应连接的,比如第一主机接口对应连接第一主机。从机与从机接口是一一对应连接的,比如第一从机接口对应连接第一从机。此外,主机的索引号与对应连接的主机接口的索引号相同,从机的索引号与对应连接的从机接口的索引号相同。比如,第一主机的索引号与第一主机接口的索引号相同,第一从机的索引号与第一从机接口的索引号相同。示例性地,第一主机向第一从机传输数据流a时,第一主机先将数据流a传输至对应连接的第一主机接口,第一主机接口再将数据流a传输至AXI桥,AXI桥基于自身功能将数据流a传输至第一从机接口。由于第一从机接口与第一从机对应连接,因而数据流a传输至第一从机接口,即相当于传输至第一从机,第一从机接口会将数据流a传输至对应连接的第一从机。
具体地,每个主机接口与主机之间均存在五个通道,每个从机接口与从机之间同样也存在五个通道。这五个通道分别是写地址(address write,AW)通道、读地址(address read,AR)通道、写入数据(write date,W)通道、写入响应(bresp,B)通道、读回数据(rdata,R)通道。在本申请实施例的描述中,AW通道和AR通道也可以统称为地址通道。
五个通道中存在两个方向的数据流:1)AW通道、AR通道和W通道用于传输从主机到从机的数据流,对于主机与主机接口之间的AW通道和AR通道传输的数据流,AXI总线根据主机的访问地址判断将数据流路由至哪一个从机,对于主机与主机接口之间的W通道传输的数据流,AXI总线根据业务标识(Transaction ID)判断将数据流路由至哪一个从机;2)B通道和R通道用于传输从机到主机的数据流,对于从机与从机接口之间的B通道和R通道传输的数据流,AXI总线根据Transaction ID中的某些固定比特位(一般为高位、或者低位)判断将数据流路由至哪一个主机。
AW通道、AR通道、W通道、B通道和R通道中均存在可配置位宽的用户自定义信息位USER,用于传递用户自定义信息。上述五个通道的用户自定义信息位分别为AWUSER、ARUSER、WUSER、BUSER和RUSER。
此外,AXI桥在基于自身功能对AW通道、AR通道、W通道、B通道和R通道中的 数据流进行路由时,不同通道的路由方式有所不同。
主机向从机传输数据流时,对于主机与主机接口之间的AW通道和AR通道来说,主机发送的数据流中携带有地址信息和业务标识,地址信息用于指示主机请求访问的目的地址,业务标识用于指该主机发起的访问请求对应的业务编号(比如,该主机向从机1发起访问请求对应的业务编号为0,该主机向从机2发起访问请求对应的业务编号为1);AXI桥接收到主机接口传输的数据流后,可以根据地址信息确定将数据流路由至哪个从机接口(从机)。对于主机与主机接口之间的W通道来说,主机发送的数据流中仅携带有业务标识、不携带地址信息,但是,由于AW通道和W通道的数据流通常是同时传输的,且AW通道和W通道中的业务标识是相同的,因此,AXI桥在根据地址信息判断AW通道的数据流需要路由至哪个从机时,可以记录下业务标识与该从机的对应关系,然后,AXI桥在判断W通道的数据流需要路由至哪个从机时,可以根据W通道中的数据流的业务标识以及上述对应关系,确定将W通道的数据流路由至哪个从机。
从机向主机传输数据流时,对于从机与从机接口之间的B通道和R通道来说,由于从机向主机传输数据流之前,已经接收到对应主机传输的数据流,因此,从机可以记录下某一主机传输的数据流中的业务标识与该主机的对应关系。在通过B通道和R通道向从机接口传输数据流之前,该从机可以将业务标识与该业务标识对应额主机索引号拼接起来组成新的业务标识,并将新的业务标识作为数据流的一部分通过B通道和R通道发送至从机接口;从机接口将数据流发送至AXI桥后,AXI桥可以根据新的业务标识中的主机索引号确定将该数据流路由至哪个主机。
下面将结合附图对本申请实施例作进一步地详细描述。
需要说明的是,本申请实施例中,多个是指两个或两个以上。另外,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。本申请实施例中所提到的“耦合”,是指电学连接,具体可以包括直接连接或者间接连接两种方式。
本申请实施例提供一种高级扩展接口总线。如图3所示,高级扩展接口总线300包括第一主机接口301、AXI桥302和第一从机接口303。其中,第一主机接口301与第一主机耦合,第一从机接口303与第一从机耦合。
具体地,第一主机接口301用于:通过第一地址通道接收第一数据流;根据第一数据流中的第一地址信息得到第一索引号;然后,将第一数据流和第一索引号输出至AXI桥302。其中,第一数据流为第一主机通过第一地址通道向第一主机接口301传输的数据流。
AXI桥302与第一主机接口301耦合,用于将第一数据流和第一索引号路由至第一从机接口303。第一从机接口303与AXI桥302耦合,用于判断第一索引号与自身的索引号(即第一从机接口303的索引号)是否相同,并输出第一判断结果。
其中,如前所述,主机与主机接口是一一对应连接的,从机与从机接口是一一对应连接的。那么,第一数据流被发送至第一从机接口303后,即相当于第一数据流最终被传输至第一从机接口303对应连接的第一从机,即第一从机接口303在接收到第一数据流后,可以通过第二地址通道将第一数据流发送至对应连接的第一从机。
如前所述,本申请实施例中,读地址通道和写地址通道可以统称为地址通道。那么,若第一地址通道为读地址通道,则第二地址通道为第二读地址通道,即第一地址通道和第 二地址通道为前述AR通道;若第一地址通道为第一写地址通道,则第二地址通道为第二写地址通道,即第一地址通道和第二地址通道为前述AW通道。
需要说明的是,本申请实施例中,AXI桥302可以连接有多个主机接口和多个从机接口,第一主机接口301是多个主机接口中的任一个,第一从机接口303是多个从机接口中的任一个。实际应用中,每个主机接口对应连接有一个主机,主机的索引号与对应的主机接口的索引号是一致的。比如,第一主机与第一主机接口相连,从而第一主机的索引号与第一主机接口的索引号相同;再比如,高级扩展接口总线300中包括M个主机接口,索引号分别为0~M-1,那么,与M个主机接口连接的M个主机,其索引号也分别为0~M-1。主机接口可以获取对应连接的主机的索引号,作为自身的索引号。同样地,每个从机接口对应连接有一个从机,从机的索引号与对应连接的从机接口的索引号也是一致的,从机接口可以获取对应连接的从机的索引号,作为自身的索引号,此处不再赘述。
具体地,第一主机接口301接收到的第一数据流中的第一地址信息用于指示第一主机请求访问的地址,比如请求读取的数据的地址,或者请求写入数据的地址。如前所述,AXI桥302可以根据第一地址信息对第一数据流和第一索引号进行路由。
在图3所示的高级扩展接口总线300中,第一主机接口301根据第一地址信息(译码)得到第一索引号,第一索引号用于指示第一主机发送第一数据流时,请求访问的从机的索引号。那么,AXI桥302在根据第一地址信息将第一数据流和第一索引号路由至第一从机接口303之后,第一从机接口303可以判断第一索引号与自身的索引号是否相同,若二者不相同,则说明高级扩展接口总线300功能异常;若二者相同,则说明高级扩展接口总线300功能未出现异常。
应理解,AXI桥302是根据第一地址信息对第一数据流进行路由的,而并非根据第一索引号路由。因此,若AXI桥302的功能异常,那么AXI桥302会将第一数据流路由至错误的从机,最终接收到第一数据流的第一从机并非第一索引号所指示的从机,那么,第一从机接口303接收到的第一索引号和自身的索引号不相同,此时第一从机接口303可以确定AXI桥302的功能异常;若AXI桥302的功能正常,AXI桥会将第一数据流路由至正确的从机,最终接收到第一数据流的第一从机即为第一索引号所指示的从机,那么,第一从机接口303接收到的第一索引号和自身的索引号相同,此时第一从机接口303可以确定AXI桥302的功能未出现异常。
此外,本申请实施例中,第一主机接口301还可以保存第一数据流中的第一业务标识与第一索引号的对应关系。
这样操作的目的是:如前所述,AW通道、AR通道和W通道用于传输主机到从机的数据流;对于AW通道和AR通道,其传输的数据流中包括地址信息和业务标识,主机接口可以根据地址信息得到索引号,进而将索引号与数据流一同传输至AXI桥302,其输出的索引号可供接收到数据流的从机接口对AXI桥302功能是否异常进行判断;但是对于W通道,其传输的数据流中包括业务标识、但并不包括地址信息,因而主机接口仅根据W通道中传输的数据流无法获取索引号;而W通道与AW通道通常是同时传输数据流的,AW通道用于传输写入数据的地址,W通道用于传输写入的数据,且AW通道和W通道中传输的业务标识是相同的,均为第一业务标识。若第一主机接口301在根据AW通道中传输的数据流的第一地址信息获取对应的第一索引号之后,将第一业务标识与第一索引号的对应关系保存,那么在接收到W通道的数据流后,可以根据W通道中的数据流中的第一业 务标识以及上述对应关系确定第一索引号,进而将第一索引号与第一数据流一同传输至AXI桥302,第一索引号可供接收到该第一数据流的从机接口对AXI桥302功能是否异常进行判断。
也就是说,第一主机接口301在处理地址通道(包括读地址通道AW和写地址通道AR)的数据流时,可以保存业务标识和索引号的对应关系;这样的话,第一主机接口301后续在处理写入数据通道(W通道)的数据流时,可以根据W通道中数据流的业务标识获取对应的索引号,以供数据流的接收方判断高级扩展接口总线300的功能是否异常。
那么,进一步地,第一主机接口301还可以通过第一写入数据通道接收第二数据流,其中,第二数据流是由第一主机通过第一写入数据通道发送给第一主机接口301的;第一主机接口301根据本地保存的第二数据中的第二业务标识与第二索引号的对应关系,获取第二索引号。然后,第一主机接口301将第二数据流和第二索引号传输至AXI桥302。AXI桥302将第二数据流和第二索引号路由至高级扩展接口总线300中的第二从机接口,第二从机接口可以在接收到第二索引号时判断第二索引号与自身的索引号是否相同,输出第二判断结果。其中,由于第二从机对应连接第二从机接口,因而第二从机可以通过第二从机与第二从机接口之间的第二写入数据通道接收第二数据流和第二索引号,即第二数据流实际上是发送给了第二从机。
具体地,AXI桥302可以根据第二业务标识将第二数据流和第二索引号路由至第二从机接口。具体路由方式可以参考前述应用场景中的描述,此处不再赘述。
在上述方案中,AXI桥302根据第二业务标识,通过查表的方式获取到第二索引号,第二索引号用于指示第一主机在发送第二数据流时,请求访问的从机的索引号。AXI桥302是根据第二业务标识对第二数据流进行路由的,而并非根据第二索引号路由。因此,若AXI桥302的功能异常,那么AXI桥会将第二数据流路由至错误的从机,接收到第二数据流的第二从机并非第二索引号所指示的从机,那么,第二从机接口接收到的第二索引号和自身的索引号不相同,此时第二从机接口可以确定AXI桥302的功能异常;若AXI桥302的功能正常,AXI桥会将第二数据流路由至正确的从机,接收到第二数据流的第二从机即为第二索引号所指示的从机,那么,第二从机接口接收到的第二索引号和自身的索引号相同,此时第二从机接口可以确定AXI桥302的功能未出现异常。
以上介绍了主机向从机传输数据流时,如何检测AXI桥302的功能是否异常;本申请实施例中,还可以在从机向主机传输数据流时,检测AXI桥302的功能是否异常。
具体地,第一从机接口303还可以通过第一读回数据通道(即B通道)或第一写入响应通道(即R通道)接收第三数据流,其中,第三数据流是由第一从机通过第一读回数据通道(即B通道)或第一写入响应通道(即R通道)向第一从机接口303传输的数据流;然后,第一从机接口303获取第三数据流中的第三业务标识中的第三索引号,第三索引号用于指示第一从机发送第三数据流时,请求访问的主机的索引号。进一步地,第一从机接口303将第三数据流和第三索引号输出至AXI桥302;然后,AXI桥302可以将第三数据流和第三索引号路由至高级扩展接口总线300中的第二主机接口,第二主机接口可以判断第三索引号与自身的索引号是否相同,输出第三判断结果,从而指示AXI桥302的功能是否异常。由于第二主机与第二主机接口对应连接,因而第二主机接口可以通过第二主机与第二主机接口之间的第二读回数据通道或第二写入响应通道向第二主机发送第三数据流,即第三数据流实际上是发送给了第二主机。
其中,AXI桥302在将第三数据流和第三索引号路由至第二主机接口时,可以根据第三业务标识进行路由。具体路由方式可以参考前述应用场景中的描述,此处不再赘述。
由于AXI桥302是根据第三业务标识对第三数据流进行路由的,而并非根据第三索引号路由。因此,若AXI桥302的功能异常,那么AXI桥会将第三数据流路由至错误的主机,接收到第三数据流的第二主机并非第三索引号所指示的主机,那么,第二主机接口接收到的第三索引号和自身的索引号不相同,此时第二主机接口可以确定AXI桥302的功能异常;若AXI桥302的功能正常,AXI桥会将第三数据流路由至正确的主机,接收到第三数据流的第二主机即为第三索引号所指示的主机,那么,第二主机接口接收到的第三索引号和自身的索引号相同,此时第二主机接口可以确定AXI桥302的功能未出现异常。
通过以上介绍不难看出,采用本申请实施例提供的方案,在主机通过AXI桥302向从机传输数据流时,以及在从机通过AXI桥302向主机传输数据流时,均可以对AXI桥302的功能是否异常进行检测。对AXI桥302的功能是否异常进行检测的方法是:(1)在数据流的入口侧,针对每个数据流产生一个对应的标识符(索引号),该标识符用于指示该数据流应该传输至哪个主机(从机);(2)将数据流和标识符通过AXI桥302传输,AXI桥302在传输数据流时,是根据数据流中的信息(比如地址信息或业务标识)传输的,而并非根据入口侧产生的标识符传输;(3)在数据流的出口侧,接收到数据流的接口将自身的标识符与接收到的标识符进行比较,若不一致,则存在传输异常,若一致,则传输功能正常。
具体地,每个主机与对应的主机接口之间存在五个传输通道,AW通道、AR通道、W通道、B通道和R通道。在前述对AXI桥302的功能是否异常进行检测时所涉及的传输通道可以如图4中的标注所示。
如前所述,五个传输通道中的每个传输通道中均存在可配置位宽的用户自定义信息位,用于传递用户自定义信息,上述针对每个数据流所产生的标识符(索引号),可以通过用户自定义信息位传输。
比如,第一主机接口301在将第一数据流和第一索引号输出至AXI桥302时,可以将第一索引号保存在第一数据流中的用户自定义信息位,然后第一主机接口301可以将第一数据流输出至AXI桥302,第一数据流的用户自定义信息位中保存有第一索引号。第一索引号会随同第一数据流被传输至第一从机接口303。
同样地,在传输第二数据流时,第二索引号也可以采用同样的方式传输;在传输第三数据流时,第三索引号也可以采用同样的方式传输。此处不再赘述。
此外,第一数据流中还可以携带有第一有效位信息(valid),用于指示第一主机此次发起的访问是否有效。第一主机接口301只有在第一有效位信息有效(valid=1)时,才会将第一数据流和第一索引号输出至AXI桥302,在第一有效位信息无效(valid=0)时,第一主机接口301不会将第一数据流和第一索引号输出至AXI桥302。若第一有效位信息有效,那么第一有效位信息会随同第一数据流传输至第一从机接口303,同样地,第一从机接口303在第一有效位信息有效时,才会执行前述判断操作。
实际应用中,第一主机在主动发起数据访问时,可以将valid置为高电平,以指示该访问为第一主机主动发起的有效访问。在一些场景下,外界环境中的电磁噪声会对高级扩展接口总线300产生干扰,对芯片造成扰动,从而产生数据。电磁噪声通常只会造成极小部分信息位上的数据扰动,造成valid信息的扰动的可能性极小,因此,在第一主机接口 301接收到的数据流中的valid无效时,则可以认为该访问并非第一主机发起的,是无效的访问(外界扰动所产生的数据访问)。
此外,在第一从机接口303执行前述输出第一判断结果的操作并将第一数据流传输至第一从机之后,可以将第一从机接口303与第一从机之间的第二地址通道的各个信息位中的信息设置为默认初始值。比如,将第一有效位信息置为0,将第一地址信息置为0。
值得注意的是,本申请实施例中,用户自定义信息位的默认初始值可以为第一预设索引号,第一预设索引号与高级扩展接口总线300所耦合的任一从机的索引号均不相同。比如,与高级扩展接口总线300所耦合的N个从机的索引号分别为1~N,那么第一预设索引号可以为0。这样做的用意是:如前所述,环境噪声会对芯片造成扰动,从而产生数据。若扰动产生的数据未造成第二地址通道中的valid信息置高,则第二从机接口303不会对扰动产生的数据做进一步处理;若扰动产生的数据造成第二地址通道中的valid信息置高,则第一从机接口303会将第一预设索引号与自身的索引号进行比较,由于第一预设索引号与高级扩展接口总线300所耦合的任一从机的索引号均不相同,那么第一从机接口303的比较结果必然是两个索引号不一致,此时第一从机接口303则不会对扰动产生的数据做进一步处理。因此,将用户自定义信息位的默认初始值设置为第一预设索引号,可以避免环境干扰对高级扩展接口总线300的功能产生影响,造成数据的误传输。
本申请实施例中,主机接口和从机接口的相应功能可以通过不同的功能模块实现。
具体地,第一主机接口301中可以包括下游译码器。下游译码器用于根据第一地址信息进行译码得到第一索引号,并将第一索引号输出至AXI桥302。第一从机接口303中可以包括上游监控器,上游监控器用于判断第一索引号与第一从机接口的索引号是否相同,输出第一判断结果。
此外,第一主机接口301中还可以包括寄存器,用于保存第一数据流中的第一业务标识与第一索引号的对应关系。
进一步地,第一从机接口303中还可以包括上游译码器,上游译码器用于获取第三数据流中的第三业务标识中的第三索引号,并将第三索引号输出至AXI桥302。相应地,高级扩展接口总线300中还包括第二主机接口,第二主机接口中包括下游监控器,用于判断第三索引号与第二主机接口的索引号是否相同,输出第三判断结果。
不难看出,本申请实施例中,数据流入口侧的译码器用于根据数据流获取对应的索引号,并将索引号输出,从而将数据流和索引号一同传输至数据流的出口侧;数据流出口侧的监控器用于对AXI桥302的功能是否异常进行检测。此外,在主机接口中还可以包括寄存器,用于保存业务标识与索引号的对应关系,使得主机接口中的译码器接收到写入数据通道的数据流后,可以根据数据流中的业务标识以及上述对应关系确定索引号。
需要说明的是,上述下游译码器和寄存器仅为本申请实施例中在第一主机接口301中新增的功能模块。现有技术中,第一主机接口301中还包括其他功能模块,比如用于对第一数据流进行处理和传输的模块,本申请实施例中不再对这些模块展开介绍。同样地,上述上游监控器和上游译码器仅为本申请实施例中在第一从机接口303中新增的功能模块,第一从机接口303中原有的其他功能模块此处不再详细介绍。
采用本申请实施例提供的高级扩展接口总线300,可以在数据流的传输过程中对高级扩展接口总线300的功能是否异常进行检测,该方案无需增加额外的备份AXI总线,与现有技术相比降低了硬件开销、减小了电路面积。
实际应用中,主机接口和从机接口在对自身的索引号和接收到的索引号进行比对并输出判断结果后,可以在确定AXI总线302功能异常的情况下,将判断结果输出至错误管理单元(error management unit,EMU)。EMU可以对多个判断结果所指示的错误进行分类,并上报至本地CPU和安全岛。由本地CPU和安全岛进行核间通信,进行错误处理。
综上,采用本申请实施例提供的高级扩展接口总线300,第一主机接口301根据第一地址信息得到第一索引号,第一索引号用于指示第一主机发送第一数据流时,请求访问的从机的索引号。那么,第一数据流和第一索引号经AXI桥302路由后,接收到第一数据流的第一从机接口303可以比较第一索引号与自身的索引号是否相同,若二者不相同,则说明高级扩展接口总线300功能异常;若二者相同,则说明高级扩展接口总线300功能未出现异常。因此,采用本申请实施例提供的高级扩展接口总线300,可以在数据流的传输过程中进行功能异常的检测,该方案无需增加额外的备份AXI总线,与现有技术相比降低了硬件开销、减小了电路面积。
下面通过一个具体示例对本申请实施例提供的高级扩展接口总线进行介绍。
图5为本申请实施例提供的一种高级扩展接口总线的结构示意图。
AXI总线(100)包括AXI桥(101)、下游监控器dn_monitor(102)、历史映射记录表History Mapping Table(103)、下游译码器dn_decoder(104)、上游监控器up_monitor(105)和上游译码器up_monitor(106)。
应理解,下游监控器dn_monitor(102)、历史映射记录表History Mapping Table(103)、下游译码器dn_decoder(104)为Master0对应的主机接口(M0接口)中的模块,上游监控器up_monitor(105)和上游译码器up_monitor(106)为Slave1对应的从机接口(S1接口)中的模块。实际上,AXI总线(100)中的每个主机接口均需要配置下游监控器dn_monitor、历史映射记录表History Mapping Table和下游译码器dn_monitor三个功能模块,AXI总线(100)中的每个从机接口均需要配置上游监控器up_monitor和上游译码器up_monitor两个功能模块。
下面对Master向Slave传输数据流时,各个模块的功能进行介绍。
AXI桥(101):按照AXI协议,实现原有的多个Master设备和多个Slave设备的互联路由功能。
下游译码器dn_decoder(104):当M0接口的AR通道(AW通道)的读写访问有效时,对AR通道(AW通道)的地址进行译码,得到当前地址将要访问的Slave索引号,将Slave索引号拼接到ARUSER信号(AWUSER信号)的高位,ARUSER信号(AWUSER信号)将被AXI桥(101)基于自身功能传递至某个Slave接口。同时,下游译码器dn_decoder(104)将译码后的Slave索引号与当前AR通道(AW通道)的Transaction ID的对应关系保存到历史映射记录表History Mapping Table(103)中。需要说明的是,AXI桥(101)基于自身功能将ARUSER信号(AWUSER信号)传递至某个Slave接口的同时,AXI桥(101)也基于自身功能将AR通道(AW通道)的数据流传递至同一个Slave接口。具体地,AXI桥(101)可以根据AR通道(AW通道)中的地址信息确定将数据流和ARUSER信号(AWUSER信号)传递至哪个Slave接口。
历史映射记录表History Mapping Table(103):当M0接口的W通道的数据有效时,历史映射记录表History Mapping Table(103)将根据W通道的Transaction ID在History Mapping Table(103)中找到与其对应的Slave索引号,将其拼接到WUSER信号的高位,然后发送到AXI桥(101),AXI桥(101)将基于W通道的Transaction ID(非WUSER中的Slave索引号),将当前传输路由至某个Slave口。AXI桥(101)在对AW通道的数据流进行路由时,记录有AW通道的Transaction ID以及Slave索引号的对应关系,由于AW通道和W通道通常是同时传输的、且两个通道中的数据流的业务标识相同,因而AXI桥(101)可以根据W通道中的Transaction ID获取对应的Slave索引号,从而确定将W通道的数据流以及WUSER信号路由至哪个Slave。
上游监控器up_monitor(105):当S1接口的AR通道的读写访问有效时,判断接收到的AWUSER的高位(Slave索引号的字段)是否与自身编号相同,若相同,则AXI桥路由正确;若不同,则AXI桥路由功能异常;所述自身编号,是指对应Slave接口的编号,比如S1接口的编号为1。此外,对于S1接口的AW通道(W通道)的处理也类似,此处不再赘述。
根据上述各模块的功能,各模块之间的连接关系如下:M0接口中的下游译码器dn_decoder(104)与AW通道和AR通道耦合,用于接收AW通道和AR通道的valid信号和地址信息,此外,下游译码器dn_decoder(104)还将Slave索引号拼接到M0接口的AW通道和AR通道的USER信号高位;下游译码器dn_decoder(104)还与历史映射记录表History Mapping Table(103)耦合,用于将Slave索引号和Transaction ID的对应关系写入至历史映射记录表History Mapping Table(103);历史映射记录表History Mapping Table(103)与M0接口的W通道耦合,用于接收W通道的valid信号和Transaction ID,读出Transaction ID对应的Slave索引号后,将Slave索引号拼接到W通道的WUSER信号高位,并连接WUSER信号至AXI桥(101)的M0接口上;上游监控器up_monitor(105)与S0接口的AR通道、AW通道和W通道耦合,用于接收valid信号,以及接收ARUSER信号、AWUSER信号和WUSER信号;上游监控器up_monitor(105)将接收到的ARUSER信号、AWUSER信号和WUSER信号与自身的编号进行对比,输出S1接口的判断结果int_safety_s1。
下面对Slave向Master传输数据流时,各个模块的功能进行介绍。
上游译码器up_decoder(106):当S1接口的B通道(R通道)有效时,将其对应Transaction ID中的Master索引号复制至BUSER(RUSER)的高位,BUSER(RUSER)将被AXI桥(101)基于自身功能路由至某个Master接口。需要说明的是,AXI桥(101)基于自身功能将BUSER(RUSER)传递至某个Master接口的同时,AXI桥(101)也基于自身功能将B通道(R通道)的数据流传递至同一个Maste接口。具体地,AXI桥(101)可以根据B通道(R通道)中的Transaction ID(该Transaction ID中包括Master索引号)确定将数据流和BUSER(RUSER)传递至哪个Master接口。
下游监控器dn_monitor(102):当M0接口的B通道(R通道)的数据有效时,它判断收到的BUSER(RUSER)的高位(Master索引号的字段)是否与自身编号相同,若相同,则AXI桥(101)路由正确;若不同,则AXI桥(101)路由功能异常。所述自身编号,是指Master接口对应的Master的编号,比如M0接口的编号为0。
根据上述各模块的功能,各模块之间的连接关系如下:上游译码器up_decoder(106)与S0接口的B通道和R通道耦合,用于接收B通道(R通道)的valid信号、Transaction ID,以及将Transaction ID对应的Master索引号字段复制到BUSER(RUSER)的高位, 并将BUSER(RUSER)的高位连接至S0接口的B通道(R通道)。下游监控器dn_monitor(102)与M0接口的B通道(R通道)耦合,用于接收M0接口的B通道和R通道的valid信号以及BUSER(RUSER)信号,下游监控器dn_monitor(102)将接收到的BUSER(RUSER)信号与自身的编号进行对比,输出M0接口的判断结果int_safety_m0。
实际上,本申请实施例中并不限定AXI总线中的Master和Slave的接口个数。Master和Slave接口个数可以根据项目需求自由配置,每个Master接口的处理与M0接口类似,每个Slave接口的处理与S1接口类似。如果存在N个Slave接口,那么Slave接口的索引号为1~N。若存在M个Master接口,那么Master接口的索引号为0~M-1。
此外,本申请实施例中,AXI桥(101)中还可以增加超时(Timeout)机制,若AXI桥(101)中的某一次传输在一定时间内未完成,则将Timeout中断置为高电平。
当AXI桥(101)检测出自身异常之后,将异常中断上报至EMU,如图6所示。由EMU对错误进行分类识别,然后将异常同时上报至本地CPU和芯片的安全岛,之后本地CPU和安全岛通过核间通信协商AXI桥(101)功能异常的软件处理方案。
基于同一发明构思,本申请实施例还提供一种片上系统。如图7所示,片上系统700包括第一主机701、第一从机702以及前述高级扩展接口总线300。第一主机701与高级扩展接口总线300的第一主机接口耦合,第一从机702与高级扩展接口总线300的第一从机接口耦合;高级扩展接口总线300用于将第一主机701发送的第一数据流传输至第一从机702。
需要说明的是,片上系统700中未详尽描述的实现方案及其技术效果可以参见高级扩展接口总线300中的相关描述,此处不再赘述。
显然,本领域的技术人员可以对本申请实施例进行各种改动和变型而不脱离本申请实施例的范围。这样,倘若本申请实施例的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。
Claims (15)
- 一种高级扩展接口总线,其特征在于,包括:第一主机接口,用于通过第一地址通道接收第一数据流;根据所述第一数据流中的第一地址信息得到第一索引号;将所述第一数据流和所述第一索引号输出至AXI桥;所述AXI桥,与所述第一主机接口耦合,用于将所述第一数据流和所述第一索引号路由至第一从机接口;所述第一从机接口,与所述AXI桥耦合,用于判断所述第一索引号与自身的索引号是否相同,输出第一判断结果。
- 如权利要求1所述的总线,其特征在于,所述第一地址通道为第一读地址通道,所述第二地址通道为第二读地址通道;或者,所述第一地址通道为第一写地址通道,所述第二地址通道为第二写地址通道。
- 如权利要求1或2所述的总线,其特征在于,所述第一主机接口还用于:保存所述第一数据流中的第一业务标识与所述第一索引号的对应关系。
- 如权利要求1~3任一项所述的总线,其特征在于,所述AXI桥在将所述第一数据流和所述第一索引号路由至第一从机接口时,具体用于:根据所述第一地址信息将所述第一数据流和所述第一索引号路由至所述第一从机接口。
- 如权利要求1~4任一项所述的总线,其特征在于,所述第一主机接口还用于:通过第一写入数据通道接收第二数据流;根据本地保存的、所述第二数据流中的第二业务标识与第二索引号的对应关系,获取所述第二索引号;将所述第二数据流和所述第二索引号输出至AXI桥;所述AXI桥还用于:将所述第二数据流和所述第二索引号路由至第二从机接口;所述高级扩展接口总线还包括:所述第二从机接口,用于判断所述第二索引号与自身的索引号是否相同,输出第二判断结果。
- 如权利要求5所述的总线,其特征在于,所述AXI桥在将所述第二数据流和所述第二索引号路由至第二从机接口时,具体用于:根据所述第二业务标识将所述第二数据流和所述第二索引号路由至所述第二从机接口。
- 如权利要求1~6任一项所述的总线,其特征在于,所述第一从机接口还用于:通过第一读回数据通道或第一写入响应通道接收第三数据流;获取所述第三数据流中 的第三业务标识中的第三索引号;将所述第三数据流和所述第三索引号输出至所述AXI桥;所述AXI桥还用于:将所述第三数据流和所述第三索引号路由至第二主机接口;所述高级扩展接口总线还包括:所述第二主机接口,用于判断所述第三索引号与自身的索引号是否相同,输出第三判断结果。
- 如权利要求7所述的总线,其特征在于,所述AXI桥在将所述第三数据流和所述第三索引号路由至第二主机接口时,具体用于:根据所述第三业务标识将所述第三数据流和所述第三索引号路由至所述第二主机接口。
- 如权利要求1~8任一项所述的总线,其特征在于,所述第一主机接口在将所述第一数据流和所述第一索引号输出至AXI桥时,具体用于:所述第一主机接口将所述第一索引号保存在所述第一数据流中的用户自定义信息位;所述第一主机接口将所述第一数据流输出至所述AXI桥,所述第一数据流的用户自定义信息位中保存有所述第一索引号。
- 如权利要求1~9任一项所述的总线,其特征在于,所述第一主机接口包括:下游译码器,用于根据所述第一地址信息得到第一索引号;将所述第一索引号输出至AXI桥;所述第一从机接口包括:上游监控器,用于判断所述第一索引号与所述第一从机接口的索引号是否相同,输出所述第一判断结果。
- 如权利要求10所述的总线,其特征在于,所述第一主机接口还包括:寄存器,用于保存所述第一数据流中的第一业务标识与所述第一索引号的对应关系。
- 如权利要求10或11所述的总线,其特征在于,所述第一从机接口还包括:上游译码器,用于获取所述第三数据流中的第三业务标识中的第三索引号;将所述第三索引号输出至所述AXI桥;其中,所述第三数据流为所述第一从机与所述第一从机接口之间的第一读回数据通道或第一写入响应通道中传输的数据流;所述高级扩展接口总线还包括第二主机接口,所述第二主机接口中包括下游监控器,用于判断所述第三索引号与所述第二主机接口的索引号是否相同,输出所述第三判断结果。
- 如权利要求1~12任一项所述的总线,其特征在于,所述第一从机接口在输出第一判断结果时,具体用于:在所述第一索引号与自身的索引号不相同的情况下,将所述第一判断结果输出至错误管理单元EMU,所述错误管理单元EMU用于对所述第一判断结果所指示的错误进行分类 并上报至中央处理器CPU和安全岛。
- 如权利要求1~13任一项所述的总线,其特征在于,所述第一主机接口在将所述第一数据流和所述第一索引号输出至AXI桥时,具有用于:在所述第一数据流中的第一有效位信息有效时,将所述第一数据流和所述第一索引号输出至所述AXI桥。
- 一种片上系统,其特征在于,包括第一主机、第一从机以及如权利要求1~14任一项所述的高级扩展接口总线;所述第一主机与所述高级扩展接口总线的第一主机接口耦合,所述第一从机与所述高级扩展接口总线的第一从机接口耦合;所述高级扩展接口总线用于将所述第一主机发送的第一数据流传输至所述第一从机。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202180101737.0A CN117836757A (zh) | 2021-08-30 | 2021-08-30 | 一种高级扩展接口总线及片上系统 |
PCT/CN2021/115272 WO2023028741A1 (zh) | 2021-08-30 | 2021-08-30 | 一种高级扩展接口总线及片上系统 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2021/115272 WO2023028741A1 (zh) | 2021-08-30 | 2021-08-30 | 一种高级扩展接口总线及片上系统 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023028741A1 true WO2023028741A1 (zh) | 2023-03-09 |
Family
ID=85411732
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/115272 WO2023028741A1 (zh) | 2021-08-30 | 2021-08-30 | 一种高级扩展接口总线及片上系统 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117836757A (zh) |
WO (1) | WO2023028741A1 (zh) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101261614A (zh) * | 2007-01-29 | 2008-09-10 | 美高森美股份有限公司-模拟混合信号集团有限公司 | 可寻址串行外围接口 |
CN102216920A (zh) * | 2011-05-24 | 2011-10-12 | 华为技术有限公司 | 先进可扩展接口总线以及相应的数据传输方法 |
US20120102250A1 (en) * | 2010-10-20 | 2012-04-26 | Samsung Electronics Co., Ltd. | Bus system |
US20140143463A1 (en) * | 2012-11-14 | 2014-05-22 | Huawei Technologies Co., Ltd. | System on chip and corresponding monitoring method |
CN111427831A (zh) * | 2020-03-27 | 2020-07-17 | 电子科技大学 | 一种基于电源管理总线协议的接口实现方法 |
-
2021
- 2021-08-30 CN CN202180101737.0A patent/CN117836757A/zh active Pending
- 2021-08-30 WO PCT/CN2021/115272 patent/WO2023028741A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101261614A (zh) * | 2007-01-29 | 2008-09-10 | 美高森美股份有限公司-模拟混合信号集团有限公司 | 可寻址串行外围接口 |
US20120102250A1 (en) * | 2010-10-20 | 2012-04-26 | Samsung Electronics Co., Ltd. | Bus system |
CN102216920A (zh) * | 2011-05-24 | 2011-10-12 | 华为技术有限公司 | 先进可扩展接口总线以及相应的数据传输方法 |
US20140143463A1 (en) * | 2012-11-14 | 2014-05-22 | Huawei Technologies Co., Ltd. | System on chip and corresponding monitoring method |
CN111427831A (zh) * | 2020-03-27 | 2020-07-17 | 电子科技大学 | 一种基于电源管理总线协议的接口实现方法 |
Also Published As
Publication number | Publication date |
---|---|
CN117836757A (zh) | 2024-04-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7970958B2 (en) | Peripheral interface alert message for downstream device | |
US7747809B2 (en) | Managing PCI express devices during recovery operations | |
US6829729B2 (en) | Method and system for fault isolation methodology for I/O unrecoverable, uncorrectable error | |
CN100375960C (zh) | 用于调试输入/输出故障的方法和系统 | |
JPH01293450A (ja) | 障害装置特定システム | |
JP2996440B2 (ja) | データ処理システムの診断方式 | |
CN111078492B (zh) | 一种SoC内部总线的状态监控系统及方法 | |
CN113505016B (zh) | 总线传输故障检测方法、总线系统及芯片 | |
CN105183575A (zh) | 处理器故障的诊断方法、装置及系统 | |
US20060212749A1 (en) | Failure communication method | |
US6189117B1 (en) | Error handling between a processor and a system managed by the processor | |
KR100293950B1 (ko) | 주변소자 내부연결 버스 모니터를 이용한 장애 감지 장치 및 방법 | |
WO2023028741A1 (zh) | 一种高级扩展接口总线及片上系统 | |
US20060117226A1 (en) | Data communication system and data communication method | |
JP2006301784A (ja) | プログラマブルロジックコントローラ | |
JP2003330905A (ja) | コンピュータシステム | |
JP2014532236A (ja) | 接続方法 | |
JP2001007893A (ja) | 情報処理システム及びそれに用いる障害処理方式 | |
US20220050139A1 (en) | System, apparatus and method for communicating debug messages on a sideband of a serial link according to a debug type messaging protocol | |
JP3638773B2 (ja) | ディスクアレイ装置 | |
WO2008062511A1 (fr) | Système multiprocesseur | |
US20110145455A1 (en) | Information processing apparatus and method for controlling information processing apparatus | |
JP2580311B2 (ja) | 多重化システムの相互監視処理方式 | |
JPH09152995A (ja) | 計算機システム | |
JP2000081987A (ja) | エラー解析装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21955323 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 202180101737.0 Country of ref document: CN |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21955323 Country of ref document: EP Kind code of ref document: A1 |