I. Field of the Disclosure
The technology of the disclosure relates generally to arbitration of bus transactions on a communications bus in a processor-based system.
II. Background
Modern digital systems and processor-based designs typically employ a communications bus. The communications bus is configured to facilitate devices or peripherals, acting as master devices, sending communications to receiving peripherals or devices, acting as slave devices. For example, if a master device desires to send a read request to a slave device, the master device provides control information that includes an address and read command on the communications bus. The communications bus directs the command to the appropriate slave device coupled to the communications bus according to the control information. Further, master and slave devices coupled to the communications bus may be provided along with a communications bus on a single chip to provide a system-on-a-chip (SOC). SOCs are particularly useful in portable electronic devices because of their integration of multiple subsystems that can provide multiple features and applications in a single chip.
An arbiter can be provided for the communications bus to direct or arbitrate bus transactions from master devices to slave devices coupled to the communications bus. Bus arbitration may, for example, prevent bus transaction collisions. For example, a system that includes a computer processing unit (CPU), a digital signal processor (DSP), and direct memory access (DMA) controller coupled to a communications bus may all have access to a shared memory system also coupled to the communications bus. The arbiter arbitrates memory access requests from these devices to the shared memory system so that bus resources are allocated between competing requests from master devices. However, it is desired that the arbiter be configured not to expend routing resources processing requests from one master device on the communications bus that will cause an unacceptable increase in latencies of other requests by other master devices.
Embodiments disclosed in the detailed description include devices, systems, methods, and computer-readable mediums for arbitrating stream transactions based on information related to the stream transactions. A stream transaction is a superset of burst access types to facilitate efficient bulk transfers of data. Information related to a stream transaction is also referred to herein as “stream transaction information.” In embodiments disclosed herein, an arbiter is provided that arbitrates bus transactions between a plurality of devices coupled to a bus, which may be an bus interconnect, competing for resources accessible through the bus. To efficiently arbitrate stream transactions requested on the bus, the arbiter is configured to use information related to the stream transactions to provide a view of future bus traffic on the bus. For example, stream transactions may have temporal and/or other priority parameters for completion. The arbiter is configured to use this stream transaction information to evaluate and/or apply bus arbitration policies for arbitrating the stream transactions. In this example, the bus arbitration policy can be adjusted or altered for the stream transactions based on the stream transaction information, if necessary, for the arbiter to attempt to meet the parameter(s) for completing the stream transactions.
In this regard in one embodiment, a bus arbiter is provided. The bus arbiter includes a controller configured to receive a stream transaction(s) on a bus from a device(s) coupled to the bus. The arbiter arbitrates the stream transaction(s) on the bus. To attempt to arbitrate the stream transaction(s) based on a parameter(s) of a device requesting the stream transaction(s), the controller in the arbiter is configured to evaluate a bus arbitration policy(ies) to arbitrate the stream transaction(s) on the bus based on information related to the stream transaction(s). The controller may also be further configured to apply a bus arbitration policy based on the evaluation.
In another embodiment, a method of arbitrating a stream transaction(s) communicated on a bus is provided. The method includes receiving a stream transaction(s) on a bus from a device(s) coupled to the bus. The method also includes evaluating, at a controller configured to arbitrate stream transactions on the bus, a bus arbitration policy for arbitrating the stream transaction(s) on the bus based on information related to the stream transaction(s). The method may also further comprise the controller applying a bus arbitration policy based on the evaluation.
In another embodiment, a computer-readable medium is provided having stored thereon computer-executable instructions to cause an arbiter to receive a stream transaction(s) on a bus from a device(s) coupled to the bus. The computer-executable instructions also cause the arbiter to arbitrate bus traffic for the stream transaction(s) on the bus. The computer-executable instructions also cause the arbiter to evaluate a bus arbitration policy to arbitrate the stream transaction(s) on the bus based on information related to the stream transaction(s). The computer-executable instructions may also cause the arbiter to apply a bus arbitration policy based on the evaluation.
With reference now to the drawing figures, several exemplary embodiments of the present disclosure are described. The word “exemplary” is used herein to mean “serving as an example, instance, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
Embodiments disclosed in the detailed description include devices, systems, methods, and computer-readable mediums for arbitrating stream transactions based on information related to the stream transactions. A stream transaction is a superset of burst access types to facilitate efficient bulk transfers of data. Information related to a stream transaction is also referred to herein as “stream transaction information.” In embodiments disclosed herein, an arbiter is provided that arbitrates bus transactions between a plurality of devices competing for resources accessible through the bus. To efficiently arbitrate stream transactions requested on the bus, the arbiter is configured to use information related to the stream transactions to provide a view of future bus traffic on the bus. For example, stream transactions may have temporal and/or other priority parameters for completion. The arbiter is configured to use this stream transaction information to evaluate and/or apply bus arbitration policies for arbitrating the stream transactions. In this example, the bus arbitration policy can be adjusted or altered for the stream transactions based on the stream transaction information, if necessary, for the arbiter to attempt to meet the parameter(s) for completing the stream transactions.
Before discussing examples of evaluating and applying a bus arbitration policy to arbitrate stream transactions based on information related to stream transactions starting at
The system 10 includes a plurality of master devices 14(0-M) interconnected to one or more slave devices 16(0-N) via a communications bus 18, also referred to herein as “bus interconnect 18.” As examples, the bus interconnect 18 may be provided by a field programmable gate array (FPGA), an asynchronous synchronous integrated circuit (ASIC), a controller, micro-controller or microprocessor that may execute software instructions, or any combinations thereof. The arbiter 12 is illustrated in
The bus interconnect 18 may be configurable to allow one or more of the master devices 14(0-M) connected to the bus interconnect 18 to communicate with some or all of the slave devices 16(0-N) coupled to the bus interconnect 18. In this embodiment, the bus interconnect 18 is configured to allow one or more of the master devices 14(0-M) connected to the bus interconnect 18 to communicate with any of the slave devices 16(0-N) coupled to the bus interconnect 18. However, the bus interconnect 18 could be configured to allow one or more of the master devices 14(0-M) connected to the bus interconnect 18 to communicate with only one or a subset of the slave devices 16(0-N) coupled to the bus interconnect 18. As an example, the bus interconnect 18 may be provided in a semiconductor die 24 and may be provided in a system-on-a-chip (SOC) integrated circuit design, if desired. The master devices 14(0-M) and slave devices 16(0-N) are connected to the bus interconnect 18 via master ports 20(0-M) and slave ports 22(0-N), respectively, provided in the bus interconnect 18 in this example. The arbiter 12 can arbitrate multiple bus transaction requests from the master devices 14(0-M) to the slave devices 16(0-N). The slave devices 16(0-N) may be shared resources to the master devices 14(0-M).
The master devices 14(0-M) and the slave devices 16(0-N) can be any type of electronic device or subsystem desired. As illustrated in
Memory access information provided in the form of a control block (CTRL_BLOCK), as will be discussed in more detail below, is provided to the memory controller 32 to request a memory access transaction to the memory 30. A memory bus 34 is provided to interface the memory 30 to the memory controller 32 that includes chip selects CS(0-A), one for each memory unit 36(0-A) provided. Each memory unit 36(0-A) may be a separate memory chip. The chip selects CS(0-A) are selectively enabled by the memory controller 32 to enable the memory units 36(0-A) containing the desired memory location to be accessed. The memory controller 32 enables one of the memory units 36(0-A) at a time to avoid data collisions.
The master devices 14(0-M) in
Because a stream transaction can move large amounts of data over the bus interconnect 18 over a longer period of time than burst and data beat transactions, routing the stream transaction may introduce a delay in servicing other bus transactions. Thus, to efficiently arbitrate stream transactions on the bus interconnect 18 without unduly causing other bus transactions to violate a latency parameter(s) desired by their requesting master devices 14(0-M), embodiments provided herein allow the arbiter 12 to evaluate bus arbitration policies for arbitrating the stream transactions on the bus interconnect 18 based on information related to the stream transactions. The information related to the stream transactions provides the arbiter 12 with a future view of bus traffic on the bus interconnect 18. For example, stream transactions may have temporal and/or other priority parameters for completion provided by the requesting master devices 14(0-M). The arbiter 12 is configured to use this stream transaction information to evaluate bus arbitration policies for arbitrating the stream transactions. The arbiter 12 may also be configured to apply bus arbitration policies based on the evaluation. For example, the bus arbitration policy can be adjusted or altered for the stream transactions based on the stream transaction information, if necessary, for the arbiter to attempt to meet the parameters for completing the stream transactions.
In this regard,
As will be discussed in more detail below with regard to the example bus arbitration policies applied by the arbiter 12 in
With continuing reference to
With continuing reference to
Examples of monitoring the progress of stream transactions with respect to evaluating and applying a bus arbitration policy for stream transactions is discussed in more detail below with regard to
With reference to
With continuing reference to
If there is a deadline associated with a stream transaction, deadline information can be stored in a deadline field (DEADLINE) 96. For example, a master device 14(0-M) may request that a particular stream transaction be completed within a certain timing, which could be in terms of clock cycles, beats, or other relative or absolute timing. A priority field (PRIORITY) 98 is also provided to allow a priority to be associated with a stream transaction. The priority field 98 may be configured to be supplied and/or altered by the master device 14(0-M), the arbiter 12, or the slave device 16(0-N) depending on design. Any of this stream information may be used by the arbiter 12 to evaluate and apply a bus arbitration policy for a stream transaction to arbitrate the stream transaction.
The arbiter 12 in
As illustrated in
A number of transfers remaining field (NO_TRANS_REMAIN) 104 is also provided to allow the arbiter 12 to determine the progress of a stream transaction to use for evaluating and applying bus arbitration policies for the bus transaction responses. Initially, the number of transfers remaining field 104 is set by the arbiter 12 based on the number of transfers field 90 provided for the stream transaction request in the number of transfers field 90 in the stream identifier block 78 in
One of the parameters for stream transactions requested by master devices 14(0-M) to the bus interconnect 18 may be to complete the stream transaction within a deadline. As discussed above with regard to the stream identifier block 78 in
With continuing reference to
If increasing the priority of the pending deadlined stream transaction would not allow the arbiter 12 to satisfy the deadline of the pending deadlined stream transaction, the arbiter 12 may terminate the pending deadlined stream transaction (block 116). In this regard, the arbiter 12 may remove the pending deadlined stream transaction from the slave port queue 56(0-N). The arbiter 12 may then perform an error handling process for the pending stream transaction to indicate the terminated status to the master device 14(0-M) that originally requested the deadlined stream transaction (block 118). Note that terminating and removing pending deadlined stream transactions can remove unnecessarily used bandwidth from the bus interconnect 18, thus increasing the performance of the bus interconnect 18.
If in the decision in block 110 the arbiter 12 determines that the amount of data actually moved for the pending deadlined stream transaction is not less than the data to be moved in order to satisfy the deadline for the pending deadlined stream transaction, the arbiter 12 determines if the amount of data actually moved for the pending deadlined stream transaction is greater than the data to be moved in order to satisfy the deadline (block 120). If so, the arbiter 12 may decrease the priority of the pending deadlined stream transaction (block 122), so that other pending bus transactions, including other pending stream transactions, can receive more processing time by the routing resources in the bus interconnect 18. If not, the arbiter 12 does not adjust the priority of the pending deadlined stream transaction and the next pending deadlined stream transaction is reviewed (block 110).
The process of reviewing pending deadlined stream transactions and adjusting the bus arbitration policy applied by the arbiter 12 in response can be performed on a continual basis. The process can also be performed at periodic intervals of completion for each pending deadlined stream transaction, also referred to as “stream watermarks” (e.g., at 25% of completion, 50% of completion, and 75% of completion, or other intervals). The number of stream watermarks employed can be provided based on the degree of granularity desired for consulting pending deadlined stream transactions and updating, if necessary, their bus arbitration policies accordingly.
If only one pending stream transaction is deadlined for a given slave port 22(0-N), the arbiter 12 can give priority to the pending deadlined stream transaction per the exemplary process in
A feasibility factor is used to determine the feasibility of the pending deadlined stream transaction be completed within its deadline. Any feasibility factor can be employed and can be an arbitrary calculation depending upon specific implementation. In this example, the feasibility factor is a function of the time remaining to complete the pending deadlined stream transaction and the number of transfers remaining for the pending deadlined stream transaction. For example, the number of transfers remaining field 104 in the slave port queues 56(0-N) is updated by the arbiter 12 as transfers are completed for pending deadlined stream transactions.
If the feasibility factor for a given pending deadlined stream transaction indicates that completion by the deadline is not possible (block 136), the arbiter 12 can terminate that pending stream transaction (block 138). An error handling process can be performed to indicate to the master device 14(0-M) requesting the terminated stream transaction that the stream transaction has been terminated prior to completion (block 140). If it is determined that it is feasible to complete the pending deadlined stream transaction (block 136), the arbiter 12 can change or adjust the bus arbitration policy for the pending deadlined stream transaction based on the feasibility factor (block 142). As non-limiting example, the arbiter 12 may change the bus arbitration policy from a weighted round robin bus arbitration policy to a fixed priority scheme, or vice versa. Once a given slave port 22(0-N) transitions from handling multiple pending deadlined stream transactions to only one pending deadlined stream transaction, the arbiter 12 can return to evaluating a bus arbitration policy to the pending deadlined stream transaction based on the process in
With continuing reference to the example in
Note that the arbiter 12 could be configured to calculate a feasibility factor when only one pending stream transaction for a given slave port 22(0-N) is deadlined, as provided in
Note that whenever it is determined that a pending deadlined stream transaction cannot be completed or is not feasible to be completed prior to its deadline, in addition to terminating the stream transaction, other actions can be taken. For example, the termination of the stream transaction may be recorded in a syndrome register. As another non-limiting example, the termination of the stream transaction may be routed as an interrupt to one or more intelligent system agents in the system 10, including but not limited to the master devices 14(0-M), that can take appropriate action. A message communicated regarding a terminated stream transaction may be embedded by the arbiter 12 in a response channel.
Note that the bus arbitration policy examples herein may be provided singularly or any in combinations together as desired. Also, any or all of the bus arbitration policies disclosed herein may be carried out by circuits in the arbiter 12, which may or may not include the controller 13, and which may or may not execute software instructions in the computer-readable medium 15, as illustrated in
The devices, systems, methods, and computer-readable mediums for arbitrating stream transactions based on information related to the stream transactions according to embodiments disclosed herein may be provided in or integrated into any processor-based device. Examples, without limitation, include a set top box, an entertainment unit, a navigation device, a communications device, a fixed location data unit, a mobile location data unit, a mobile phone, a cellular phone, a computer, a portable computer, a desktop computer, a personal digital assistant (PDA), a monitor, a computer monitor, a television, a tuner, a radio, a satellite radio, a music player, a digital music player, a portable music player, a digital video player, a video player, a digital video disc (DVD) player, and a portable digital video player.
In this regard,
Other master and slave devices can be connected to the system bus 170. As illustrated in
The CPU 162 may also be configured to access the display controller(s) 180 over the system bus 170 to control information sent to one or more displays 184. The display controller(s) 180 sends information to the display(s) 184 to be displayed via one or more video processors 186, which process the information to be displayed into a format suitable for the display(s) 184. The display(s) 184 can include any type of display, including but not limited to a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, etc.
The CPU(s) 162 and the display controller(s) 180 may act as master devices to make memory access requests to the arbiter 12 over the system bus 170. Different threads within the CPU(s) 162 and the display controller(s) 180 may make requests to the arbiter 12. The CPU(s) 162 and the display controller(s) 180 may provide the master identifier 72 to the arbiter 12, as previously described, as part of a bus transaction request.
Any type of master devices 14(0-M) and slave devices 16(0-N) may be employed in the processor-based system 160 to request and respond to stream transactions. As a non-limiting example, if the master device 14(0-M) requesting a deadlined stream transaction were the DMA controller 14(M) as illustrated in
Those of skill in the art would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithms described in connection with the embodiments disclosed herein may be implemented as electronic hardware, instructions stored in memory or in another computer-readable medium and executed by a processor or other processing device, or combinations of both. The arbiter, master devices, sub-master devices, and slave devices described herein may be employed in any circuit, hardware component, integrated circuit (IC), or IC chip, as examples. Memory disclosed herein may be any type and size of memory and may be configured to store any type of information desired. To clearly illustrate this interchangeability, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. How such functionality is implemented depends upon the particular application, design choices, and/or design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The various illustrative logical blocks, modules, and circuits described in connection with the embodiments disclosed herein may be implemented or performed with a processor, a DSP, an Application Specific Integrated Circuit (ASIC), an FPGA or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
The embodiments disclosed herein may be embodied in hardware and in instructions that are stored in hardware, and may reside, for example, in Random Access Memory (RAM), flash memory, Read Only Memory (ROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of computer readable medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a remote station. In the alternative, the processor and the storage medium may reside as discrete components in a remote station, base station, or server.
It is also noted that the operational steps described in any of the exemplary embodiments herein are described to provide examples and discussion. The operations described may be performed in numerous different sequences other than the illustrated sequences. Furthermore, operations described in a single operational step may actually be performed in a number of different steps. Additionally, one or more operational steps discussed in the exemplary embodiments may be combined. It is to be understood that the operational steps illustrated in the flow chart diagrams may be subject to numerous different modifications as will be readily apparent to one of skill in the art. Those of skill in the art would also understand that information and signals may be represented using any of a variety of different technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips that may be referenced throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.
The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The present application is related to co-pending U.S. Patent Application Attorney Docket Number 100745, Customer Number 23696, filed on Oct. ______, 2010, entitled “MEMORY CONTROLLERS, SYSTEMS, AND METHODS FOR APPLYING PAGE MANAGEMENT POLICIES BASED ON STREAM TRANSACTION INFORMATION,” incorporated herein by reference in its entirety.