The present invention relates generally to reconfigurable circuits, and more specifically to programming reconfigurable circuits.
Some integrated circuits are programmable or configurable. Examples include microprocessors and field programmable gate arrays. As programmable and configurable integrated circuits become more complex, the tasks of programming and configuring them also become more complex.
In the following detailed description, reference is made to the accompanying drawings that show, by way of illustration, specific embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention. It is to be understood that the various embodiments of the invention, although different, are not necessarily mutually exclusive. For example, a particular feature, structure, or characteristic described herein in connection with one embodiment may be implemented within other embodiments without departing from the spirit and scope of the invention. In addition, it is to be understood that the location or arrangement of individual elements within each disclosed embodiment may be modified without departing from the spirit and scope of the invention. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present invention is defined only by the appended claims, appropriately interpreted, along with the full range of equivalents to which the claims are entitled. In the drawings, like numerals refer to the same or similar functionality throughout the several views.
In some embodiments of the present invention, configurable circuit 100 may include various types of PEs having a variety of different architectures. For example, PE 102 may include a programmable logic array that may be configured to perform a particular logic function, while PE 104 may include a processor core that may be programmed with machine instructions. In general, any number of PEs with a wide variety of architectures may be included within configurable circuit 100.
As shown in
In some embodiments, each PE is individually configurable. For example, PE 102 may be configured by loading a table of values that defines a logic function, and PE 104 may be configured, or “programmed,” by loading a machine program to be executed by PE 104. Further, in some embodiments, power supply voltage values and clock frequencies for various PEs may be configurable. By modifying power supply voltages, clock frequencies, and other parameters, intelligent tradeoffs between speed, power, and other variables may be made during the design phase of a particular configuration.
In some embodiments, some PEs are more flexible (that is, programmable) than others because they can be programmed to do a variety of functions. Other PEs are less flexible because they can only perform a very specific type of function. Less flexible PEs are referred to as “configurable,” and more flexible PEs are referred to as “programmable.” The degree of flexibility that makes a PE configurable as opposed to programmable is chosen somewhat arbitrarily. The terms “configurable” and “programmable” are used herein as qualitative terms to qualitatively differentiate between different types of PEs, and are not meant to limit the invention in any way. In some embodiments, PEs fall somewhere between configurable and programmable.
In some embodiments, the routers communicate with each other and with PEs using packets of information. For example, if PE 102 has information to be sent to PE 104, it may send a packet of data to router 112, which routes the packet to router 114 for delivery to PE 104. Packets may be of any size. In embodiments that include various types of PEs that communicate using packets, configurable circuit 100 may be referred to as a “packet-based network of heterogeneous processing elements.”
Configurable circuit 100 may be configured by receiving configuration packets through an IO element. For example, IO element 130 may receive configuration packets that include configuration information for various PEs and IOs, and the configuration packets may be routed to the appropriate elements. Configurable circuit 100 may also be configured by receiving configuration information through a dedicated programming interface. For example, a serial interface such as a serial scan chain may be utilized to program configurable circuit 100.
Configurable circuit 100 may have many uses. For example, configurable circuit 100 may be configured to instantiate particular physical layer (PHY) implementations in communications systems, or to instantiate particular media access control layer (MAC) implementations in communications systems. In some embodiments, multiple configurations for configurable circuit 100 may exist, and changing from one configuration to another may allow a communications system to quickly switch from one PHY to another, one MAC to another, or between any combination of multiple configurations.
In some embodiments, configurable circuit 100 is part of an integrated circuit. In some of these embodiments, configurable circuit 100 is included on an integrated circuit die that includes circuitry other than configurable circuit 100. For example, configurable circuit 100 may be included on an integrated circuit die with a processor, memory, or any other suitable circuit. In some embodiments, configurable circuit 100 coexists with radio frequency (RF) circuits on the same integrated circuit die to increase the level of integration of a communications device. Further, in some embodiments, configurable circuit 100 spans multiple integrated circuit dice.
High-level description 201 includes information describing the operation of the intended design. The intended design may be useful for any purpose. For example, the intended design may be useful for image processing, video processing, audio processing, or the like. The intended design is referred to herein as a “protocol,” but this terminology is not meant to limit the invention in any way. In some embodiments, the protocol specified by high-level description 201 may be in the form of an algorithm that a particular PHY, MAC, or combination thereof, is to implement. The high-level description may be in the form of a procedural or object-oriented language, such as C or C++, or may be written in a specialized, or “stylized” version of a high level language.
User specified constraints 203 may include constraints such as minimum requirements that the completed configuration should meet, or may include other information to constrain the operation of the design flow. The constraints may be related to the target protocol, or they may be related to overall goals of design flow 200, such as mapping and placement. Protocol related constraints may include latency and throughput constraints. In some embodiments, various constraints are assigned weights so that they are given various amounts of deference during the operation of design flow 200. In some embodiments, constraints may be listed as requirements or preferences, and in some embodiments, constraints may be listed as ranges of parameter values. In some embodiments, constraints may not be absolute. For example, if the target reconfigurable circuit includes a data path that communicates with packets, the measured latency through part of the protocol may not be a fixed value but instead may be one with a statistical variation.
Overall mapping goals may include such constraints as low power consumption and low area usage. Any combination of the global, overall goals may be specified as part of user-specified constraints 203. Satisfying various constraints involves tuning various parameters, such as PE clock frequencies and functions' input block size and physical output packet size. These parameters and others are described more fully below.
In design flow 200, the high-level description 201 is partitioned into stages at 202 and partitioned into functions at 204. Partitioning into stages refers to breaking a protocol into non-overlapping segments in time where different processing may occur. For example, at a very high level, any protocol can be broken into a transmit path and a receive path. The receive path may be further partitioned into stages such as acquisition and steady-state. Each of these stages may be partitioned into smaller stages as well, depending on the implementation.
Once a protocol has been partitioned into stages, the stages may be further partitioned into functions. Functions may serve data path purposes or control path purposes, or some combination of the two. Data path functions process blocks of data and send their output data to other data path functions. In some embodiments, these functions are defined using a producer-consumer model where a “producer” function produces data that is consumed by a “consumer” function. Utilizing data path functions that follow a producer-consumer model allows algorithms that are heavy in data flow to be mapped to a configurable circuit such as configurable circuit 100 (
In some embodiments, algorithms are partitioned into a hierarchical representation of stages and functions. For example, many PHY implementations include a considerable amount of pipelined processing. A hierarchical representation of a PHY may be produced by breaking down each stage or function until the pipeline is represented by lowest level stages and functions in the hierarchy. The functions that are at the lowest level of the hierarchy are referred to as “leaf” functions. Leaf functions represent atomic functions that are not partitioned further. In some embodiments, leaf functions are represented by a block of code written in a stylized high-level language, a block of code written in a low-level format for a specific PE type, or a library function call.
At 206 in design flow 200, the partitioned code is parsed and optimized. A parser parses the code into tokens, and performs syntactic checking followed by semantic checking. The result is a conversion into an intermediate representation (IR). Any intermediate representation format may be used.
Although optimization is shown concurrently with parsing in design flow 200, there are several points in the design flow where optimization may occur. At this point in the design flow, optimizations such as dead code removal and common expression elimination may be performed. Other PE-independent optimizations may also be performed on the intermediate representation at this point.
At 208 and 210, functions are mapped to PEs. In some embodiments, functions are grouped by selecting various functions that can execute on the same PE type. All functions are assigned to a group, and each group may include any number of functions. Each group may be assigned to a PE, or groups may be combined prior to assigning them to PEs.
In some embodiments, prior to forming groups, all possible PE mappings are enumerated for each function. The hardware topology specification 205 may be utilized to determine the types of resources available in the target reconfigurable circuit. The code in each function may then be analyzed to determine the possible PE types on which the function could successfully map. Some functions may have only one possibility, such as a library function with a single implementation. Library information may be gathered for this purpose from library 260. Other functions may have many possibilities, such as a simple arithmetic function which may be implemented on many different types of PEs. A table may be built that contains all the possibilities of each function, which may be ranked in order of likelihood. This table may be referenced throughout design flow 200.
After the table has been constructed, groups of functions may be formed. Functions that can execute on only one type of PE have limited groups to which they can belong. In some embodiments, user specified constraints 203 may specify a grouping of functions, or may specify a maximum delay or latency that may affect the successful formation of groups. In some embodiments, heuristics may be utilized in determining groupings that are likely to be successful. Information stored in the hierarchical structure created after partitioning may also be utilized.
At 212 in design flow 200, the groups are assigned, or “placed,” to particular PEs in the target configurable circuit. Several factors may guide the placement, including group placement possibilities, user constraints, and the profiler based feedback (described more fully below). Possible placement options are also constrained by information in the hardware topology specification 205. For example, to satisfy tight latency constraints, it may be useful to place two groups on PEs that are next to each other. The placement may also be guided by the directed feedback from the “evaluate and adjust” operation described below.
At 214 in design flow 200, packet routing information is generated to “connect” the various PEs. For example, producer functions are “connected” to appropriate consumer functions for the given mapping and placement. In some embodiments, the connections are performed by specifying the relative address from the PE with a producer function to the appropriate PE with a consumer function. In some cases, the output may be sent to multiple destinations, so a series of relative addresses may be specified.
At 214 of design flow 200, parameters are set. There are a number of parameters that can affect the performance of a mapped and placed protocol. In the constraints file there may be protocol related constraints, such as latency requirements, as well as overall mapping constraints, all of which may affect the setting of parameters. There are several parameters that can be adjusted to meet the specified constraints. Examples include, but are not limited to: input block size for functions, physical output packet size for functions, power supply voltage values for PEs, and PE clock frequency.
The “input block size” of a function may be a variable parameter. Processing elements that include data path functions are generally “data driven,” referring to the manner in which functions operate on blocks of data. In some embodiments, various functions have a parameterizable input block size. These functions collect packets of data until the quantity of received data is equal to or greater than the input block size. The function then operates on the data in the input block. The size of this input block may be parameterizable, and it may also be subject to user constraints. In some embodiments, the input block size is chosen by analyzing such factors as the latency incurred, data throughput required, and the buffering needed in the PE.
A function's physical output packet size may also be a variable parameter. For data path functions, the “output block size” may be related to the function's input block size, as well as other parameters. Regardless of the actual output block size, a PE may send out data in packets that are smaller than the output block size. The size of these smaller packets is referred to as the function's “physical output packet size,” or “physical packet size.” The physical packet size may affect the latency, router bandwidth, data throughput, and buffering by the function's PE. In some embodiments, user-specified constraints may guide the physical output packet size selection either directly or indirectly. For example, physical output packet size may be specified directly in user constraints, or the physical packet size may affected by other user constraints such as latency.
The operating clock frequency of various PEs may also be a variable parameter. Power consumption may be reduced in a configurable circuit by reducing the clock frequency at which one or more PEs operate. In some embodiments, the clock frequency of various PEs is reduced to reduce power consumption, as long as the performance requirements are met. For example, if user constraints specify a maximum latency, the clock frequency of various PEs may be reduced as long as the latency constraint can still be met. In some embodiments, the clock frequency of various PEs may be increased to meet tight latency requirements. In some embodiments, the hardware topology file may show whether clock adjustment is available as a parameter for various PEs.
The power supply voltage of various PEs may also be a variable parameter. Power consumption may be reduced in a configurable circuit by reducing the power supply voltage at which one or more PEs operate. In some embodiments, the power supply voltage of various PEs is reduced to reduce power consumption, as long as the performance requirements are met. For example, if user constraints specify a maximum latency, the power supply voltage of various PEs may be reduced as long as the latency constraint can still be met. In some embodiments, the power supply voltage of various PEs may be increased to meet tight latency requirements. In some embodiments, the hardware topology file may show whether power supply voltage adjustment is available as a parameter for various PEs.
At 216, 218, and 220 of design flow 200, code is generated for various types of PEs. In some embodiments, different code generation tools exist for different types of PEs. For example, a PE that includes programmable logic may have code generated by a translator that translates the intermediate representation of logic equations into tables of information to configure the PE. Also for example, a PE that includes a processor or controller may have code generated by an assembler or compiler. In some embodiments, code is generated for each function, and then the code for a group of functions is generated for a PE. In other embodiments, code for a PE is generated from a group of functions in one operation. Configuration packets are generated to program the various PEs. Configuration packets may include the data to configure a particular PE, and may also include the address of the PE to be configured. In some embodiments, the address of the PE is specified as a relative address from the IO element that is used to communicate with the host.
At 222 of design flow 200, a protocol file is created. The creation of the protocol file may take into account information in the hardware topology file and the generated configuration packets. The quality of the current configuration as specified by the protocol file may be measured by the system profiler 262. In some embodiments, the system profiler 262 allows the gathering of information that may be compared against the user constraints to determine the quality of the current configuration. For example, the system profiler 262 may be utilized to determine whether the user specified latency or throughput requirements can be met given the current protocol layout. The system profiler passes the data regarding latency, throughput, and other performance results to the “evaluate and adjust” block at 226.
System profiler 262 may be a software program that emulates a configurable circuit, or may be a hardware device that accelerates profiling. In some embodiments, system profiler 262 includes a configurable circuit that is the same as the target configurable circuit. In other embodiments, system profiler 262 includes a configurable circuit that is similar to the target configurable circuit. System profiler 262 may accept the configuration packets through any kind of interface, including any type of serial or parallel interface.
At 226 of design flow 200, the current protocol is evaluated and adjusted. Data received from the system profiler may be utilized to determine whether the user specified constraints were met. Evaluation may include evaluating a cost function that takes into account many possible parameters, including the user specified constraints. Parameter adjustments may be made to change the behavior of the protocol, in an attempt to meet the specified constraints. The parameters to be adjusted are then fed back to the various operations (i.e. group, place, set parameters), and the process is repeated until the constraints are met or another stop condition is reached (e.g. maximum numbers of iterations to attempt).
A completed protocol is output from 226 when the constraints are met. In some embodiments, the completed protocol is in the form of a file that specifies the configuration of a configurable circuit such as configurable circuit 100 (
The design flow described above with reference to
In some embodiments, processor 310 may be a processor that can perform methods implementing all of design flow 200, or portions of design flow 200. For example, processor 310 may perform function grouping, placement, mapping, profiling, and setting of parameters, or any combination thereof. Processor 310 represents any type of processor, including but not limited to, a microprocessor, a microcontroller, a digital signal processor, a personal computer, a workstation, or the like.
In some embodiments, system 300 may be a communications system, and processor 310 may be a computing device that performs various tasks within the communications system. For example, system 300 may be a system that provides wireless networking capabilities to a computer. In these embodiments, processor 310 may implement all or a portion of a device driver, or may implement a lower level MAC. Also in these embodiments, configurable circuit 100 may implement one or more protocols for wireless network connectivity. In some embodiments, configurable circuit 100 may implement multiple protocols simultaneously, and in other embodiments, processor 310 may change the protocol in use by reconfiguring configurable circuit 100.
Memory 320 represents an article that includes a machine readable medium. For example, memory 320 represents any one or more of the following: a hard disk, a floppy disk, random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), read only memory (ROM), flash memory, CDROM, or any other type of article that includes a medium readable by a machine such as processor 310. In some embodiments, memory 320 can store instructions for performing the execution of the various method embodiments of the present invention.
In operation of some embodiments, processor 310 reads instructions and data from memory 320 and performs actions in response thereto. For example, various method embodiments of the present invention may be performed by processor 310 while reading instructions from memory 320.
Antenna 342 may be either a directional antenna or an omni-directional antenna. For example, in some embodiments, antenna 342 may be an omni-directional antenna such as a dipole antenna, or a quarter-wave antenna. Also for example, in some embodiments, antenna 342 may be a directional antenna such as a parabolic dish antenna or a Yagi antenna. In some embodiments, antenna 342 is omitted.
In some embodiments, RF signals transmitted or received by antenna 342 may correspond to voice signals, data signals, or any combination thereof. For example, in some embodiments, configurable circuit 100 may implement a protocol for a wireless local area network interface, cellular phone interface, global positioning system (GPS) interface, or the like. In these various embodiments, RF interface 340 may operate at the appropriate frequency for the protocol implemented by configurable circuit 100. In some embodiments, RF interface 340 is omitted.
Method 400 is shown beginning with block 410 where a design description is divided into a plurality of functions. In some embodiments, block 410 corresponds to block 204 in design flow 200. The design description may be divided into functions by a person that generates a high-level description, or the design description may be divided into functions by a machine executing all or a portion of method 400. In some embodiments, the design description may also be divided into control and data path portions when the design description is partitioned into stages or functions. For example, when the design description is divided into non-overlapping stages, such as at 202 in design flow 200, one subset of stages may represent control path portions, while another subset of stages may represent data path portions. Also for example, when the design description is divided into functions, such as at 204 in design flow 200, some functions may represent data path portions, while other functions may represent control path portions.
At 420, at least one function is compiled into machine code to run on a first PE. For example, referring now to
At 440, a packet size is set for packet communications between the first and second PEs. In some embodiments, many different packet sizes are set. For example, different types of packets may be sent between the first and second PEs, where the different types of packets are different sizes. Also for example, more than two PEs may be utilized, and multiple different packet types may be used for communication between the various PEs.
At 450, the design is profiled. The design referred to in 450 includes the configuration information for the various PEs. For example, referring now back to
At 460, one or more parameters of the design may be modified. For example, in response to profiling, one or more packet size set at 440 may be modified. Also for example, power supply voltage values for various PEs may be modified. Also for example, operating clock frequencies for various PEs may be modified. In some embodiments, parameters are modified in an attempt to satisfy user constraints such as those shown at 203 in
Method 500 is shown beginning with block 510 where a design description is translated into configurations for a plurality of PEs on a single integrated circuit. For example, a design description such as that shown at 201 in
At 520, a packet size is set for packet communications between the plurality of PEs. In some embodiments, many different packet sizes are set. For example, different types of packets may be sent between the plurality of PEs, where the different types of packets are different sizes. Also for example, different configurations may utilize various different PEs, and the different PEs may communicate with each other using different size packets.
At 530, the design is profiled. The design referred to in 530 includes the configuration information for the various PEs. For example, referring now back to
At 540, a power supply voltage of a PE is changed. This may be performed in response to the profiling at 530. For example, if, after profiling the design, the speed of a particular PE is to be increased, the power supply voltage of the PE may be increased. Also for example, if the speed of the PE is greater than required, the power supply voltage of the PE may be reduced to reduce power consumption.
At 550, a clock frequency of a PE is changed. This may be performed in response to the profiling at 530. For example, if, after profiling the design, the speed of a particular PE is to be increased, the clock frequency of the PE may be increased. Also for example, if the speed of the PE is greater than required, the clock frequency of the PE may be decreased to reduce power consumption.
At 560, a packet size is changed. This may be performed in response to the profiling at 530. For example, packet sizes may be decreased to reduced latency, or may be increased to increased latency. In some embodiments, packet sizes are modified to match block sizes (such as the input block size of a function). In other embodiments, packet sizes are modified such that they are larger or smaller than block sizes.
Blocks 540, 550, and 560 describe a process of changing parameters to modify the behavior of a design. In some embodiments, many parameters relating to the operation of PEs may be changed as part of method 500.
Although the present invention has been described in conjunction with certain embodiments, it is to be understood that modifications and variations may be resorted to without departing from the spirit and scope of the invention as those skilled in the art readily understand. Such modifications and variations are considered to be within the scope of the invention and the appended claims.