US20160098278A1 - Instruction forwarding based on predication criteria - Google Patents
Instruction forwarding based on predication criteria Download PDFInfo
- Publication number
- US20160098278A1 US20160098278A1 US14/962,622 US201514962622A US2016098278A1 US 20160098278 A1 US20160098278 A1 US 20160098278A1 US 201514962622 A US201514962622 A US 201514962622A US 2016098278 A1 US2016098278 A1 US 2016098278A1
- Authority
- US
- United States
- Prior art keywords
- instructions
- predication
- criteria
- instruction
- packet
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Abandoned
Links
- 239000000872 buffer Substances 0.000 claims description 28
- 238000000034 method Methods 0.000 claims description 24
- 238000010586 diagram Methods 0.000 description 7
- 230000004048 modification Effects 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 102100024342 Contactin-2 Human genes 0.000 description 2
- 101000690440 Solanum lycopersicum Floral homeotic protein AGAMOUS Proteins 0.000 description 2
- 230000009191 jumping Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/0268—Traffic management, e.g. flow control or congestion control using specific QoS parameters for wireless networks, e.g. QoS class identifier [QCI] or guaranteed bit rate [GBR]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline, look ahead
- G06F9/3802—Instruction prefetching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline, look ahead
- G06F9/3802—Instruction prefetching
- G06F9/3804—Instruction prefetching for branches, e.g. hedging, branch folding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/3004—Arrangements for executing specific machine instructions to perform operations on memory
- G06F9/30043—LOAD or STORE instructions; Clear instruction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30145—Instruction analysis, e.g. decoding, instruction word fields
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline, look ahead
- G06F9/3836—Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J11/00—Orthogonal multiplex systems, e.g. using WALSH codes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0001—Systems modifying transmission characteristics according to link quality, e.g. power backoff
- H04L1/0015—Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy
- H04L1/0017—Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy where the mode-switching is based on Quality of Service requirement
- H04L1/0018—Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy where the mode-switching is based on Quality of Service requirement based on latency requirement
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0852—Delays
- H04L43/087—Jitter
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L5/00—Arrangements affording multiple use of the transmission path
- H04L5/003—Arrangements for allocating sub-channels of the transmission path
- H04L5/0058—Allocation criteria
- H04L5/006—Quality of the received signal, e.g. BER, SNR, water filling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/253—Telephone sets using digital voice transmission
- H04M1/2535—Telephone sets using digital voice transmission adapted for voice communication over an Internet Protocol [IP] network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/02—Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
- H04W84/10—Small scale networks; Flat hierarchical networks
- H04W84/12—WLAN [Wireless Local Area Networks]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W88/00—Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
- H04W88/16—Gateway arrangements
Definitions
- Processors may carry out various type of operations, such as data transforms. Such processors may be included in network switch and process network data passing through the switch at high throughput rates. Manufacturers are challenged to find ways to improve throughput rates and reduce costs and size of the switch.
- FIG. 1 is an example block diagram of a device to forward an instruction based on predication criteria
- FIG. 2 is another example block diagram of a device to forward an instruction based on predication criteria
- FIG. 3A is an example of instructions without predication criteria and FIG. 3B is an example of instructions with predication criteria;
- FIG. 4 is an example block diagram of a computing device including instructions for forwarding an instruction based on predication criteria
- FIG. 5 is an example flowchart of a method for forwarding an instruction based on predication criteria.
- FIG. 6 is another example flowchart of a method for forwarding an instruction based on predication criteria.
- Processors such as data transform processors included in network switches, may be able to modify individual packets at very high rates.
- the term data transform may refer to any type of operation performed on a packet of data that changes one or more properties of the packet. For example, encapsulation, decapsulation, adding or removing a tag or field, modifying a payload or header of the packet, and the like may constitute different types of data transforms.
- Modification programs that run on a processor are usually optimized for execution in the least number of clock cycles possible. In order to do so, such modification programs may prohibit traditional branching instructions during execution of the programs because branching instructions usually require additional clock cycles to move to and load the next instruction.
- Branching is primarily a software function. In many situations, the extra clock cycle or two needed to perform a branch may be insignificant to performance. However, in data transform processing, the extra clock cycles can have a negative effect on the overall performance. Data transform processors may often have throughput requirements, which may be measured, for example, in giga-bits per second (Gbps). To meet these requirements, data is moved as fast as possible through the processor by optimizing the use of each clock cycle. This aspect of the data transform processor makes it undesirable to support branching type instructions, which generally use at least one additional clock cycle to move to the next branched instruction.
- Gbps giga-bits per second
- modification programs are created for the many types of different possible data transforms.
- the modification programs are generally stored in a memory of the processor. While creating different modification programs for the different types of possible data transforms reduces or eliminates branch instructions and maximizes throughput performance, a storage capacity of the processor's memory may become excessively larger.
- Embodiments may provide predicate based instruction loading to implement branch-type instructions of a program without affecting the data throughput or drastically increasing memory requirements.
- an embodiment may include an instruction unit and a fetch unit.
- the instruction unit is to store a program including an instruction associated with the predication criteria.
- the fetch unit is to compare a predicate state associated with a current packet of data to the predication criteria and is to forward the instruction to an execution unit if the predication criteria includes the predicate state of the current packet.
- predication criteria and a predicate state may provide a relatively large amount of flexibility, thus allowing a single program in memory to be used on a multitude of possible transforms, thereby reducing the memory size while avoiding the processing of branch instructions at the execution unit.
- embodiments may allow for improved throughput performance with reduced memory requirements and lower costs, when compared to non-predicate based techniques.
- FIG. 1 is an example block diagram of a device 100 to forward an instruction based on predication criteria.
- the device 100 may be any type of device that processes packets of data, such as a switch, hub, router, bridge, gateway, server and the like.
- the device 100 may apply to devices with program storage limits and performance requirements that limit their ability to use execution cycles for branching or jumping, such as in the areas of high performance analytics or real-time image processing.
- the device 100 may have a minimum instructions/cycle throughput threshold to satisfy and branch or jump instructions may reduce throughput.
- the device 100 includes an instruction unit 110 , a fetch unit 120 and an execution unit 130 .
- the instruction unit 110 includes a program 112 having an instruction 114 and the instruction 114 is associated with predication criteria 116 (PC), as described in further detail below.
- the instruction and fetch units 110 and 120 may include, for example, a hardware device including electronic circuitry for implementing the functionality described below, such as control logic and/or memory.
- the instruction and fetch units 110 may be implemented as a series of instructions encoded on a machine-readable storage medium and executable by a processor.
- the execution unit 130 may include a processor, such as a central processing unit (CPU), a semiconductor-based microprocessor, a graphics processing unit (GPU), and other hardware devices suitable for retrieval and execution of instructions stored in fetch unit 120 and/or instruction unit 110 .
- a processor such as a central processing unit (CPU), a semiconductor-based microprocessor, a graphics processing unit (GPU), and other hardware devices suitable for retrieval and execution of instructions stored in fetch unit 120 and/or instruction unit 110 .
- the instruction unit 110 is shown to store the program 112 including the instruction 114 associated with the predication criteria 116 .
- embodiments may include a plurality of programs, where each program may include more than one instruction, and/or a single program including a plurality of instructions.
- the predication criteria 116 may indicate one or more predicates states for which the associated instruction 114 is to be executed.
- the predicate state 142 PS
- PS may refer to a value included in a current packet of data 140 while the predication criteria 116 may refer to a value or a set of values stored in the instruction unit 110 and associated with an instruction, such as the instruction 114 .
- a packet of data may include a predicate state field that stores the predicate state 142 .
- FIG. 1 shows the current packet 140 that was received by the device 100 to include the predicate state 142 .
- the predicate state 142 may indicate one or more operations to be performed on the associated current packet of data
- the predicate state 142 may have a binary, two-bit value of “10” while the predication criteria 116 may have a binary, two-bit value of “1X.”
- the instruction 114 associated with the predication criteria of “1X” may be executed on packets 140 having the predicate state 142 of “11” and/or “10”.
- the instruction 114 associated with the predication criteria of “1X” should not be executed on packets 140 having the predicate state 142 of “00” and/or “01.”
- Different types of packets may have different types of predicate states.
- different type of instructions and/or different types of programs may have different predication criteria values, and thus be executed for different types of packets.
- the fetch unit 120 is to compare the predicate state 142 associated with the current packet of data 140 to the predication criteria 116 . For example, the fetch unit 120 may inspect the current packet 140 for its predicate state 142 and store a value of the predicate state 142 ′ of the current packet 140 at the fetch unit 120 . Then, the fetch unit 120 may inspect the predication criteria 116 of the instruction 114 or a plurality of instructions at the instruction unit 110 and fetch only the instructions that have predication criteria 116 including the predicate sate 142 .
- the fetch unit 120 may load a plurality of instructions from the instruction unit 110 without checking the predication criteria 116 . Instead, the fetch unit 110 may check the predication criteria 116 after loading the instructions, and then discard the instructions which have predication criteria that do not include the predicate state 142 of the current packet 140 .
- a memory of the fetch unit 120 may have a smaller capacity but higher operating speed than that of the instruction unit 110 .
- the fetch unit 120 may forward the at least one instruction 114 to the execution unit 130 . Conversely, the fetch unit 120 is to not forward the instruction 114 to the execution unit 116 if the associated predication criteria 116 does not include the predicate state 142 .
- the execution unit 130 may be a processor that is to execute the at least one instruction 114 on the current packet 140 . Further, the predicate state 142 may be removed from the executed packet 140 by the execution unit 130 .
- FIG. 2 is another example block diagram of a device 200 to forward an instruction based on predication criteria.
- the device 200 may be any type of device that processes data, such as a switch, hub, router, bridge, gateway, server and the like.
- the device 200 may apply to devices with program storage limits and performance requirements that limit their ability to use execution cycles for branching or jumping, such as in the areas of high performance analytics or real-time image processing.
- the device 200 may have a minimum instructions/cycle throughput threshold to satisfy and branch or jump instructions may reduce throughput.
- the device 200 includes an instruction unit 210 , a fetch unit 220 , an execution unit 230 , and a predicate unit 240 .
- the instruction unit 210 , fetch unit 220 and execution unit 230 of FIG. 2 may at least respectively include the functionality and/or hardware of the instruction unit 110 , fetch unit 120 and execution unit 130 of FIG. 1 .
- the predicate unit 240 may include, for example, a hardware device including electronic circuitry for implementing the functionality described below, such as control logic and/or memory.
- the predicate unit 240 may be implemented as a series of instructions encoded on a machine-readable storage medium and executable by a processor.
- the predicate unit 240 is to analyze the current packet of data 250 and to add a predicate field to the current packet of data 250 ′.
- the predicate field is to include the predicate state 254 and a value of the predicate state is to be based on the analysis of the current packet 250 .
- the predicate unit 240 may analyze at least one of one or ore packet headers, a payload, one or more tags 252 , and a packet size of the current packet of data 250 to determine the predicate state 254 of the current packet 250 .
- the packet 250 ′ is forwarded to the fetch unit 220 .
- the predicate state 254 associated with the current packet 250 ′ is determined before the current packet 250 ′ is received by the execution unit 230 or fetch unit 220 .
- the instruction unit 210 is shown to include a plurality of programs, such as program A 212 and program B 218 . Further program A 212 is shown to include a plurality of instructions 214 - 1 to 214 - n associated with a plurality of predication criteria 216 - 1 to 216 - n, where n is a natural number.
- the instruction unit 210 may include more or less than two programs. Further, the programs stored in the instruction unit 210 , such as programs A and B, may be any type of program including at least instruction to modify a packet of data.
- the instructions 214 - 1 to 214 - n of program A 212 include separate predication criteria 216 - 1 to 216 - n.
- the predication criteria 216 - 1 to 216 - n may be one or more bits that specify for which types of packets of data the associated instruction 214 is to be executed upon.
- the instructions 214 - 1 to 214 - n may copy without changes, insert information into, replace and/or delete at least part of the packet 250 .
- Example parts of the packet 250 may include a MAC address, a time to live (TTL) field, a type of service (TOS) field, a tag, a header, a payload and the like.
- TTL time to live
- TOS type of service
- the fetch unit 220 is shown to include a multiplexer (mux) 222 , a plurality of buffers 224 - 1 to 224 - 4 and demultiplexer (demux) 228 . While FIG. 2 , shows four buffers 224 - 1 to 224 - 4 , embodiments may include more or less than four buffers. At least one of the buffers 224 - 1 to 224 - 4 , such as the first buffer 224 - 1 , may include a data buffer unit 225 , an instruction buffer unit 226 and a variable buffer unit 227 .
- the data buffer unit 225 is to store one or more of the incoming packets of data 250 or at least a payload or data portion 256 thereof
- the instruction buffer unit 226 is to store the instructions 214 fetched from the instruction unit 210 .
- the instruction buffer 226 may store one or more instructions, such as the first instruction 214 - 1 ′, associated with each of the packets 250 or data portions 256 ′ thereof in the data buffer unit 225 for which the predication criteria 216 includes the predicate state 254 of the packet 250 .
- the variable buffer unit 227 is to store information specific to the one or more packets 250 stored in the data buffer unit 210 .
- the specific information may including the predicate states 254 ′ of the one or more packets 250 ′, a new address, and the like.
- the mux 222 is only shown as a single mux and the demux 228 is only shown as a single demux, which select between the plurality of buffers 224 - 1 to 224 - 4
- the mux 222 may consist of a plurality of multiplexers and the demux 228 may consist of a plurality of demultiplexers.
- the fetch unit 220 may include separate multiplexers and demultiplexers operating in parallel and interfacing with each of the data buffer unit 225 , instruction buffer unit 226 and the variable buffer unit 227 of each of the plurality of buffers 224 - 1 to 224 - 4 .
- the fetch unit 220 may fetch the plurality of instructions 214 - 1 to 214 - n and discard any of the fetched instructions for which the predication criteria 216 - 1 to 216 - n does not include the predicate state 254 ′ of the current packet of data 250 ′.
- the predicate state 254 may be compared to the predication criteria 216 - 1 to 215 - n to determine which of the instructions 214 - 1 to 214 - n are be forwarded to the execution unit 230 along with contents of the current packet 250 ′, However, when the instruction unit 210 stores more than one program the predicate state 254 may also be used to select the one of the programs.
- the predicate state 254 may be a value and the predication criteria 216 may be a set of one or more values.
- the fetch unit 220 may be able to determine from which program to fetch one or more instructions.
- the predicate unit 240 may analyze Layer 2 (Ethernet) and/or Layer (IP) protocol headers and the size of an IP datagram of the packet 250 to set the predicate state 254 and the fetch unit 220 may select a general transform program based thereon.
- the predicate state 254 may determine how the Layer 2 header is modified or Layer 3 header is refined, based on its original state. Further, the predicate state 254 may alter the effective length of the packet 250 based on its size, such as by truncating or appending pad bytes to the packet 250 .
- the fetch unit 220 may forward the one or more instructions 214 to the instruction buffer 226 for which the predication criteria 216 includes the predicate state 254 ′ of the current packet 250 .
- the execution unit 230 may retrieve instructions to execute from the instruction buffer 226 .
- the execution unit 230 such as a processor, is to execute the one or more instructions 214 on the current packet of data 250 and to output the executed packet.
- the one or more instructions executed by the execution unit 230 are not a branch or jump instruction. Further, the execution unit 230 is to not inspect the predicate state 254 of the current packet of data 250 ′ and may even remove the predicate state 254 from the packet 250 ′ before outputting it.
- the fetch unit 220 may fetch a next packet of data while the current packet of data 250 ′ is being executed.
- FIG. 3A is an example of instructions without predication criteria and FIG. 3B is an example of instructions with predication criteria.
- Three programs 1 - 3 are shown in FIG. 3A with a varying number of instructions. For example, the first program 1 is shown to include four instructions, the second program 2 is shown to include five instructions, and the third program 3 is shown to include six instructions.
- Each of these programs 1 - 3 are to be executed on a different type of packet.
- all three programs include common instructions.
- all three programs include a “modify MAC addresses,” “modify TTL,” “modify TOS” and “copy to end of pkt” instruction.
- the “modify MAC addresses” instruction may relate to modifying at least one of a destination and source MAC addresses of the packet 250 .
- the “modify TTL” instruction may relate to modifying the TTL field of the packet 250 .
- the “modify TOS” instruction may relate to modifying the TOS field of the packet and the “copy to end of pkt” instruction may relate to modifying a payload or data portion of the packet 250 .
- the second and third programs 2 and 3 both include the “delete TAG1” instruction, which may relate to deleting a tag of a packet 250 .
- the three programs 1 - 3 together require storage capacity for fifteen instructions, there are only six unique instructions between all of the three programs 1 - 3 .
- FIG. 3B shows an example of instructions with predication criteria, such as in the instruction unit 210 of FIG. 2 . By adding predication criteria, storage capacity for only six instructions may now be needed, along with an additional two bits of capacity for the predicate bits of the predication criteria of each of the six instructions.
- the predication bits “XX” may indicate that the associated instruction is always executed, regardless of a predicate state of the packet.
- the instructions “modify MAC addresses,” “modify TTL,” “modify TOS” and “copy to end of pkt” are shown to have the predication criteria bits “XX” because all the programs execute these instructions.
- the predication criteria bits “1X” may indicate that the associated instruction is only executed for packets having the predicate state “11” or “10”.
- the instruction “delete TAG1” is associated with the predication criteria bits “1X” and was included in the second and third programs 2 and 3 of FIG. 3A .
- the predication criteria bits “11” may indicate that the associated instruction is only executed for packets having the predicate state “11”.
- the instruction “delete TAG2” is associated with the predication criteria bits “11” and was included in only the third program 3 of FIG. 3A .
- predication criteria may be greatly reduced by using predication criteria to reduce a plurality of unique programs to a single multi-purpose program, without the introduction of jump or branch instructions
- FIG. 3B only shows the predication criteria for a single program
- embodiments may include a plurality of programs.
- the predication criteria may include additional bits to distinguish between different types of programs and/or the instructions thereof.
- FIG. 4 is an example block diagram of a computing device 400 including instructions for forwarding an instruction based on predication criteria.
- the computing device 400 includes a processor 410 and a machine-readable storage medium 420 .
- the machine-readable storage medium 420 further includes instructions 422 , 424 , 426 and 428 for forwarding an instruction based on predication criteria.
- the computing device 400 may be, for example, a router, a switch, a gateway, a bridge, a server or any other type of device capable of executing the instructions 422 , 424 , 426 and 428 .
- the computing device 400 may be included or be connected to additional components such as a storage drive, a processor, a network appliance, etc.
- the processor 410 may be, at least one central processing unit (CPU), at least one semiconductor-based microprocessor, at least one graphics processing unit (GPU), other hardware devices suitable for retrieval and execution of instructions stored in the machine-readable storage medium 420 , or combinations thereof.
- the processor 410 may fetch, decode, and execute instructions 422 , 424 , 426 and 428 to implement forwarding an instruction based on predication criteria.
- the processor 410 may include at least one integrated circuit (IC), other control logic, other electronic circuits, or combinations thereof that include a number of electronic components for performing the functionality of instructions 422 , 424 , 426 and 428 .
- IC integrated circuit
- the machine-readable storage medium 420 may be any electronic, magnetic, optical, or other physical storage device that contains or stores executable instructions.
- the machine-readable storage medium 420 may be, for example, Random Access Memory (RAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a storage drive, a Compact Disc Read Only Memory (CD-ROM), and the like.
- RAM Random Access Memory
- EEPROM Electrically Erasable Programmable Read-Only Memory
- CD-ROM Compact Disc Read Only Memory
- the machine-readable storage medium 420 can be non-transitory.
- machine-readable storage medium 420 may be encoded with a series of executable instructions for forwarding an instruction based on the predication criteria.
- the instructions 422 , 424 , 426 and 428 when executed by a processor can cause the processor to perform processes, such as, the process of FIG. 4 .
- the analyze instructions 422 may be executed by the processor 410 to analyze a predicate state of a received packet of data.
- the retrieve instructions 424 may be executed by the processor 410 to retrieve a plurality of instructions, each of the instructions associated with predication criteria.
- the compare instructions 426 may be executed by the processor 410 to compare the predicate state to the predication criteria of each of the instructions to determine if any of the predication criteria includes the predicate state.
- the forward instructions 428 may be executed by the processor 410 to forward, to an execution unit (not shown), the one or more instructions associated with the predication criteria that include the predicate state.
- the execution unit is to execute the forwarded instructions on the packet of data.
- the execution unit does not receive such types of instructions and thus may execute a different instruction each clock cycle of the execution unit.
- FIG. 5 is an example flowchart of a method 500 for forwarding an instruction based on predication criteria. Although execution of the method 500 is described below with reference to the device 200 , other suitable components for execution of the method 500 can be utilized, such as the device 100 . Additionally, the components for executing the method 500 may be spread among multiple devices.
- the method 500 may be implemented in the form of executable instructions stored on a machine-readable storage medium, such as storage medium 420 , and/or in the form of electronic circuitry.
- the device 200 inspects a predicate state 254 associated with a packet of data 250 ′.
- the predicate state 254 is to indicate one or more operations to be performed on the packet 250 ′.
- the device 200 compares the inspected predicate state 254 ′ to a plurality of predication criteria 216 - 1 to 216 - n of a plurality of instructions 214 - 1 to 214 - n, to determine if any of the predication criteria 216 - 1 to 216 - n of the plurality of instructions 214 - 1 to 214 - n includes the inspected predicate state 254 ′.
- the device 200 forwards the packet 250 ′ and any of the instructions 214 - 1 to 214 - n that are associated with the predication criteria 216 - 1 to 216 - n that includes the inspected predicate state 254 ′ to an execution unit 230 .
- the execution unit 230 is to execute the one or more forwarded instructions 214 on the forwarded packet 250 ′.
- FIG. 6 is another example flowchart of a method 600 for forwarding an instruction based on predication criteria.
- execution of the method 600 is described below with reference to the device 200 , other suitable components for execution of the method 600 can be utilized, such as the device 100 . Additionally, the components for executing the method 600 may be spread among multiple devices.
- the method 600 may be implemented in the form of executable instructions stored on a machine-readable storage medium, such as storage medium 420 , and/or in the form of electronic circuitry.
- the device 200 receives a packet of data 250 , such as via a network connection.
- the device 200 analyzes one or more tags 252 of the received packet 250 .
- the device 200 adds a predicate field 254 to a header of the received packet 250 ′ based on the analysis.
- the predicate field 254 includes a predicate state of the packet 250 ′.
- the device 200 inspects the predicate state 254 associated with the packet 250 ′.
- the predicate state 254 is to indicate one or more operations to be performed on the packet 250 ′.
- the device 200 retrieves, from an instruction unit 210 , a plurality of instructions 214 - 1 to 214 - n.
- the device 200 compares the inspected predicate state 254 ′ to a plurality of predication criteria 216 - 1 to 216 - n of the plurality of instructions 214 - 1 to 214 - n, to determine if any of the predication criteria 216 - 1 to 216 -n of the plurality of instructions 214 - 1 to 214 - n includes the inspected predicate state 254 ′.
- the device 200 forwards the packet 250 ′ and any of the instructions 214 - 1 to 214 - n that are associated with the predication criteria 216 - 1 to 216 - n that includes the inspected predicate state 254 ′ to an execution unit 230 .
- the execution unit 230 is to execute the one or more forwarded instructions 214 on the forwarded packet 250 ′.
- embodiments may provide a method and/or device for predicate based instruction loading to implement branch-type instructions of a program without affecting the data throughput or drastically increasing memory requirements.
- Using predicate bits for the predication criteria and predicate state may provide a relatively large amount of flexibility, thus allowing a single program in a memory to be used on a multitude of possible transforms, thereby reducing the memory size while avoiding the processing of branch instructions at the execution unit.
- embodiments may allow foe improved throughput performance with reduced memory requirements and at a lower cost, when compared to non-predicate based techniques.
Abstract
Embodiments herein relate to forwarding an instruction based on predication criteria. A predicate state associated with a packet of data is to be compared to an instruction associated with the predication criteria. The instruction is to be forwarded to an execution unit if the predication criteria includes or matches the predicate state of the packet.
Description
- Processors may carry out various type of operations, such as data transforms. Such processors may be included in network switch and process network data passing through the switch at high throughput rates. Manufacturers are challenged to find ways to improve throughput rates and reduce costs and size of the switch.
- The following detailed description references the drawings, wherein:
-
FIG. 1 is an example block diagram of a device to forward an instruction based on predication criteria; -
FIG. 2 is another example block diagram of a device to forward an instruction based on predication criteria; -
FIG. 3A is an example of instructions without predication criteria andFIG. 3B is an example of instructions with predication criteria; -
FIG. 4 is an example block diagram of a computing device including instructions for forwarding an instruction based on predication criteria; -
FIG. 5 is an example flowchart of a method for forwarding an instruction based on predication criteria; and -
FIG. 6 is another example flowchart of a method for forwarding an instruction based on predication criteria. - Specific details are given in the following description to provide a thorough understanding of embodiments. However, it will be understood by one of ordinary skill in the art that embodiments may be practiced without these specific details. For example, systems may be shown in block diagrams in order not to obscure embodiments in unnecessary detail. In other instances, well-known processes, structures and techniques may be shown without unnecessary detail in order to avoid obscuring embodiments.
- Processors, such as data transform processors included in network switches, may be able to modify individual packets at very high rates. The term data transform may refer to any type of operation performed on a packet of data that changes one or more properties of the packet. For example, encapsulation, decapsulation, adding or removing a tag or field, modifying a payload or header of the packet, and the like may constitute different types of data transforms.
- Moving data or a packet of data in every clock cycle may yield a greater throughput. Thus, modification programs that run on a processor, such as the data transform processor, are usually optimized for execution in the least number of clock cycles possible. In order to do so, such modification programs may prohibit traditional branching instructions during execution of the programs because branching instructions usually require additional clock cycles to move to and load the next instruction.
- Branching is primarily a software function. In many situations, the extra clock cycle or two needed to perform a branch may be insignificant to performance. However, in data transform processing, the extra clock cycles can have a negative effect on the overall performance. Data transform processors may often have throughput requirements, which may be measured, for example, in giga-bits per second (Gbps). To meet these requirements, data is moved as fast as possible through the processor by optimizing the use of each clock cycle. This aspect of the data transform processor makes it undesirable to support branching type instructions, which generally use at least one additional clock cycle to move to the next branched instruction.
- In order to avoid branching instructions, a large number of modification programs are created for the many types of different possible data transforms. The modification programs are generally stored in a memory of the processor. While creating different modification programs for the different types of possible data transforms reduces or eliminates branch instructions and maximizes throughput performance, a storage capacity of the processor's memory may become excessively larger.
- This larger memory requirement can add unwanted additional costs, especially when faster and more expensive types of memory are used for the processor. Yet reducing memory requirement needs by creating smaller or fewer programs that are capable of handling multiple variants of data transforms, e.g. multi-purpose programs, generally requires branching instructions to skip to specific lines of code not needed for a specific type of data transform. As explained above, such branching operations may reduce the maximum throughput. Hence, a designer or manufacturer is posed with a dilemma of choosing between improved performance with a larger or more expensive memory or decreased performance with a smaller and cheaper memory.
- Embodiments may provide predicate based instruction loading to implement branch-type instructions of a program without affecting the data throughput or drastically increasing memory requirements. For example, an embodiment may include an instruction unit and a fetch unit. The instruction unit is to store a program including an instruction associated with the predication criteria. The fetch unit is to compare a predicate state associated with a current packet of data to the predication criteria and is to forward the instruction to an execution unit if the predication criteria includes the predicate state of the current packet.
- Using predication criteria and a predicate state, such as through control bits, may provide a relatively large amount of flexibility, thus allowing a single program in memory to be used on a multitude of possible transforms, thereby reducing the memory size while avoiding the processing of branch instructions at the execution unit. Thus, embodiments may allow for improved throughput performance with reduced memory requirements and lower costs, when compared to non-predicate based techniques.
- Referring now to the drawings,
FIG. 1 is an example block diagram of adevice 100 to forward an instruction based on predication criteria. Thedevice 100 may be any type of device that processes packets of data, such as a switch, hub, router, bridge, gateway, server and the like. For example, thedevice 100 may apply to devices with program storage limits and performance requirements that limit their ability to use execution cycles for branching or jumping, such as in the areas of high performance analytics or real-time image processing. In these instances, thedevice 100 may have a minimum instructions/cycle throughput threshold to satisfy and branch or jump instructions may reduce throughput. - In
FIG. 1 , thedevice 100 includes aninstruction unit 110, afetch unit 120 and anexecution unit 130. Theinstruction unit 110 includes aprogram 112 having aninstruction 114 and theinstruction 114 is associated with predication criteria 116 (PC), as described in further detail below. The instruction andfetch units fetch units 110 may be implemented as a series of instructions encoded on a machine-readable storage medium and executable by a processor. Theexecution unit 130 may include a processor, such as a central processing unit (CPU), a semiconductor-based microprocessor, a graphics processing unit (GPU), and other hardware devices suitable for retrieval and execution of instructions stored infetch unit 120 and/orinstruction unit 110. - The
instruction unit 110 is shown to store theprogram 112 including theinstruction 114 associated with thepredication criteria 116. However, embodiments may include a plurality of programs, where each program may include more than one instruction, and/or a single program including a plurality of instructions. Thepredication criteria 116 may indicate one or more predicates states for which the associatedinstruction 114 is to be executed. The predicate state 142 (PS) may refer to a value included in a current packet ofdata 140 while thepredication criteria 116 may refer to a value or a set of values stored in theinstruction unit 110 and associated with an instruction, such as theinstruction 114. In one embodiment, a packet of data may include a predicate state field that stores thepredicate state 142.FIG. 1 shows thecurrent packet 140 that was received by thedevice 100 to include thepredicate state 142. Thepredicate state 142 may indicate one or more operations to be performed on the associated current packet of data - For example, the
predicate state 142 may have a binary, two-bit value of “10” while thepredication criteria 116 may have a binary, two-bit value of “1X.” Thus, theinstruction 114 associated with the predication criteria of “1X” may be executed onpackets 140 having thepredicate state 142 of “11” and/or “10”. Conversely, theinstruction 114 associated with the predication criteria of “1X” should not be executed onpackets 140 having thepredicate state 142 of “00” and/or “01.” Different types of packets may have different types of predicate states. Similarly, different type of instructions and/or different types of programs may have different predication criteria values, and thus be executed for different types of packets. - The fetch
unit 120 is to compare thepredicate state 142 associated with the current packet ofdata 140 to thepredication criteria 116. For example, the fetchunit 120 may inspect thecurrent packet 140 for itspredicate state 142 and store a value of thepredicate state 142′ of thecurrent packet 140 at the fetchunit 120. Then, the fetchunit 120 may inspect thepredication criteria 116 of theinstruction 114 or a plurality of instructions at theinstruction unit 110 and fetch only the instructions that havepredication criteria 116 including the predicate sate 142. - Alternatively, the fetch
unit 120 may load a plurality of instructions from theinstruction unit 110 without checking thepredication criteria 116. Instead, the fetchunit 110 may check thepredication criteria 116 after loading the instructions, and then discard the instructions which have predication criteria that do not include thepredicate state 142 of thecurrent packet 140. In one embodiment, a memory of the fetchunit 120 may have a smaller capacity but higher operating speed than that of theinstruction unit 110. - After the fetch
unit 120 determines the at least oneinstruction 114 that is associated with thepredication criteria 116 matching thepredicate state 142, the fetchunit 120 may forward the at least oneinstruction 114 to theexecution unit 130. Conversely, the fetchunit 120 is to not forward theinstruction 114 to theexecution unit 116 if the associatedpredication criteria 116 does not include thepredicate state 142. As noted above, theexecution unit 130 may be a processor that is to execute the at least oneinstruction 114 on thecurrent packet 140. Further, thepredicate state 142 may be removed from the executedpacket 140 by theexecution unit 130. -
FIG. 2 is another example block diagram of adevice 200 to forward an instruction based on predication criteria. Thedevice 200 may be any type of device that processes data, such as a switch, hub, router, bridge, gateway, server and the like. For example, thedevice 200 may apply to devices with program storage limits and performance requirements that limit their ability to use execution cycles for branching or jumping, such as in the areas of high performance analytics or real-time image processing. In these instances, thedevice 200 may have a minimum instructions/cycle throughput threshold to satisfy and branch or jump instructions may reduce throughput. - In
FIG. 2 , thedevice 200 includes aninstruction unit 210, a fetchunit 220, anexecution unit 230, and apredicate unit 240. Theinstruction unit 210, fetchunit 220 andexecution unit 230 ofFIG. 2 may at least respectively include the functionality and/or hardware of theinstruction unit 110, fetchunit 120 andexecution unit 130 ofFIG. 1 . Thepredicate unit 240 may include, for example, a hardware device including electronic circuitry for implementing the functionality described below, such as control logic and/or memory. In addition or as an alternative, thepredicate unit 240 may be implemented as a series of instructions encoded on a machine-readable storage medium and executable by a processor. - The
predicate unit 240 is to analyze the current packet ofdata 250 and to add a predicate field to the current packet ofdata 250′. The predicate field is to include thepredicate state 254 and a value of the predicate state is to be based on the analysis of thecurrent packet 250. For example, thepredicate unit 240 may analyze at least one of one or ore packet headers, a payload, one ormore tags 252, and a packet size of the current packet ofdata 250 to determine thepredicate state 254 of thecurrent packet 250. After thepredicate unit 240 analyzes thecurrent packet 250 and adds thepredicate state 254 thereto, thepacket 250′ is forwarded to the fetchunit 220. Thus, thepredicate state 254 associated with thecurrent packet 250′ is determined before thecurrent packet 250′ is received by theexecution unit 230 or fetchunit 220. - The
instruction unit 210 is shown to include a plurality of programs, such asprogram A 212 andprogram B 218.Further program A 212 is shown to include a plurality of instructions 214-1 to 214-n associated with a plurality of predication criteria 216-1 to 216-n, where n is a natural number. Theinstruction unit 210 may include more or less than two programs. Further, the programs stored in theinstruction unit 210, such as programs A and B, may be any type of program including at least instruction to modify a packet of data. - For the sake of simplicity of description, only some of the instructions 214-1 to 214-n of
program A 212 have been illustrated. As shown inFIG. 2 , the instructions 214-1 to 214-n include separate predication criteria 216-1 to 216-n. As explained above with respect toFIG. 1 , the predication criteria 216-1 to 216-n may be one or more bits that specify for which types of packets of data the associatedinstruction 214 is to be executed upon. The instructions 214-1 to 214-n may copy without changes, insert information into, replace and/or delete at least part of thepacket 250. Example parts of thepacket 250 may include a MAC address, a time to live (TTL) field, a type of service (TOS) field, a tag, a header, a payload and the like. An example of the instructions 214-1 to 214-n will be explained in greater detail with respect toFIG. 3B . - The fetch
unit 220 is shown to include a multiplexer (mux) 222, a plurality of buffers 224-1 to 224-4 and demultiplexer (demux) 228. WhileFIG. 2 , shows four buffers 224-1 to 224-4, embodiments may include more or less than four buffers. At least one of the buffers 224-1 to 224-4, such as the first buffer 224-1, may include adata buffer unit 225, aninstruction buffer unit 226 and avariable buffer unit 227. Thedata buffer unit 225 is to store one or more of the incoming packets ofdata 250 or at least a payload ordata portion 256 thereof, Theinstruction buffer unit 226 is to store theinstructions 214 fetched from theinstruction unit 210. For example, theinstruction buffer 226 may store one or more instructions, such as the first instruction 214-1′, associated with each of thepackets 250 ordata portions 256′ thereof in thedata buffer unit 225 for which thepredication criteria 216 includes thepredicate state 254 of thepacket 250. Thevariable buffer unit 227 is to store information specific to the one ormore packets 250 stored in thedata buffer unit 210. For example, the specific information may including the predicate states 254′ of the one ormore packets 250′, a new address, and the like. - While the
mux 222 is only shown as a single mux and thedemux 228 is only shown as a single demux, which select between the plurality of buffers 224-1 to 224-4, themux 222 may consist of a plurality of multiplexers and thedemux 228 may consist of a plurality of demultiplexers. For example, the fetchunit 220 may include separate multiplexers and demultiplexers operating in parallel and interfacing with each of thedata buffer unit 225,instruction buffer unit 226 and thevariable buffer unit 227 of each of the plurality of buffers 224-1 to 224-4. - As noted above, the fetch
unit 220 may fetch the plurality of instructions 214-1 to 214-n and discard any of the fetched instructions for which the predication criteria 216-1 to 216-n does not include thepredicate state 254′ of the current packet ofdata 250′. Thepredicate state 254 may be compared to the predication criteria 216-1 to 215-n to determine which of the instructions 214-1 to 214-n are be forwarded to theexecution unit 230 along with contents of thecurrent packet 250′, However, when theinstruction unit 210 stores more than one program thepredicate state 254 may also be used to select the one of the programs. As noted above, thepredicate state 254 may be a value and thepredication criteria 216 may be a set of one or more values. Thus, for example, by including additional information and/or bits in thepredicate state 254 and/or predication criteria 216-1 to 216-n about program selection, the fetchunit 220 may be able to determine from which program to fetch one or more instructions. - For instance, the
predicate unit 240 may analyze Layer 2 (Ethernet) and/or Layer (IP) protocol headers and the size of an IP datagram of thepacket 250 to set thepredicate state 254 and the fetchunit 220 may select a general transform program based thereon. In another instance, thepredicate state 254 may determine how theLayer 2 header is modified orLayer 3 header is refined, based on its original state. Further, thepredicate state 254 may alter the effective length of thepacket 250 based on its size, such as by truncating or appending pad bytes to thepacket 250. - The fetch
unit 220 may forward the one ormore instructions 214 to theinstruction buffer 226 for which thepredication criteria 216 includes thepredicate state 254′ of thecurrent packet 250. Theexecution unit 230 may retrieve instructions to execute from theinstruction buffer 226. As noted above, theexecution unit 230, such as a processor, is to execute the one ormore instructions 214 on the current packet ofdata 250 and to output the executed packet. The one or more instructions executed by theexecution unit 230 are not a branch or jump instruction. Further, theexecution unit 230 is to not inspect thepredicate state 254 of the current packet ofdata 250′ and may even remove thepredicate state 254 from thepacket 250′ before outputting it. The fetchunit 220 may fetch a next packet of data while the current packet ofdata 250′ is being executed. -
FIG. 3A is an example of instructions without predication criteria andFIG. 3B is an example of instructions with predication criteria. Three programs 1-3 are shown inFIG. 3A with a varying number of instructions. For example, thefirst program 1 is shown to include four instructions, thesecond program 2 is shown to include five instructions, and thethird program 3 is shown to include six instructions. - Each of these programs 1-3 are to be executed on a different type of packet. However, as shown in
FIG. 3A , all three programs include common instructions. For example, all three programs include a “modify MAC addresses,” “modify TTL,” “modify TOS” and “copy to end of pkt” instruction. The “modify MAC addresses” instruction may relate to modifying at least one of a destination and source MAC addresses of thepacket 250. The “modify TTL” instruction may relate to modifying the TTL field of thepacket 250. The “modify TOS” instruction may relate to modifying the TOS field of the packet and the “copy to end of pkt” instruction may relate to modifying a payload or data portion of thepacket 250. - Further, the second and
third programs packet 250. Thus, while the three programs 1-3 together require storage capacity for fifteen instructions, there are only six unique instructions between all of the three programs 1-3.FIG. 3B shows an example of instructions with predication criteria, such as in theinstruction unit 210 ofFIG. 2 . By adding predication criteria, storage capacity for only six instructions may now be needed, along with an additional two bits of capacity for the predicate bits of the predication criteria of each of the six instructions. - For example, the predication bits “XX” may indicate that the associated instruction is always executed, regardless of a predicate state of the packet. In this instance, the instructions “modify MAC addresses,” “modify TTL,” “modify TOS” and “copy to end of pkt” are shown to have the predication criteria bits “XX” because all the programs execute these instructions. The predication criteria bits “1X” may indicate that the associated instruction is only executed for packets having the predicate state “11” or “10”. In this instance, the instruction “delete TAG1” is associated with the predication criteria bits “1X” and was included in the second and
third programs FIG. 3A . The predication criteria bits “11” may indicate that the associated instruction is only executed for packets having the predicate state “11”. In this instance, the instruction “delete TAG2” is associated with the predication criteria bits “11” and was included in only thethird program 3 ofFIG. 3A . - Thus, storage requirements may be greatly reduced by using predication criteria to reduce a plurality of unique programs to a single multi-purpose program, without the introduction of jump or branch instructions, While
FIG. 3B only shows the predication criteria for a single program, embodiments may include a plurality of programs. For example, the predication criteria may include additional bits to distinguish between different types of programs and/or the instructions thereof. -
FIG. 4 is an example block diagram of acomputing device 400 including instructions for forwarding an instruction based on predication criteria. In the embodiment ofFIG. 4 , thecomputing device 400 includes aprocessor 410 and a machine-readable storage medium 420. The machine-readable storage medium 420 further includesinstructions computing device 400 may be, for example, a router, a switch, a gateway, a bridge, a server or any other type of device capable of executing theinstructions computing device 400 may be included or be connected to additional components such as a storage drive, a processor, a network appliance, etc. - The
processor 410 may be, at least one central processing unit (CPU), at least one semiconductor-based microprocessor, at least one graphics processing unit (GPU), other hardware devices suitable for retrieval and execution of instructions stored in the machine-readable storage medium 420, or combinations thereof. Theprocessor 410 may fetch, decode, and executeinstructions processor 410 may include at least one integrated circuit (IC), other control logic, other electronic circuits, or combinations thereof that include a number of electronic components for performing the functionality ofinstructions - The machine-
readable storage medium 420 may be any electronic, magnetic, optical, or other physical storage device that contains or stores executable instructions. Thus, the machine-readable storage medium 420 may be, for example, Random Access Memory (RAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a storage drive, a Compact Disc Read Only Memory (CD-ROM), and the like. As such, the machine-readable storage medium 420 can be non-transitory. As described in detail below, machine-readable storage medium 420 may be encoded with a series of executable instructions for forwarding an instruction based on the predication criteria. - Moreover, the
instructions FIG. 4 . For example, the analyzeinstructions 422 may be executed by theprocessor 410 to analyze a predicate state of a received packet of data. The retrieveinstructions 424 may be executed by theprocessor 410 to retrieve a plurality of instructions, each of the instructions associated with predication criteria. The compareinstructions 426 may be executed by theprocessor 410 to compare the predicate state to the predication criteria of each of the instructions to determine if any of the predication criteria includes the predicate state. Theforward instructions 428 may be executed by theprocessor 410 to forward, to an execution unit (not shown), the one or more instructions associated with the predication criteria that include the predicate state. The execution unit is to execute the forwarded instructions on the packet of data. Moreover, due to the predication criteria effectively determining jumps or branches beforehand, the execution unit does not receive such types of instructions and thus may execute a different instruction each clock cycle of the execution unit. -
FIG. 5 is an example flowchart of amethod 500 for forwarding an instruction based on predication criteria. Although execution of themethod 500 is described below with reference to thedevice 200, other suitable components for execution of themethod 500 can be utilized, such as thedevice 100. Additionally, the components for executing themethod 500 may be spread among multiple devices. - The
method 500 may be implemented in the form of executable instructions stored on a machine-readable storage medium, such asstorage medium 420, and/or in the form of electronic circuitry. - At
block 510, thedevice 200 inspects apredicate state 254 associated with a packet ofdata 250′. Thepredicate state 254 is to indicate one or more operations to be performed on thepacket 250′. Next, atblock 520, thedevice 200 compares the inspectedpredicate state 254′ to a plurality of predication criteria 216-1 to 216-n of a plurality of instructions 214-1 to 214-n, to determine if any of the predication criteria 216-1 to 216-n of the plurality of instructions 214-1 to 214-n includes the inspectedpredicate state 254′. Then, atblock 530, thedevice 200 forwards thepacket 250′ and any of the instructions 214-1 to 214-n that are associated with the predication criteria 216-1 to 216-n that includes the inspectedpredicate state 254′ to anexecution unit 230. Theexecution unit 230 is to execute the one or more forwardedinstructions 214 on the forwardedpacket 250′. -
FIG. 6 is another example flowchart of amethod 600 for forwarding an instruction based on predication criteria. Although execution of themethod 600 is described below with reference to thedevice 200, other suitable components for execution of themethod 600 can be utilized, such as thedevice 100. Additionally, the components for executing themethod 600 may be spread among multiple devices. Themethod 600 may be implemented in the form of executable instructions stored on a machine-readable storage medium, such asstorage medium 420, and/or in the form of electronic circuitry. - At
block 610, thedevice 200 receives a packet ofdata 250, such as via a network connection. Next, atblock 620, thedevice 200 analyzes one ormore tags 252 of the receivedpacket 250. Atblock 630, thedevice 200 adds apredicate field 254 to a header of the receivedpacket 250′ based on the analysis. Thepredicate field 254 includes a predicate state of thepacket 250′. Then, atblock 640, thedevice 200 inspects thepredicate state 254 associated with thepacket 250′. Thepredicate state 254 is to indicate one or more operations to be performed on thepacket 250′. - Further, at
block 650, thedevice 200 retrieves, from aninstruction unit 210, a plurality of instructions 214-1 to 214-n. Next, atblock 660, thedevice 200 compares the inspectedpredicate state 254′ to a plurality of predication criteria 216-1 to 216-n of the plurality of instructions 214-1 to 214-n, to determine if any of the predication criteria 216-1 to 216-n of the plurality of instructions 214-1 to 214-n includes the inspectedpredicate state 254′. Then, atblock 670, thedevice 200 forwards thepacket 250′ and any of the instructions 214-1 to 214-n that are associated with the predication criteria 216-1 to 216-n that includes the inspectedpredicate state 254′ to anexecution unit 230. Theexecution unit 230 is to execute the one or more forwardedinstructions 214 on the forwardedpacket 250′. - According to the foregoing, embodiments may provide a method and/or device for predicate based instruction loading to implement branch-type instructions of a program without affecting the data throughput or drastically increasing memory requirements. Using predicate bits for the predication criteria and predicate state may provide a relatively large amount of flexibility, thus allowing a single program in a memory to be used on a multitude of possible transforms, thereby reducing the memory size while avoiding the processing of branch instructions at the execution unit. Thus, embodiments may allow foe improved throughput performance with reduced memory requirements and at a lower cost, when compared to non-predicate based techniques.
Claims (15)
1. A device, comprising:
an instruction unit to store a program including an instruction associated with predication criteria; and
a fetch unit to compare a predicate state associated with a current packet of data to the predication criteria, wherein
the fetch unit is to forward the instruction to an execution unit if the predication criteria includes the predicate state of the current packet.
2. The device of claim 1 , wherein the fetch unit is to not forward the instruction to the execution unit if the predication criteria does not include the predicate state.
3. The device of claim 2 , wherein,
the predicate state indicates one or more operations to be performed on the associated current packet of data, and
the predication criteria indicates one or more predicates states for which the associated instruction is be executed.
4. The device of claim 2 , wherein,
the program includes a plurality of instructions, each of the instructions associated with separate predication criteria, and
the fetch unit is to fetch the plurality of instructions and to discard any of the fetched instructions for which the predication criteria does not include the predicate state of the current packet of data.
5. The device of claim 4 , wherein the fetch unit includes a plurality of buffers accessible by the execution unit, the plurality of buffers including,
a data buffer unit to store one or more of incoming packets of data,
an instruction buffer unit to store the instructions fetched from the instruction unit, and
a variable buffer unit to store information specific to the one or more packets of data, the specific information including at least one of the predicate state and a new address.
6. The device of claim 5 , wherein,
the fetch unit is to forward the instruction to the instruction buffer if the predication criteria includes the predicate state of the current packet, and
the execution unit is to retrieve instructions to execute from the instruction buffer.
7. The device of claim 1 , wherein,
the execution unit is to execute the instruction on the current packet of data and to output the executed packet, and
the fetch unit is to fetch a next packet of data while the current packet of data is executed.
8. The device of claim 7 , wherein,
the instruction is to at least one of copy without changes, insert information into, replace and delete at least part of the current packet,
at least part of the current packet includes at least one of a MAC address, a time to live (TTL) field, a type of service (TOS) field, a tag, a header and a payload, and
the predicate state is a value and the predication criteria is a set of one or more values.
9. The device of claim 7 , wherein the instruction executed by the execution unit is not at least one of a branch and jump instruction.
10. The device of claim 1 , wherein
the predicate state associated with the current packet is determined before the current packet is received by the execution unit, and
the execution unit is to not inspect the predicate state of the current packet of data.
11. The device of claim 10 , further comprising:
a predicate unit to analyze the current packet of data and to add a predicate field to the current packet of data, the predicate field to include the predicate state and a value of the predicate state is to be based on the analysis, wherein
the predicate unit analyzes at least one of a packet header, a tag, and a packet size of the current packet of data.
12. A method, comprising:
inspecting a predicate state associated with a packet of data, the predicate state to indicate one or more operations to be performed on the packet;
comparing the inspected predicate state to a plurality of predication criteria of a plurality of instructions, to determine if any of the predication criteria of the plurality of instructions includes the inspected predicate state; and
forwarding the packet and any of the instructions that are associated with predication criteria that includes the inspected predicate state to an execution unit, the execution unit to execute the one or more forwarded instructions on the forwarded packet.
13. The method of claim 11 , further comprising:
receiving the packet of data, before the inspecting;
analyzing one or more tags of the received packet, before the inspecting;
adding a predicate field to a header of the received packet based on the analysis, before the inspecting, the predicate field to include the predicate state; and
retrieving, from an instruction unit, the plurality of instructions, before the comparing.
14. A non-transitory computer-readable storage medium storing instructions that, if executed by a processor of a device, cause the processor to:
analyze a predicate state of a received packet of data;
retrieve a plurality of instructions, each of the instructions associated with predication criteria;
compare the predicate state to the predication criteria of each of the instructions to determine if the predication criteria includes the predicate state; and
forward, to an execution unit, the one or more instructions associated with the predication criteria that include the predicate state, the execution unit to execute the forwarded instructions on the packet of data.
15. The non-transitory computer-readable storage medium of claim 14 , wherein the execution unit is to execute a different instruction each clock cycle.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US14/962,622 US20160098278A1 (en) | 2012-08-29 | 2015-12-08 | Instruction forwarding based on predication criteria |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US13/598,267 US9207938B2 (en) | 2012-08-29 | 2012-08-29 | Instruction forwarding based on predication criteria |
US14/962,622 US20160098278A1 (en) | 2012-08-29 | 2015-12-08 | Instruction forwarding based on predication criteria |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US13/598,267 Continuation US9207938B2 (en) | 2012-08-29 | 2012-08-29 | Instruction forwarding based on predication criteria |
Publications (1)
Publication Number | Publication Date |
---|---|
US20160098278A1 true US20160098278A1 (en) | 2016-04-07 |
Family
ID=50189136
Family Applications (4)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US13/598,267 Expired - Fee Related US9207938B2 (en) | 2012-08-29 | 2012-08-29 | Instruction forwarding based on predication criteria |
US14/962,622 Abandoned US20160098278A1 (en) | 2012-08-29 | 2015-12-08 | Instruction forwarding based on predication criteria |
US15/179,872 Active 2033-07-03 US10271240B2 (en) | 2012-08-29 | 2016-06-10 | Determining whether a flow is to be added to a network |
US16/358,639 Active 2036-08-19 US11134409B2 (en) | 2012-08-29 | 2019-03-19 | Determining whether a flow is to be added to a network |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US13/598,267 Expired - Fee Related US9207938B2 (en) | 2012-08-29 | 2012-08-29 | Instruction forwarding based on predication criteria |
Family Applications After (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/179,872 Active 2033-07-03 US10271240B2 (en) | 2012-08-29 | 2016-06-10 | Determining whether a flow is to be added to a network |
US16/358,639 Active 2036-08-19 US11134409B2 (en) | 2012-08-29 | 2019-03-19 | Determining whether a flow is to be added to a network |
Country Status (1)
Country | Link |
---|---|
US (4) | US9207938B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10454989B2 (en) * | 2016-02-19 | 2019-10-22 | Verizon Patent And Licensing Inc. | Application quality of experience evaluator for enhancing subjective quality of experience |
US11882024B2 (en) * | 2018-06-18 | 2024-01-23 | Cisco Technology, Inc. | Application-aware links |
US11665576B2 (en) * | 2018-08-10 | 2023-05-30 | Verizon Patent And Licensing Inc. | Systems and methods for wireless low latency traffic scheduler |
US11558668B2 (en) * | 2021-06-03 | 2023-01-17 | Microsoft Technology Licensing, Llc | Measuring video quality of experience based on decoded frame rate |
Family Cites Families (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4710866A (en) * | 1983-09-12 | 1987-12-01 | Motorola, Inc. | Method and apparatus for validating prefetched instruction |
US5321606A (en) | 1987-05-19 | 1994-06-14 | Hitachi, Ltd. | Data transforming method using externally provided transformation rules |
JPH0820950B2 (en) * | 1990-10-09 | 1996-03-04 | インターナショナル・ビジネス・マシーンズ・コーポレイション | Multi-predictive branch prediction mechanism |
US6662294B1 (en) * | 2000-09-28 | 2003-12-09 | International Business Machines Corporation | Converting short branches to predicated instructions |
US6741595B2 (en) * | 2002-06-11 | 2004-05-25 | Netrake Corporation | Device for enabling trap and trace of internet protocol communications |
US8751648B2 (en) * | 2005-06-03 | 2014-06-10 | Wefi, Inc. | Providing and receiving network access |
US20100290621A1 (en) | 2007-03-12 | 2010-11-18 | Nortel Networks Limited | Tunneling support for mobile ip using a key for flow identification |
CA2585808A1 (en) | 2007-03-26 | 2008-09-26 | David Ker | Method and system for implementing a secured and centrally managed virtual ip network on a common ip network infrastructure |
US9049045B2 (en) | 2009-04-24 | 2015-06-02 | Aruba Networks, Inc. | Peer-to-peer forwarding for packet-switched traffic |
US8032652B2 (en) | 2009-04-30 | 2011-10-04 | Aruba Networks, Inc. | Initiating peer-to-peer tunnels |
US8201501B2 (en) | 2009-09-04 | 2012-06-19 | Tinsley Douglas M | Dual path kiln improvement |
WO2011056087A1 (en) | 2009-11-09 | 2011-05-12 | Netcracker Technology Corp. | Declarative and unified data transition |
US20130086267A1 (en) * | 2010-09-24 | 2013-04-04 | Bae Systems Plc | Admission control in a self aware network |
US20120084539A1 (en) * | 2010-09-29 | 2012-04-05 | Nyland Lars S | Method and sytem for predicate-controlled multi-function instructions |
US8577820B2 (en) * | 2011-03-04 | 2013-11-05 | Tokyo Electron Limited | Accurate and fast neural network training for library-based critical dimension (CD) metrology |
US8843730B2 (en) * | 2011-09-09 | 2014-09-23 | Qualcomm Incorporated | Executing instruction packet with multiple instructions with same destination by performing logical operation on results of instructions and storing the result to the destination |
US9001701B1 (en) * | 2011-11-03 | 2015-04-07 | Cisco Technology, Inc. | Priority assignment and signaling of scalable video in a switch based system |
JP5974665B2 (en) * | 2012-06-22 | 2016-08-23 | 富士通株式会社 | Information processing system, relay device, information processing device, and information processing method |
-
2012
- 2012-08-29 US US13/598,267 patent/US9207938B2/en not_active Expired - Fee Related
-
2015
- 2015-12-08 US US14/962,622 patent/US20160098278A1/en not_active Abandoned
-
2016
- 2016-06-10 US US15/179,872 patent/US10271240B2/en active Active
-
2019
- 2019-03-19 US US16/358,639 patent/US11134409B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
US10271240B2 (en) | 2019-04-23 |
US20160286427A1 (en) | 2016-09-29 |
US11134409B2 (en) | 2021-09-28 |
US9207938B2 (en) | 2015-12-08 |
US20140068228A1 (en) | 2014-03-06 |
US20190215716A1 (en) | 2019-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107608750B (en) | Device for pattern recognition | |
US11418632B2 (en) | High speed flexible packet classification using network processors | |
US8867395B2 (en) | Accelerating data packet parsing | |
US20160098278A1 (en) | Instruction forwarding based on predication criteria | |
JP6126127B2 (en) | Method and system for routing in a state machine | |
US8788991B2 (en) | State grouping for element utilization | |
US9825841B2 (en) | Method of and network server for detecting data patterns in an input data stream | |
US10515699B1 (en) | Error handling for match action unit memory of a forwarding element | |
JP6082753B2 (en) | Method and system for data analysis in a state machine | |
JP5226714B2 (en) | Packet routing in on-chip networks | |
US11463381B2 (en) | Network forwarding element with key-value processing in the data plane | |
CN107563201B (en) | Associated sample searching method and device based on machine learning and server | |
JP6212111B2 (en) | System and method for performing feature detection and determining feature scores | |
US9965434B2 (en) | Data packet processing | |
US20210064443A1 (en) | Hardware offload support for an operating system offload interface using operation code verification | |
US10015291B2 (en) | Host network controller | |
US9979802B2 (en) | Assembling response packets | |
US9912591B1 (en) | Flow switch IC that uses flow IDs and an exact-match flow table | |
KR102207775B1 (en) | Method for Static Analysis based on Data Dependence on Data Plane Towards Network Switch Parallelization, and Parallelization Apparatus using the same | |
WO2016136197A1 (en) | Data processing device, data processing method, and recording medium | |
US9026424B1 (en) | Emulation of multiple instruction sets | |
KR20150041460A (en) | Packet parsing processor, system and method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP, TEXAS Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:WARREN, DAVID A.;KEAVENY, THOMAS A.;REEL/FRAME:038476/0845 Effective date: 20160107 |
|
STCB | Information on status: application discontinuation |
Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION |