An AHB-lite bus matrix structure

By designing an AHB-lite bus matrix structure, including master and slave control modules, the problems of unclear AHB-lite bus matrix circuit implementation and access delay in the prior art are solved, realizing parallel access of multiple masters and multiple slaves and high access speed.

CN116401201BActive Publication Date: 2026-11-27XIAN MICROELECTRONICS TECH INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310335219.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2026-11-27
Estimated Expiration
2043-03-30

AI Technical Summary

Technical Problem

The existing research on AHB-lite bus matrices does not provide a specific circuit implementation structure, and there is a problem of single-cycle delay when accessing a shared slave device for the first time under burst conditions, and no implementation structure for eliminating buffering is provided.

Method used

An AHB-lite bus matrix structure was designed, including master and slave control modules. Through the interaction of the input/output control module, address decoding and slave signal transmission module and slave control module, parallel access of multiple masters and multiple slaves is realized. Two-stage pipeline and register signal priority arbitration are adopted to resolve access conflicts.

Benefits of technology

It enables parallel access of multiple masters and slaves based on the AHB-lite bus matrix, which improves access speed, reduces access conflicts, has good scalability, strong control logic versatility, and is easy to expand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116401201B_ABST
    Figure CN116401201B_ABST
Patent Text Reader

Abstract

The application discloses a kind of structures of AHB-lite bus matrix, comprising: input and output control module respectively with host, address decoding and slave signal transmission module carry out information interaction;Slave control module is connected slave;Host control module is connected with all slave control module, carries out information interaction;A host corresponds to a host control module, a slave corresponds to slave control module.The application realizes the parallel access of multiple hosts and multiple slaves based on AHB-lite bus matrix;Meanwhile, the application control logic is strong in universality, good in expandability, easy to expand, and high in application flexibility.Based on each host bus access when there is no bus access conflict, it can be directly transmitted to slave, to speed up access rate;Based on AHB-lite two-stage flow, support seamless efficient bus access of multiple hosts and multiple slaves.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of bus matrix technology and relates to the structure of an AHB-lite bus matrix. Background Technology

[0002] AHB bus matrix is ​​a commonly used bus for interconnecting high-performance devices. Due to the problem that only one valid host can transmit at a time, the performance of the AHB bus degrades, affecting the overall SoC performance. Therefore, an AHB-based bus matrix scheme is proposed, which supports parallel access of multi-level AHB buses and can significantly improve system bandwidth.

[0003] Based on the simplicity of the AMBA3.0 AHB-lite bus protocol, it was chosen as the bus for the bus matrix. Current research on AHB-lite bus matrices, however, does not provide a specific circuit implementation structure for the bus matrix in the paper "Design and Implementation of AHB Matrix Interconnect Bus IP," nor does it explain whether bus arbitration results are cached. The papers "Design and Implementation of BusMatrix in Multi-Level AHB Bus Architecture" and "Design and Implementation of Multi-Level AHB Bus Based on Interconnect Matrix Structure" both implement a first-level cache for arbitration results, which results in a single-cycle delay for a single access or the first access to a shared slave device under burst conditions, and also fail to provide a specific implementation structure to eliminate the cache. Summary of the Invention

[0004] The purpose of this invention is to address the problems in existing research on AHB-lite bus matrices, which do not provide a specific circuit implementation structure for the bus matrix, or have the problem of single-cycle delay when accessing a shared slave device for the first time under burst conditions, and also do not provide a specific implementation structure for eliminating buffering. This invention provides a structure for an AHB-lite bus matrix.

[0005] To achieve the above objectives, the present invention employs the following technical solution:

[0006] A structure of an AHB-lite bus matrix includes: i masters and j slaves, a master control module and a slave control module;

[0007] The master control module includes an input / output control module and an address decoding and slave signal transmission module. The input / output control module interacts with the master, address decoding and slave signal transmission modules respectively. The slave control module is connected to the slave. The master control module is connected to all slave control modules for information exchange. One master corresponds to one master control module, and one slave corresponds to one slave control module.

[0008] A further improvement of the present invention is that:

[0009] Furthermore, the number of hosts i ≥ 2 and the number of slaves j ≥ 2.

