The technical field of this invention is communication between master and slave devices.
In conventional hardware systems, either system-on-chip (SOC) or discrete, there can be multiple master modules such as CPUs, DMAs, host processors or port interface elements that communicate with multiple slave peripherals. These peripherals include media and data ports and memory controllers. A single master can access many slave peripherals and a single peripheral needs to be accessed by many masters. The access route from a master to a slave may include multiple routing stages. These routing stages include address decoders, arbitration units, and frequency and width translation bridges.
This scheme works well for the applications that are well understood. However the application requirements are not always completely known when hardware system is being designed. The same hardware system can be used in multiple applications. In these situations fixed routes pose a limitation in achieving optimal performance.
A request M1 to M3 from any one of masters 101 to 103 has to pass through two stages of arbitration at arbitration unit 110 and one of arbitration units 121, 122 and 130 before it can reach any of the destination slaves 131, 132 and 140. In contrast requests M4 or M5 from masters 104 or 105 see only one stage of arbitration at one of arbitration units 121, or 122 and 130. Clearly, the system illustrated in
If the precise requirements of traffic from a master and concurrency of traffic with other masters are not known before design implementation, the safe approach would be add extra hardware to allow as many parallel accesses as possible. In above example, if the request profiles of masters M1 through M4 were not known, one design solution adds a separate port for all the masters M1 through M4 on SCR2. This would mean that a similar path to all the slaves S1 through S10 would have to be included for all the masters M1 through M4 in SCR2. This results in a significantly larger hardware design and can cause speed limitations or extra pipelining latency. Ignoring M5 since it represents any number of additional masters in the system, crossbar switching network SCR2120 becomes a 4:10 crossbar instead of 2:10, doubling its size.
Complex digital systems include both master and slave devices with versatile communication requirements. A single master can access many slave peripherals and a single slave peripheral needs to be accessed by many masters. The access route from a master to a slave can include multiple routing stages. The present invention is a flexible routing scheme optimized for maximum versatility and configurability while achieving acceptable chip size and complexity.
These and other aspects of this invention are illustrated in the drawings, in which:
In the example of the invention illustrated in
The bus infrastructure that lies beyond intermediate points 216 and 217 including crossbar switching network SCR2220 is identical to crossbar switching network 120 illustrated in
In
In the example of
In
Without any change in hardware, a request coming from a master is always forwarded to one of the possible points in the bus structure. Thus, for example in
In
A second important modification that is sometimes necessary is master identification (ID). In some protocols the slave devices send read data and status as well as write status information back to the master. This information is routed to the master by the bus infrastructure using master ID information that traveled along with the request to the slave, sent back from the slave along with the information status and data information. As an example, suppose master M1201 did a read request to slave S1. The configuration bit for master M1201 is set such that all master M1201 requests are directed to intermediate point P11. Read data information reaching point P2 from slave S1, will have to be sent to intermediate point P11, so that the return data travels a similar path as the request. This is necessary for consistency in the switch hardware states, apart from managing traffic. However, without any modification to the master ID, crossbar switching network SCR2220 would not know the difference between intermediate points P1 and P11. Thus crossbar switching network SCR2220 would not know to which node it should send back the data.
For this reason, the master IDs of the masters M1 to M4 are also modified with the configuration bit. For example, if master ID for master M1 was 001, then, the modified master ID looks like X001 where X can be either 0 or 1 based on the value in the configuration register for M1. With this addition the flexible routing scheme is complete.
Consider a system having m masters that need flexible connectivity to support access to n nodes with n<m. This implies use of an m:n crossbar switching network to provide flexible connection that allows any partitioning of m masters into n disjoint subsets. Let M1 to Mm be the masters and OutO1 to Outn be the outputs of the flexible crossbar switching network. The number of extra address bits required to be decoded by the flexible crossbar switching network is
ceil(log2(N)
where: the ceil function is the nearest integer bigger than the log value; and log2(N) is the base 2 logarithm of N.
The m:n scheme can be optimized for area without loss of generality such that:
1. One of the outputs, such as OutO1, is connected to all the masters M1 to Mm;
2. A second output, such as OutO2, is connected to all but one of the masters, such as M2 to Mm;
3. A third output, such as OutO3 is connected to all but two masters, such as M3 to Mm;
4. Repeating for all outputs.
Consider the specific example of a 6:3 flexible connectivity scheme. Because there are three outputs, we have ceil(log2(3))=2 required extra bits. Note: ceil(log2(3))=ceil(1.585)=2. Thus two extra address bits are required to drive the master requests to the desired flexible output. In this manner one can create a flexible crossbar switching network with 6 inputs and 3 outputs, allowing any possible partitions of the 6 inputs to be connected to one of the outputs. This invention conserves chip area using this optimization without losing any flexibility.
Further analysis of the m:n case reveals that any possible partitioning of masters is allowable. Ideally, the m:n path optimization described above should be achieved in such a way that it should result in minimum change in software as well as minimum change in hardware protocol. The m:n case of this invention achieves both. First, there is minimal software change needed because it required programming just a few configuration bits. Secondly, there is no change to the hardware protocol. All the existing systems can benefit from this technique without any change. Thirdly, compared to the prior art that adds two extra decode points in crossbar switching network SCR2 significantly increasing hardware cost, this invention is cheaper in terms of chip area. Fourthly, this invention is less likely to degrade system speed.