[0010] Furthermore, the inputs of the input / output control module are the host's input based on the AHB-lite bus protocol, and the input signals slv_hresp_i, slv_hrdata_i, slv_hready_i, and slv_ok_i from the address decoding and slave transmission module. Among them, slv_hresp_i, slv_hrdata_i, and slv_hready_i are the slave's output signals based on the AHB-lite bus protocol, and slv_ok_i indicates whether the slave has received a new transmission, active high. The outputs of the input / output control module are the host's output based on the AHB-lite bus protocol, and slv_heldtrans_o transmitted to the address decoding and slave transmission module. This signal indicates that the host has made a valid transmission to the slave, active high.

[0011] Furthermore, the inputs of the address decoding and slave signal transmission module are the outputs of the input / output control module and the outputs of all connected slave control modules, while the output of the address decoding and slave signal transmission module serves as the input of the input / output control module. Based on slave address allocation, the address decoding and slave signal transmission module completes the slave selection signal (active high) according to the address signal haddr_i transmitted from the master. It then uses the slave selection signal to indicate whether each slave device receives the new transmission indication signal slvy_ok_i, thereby determining whether the current slave device can receive the new transmission indication signal slv_ok_o. Here, y represents the different interconnected slave device numbers.

[0012] Furthermore, the address decoding and slave signal transmission module is based on a two-stage pipeline of the AHB-lite bus protocol. It generates slv_hresp_o, slv_hrdata_o, and slv_hready_o output signals according to the registered value of the slave selection signal and the corresponding slave hresp, hrdata, and hready input signals.

[0013] Furthermore, the inputs of the slave control module are the outputs of the input / output control module, the address decoder and slave signal transmission module, and the slave input based on the AHB-lite protocol. The output of the slave control module is connected to the input of the address decoder and slave signal transmission module. Based on the master's valid transmission indication signal mx_heldtrans_i and the slave selection signal mx_slv_sel_i, combined with the slave input slv_hready_i, the slave control module generates a master valid access indication signal mx_slv_valid for the slave. This valid signal indicates that the master can send information to the slave. Here, x represents the master number, and the number of master numbers is the same as the number of masters.

[0014] Furthermore, master access to slave also includes: when a slave has no access operation in the previous clock cycle and is unaware of an access operation in the next clock cycle, the slave can receive access, and slvy_ok_i is valid. Therefore, there may be situations where multiple masters have valid access indication signals for the same slave at the same time. In this case, it is necessary to store the low-priority master access information and prioritize the access of high-priority masters. Here, y represents the slave number, and the number of slave numbers is the same as the number of slaves.

[0015] Furthermore, low-priority host access information is stored, and high-priority access is prioritized. Specifically:

[0016] Based on the register signal r_heldtrans, incomplete low-priority host accesses are registered. For hosts with multiple hosts, the bit width of r_heldtrans is expanded, and multiple host accesses are registered. When there is a high-priority host access in the current clock cycle, the signal is continued to be registered. When there is no high-priority host access, the host access with the highest priority among the registered r_heldtrans is selected, and the host accesses of other priorities are still registered. This process continues until all host accesses are completed.

[0017] Furthermore, the htrans signal transmitted from the slave control module to the master is stored in the register. When there is a defined access cycle, the slave outputs the slv_htrans_o signal, and in other cycles, it outputs an invalid value "00".

[0018] Compared with the prior art, the present invention has the following beneficial effects:

[0019] This invention enables information interaction between the input / output control module and the master, address decoding, and slave signal transmission modules respectively; the slave control module connects to the slave devices; and the master control module connects to all slave control modules for information interaction. This achieves parallel access across multiple masters and slaves based on an AHB-lite bus matrix. This invention is easy to implement, has highly versatile control logic, good scalability, is easy to extend, and offers high application flexibility.

[0020] Furthermore, based on the fact that bus access from each master can be directly transmitted to the slave when there is no bus access conflict, the access rate is accelerated; based on the two-stage pipeline of AHB-lite, seamless and efficient bus access for multiple masters and multiple slaves is supported. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a diagram of the AHB-lite bus matrix structure of the present invention;

[0023] Figure 2 This is a structural diagram of the input / output control module;

[0024] Figure 3 This is a structural diagram of the address decoding and slave signal transmission module;

[0025] Figure 4 This is a structural diagram of the slave control module;

[0026] Figure 5 A diagram showing the fully connected host and slave architecture for the AHB-lite bus matrix extension;

[0027] Figure 6 Diagram showing the connection structure between the master and slave components of the AHB-lite bus matrix extension. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0029] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0030] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0031] In the description of the embodiments of the present invention, it should be noted that if terms such as "upper," "lower," "horizontal," or "inner" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of the invention is in use, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Furthermore, terms such as "first" and "second" are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0032] Furthermore, the use of the term "horizontal" does not imply that the component must be absolutely horizontal, but rather that it can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.

[0033] In the description of the embodiments of the present invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention according to the specific circumstances.

[0034] The present invention will now be described in further detail with reference to the accompanying drawings:

[0035] See Figure 1 This invention discloses a structure of an AHB-lite bus matrix, characterized in that it includes: i master units and j slave units, a master control module and a slave control module;

[0036] The master control module includes an input / output control module and an address decoding and slave signal transmission module. The input / output control module interacts with the master and address decoding and slave signal transmission modules respectively. The slave control module connects to the slave devices. The master control module is connected to all slave control modules for information exchange. One master corresponds to one master control module, and one slave corresponds to one slave control module. The number of masters i ≥ 2, and the number of slaves j ≥ 2.

[0037] See Figure 2 The inputs of the input / output control module are the host's input based on the AHB-lite bus protocol, and the input signals slv_hresp_i, slv_hrdata_i, slv_hready_i, and slv_ok_i from the address decoding and slave transmission module. slv_hresp_i, slv_hrdata_i, and slv_hready_i are the slave's output signals based on the AHB-lite bus protocol, and slv_ok_i indicates whether the slave has received a new transmission; it is active high. The outputs of the input / output control module are the host's output based on the AHB-lite bus protocol, and slv_heldtrans_o, transmitted to the address decoding and slave transmission module. This signal indicates that the host has made a valid transmission to the slave; it is active high. To ensure that valid transmissions are not lost when the slave cannot receive a new transmission, the host's transmission input signals are registered.

[0038] The address decoding and slave signal transmission module's inputs are the outputs of the input / output control module and all connected slave control modules, while the output of the address decoding and slave signal transmission module serves as the input of the input / output control module.

[0039] The address decoding and slave signal transmission module is based on slave address allocation. It completes the slave selection signal according to the address signal haddr_i transmitted by the master. The slave selection signal is active high. It also indicates whether each slave can receive the new transmission indication signal slvy_ok_i based on the slave selection signal, thereby determining whether the current slave can receive the new transmission indication signal slv_ok_o. Here, y represents the different slave numbers interconnected.

[0040] The address decoding and slave signal transmission module is a two-stage pipeline based on the AHB-lite bus protocol. It generates slv_hresp_o, slv_hrdata_o, and slv_hready_o output signals according to the registered value of the slave selection signal and the corresponding slave hresp, hrdata, and hready input signals.

[0041] The inputs of the slave control module are the outputs of the input / output control module, the address decoder and slave signal transmission module, and the slave input based on the AHB-lite protocol. The outputs of the slave control module are connected to the inputs of the address decoder and slave signal transmission module. Based on the master's valid transmission indication signal mx_heldtrans_i and the slave selection signal mx_slv_sel_i, combined with the slave input slv_hready_i, the slave control module generates a master valid access indication signal mx_slv_valid for the slave. This valid signal indicates that the master can transmit information to the slave. Here, x represents the master number, and the number of master numbers is the same as the number of masters.

[0042] Master access to slave also includes: when a slave has no access operation in the previous clock cycle and is unaware of an access operation in the next clock cycle, the slave can receive access, and slvy_ok_i is valid. Therefore, there may be situations where multiple masters have valid access indication signals for the same slave at the same time. In this case, it is necessary to register the low-priority master access information and prioritize the access of high-priority masters. Here, y represents the slave number, and the number of slave numbers is the same as the number of slaves.

[0043] Low-priority host access information is stored, and high-priority access is prioritized. Specifically:

[0044] Based on the register signal r_heldtrans, incomplete low-priority host accesses are registered. For hosts with multiple hosts, the bit width of r_heldtrans is expanded, and multiple host accesses are registered. When there is a high-priority host access in the current clock cycle, the signal is continued to be registered. When there is no high-priority host access, the host access with the highest priority among the registered r_heldtrans is selected, and the host accesses of other priorities are still registered. This process continues until all host accesses are completed.

[0045] The htrans signal transmitted from the slave control module to the master is stored in a register. When there is a defined access cycle, the slave outputs the slv_htrans_o signal, and in other cycles, it outputs an invalid value "00".

[0046] Example:

[0047] See Figure 1Based on a three-master, two-slave fully connected AHB-lite bus matrix, the masters are M1, M2, and M3, and the slaves are S1 and S2. Master M1 is connected to the input / output control module 1 of master control module 1, which in turn is connected to the address decoding and slave signal transmission module 1. Master control module 1 connects to slave control module 1 and slave control module 2. M2 is connected to the input / output control module 2 of master control module 2, which in turn is connected to the address decoding and slave signal transmission module 2. Master control module 2 connects to slave control module 1 and slave control module 2. M3 is connected to the input / output control module 3 of master control module 3, which in turn is connected to the address decoding and slave signal transmission module 3. Master control module 3 connects to slave control module 1 and slave control module 2. Slave control module 1 is connected to S1, and slave control module 2 is connected to S2.

[0048] The structure of the input / output control module is shown below. Figure 2 As shown, its inputs are the master's input based on the AHB-lite bus protocol, and the input signals slv_hresp_i, slv_hrdata_i, slv_hready_i, and slv_ok_i from the address decoding and slave transmission module. slv_hresp_i, slv_hrdata_i, and slv_hready_i are the slave's output signals based on the AHB-lite bus protocol, and slv_ok_i indicates whether the slave can receive access (active high). The module's output is the master's output based on the AHB-lite bus protocol, and the master-slave valid transmission indication signal slv_heldtrans_o, transmitted to the address decoding and slave transmission module. This signal indicates a valid transmission from the master to the slave (active high). To ensure that valid transmissions are not lost when the slave cannot receive new transmissions, the master's transmission input signals are registered. The specific structure is as follows:

[0049] The host's htrans_i[1] is connected to the enable EN terminal of the diff register, yy_i is connected to the D terminal of the diff register and the 1 terminal of the mux, the Q terminal of the diff register is connected to the 0 terminal of the mux, and the output of the mux is yy_o. Among them, yy in yy_i and yy_o represents htrans, haddr, hwrite, hsize, hprot, hburst and hwdata. slv_hresp_i is directly output to hresp_o. slv_hrdata_i is directly output to hrdata_o. slv_hready_i and slv_ok_i are respectively connected to the two ends of the AND gate h_and1, the output of which is hready_o, and connected to one end of the AND gate h_and2. The other end of h_and2 is connected to htrans_i[1], and its output is slv_heldtrans_o.

[0050] The structure of the address decoding and slave signal transmission module is shown in [link to module description]. Figure 3 As shown, its inputs are the outputs of the input / output control module and the outputs of the slave control module of the connected slave device, and its outputs serve as the inputs of the input / output control module. This module, based on slave address allocation, completes the slave selection signal (active high) according to the address signal haddr_i transmitted from the master. Based on the slave selection signal and the indication signal slvy_ok_i (where y represents the different interconnected slave numbers), it generates the current slave device's new transmission indication signal slv_ok_o. It also employs a two-stage pipeline based on the AHB-lite bus protocol, generating slv_hresp_o, slv_hrdata_o, and slv_hready_o output signals based on the registered value of the slave selection signal and the corresponding slave device's hresp, hrdata, and hready input signals. The specific structure is as follows:

[0051] haddr_i serves as the input to the address decoding module, decoding the address assigned to different slave devices. Based on the connection of two slave devices, the address decoding module outputs slave 1 select signal slv1_sel and slave 2 select signal slv2_sel. The slv1_sel signal is connected to the D terminal of the diff1 register, and slv_heldtrans_i is connected to the EN terminal of the diff1 register. The Q terminal of the diff1 register outputs r_slv1_sel. Similarly, the slv2_sel signal is connected to the D terminal of the diff2 register, and slv_heldtrans_i is connected to the EN terminal of the diff2 register. The Q terminal of the diff2 register outputs r_slv2_sel.

[0052] slv1_sel and slv1_ok_i are connected to the two ends of AND gate AND1, and their output is connected to one end of OR gate OR1; slv2_sel and slv2_ok_i are connected to the two ends of AND gate AND2, and their output is connected to one end of OR gate OR1; the inverted slv1_sel and the inverted slv2_sel are connected to the two ends of AND gate AND3, and their output is connected to one end of OR gate OR1; the output of OR gate OR1 is slv_ok_o.

[0053] r_slv1_sel and slv1_hready_i are connected to the two ends of AND gate AND4, and their output is connected to one end of OR gate OR2; r_slv2_sel and r_slv2_hready_i are connected to the two ends of AND gate AND5, and their output is connected to one end of OR gate OR2; the inverted r_slv1_sel and the inverted r_slv2_sel are connected to the two ends of AND gate AND6, and their output is connected to one end of OR gate OR2; the output of OR gate OR2 is slv_hready_o.

[0054] r_slv1_sel and slv1_hresp_i are connected to the two ends of AND gate AND7, and their output is connected to one end of OR gate OR3; r_slv2_sel and r_slv2_hresp_i are connected to the two ends of AND gate AND8, and their output is connected to one end of OR gate OR3; the output of OR gate OR3 is slv_hresp_o.

[0055] r_slv1_sel and slv1_hrdata_i are connected to the two ends of AND gate AND9, and their output is connected to one end of OR gate OR4; r_slv2_sel and r_slv2_hrdata_i are connected to the two ends of AND gate AND10, and their output is connected to one end of OR gate OR4; the output of OR gate OR4 is slv_hrdata_o.

[0056] The structure of the slave control module is shown below. Figure 4As shown, its inputs are the outputs of the input / output control module, the address decoder and slave signal transmission module, and the slave input based on the AHB-lite protocol. The output of this module is connected to the input of the address decoder and slave signal transmission module. This module generates the master access valid indication signal mx_heldtrans_i (where x represents the master number, and there are as many of these signals as there are masters, the same applies below) based on the master's valid transmission indication signal to the slave (mx_heldtrans_i) and the slave selection signal mx_slv_sel_i, combined with the slave input slv_hready_i. When this signal is valid, it indicates that the master can send transmission information to the slave. This invention supports direct bus access transmission to slave devices when there are no bus access conflicts, accelerating master-slave access speed. However, this also means that the master must obtain an indication signal indicating whether the slave can receive access in the current clock cycle when initiating the access transmission. Furthermore, controlling this indication signal based on master access conflict results can create a combinational logic loop. Therefore, this invention allows a slave to receive access if it did not have a valid access in the previous clock cycle and is unaware of an access operation in the next clock cycle; that is, `slvy_ok_i` (where y represents the slave number, and there are as many of these signals as there are slaves) is valid. Therefore, multiple masters may simultaneously have valid indication signals for the same slave access, leading to slave access conflicts. In this case, low-priority master access information needs to be registered, prioritizing high-priority access. To achieve efficient and seamless bus access, after high-priority master access, low-priority master access can be piped through. This invention proposes a register signal `r_heldtrans` to register incomplete low-priority master accesses. For systems with multiple masters, the bit width of `r_heldtrans` can be expanded to register multiple master accesses. If a high-priority master still accesses the device within the current clock cycle, the signal continues to be registered. If no high-priority master accesses the device, the highest-priority master in the registered `r_heldtrans` register is selected for access, while other priority master accesses remain registered, and so on, until all master accesses are completed. Additionally, since the `htrans` signal (`mx_htrans_i`) transmitted to the master is stored in a register, directly transmitting it to the slave would cause multiple slave access errors. Therefore, the `slv_htrans_o` signal should be output to the slave during a defined access cycle, and an invalid value "00" should be output in other cycles. The specific structure is as follows:

[0057] `mx_heldtrans_i` is connected to one end of OR gate `or1_1` and one end of OR gate `or_2`. The Q output of the `diff_mxtrans` register, `r_mxheldtrans`, is connected to one end of OR gate `or1_1` and one end of OR gate `or_2`. The output of OR gate `or_1` is connected to one end of AND gate `and1`. The other end of AND gate `and1` is connected to the inverted output of `slv_hready_i`. The output of AND gate `and1` is `next_mxheldtrans`, which is connected to the D output of the `diff_mxtrans` register and one end of OR gate `or_2`. The output of OR gate `or_2` is connected to one end of AND gate `and_2`. The other end of `and_2` is connected to `mx_slv_sel_i`. The output of `and_2` is `mx_slv_valid`. Here, `x` in `mx_heldtrans_i`, `diff_mxtrans`, `mx_slv_sel_i`, and `mx_slv_valid` represents the host. There are two hosts here, so `x` can be 1 or 2.

[0058] The SEL pin of mux_3 is connected to the Q pin r_heldtrans of the diff_m_1 register. The 1 pin is connected to 1, and the 0 pin is connected to m2_slv_valid. The output is connected to the 1 pin of mux_2. The 0 pin of mux_2 is connected to r_heldtrans. The SEL pin of mux_2 is connected to m1_slv_valid. The output of mux_2 is connected to the 1 pin of mux_1. The 0 pin of mux_1 is connected to r_heldtrans. The SEL pin of mux_1 is connected to slv_hready_i. The output of mux_1 is m2_heldtrans (the signal that selects the low-priority master, which is m2 in this case). It is connected to the D pin of the diff_m_1 register. The EN pin of diff_m_1 is connected to slv_hready_i.

[0059] `m1_slv_valid` and `m2_slv_valid` serve as inputs to priority arbitration, outputting the conflict indication signal `conflict` and determining the priorities of the two hosts `m1` and `m2`. Here, it's assumed that `m1` has a higher priority than `m2`. Therefore, the `EN` pin of the `diff_m_2` register is connected to `conflict`, the `D` pin is connected to `m2_yy_i` (the signal that selects the lower-priority host, in this case, `m2`), and the `Q` pin outputs `r_m2_yy`. In `m2_yy_i` and `r_m2_yy`, `yy` represents `htrans`, `haddr`, `hwrite`, `hsize`, `hprot`, `hburst`, and `hwdata`, respectively.

[0060] The sel terminal of mux_s_4 is connected to m2_slv_valid, the 1 terminal is connected to m2_htrans_i, and the 0 terminal is connected to "00". The output is connected to the 0 terminal of mux_s_3. The 1 terminal of mux_s_3 is connected to r_m2_htrans. The sel terminal of mux_s_3 is connected to r_heldtrans. The output of mux_s_3 is connected to the 0 terminal of mux_s_2. The 1 terminal of mux_s_2 is connected to m1_htrans_i. The sel terminal of mux_s_2 is connected to m1_slv_valid. The output of mux_s_2 is connected to the 1 terminal of mux_s_1. The 0 terminal of mux_s_1 is connected to "00". The sel terminal of mux_s_1 is connected to slv_hready_i. The output of mux_s_1, slv_htrans, is connected to the D terminal of the diff_s_1 register. The EN terminal of the diff_s_1 register is connected to slv_hready_i. The Q terminal outputs r_htrans.

[0061] The sel pin of mux_s_8 is connected to m2_slv_valid, the 1 pin of mux_s_8 is connected to m2_yy_i, the 0 pin of mux_s_8 is connected to the Q pin r_yy of the diff_s_2 register, the output of mux_s_8 is connected to the 0 pin of mux_s_7, the 1 pin of mux_s_7 is connected to r_m2_yy, the sel pin of mux_s_7 is connected to r_heldtrans, the output of mux_s_7 is connected to the 0 pin of mux_s_6, and the 1 pin of mux_s_6 is connected to the 1 pin of mux_s_6. Connect m1_yy_i, connect the sel terminal of mux_s_6 to m1_slv_valid, connect the output of mux_s_6 to terminal 1 of mux_s_5, connect terminal 0 of mux_s_5 to the Q terminal r_yy of the diff_s_2 register, connect the sel terminal of mux_s_5 to slv_hready_i, connect the output slv_yy of mux_s_5 to the D terminal of the diff_s_2 register, and connect the EN terminal of the diff_s_2 register to slv_hready_i. Here, yy in m2_yy_i, r_yy, r_m2_yy, and m1_yy_i represents haddr, hwrite, hsize, hprot, hburst, and hwdata, respectively.

[0062] The sel terminal of mux_m_2 is connected to m1_slv_valid, the 1 terminal is connected to slv_hresp_i, the 0 terminal is connected to 0, and the output is connected to the 1 terminal of mux_m_1. The sel terminal of mux_m_4 is connected to m2_slv_valid, the 1 terminal is connected to 0, and the 0 terminal is connected to r_hresp. The output of mux_m_4 is connected to the 0 terminal of mux_m_3. The 1 terminal of mux_m_3 is connected to 0, the sel terminal is connected to m1_slv_valid, the output of mux_m_3 is connected to the 0 terminal of mux_m_1, the sel terminal of mux_m_1 is slv_hready_i, and the output of mux_m_1 is m1_slv_hresp. The sel terminal of mux_m_6 is connected to m2_slv_valid, the 1 terminal is connected to slv_hresp_i, the 0 terminal is connected to 0, and the output is connected to the 1 terminal of mux_m_5. The sel terminal of mux_m_8 is connected to m1_slv_valid, the 1 terminal is connected to 0, and the 0 terminal is connected to r_hresp. The output of mux_m_8 is connected to the 0 terminal of mux_m_7, the 1 terminal of mux_m_7 is connected to 0, the sel terminal is connected to m2_slv_valid, the output of mux_m_7 is connected to the 0 terminal of mux_m_5, the sel terminal of mux_m_5 is slv_hready_i, and the output of mux_m_5 is m2_slv_hresp.

[0063] The Q output r_m1_slv_ok of diff_m_3 is connected to the 1 terminal of mux_m_10. The sel terminal of mux_m_10 is connected to m1_slv_valid. The 0 terminal of mux_m_10 is connected to 0. The output of mux_m_10 is connected to the 0 terminal of mux_m_9. The 1 terminal of mux_m_9 is connected to 1. The sel terminal of mux_m_9 is connected to slv_hready_i. The output m1_slv_ok of mux_m_9 is connected to the D terminal of the diff_m_3 register. The Q output of the diff_m_4 register, r_m2_slv_ok, is connected to pin 0 of mux_m_14. The sel output of mux_m_14 is connected to m2_slv_valid. The pin 1 of mux_m_14 is connected to 1. The output of mux_m_14 is connected to pin 0 of mux_m_11. The sel output of mux_m_13 is connected to r_heldtrans. The pin 1 of mux_m_13 is connected to 0. The pin 0 of mux_m_13 is connected to m2_sl. The inverted v_valid, the output of mux_m_13 is connected to terminal 1 of mux_m_12, terminal 0 of mux_m_12 is connected to terminal 1, the sel terminal of mux_m_12 is connected to m1_slv_valid, the output of mux_m_12 is connected to terminal 1 of mux_m_11, the sel terminal of mux_m_11 is connected to slv_hready_i, and the output of mux_m_11 is m2_slv_ok, which is connected to terminal D of the difff_m_4 register.

[0064] This module assigns the following outputs to the address decoding and slave signal transmission modules as follows: m1_slv_hready_o is slv_hready_i, m1_slv_hrdata_o is slv_hrdata_i, m1_slv_ok_o is r_m1_slv_ok, m1_slv_hresp_o is m1_slv_hresp, m2_slv_hready_o is slv_hready_i, m2_slv_hrdata_o is slv_hrdata_i, m2_slv_ok_o is r_m2_slv_ok, and m2_slv_hresp_o is m2_slv_hresp. For the slave module, the output slv_yy_o is slv_yy, where yy represents htrans, haddr, hwrite, hsize, hprot, hburst, and hwdata.

[0065] This invention supports AHB-lite-based bus matrix expansion, which can be a fully connected or partially connected i-master-j-slave (i≥2, j≥2) bus, such as... Figure 5As shown, an AHB-lite bus matrix with i fully connected masters and j fully connected slaves is constructed. The masters are M1, M2, ..., Mi, and the slaves are S1, S2, ..., Sj. M1 is connected to the input / output control module 1 of master control module 1. Input / output module 1 is connected to the address decoding and slave signal transmission module 1. Master control module 1 is connected to slave control modules 1, 2, ..., j. M2 is connected to the input / output control module 2 of master control module 2. Input / output module 2 is connected to the address decoding and slave signal transmission module 2. Master control module 2 is connected to slave control modules 1, 2, ..., j. Mi is connected to the input / output control module i of master control module i. Input / output module i is connected to the address decoding and slave signal transmission module i. Master control module i is connected to slave control modules 1, 2, ..., j. Slave control module 1 is connected to S1, slave control module 2 is connected to S2, ..., and slave control module j is connected to Sj.

[0066] like Figure 6 As shown, an AHB-lite bus matrix is ​​partially connected based on i masters and j slaves (i≥2, j≥2), where the number of masters is the same as the number of slaves. The masters are M1, M2, ..., Mi, and the slaves are S1, S2, ..., Sj. M1 is connected to the input / output control module 1 of master control module 1, which is connected to the address decoding and slave signal transmission module 1. Master control module 1 connects to slave control module 1 and slave control module 2. M2 is connected to the input / output control module 2 of master control module 2, which is connected to the address decoding and slave signal transmission module 2. Master control module 2 connects to slave control module 2 and slave control module 3. Mi is connected to the input / output control module i of master control module i, which is connected to the address decoding and slave signal transmission module i. Master control module i connects to slave control module 1 and slave control module j. Slave control module 1 is connected to S1, slave control module 2 is connected to S2, ..., and slave control module j is connected to Sj.

[0067] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A structure for an AHB-lite bus matrix, characterized in that, include: There are i master devices and j slave devices, a master device control module and a slave device control module; the number of master devices i ≥ 2 and the number of slave devices j ≥ 2; The host control module includes an input / output control module and an address decoding and slave signal transmission module; the input / output control module interacts with the host and the address decoding and slave signal transmission module respectively; the slave control module is connected to the slave device; The host control module is connected to all the slave control modules for information exchange; one host corresponds to one host control module, and one slave corresponds to one slave control module. The inputs of the input / output control module are the host's input based on the AHB-lite bus protocol, and the input signals slv_hresp_i, slv_hrdata_i, slv_hready_i, and slv_ok_i from the address decoding and slave transmission module. Here, slv_hresp_i, slv_hrdata_i, and slv_hready_i are the slave's output signals based on the AHB-lite bus protocol, and slv_ok_i indicates whether the slave has received a new transmission; it is active high. The outputs of the input / output control module are the host's output based on the AHB-lite bus protocol, and slv_heldtrans_o, transmitted to the address decoding and slave transmission module. This signal indicates that the host has made a valid transmission to the slave; it is active high. The input of the address decoding and slave signal transmission module is the output of the input-output control module and the output of all connected slave control modules; the output of the address decoding and slave signal transmission module serves as the input of the input-output control module. The address decoding and slave signal transmission module is based on slave address allocation. It completes the slave selection signal according to the address signal haddr_i transmitted by the master. The slave selection signal is active high. It also indicates whether each slave can receive the new transmission indication signal slvy_ok_i based on the slave selection signal, thereby determining whether the current slave can receive the new transmission indication signal slv_ok_o. Here, y represents the different slave numbers interconnected. The inputs of the slave control module are the outputs of the input / output control module, the address decoder and slave signal transmission module, and the slave input based on the AHB-lite protocol. The output of the slave control module is connected to the input of the address decoder and slave signal transmission module. Based on the master's valid transmission indication signal mx_heldtrans_i and the slave selection signal mx_slv_sel_i, combined with the slave input slv_hready_i, the slave control module generates a master valid access indication signal mx_slv_valid for the slave. This valid signal indicates that the master can transmit information to the slave. Here, x represents the master number, and the number of master numbers is the same as the number of masters.

2. The structure of the AHB-lite bus matrix according to claim 1, characterized in that, The address decoding and slave signal transmission module is based on a two-stage pipeline of the AHB-lite bus protocol. It generates slv_hresp_o, slv_hrdata_o, and slv_hready_o output signals according to the registered value of the slave selection signal and the corresponding slave hresp, hrdata, and hready input signals.

3. The structure of the AHB-lite bus matrix according to claim 1, characterized in that, Master access to slave also includes: when a slave has no access operation in the previous clock cycle and is unaware of an access operation in the next clock cycle, the slave can receive access, and slvy_ok_i is valid. Therefore, there may be situations where multiple masters have valid access indication signals for the same slave at the same time. In this case, it is necessary to register the low-priority master access information and prioritize the access of high-priority masters. Here, y represents the slave number, and the number of slave numbers is the same as the number of slaves.

4. The structure of the AHB-lite bus matrix according to claim 3, characterized in that, The process of storing low-priority host access information and prioritizing high-priority access involves the following steps: Based on the register signal r_heldtrans, incomplete low-priority host accesses are registered. For hosts with multiple hosts, the bit width of r_heldtrans is expanded, and multiple host accesses are registered. When there is a high-priority host access in the current clock cycle, the signal is continued to be registered. When there is no high-priority host access, the host access with the highest priority among the registered r_heldtrans is selected, and the host accesses of other priorities are still registered. This process continues until all host accesses are completed.

5. The structure of the AHB-lite bus matrix according to claim 1, characterized in that, The htrans signal transmitted from the slave control module to the master is stored in a register. When there is a defined access cycle, the slave outputs the slv_htrans_o signal, and in other cycles, it outputs an invalid value "00".

Citation Information

Patent Citations

  • Advanced high-performance system bus connector device and advanced high-performance system bus device

    CN101021821A

  • Device, method and system for accessing data bus

    CN113641622A