EP1576475A2 - Method and apparatus for determining a processor state without interrupting processor operation - Google Patents

Method and apparatus for determining a processor state without interrupting processor operation

Info

Publication number
EP1576475A2
EP1576475A2 EP03764379A EP03764379A EP1576475A2 EP 1576475 A2 EP1576475 A2 EP 1576475A2 EP 03764379 A EP03764379 A EP 03764379A EP 03764379 A EP03764379 A EP 03764379A EP 1576475 A2 EP1576475 A2 EP 1576475A2
Authority
EP
European Patent Office
Prior art keywords
processor
host processor
register
data
valid bit
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.)
Withdrawn
Application number
EP03764379A
Other languages
German (de)
French (fr)
Inventor
Timothy J. Wood
Scott A. White
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced Micro Devices Inc
Original Assignee
Advanced Micro Devices Inc
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Advanced Micro Devices Inc filed Critical Advanced Micro Devices Inc
Publication of EP1576475A2 publication Critical patent/EP1576475A2/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2236Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test CPU or processors

Definitions

  • TITLE METHOD AND APPARATUS FOR DETERMINING A PROCESSOR STATE WITHOUT
  • This invention relates to processors, and more particularly, a method and apparatus for determining the state of a processor.
  • determining the behavior of system hardware involves the determination of processor states at various stages of program execution. Determining the processor state may involve querying the processor by sending it data. The data received by the processor may then be acted on and produce additional data indicative of the processor state. Such data may include the contents of registers, reservation stations, and so on. The additional data may then be transmitted from the processor for observation. Alternatively, a processor may be configured to periodically transmit data to an external source where the data may be used to determine a processor state or other information.
  • test data may result in the processor switching to an alternate service routine, which may result in the suspension of the currently executing instruction stream. These factors may make it difficult to ascertain the speed at which certain routines execute in the processor. Furthermore, the transition to an alternate service routine may result in the inability to determine the true processor state from the processor query.
  • a service processor may poll a valid bit stored in a register of a receiver in the host processor. Upon determining that the valid bit is clear, the service processor may load test data into an output register and transmit test data to the host processor, setting the valid bit upon completing the transmission. The test data may be retrieved from the register of tire receiver responsive to the host processor determining that the valid bit is set. State data, indicative of a state of the host processor, may be generated responsive to the test data. The host processor may poll a valid bit in a register of a transmitter in its output port, and may deposit data into the register of the transmitter responsive to detecting that the valid bit is clear.
  • the data may then be transmitted to the receiver of the service processor, and the valid bit may be set in response to said transmitting.
  • the operations of transmitting data to the host processor and retrieving data from the host processor may be performed without interrupting the execution of instructions. Furthermore, transmission and reception of data by the host processor may occur independently of each other.
  • the host processor includes an input port and an output port.
  • the input port of the host processor may be configured to be coupled to an output port of the service processor, while the output port may be configured to be coupled to an input port of the service processor.
  • the input ports and output ports of both the host and service processors may each include a register configured to store a number of bits. Each register may be configured to store a valid bit that, when set, may indicate that the data stored is valid.
  • the registers in the input ports may be configured such that they may only receive data when the valid bit is cleared. When data is transferred from an output port to an input port, the valid bit may be set in the register of the input port.
  • Both the host processor and the service processor may be configured such that data may be retrieved from the register of their respective input ports responsive to detecting that the valid bit is set.
  • data may be loaded into the register of the output port or retrieved from the input port through a boundary scan test access port (TAP) which may conform to the IEEE 1149.1 standard.
  • TTP boundary scan test access port
  • Data may be serially loaded into the register of the service processor output port through a test data in (TDI) pin.
  • TDI test data in
  • TDO test data out
  • the operation of the combinations of input ports and output ports may operate independently of one another.
  • the output port of the service processor may transfer data to the input port of the host processor independently of any data transfers from the output port of the host processor to the input port of the service processor.
  • data may be transferred in regular intervals to or from the processor, or data may be transferred from the processor responsive to an individual query.
  • Figure 1 is a block diagram of one embodiment of a processor
  • Figure 2 is a block diagram of one embodiment of a system for determining the state of a processor
  • Figure 3 is a block diagram of illustrating one embodiment of a host processor input port coupled to a service processor output port
  • Figure 4 is a block diagram of one embodiment of a host processor output port coupled to a service processor input port;
  • Figure 5 A is a flow diagram of one embodiment of a method of querying a host processor.
  • Figure 5B is a flow diagram of one embodiment of a method for outputting state data from a host processor.
  • processor 10 includes a prefetch/predecode unit 12, a branch prediction unit 14, an instruction cache 16, an instruction alignment unit 18, a plurality of decode units 20A-20C, a plurality of reservation stations 22A-22C, a plurality of functional units 24A-24C, a load/store unit 26, a data cache 28, a register file 30, a reorder buffer 32, an MROM unit 34, and a bus interface unit 37.
  • processor 10 includes a prefetch/predecode unit 12, a branch prediction unit 14, an instruction cache 16, an instruction alignment unit 18, a plurality of decode units 20A-20C, a plurality of reservation stations 22A-22C, a plurality of functional units 24A-24C, a load/store unit 26, a data cache 28, a register file 30, a reorder buffer 32, an MROM unit 34, and a bus interface unit 37.
  • decode units 20A-20C will be collectively referred to as decode units 20.
  • Prefetch/predecode unit 12 is coupled to receive instructions from bus interface unit 37, and is further coupled to instruction cache 16 and branch prediction unit 14. Similarly, branch prediction unit 14 is coupled to instruction cache 16. Still further, branch prediction unit 14 is coupled to decode units 20 and functional units 24. Instruction cache 16 is further coupled to MROM unit 34 and instruction alignment unit 18. Instruction alignment unit 18 is in turn coupled to decode units 20. Each decode unit 20A-20C is coupled to load/store unit 26 and to respective reservation stations 22A-22C. Reservation stations 22A-22C are further coupled to respective functional units 24A-24C. Additionally, decode units 20 and reservation stations 22 are coupled to register file 30 and reorder buffer 32. Functional units 24 are coupled to load/store unit 26, register file 30, and reorder buffer 32 as well. Data cache 28 is coupled to load/store unit 26 and to bus interface unit 37. Bus interface unit 37 is further coupled to an L2 interface to an L2 cache and a bus. Finally, MROM unit 34 is coupled to decode units 20.
  • Instruction cache 16 is a high speed cache memory provided to store instructions. Instructions are fetched from instruction cache 16 and dispatched to decode units 20. In one embodiment, instruction cache 16 is configured to store up to 64 kilobytes of instructions in a 2 way set associative structure having 64 byte lines (a byte comprises 8 binary bits). Alternatively, any other desired configuration and size may be employed. For example, it is noted that instruction cache 16 may be implemented as a fully associative, set associative, or direct mapped configuration.
  • Instructions are stored into instruction cache 16 by prefetch/predecode unit 12. Instructions may be prefetched prior to the request thereof from instruction cache 16 in accordance with a prefetch scheme. A variety of prefetch schemes may be employed by prefetch/predecode unit 12. As prefetch/predecode unit 12 transfers instructions to instruction cache 16, prefetch/predecode unit 12 may generate predecode data corresponding to the instructions. For example, in one embodiment, prefetch/predecode unit 12 generates three predecode bits for each byte of the instructions: a start bit, an end bit, and a functional bit. The predecode bits form tags indicative of the boundaries of each instruction.
  • predecode tags may also convey additional information such as whether a given instruction can be decoded directly by decode units 20 or whether the instruction is executed by invoking a microcode procedure controlled by MROM unit 34.
  • prefetch/predecode unit 12 may be configured to detect branch instructions and to store branch prediction information corresponding to the branch instructions into branch prediction unit 14.
  • Other embodiments may employ any suitable predecode scheme or no predecode, as desired.
  • variable byte length instruction set is an instruction set in which different instructions may occupy differing numbers of bytes.
  • An exemplary variable byte length instruction set employed by one embodiment of processor 10 is the x86 instruction set.
  • a given byte is the first byte of an instruction
  • the start bit for that byte is set. If the byte is the last byte of an instruction, the end bit for that byte is set.
  • Instructions which may be directly decoded by decode units 20 are referred to as "fast path" instructions.
  • the remaining x86 instructions are referred to as MROM instructions, according to one embodiment.
  • the functional bit is set for each prefix byte included in the instruction, and cleared for other bytes.
  • the functional bit is cleared for each prefix byte and set for other bytes. The type of instruction may be determined by examining the functional bit corresponding to the end byte.
  • the instruction is a fast path instruction. Conversely, if that functional bit is set, the instruction is an MROM instruction.
  • the opcode of an instruction may thereby be located within an instruction which may be directly decoded by decode units 20 as the byte associated with the first clear functional bit in the instruction. For example, a fast path instruction including two prefix bytes, a Mod R/M byte, and an immediate byte would have start, end, and functional bits as follows:
  • MROM instructions are instructions which are determined to be too complex for decode by decode units 20.
  • MROM instructions are executed by invoking MROM unit 34. More specifically, when an MROM instruction is encountered, MROM unit 34 parses and issues the instruction into a subset of defined fast path instructions to effectuate the desired operation. MROM unit 34 dispatches the subset of fast path instructions to decode units 20.
  • Branch prediction unit 14 is included to perform branch prediction operations.
  • branch prediction unit 14 employs a branch target buffer which caches up to two branch target addresses and corresponding taken/not taken predictions per 16 byte portion of a cache line in instruction cache 16.
  • the branch target buffer may, for example, comprise 2048 entries or any other suitable number of entries.
  • Prefetch/predecode unit 12 determines initial branch targets when a particular line is predecoded. Subsequent updates to the branch targets corresponding to a cache line may occur due to the execution of instructions within the cache line.
  • Instruction cache 16 provides an indication of the instruction address being fetched, so that branch prediction unit 14 may determine which branch target addresses to select for forming a branch prediction.
  • Decode units 20 and functional units 24 provide update information to branch prediction unit 14.
  • Decode units 20 detect branch instructions which were not predicted by branch prediction unit 14.
  • Functional units 24 execute the branch instructions and determine if the predicted branch direction is incorrect. The branch direction may be "taken”, in which subsequent instructions are fetched from the target address of the branch instruction. Conversely, the branch direction may be "not taken”, in which subsequent instructions are fetched from memory locations consecutive to the branch instruction.
  • branch prediction unit 14 may be coupled to reorder buffer 32 instead of decode units 20 and functional units 24, and may receive branch misprediction information from reorder buffer 32.
  • branch prediction unit 14 may be coupled to reorder buffer 32 instead of decode units 20 and functional units 24, and may receive branch misprediction information from reorder buffer 32.
  • branch prediction unit 14 may be coupled to reorder buffer 32 instead of decode units 20 and functional units 24, and
  • Instructions fetched from instruction cache 16 are conveyed to instruction alignment unit 18. As instructions are fetched from instruction cache 16, the corresponding predecode data is scanned to provide information to instruction alignment unit 18 (and to MROM unit 34) regarding the instructions being fetched. Instruction alignment unit 18 utilizes the scanning data to align an instruction to each of decode units 20. In one embodiment, instruction alignment unit 18 aligns instructions from three sets of eight instruction bytes to decode units 20. Decode unit 20A receives an instruction which is prior to instructions concurrently received by decode units 20B and 20C (in program order). Similarly, decode unit 20B receives an instruction which is prior to the instruction concurrently received by decode unit 20C in program order. In some embodiments, (e.g. embodiments employing fixed-length instruction sets), the instruction alignment unit 18 may be eliminated.
  • Decode units 20 are configured to decode instructions received from instruction alignment unit 18. Register operand information is detected and routed to register file 30 and reorder buffer 32. Additionally, if the instructions require one or more memory operations to be performed, decode units 20 dispatch the memory operations to load/store unit 26. Each instruction is decoded into a set of control values for functional units 24, and these control values are dispatched to reservation stations 22 along with operand address information and displacement or immediate data which may be included with the instruction. In one particular embodiment, each instruction is decoded into up to two operations which may be separately executed by functional units 24A-24C.
  • Processor 10 supports out of order execution, and thus employs reorder buffer 32 to keep track of the original program sequence for register read and write operations, to implement register renaming, to allow for speculative instruction execution and branch misprediction recovery, and to facilitate precise exceptions.
  • a temporary storage location within reorder buffer 32 is reserved upon decode of an instruction that involves the update of a register to thereby store speculative register states. If a branch prediction is incorrect, the results of speculatively-executed instructions along the mispredicted path can be invalidated in the buffer before they are written to register file 30. Similarly, if a particular instruction causes an exception, instructions subsequent to the particular instruction may be discarded. In this manner, exceptions are "precise" (i.e.
  • a particular instruction is speculatively executed if it is executed prior to instructions which precede the particular instruction in program order. Preceding instructions may be a branch instruction or an exception-causing instruction, in which case the speculative results may be discarded by reorder buffer 32.
  • each reservation station 22 is capable of holding instruction information (e.g. decoded instructions as well as operand values, operand tags and/or immediate data) for up to six pending instructions awaiting issue to the corresponding functional unit.
  • instruction information e.g. decoded instructions as well as operand values, operand tags and/or immediate data
  • each reservation station 22 is associated with a dedicated functional unit 24. Accordingly, three dedicated "issue positions" are formed by reservation stations 22 and functional units 24.
  • issue position 0 is formed by reservation station 22A and functional unit 24A. Instructions aligned and dispatched to reservation station 22A are executed by functional unit 24A.
  • issue position 1 is formed by reservation station 22B and functional unit 24B; and issue position 2 is formed by reservation station 22C and functional unit 24C.
  • register address information is routed to reorder buffer 32 and register file 30 simultaneously.
  • the register file 30 comprises storage locations for each of the architected registers included in the instruction set implemented by the processor 10. Additional storage locations may be included within register file 30 for use by MROM unit 34.
  • Reorder buffer 32 contains temporary storage locations for results which change the contents of these registers to thereby allow out of order execution.
  • a temporary storage location of reorder buffer 32 is reserved for each instruction which, upon decode, is determined to modify the contents of one of the real registers. Therefore, at various points during execution of a particular program, reorder buffer 32 may have one or more locations which contain the speculatively executed contents of a given register.
  • the reorder buffer 32 forwards to the corresponding reservation station either: 1) the value in the most recently assigned location, or 2) a tag for the most recently assigned location if the value has not yet been produced by the functional unit that will eventually execute the previous instruction. If reorder buffer 32 has a location reserved for a given register, the operand value (or reorder buffer tag) is provided from reorder buffer 32 rather than from register file 30. If there is no location reserved for a required register in reorder buffer 32, the value is taken directly from register file 30. If the operand corresponds to a memory location, the operand value is provided to the reservation station through load/store unit 26.
  • reorder buffer 32 is configured to store and manipulate concurrently decoded instructions as a unit. This configuration will be referred to herein as "line-oriented". By manipulating several instructions together, the hardware employed within reorder buffer 32 may be simplified. For example, a line-oriented reorder buffer included in the present embodiment allocates storage sufficient for instruction information pertaining to three instructions (one from each decode unit 20) whenever one or more instructions are dispatched by decode units 20. By contrast, a variable amount of storage is allocated in conventional reorder buffers, dependent upon the number of instructions actually dispatched. A comparatively larger number of logic gates may be required to allocate the variable amount of storage. When each of the concurrently decoded instructions has executed, the instruction results are stored into register file 30 simultaneously.
  • a reorder buffer tag identifying a particular instruction may be divided into two fields: a line tag and an offset tag.
  • the line tag identifies the set of concurrently decoded instructions including the particular instruction
  • the offset tag identifies which instruction within the set corresponds to the particular instruction. It is noted that storing instruction results into register file 30 and freeing the corresponding storage is referred to as "retiring" the instructions. It is further noted that any reorder buffer configuration may be employed in various embodiments of processor 10.
  • reservation stations 22 store instructions until the instructions are executed by the corresponding functional unit 24.
  • An instruction is selected for execution if: (i) the operands of the instruction have been provided; and (ii) the operands have not yet been provided for instructions which are within the same reservation station 22A-22C and which are prior to the instruction in program order. It is noted that when an instruction is executed by one of the functional units 24, the result of that instruction is passed directly to any reservation stations 22 that are waiting for that result at the same time the result is passed to update reorder buffer 32 (this technique is commonly referred to as "result forwarding"). An instruction may be selected for execution and passed to a functional unit 24A-24C during the clock cycle that the associated result is forwarded. Reservation stations 22 route the forwarded result to the functional unit 24 in this case. In embodiments in which instructions may be decoded into multiple operations to be executed by functional units 24, the operations may be scheduled separately from each other instructions.
  • each of the functional units 24 is configured to perform integer arithmetic operations of addition and subtraction, as well as shifts, rotates, logical operations, and branch operations. The operations are performed in response to the control values decoded for a particular instruction by decode units 20. It is noted that a floating point unit (not shown) may also be employed to accommodate floating point operations. The floating point unit may be operated as a coprocessor, receiving instructions from MROM unit 34 or reorder buffer 32 and subsequently communicating with reorder buffer 32 to complete the instructions. Additionally, functional units 24 may be configured to perform address generation for load and store memory operations performed by load/store unit 26. In one particular embodiment, each functional unit 24 may comprise an address generation unit for generating addresses and an execute unit for performing the remaining functions. The two units may operate independently upon different instructions or operations during a clock cycle.
  • Each of the functional units 24 also provides information regarding the execution of conditional branch instructions to the branch prediction unit 14. If a branch prediction was incorrect, branch prediction unit 14 flushes instructions subsequent to the mispredicted branch that have entered the instruction processing pipeline, and causes fetch of the required instructions from instruction cache 16 or main memory. It is noted that in such situations, results of instructions in the original program sequence which occur after the mispredicted branch instruction are discarded, including those which were speculatively executed and temporarily stored in load/store unit 26 and reorder buffer 32. It is further noted that branch execution results may be provided by functional units 24 to reorder buffer 32, which may indicate branch mispredictions to functional units 24.
  • Results produced by functional units 24 are sent to reorder buffer 32 if a register value is being updated, and to load/store unit 26 if the contents of a memory location are changed. If the result is to be stored in a register, reorder buffer 32 stores the result in the location reserved for the value of the register when the instruction was decoded.
  • a plurality of result buses 38 are included for forwarding of results from functional units 24 and load/store unit 26. Result buses 38 convey the result generated, as well as the reorder buffer tag identifying the instruction being executed.
  • Load/store unit 26 provides an interface between functional units 24 and data cache 28.
  • load/store unit 26 is configured with a first load/store buffer having storage locations for data and address information for pending loads or stores which have not accessed data cache 28 and a second load/store buffer having storage locations for data and address information for loads and stores which have accessed data cache 28.
  • the first buffer may comprise 12 locations and the second buffer may comprise 32 locations.
  • Decode units 20 arbitrate for access to the load/store unit 26. When the first buffer is full, a decode unit must wait until load/store unit 26 has room for the pending load or store request information. Load/store unit 26 also performs dependency checking for load memory operations against pending store memory operations to ensure that data coherency is maintained.
  • a memory operation is a transfer of data between processor 10 and the main memory subsystem (although the transfer may be accomplished in the data cache 28).
  • Memory operations may be the result of an instruction which utilizes an operand stored in memory, or may be the result of a load/store instruction which causes the data transfer but no other operation.
  • Data cache 28 is a high speed cache memory provided to temporarily store data being transferred between load/store unit 26 and the main memory subsystem.
  • data cache 28 has a capacity of storing up to 64 kilobytes of data in an two way set associative structure. It is understood that data cache 28 may be implemented in a variety of specific memory configurations, including a set associative configuration, a fully associative configuration, a direct-mapped configuration, and any suitable size of any other configuration.
  • Bus interface unit 37 is configured to communicate between processor 10 and other components in a computer system via a bus.
  • the bus may be compatible with the EV-6 bus developed by Digital Equipment Corporation.
  • any suitable interconnect structure may be used including packet-based, unidirectional or bi-directional links, etc.
  • An optional L2 cache interface may be employed as well for interfacing to a level two cache.
  • Figure 1 is a superscalar implementation, other embodiments may employ scalar implementations. Furthermore, the number of functional units may be varied from embodiment to embodiment. Other embodiments may use a centralized reservation station rather than the individual reservation stations shown in Figure 1. Furthermore, other embodiments may employ a central scheduler rather than the reservation stations and reorder buffer shown in Figure 1.
  • Processor 10 may include a port, shown here as mailbox port 100, which allows it to be queried during the execution of an instruction stream.
  • Mailbox port 100 may be configured to be coupled to a service processor or a debug processor that is external to processor 10. Test data, used for querying a state of processor 10 may be received through mailbox port 100. Similarly, state data, indicative of the state of processor 10 resulting from the query may be transmitted from mailbox port 100 to the service processor or debug processor.
  • Mailbox port 100 may be coupled to one or more units of processor 10, such as decode units 20A-20C, register file 30, instruction cache 16, functional units 24A-24C, and so on. Information may be sent or received from mailbox port 100.
  • processor 10 hereafter host processor 10
  • service processor 140 may be coupled to service processor 140.
  • service processor 140 may be located in another computer system that may be coupled to a computer system in which host processor 10 is implemented.
  • service processor 140 may be located on a board inserted into a peripheral slot of the computer system in which host processor 10 is located, or may even be mounted to the same board as host processor 10.
  • host processor 10 includes a mailbox port 100.
  • Mailbox port 100 may include mailbox input port 102 and mailbox output port 104.
  • Mailbox input port 102 may be configured to be coupled to a complementary output port 152 of service processor 140.
  • mailbox output port 104 may be configured to be coupled to a complementary input port 154 of service processor 140.
  • Mailbox input port 102 of host processor 10 may receive test data transmitted from service processor 140.
  • the test data may be transmitted from output port 152 of service processor 140 to mailbox input port 102 of host processor 10.
  • service processor 140 may be configured to receive state data from host processor 10.
  • the state data may be transmitted from mailbox output port 104 of host processor 10 to input port 154 of service processor 140.
  • Each of the complementary pairs of input output ports may function independently of one another.
  • output port 152 may transmit test data to mailbox input port 102 independently of any transmissions of state data from mailbox output port 104 to input port 154.
  • Test data may be serially loaded into a output port 152 of service processor 140 through a test data in (TDI) pin, which may be part of a test access port (TAP).
  • the test access port may be a boundary scan port that is in compliance with IEEE standard 1149.1.
  • state data may be serially shifted from input port 154 through a test data out (TDO) pin. Additional details of loading test data and unloading state data from service processor 140 will be discussed below.
  • FIG. 3 a block diagram of illustrating one embodiment of a host processor input port coupled to a service processor output port.
  • mailbox input port 102 of host processor 10 is coupled to mailbox output port 152 of service processor 140.
  • Mailbox input port 102 includes input register 112.
  • Input register 112 is configured to receive and store test data. The test data may be received from output register 162 located in output port 152.
  • Both output register 162 and input register 112 may be of various sizes. In one embodiment, both output register 162 and input register 112 are configured to store 32 bits of data and one valid bit. Other embodiments having different register sizes, as well as multiple registers (for both mailbox input ports and both mailbox output ports), are possible and contemplated.
  • output register 162 is coupled to a TDI pin. Test data may be serially shifted into output register 162 through the TDI pin. In addition to the test data, a valid bit may also be set in the output register through the TDI pin.
  • test data In order to transmit the test data to input register 112, it may be first necessary to poll the valid bit to make sure it is clear. Since this bit is in the host processor's clock domain, it must first be synchronized to the service processor clock domain. The synchronized version of the valid bit is captured into output register 162 and serially shifted out for examination. While the valid bit is being serially shifted out for examination, test data may be serially loaded into output register 162.
  • the valid bit may be an indication that test data has been loaded into mailbox input port 102 but has not been retrieved by host processor 10. Thus, the loading of test data into output register 162 and its subsequent transfer to input register 112 may be inhibited while this valid bit is set.
  • the valid bit may be cleared from input register 112 by the host processor. Responsive to detecting that the valid bit stored in input register 112 is clear, output port 152 may initiate transfer of the test data to input register 112.
  • a separate TAP instruction is used to set the valid bit. Using this instruction causes a synchronized load of the data from output register 162 to input register 112 (See 'A' in Figure 3).
  • a processor core of host processor 10 may also poll the valid bit in input register 112. Upon detecting the setting of the valid bit indicating the successful loading of test data into input register 112, the processor core may retrieve the test data. The test data may then be used to generate state data to be transmitted back to the service processor, as will be discussed in further detail below.
  • the protocol for transmission and reception between input ports and output ports may be the same for both host processor 10 and service processor 140.
  • Table 1 below illustrates the protocol for one embodiment of an input port/output port combination.
  • a transmitter in the system i.e. an output port
  • a receiver in the system i.e. an input port
  • the receiver in the service processor may periodically shift data from its input register and examine the valid bit subsequent to said shifting (as the valid bit is part of the data shifted out) in order to determine whether the data is valid.
  • FIG. 4 is a block diagram of one embodiment of a host processor output port coupled to a service processor input port.
  • mailbox output port 104 of host processor 10 is coupled to input port 154 of service processor 140.
  • Mailbox output port 104 includes an output register 114, which is configured to store state data received from the processor core of host processor 10. The state data received into output register 114 may be generated responsive to previously input test data.
  • Mailbox output port includes a output register 114, while input port 154 includes a input register 164.
  • mailbox output port 104 may deposit state data into output register 114 and subsequently set the valid bit in output register 114.
  • the transfer of data to input register 164 is initiated by service processor 140. This is done in the Capture-DR state of the TAP controller. Once the state data and valid bit have been transferred to input register 164, the valid bit may be examined and the data may be retrieved by shifting it out through the test data out (TDO) pin. If the valid bit is set, service processor 140 determines that the data that has been shifted out along with the valid bit is viable (i.e. valid data).
  • the transfers of data to and from the mailbox input and output ports, respectively, may be controlled by sets of instructions for both the service processor and the host processor.
  • the TAP instructions for the service processor are: MBOXIN, MBOXINSETV, MBOXOUT, and MBOXOUTCLRV.
  • the MBOXIN instruction may be used by service processor 140 in order to effect a transfer of test data from output port 152 to mailbox input port 102.
  • Service processor 140 may execute the MBOXINSETV instruction responsive to the transfer of test data, thereby setting the valid bit in input register 112 in order to indicate to host processor 10 that valid data is present.
  • the MBOXOUT instruction may be executed in order to initiate a transfer of state data from host processor 10 to service processor 140.
  • the MBOXOUTCLRV instruction may be executed in order to clear the valid bit stored in output register 114.
  • Instructions executed by host processor 10 may include model specific register (MSR) reads and writes to the mnemonics UC_SPREG_MBOX_IN and UC_SPREG_MBOX_OUT.
  • MSR model specific register
  • UC_SPREG_MBOX_IN may initiate an access to mailbox input register 112 in order to retrieve test data from the register.
  • An MSR write to UC_SPREG_MBOX_IN may be used to clear the valid bit.
  • An MSR write to UC_SPREG_MBOX_OUT may initiate an access to mailbox output register 114 in order to deposit state data, or to set the valid bit.
  • An MSR read of UC_SPREG_MBOX_OUT may be used to detect that the valid bit is clear.
  • output register 162 and input register 164 of service processor 140 may be any shift register in the TAP between the TDI pin and the TDO pin that includes a sufficient number of bit positions to store the test/state data and at least one valid bit. It should also be noted that other embodiments of service processor 140 are possible and contemplated wherein test data is loaded and state data retrieved through mechanisms other than the TAP described above. In addition, for the purposes of this description, the terms service processor and debug processor may be interchangeable, as a debug processor may be substituted for a service processor and configured in accordance with the description herein.
  • Method 500 begins polling of the valid bit in the input register of a host processor (item 502). During polling, it is determined as to whether the valid bit is clear or set (item 504). If the valid bit is set, polling continues. A set valid bit may indicate that the input register of the host processor contains valid data that has not yet been retrieved.
  • the serial loading of test data may be through a TDI pin as discussed above. Other embodiments wherein the test data is loaded in parallel are possible and contemplated.
  • the output port of the service processor may transfer the data to the input register of the host processor (item 508) and set the valid bit (item 510).
  • the setting of the valid bit in the input register of the host processor may indicate to the processor that valid data is present and ready for retrieval.
  • the host processor may retrieve the test data and generate state data based on the test data (item 512).
  • the valid bit stored in the input register of the mailbox input port may be cleared by the host processor following the retrieval of the test data by the host processor.
  • Figure 5B is a flow diagram of one embodiment of a method for outputting state data from a host processor.
  • the state data may be generated in accordance with the method described in Figure 5A and the mechanisms described in Figures 1-4.
  • Method 550 begins with the polling of the valid bit of the output register of the host processor (item 552). Similar to the method described in reference to Figure 5 A, polling of the valid bit continues until the valid bit is determined to be clear (item 554). Once the valid bit is determined to be clear, the host processor may deposit state data into the output register of its mailbox output port (item 556). Following the loading of state data into the output register, the host processor sets the valid bit in the output register (Item 560).
  • the service processor may transfer the data and the valid bit in the Capture-DR state and then shift it from the input register (Item 562). If the transferred valid bit is set, the data is also then known to be valid. Responsive to the retrieval of the state data from the input register, the host processor valid bit may be cleared, thereby enabling additional state data to be sent from the host processor. It is important to note that the operations described in reference to Figure 5B may occur independently of those described in reference to Figure 5 A.
  • test data' used herein may refer to any type of data that may be input into host processor 10 in order to receive a desired response.
  • state data' may refer to any type of data that may be used to provide information concerning the operation of host processor 10.
  • loading of test data and/or the retrieval of state data may either be in response to individual queries of the processor, or may be an operation that is performed at regular intervals.
  • Alternative embodiments are also possible and contemplated wherein the specific order of polling the valid bits and transferring data may be different from that described herein.
  • This invention may generally be applicable to processors.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Advance Control (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Multi Processors (AREA)

Abstract

A method and apparatus for determining an internal state of a host processor. Test data may be loaded into an output port (152) of a service processor (140). The service processor (140) may poll a valid bit stored in the host processor (10). Upon determining that the valid bit is clear, the service processor (140) may transmit the test data to the host processor, and set the valid bit. State data may be generated responsive to the test data. The state data may be written into output port (104) of the host processor (10). The service processor (140) may receive the data from the output port (104) of the host processor (10). The operation of determining the state of the host processor (10) is performed without interrupting the execution of instructions in the host processor (10).

Description

TITLE: METHOD AND APPARATUS FOR DETERMINING A PROCESSOR STATE WITHOUT
INTERRUPTING PROCESSOR OPERATION
TECHNICAL FIELD
This invention relates to processors, and more particularly, a method and apparatus for determining the state of a processor.
BACKGROUND ART
During the design of new computer systems and system software, various techniques may be employed to determine how the various hardware mechanisms will behave during the execution of instructions by a system processor. One aspect of determining the behavior of system hardware involves the determination of processor states at various stages of program execution. Determining the processor state may involve querying the processor by sending it data. The data received by the processor may then be acted on and produce additional data indicative of the processor state. Such data may include the contents of registers, reservation stations, and so on. The additional data may then be transmitted from the processor for observation. Alternatively, a processor may be configured to periodically transmit data to an external source where the data may be used to determine a processor state or other information.
Various tools have been developed for querying a processor to determine the processor state. These tools may allow test data to be input to the processor, state data to be generated responsive to the processor receiving the test data, and the state data to be transmitted from the processor for observation. One such drawback to such tools involves the execution of instructions during the querying of the processor. Typically, such tools require that the operation of the processor be interrupted during the processor query. An instruction stream that is being executed by the processor may need to be interrupted in order to input the test data, generate the state data, and output the state data. Inputting test data and outputting state data may require the use of existing processor input and output ports, thereby interrupting the inputting and outputting of other data to or from the processor. Furthermore, the inputting of test data may result in the processor switching to an alternate service routine, which may result in the suspension of the currently executing instruction stream. These factors may make it difficult to ascertain the speed at which certain routines execute in the processor. Furthermore, the transition to an alternate service routine may result in the inability to determine the true processor state from the processor query.
DISCLOSURE OF INVENTION
A method and apparatus for determining the state of a host processor is disclosed. In one embodiment, a service processor may poll a valid bit stored in a register of a receiver in the host processor. Upon determining that the valid bit is clear, the service processor may load test data into an output register and transmit test data to the host processor, setting the valid bit upon completing the transmission. The test data may be retrieved from the register of tire receiver responsive to the host processor determining that the valid bit is set. State data, indicative of a state of the host processor, may be generated responsive to the test data. The host processor may poll a valid bit in a register of a transmitter in its output port, and may deposit data into the register of the transmitter responsive to detecting that the valid bit is clear. The data may then be transmitted to the receiver of the service processor, and the valid bit may be set in response to said transmitting. The operations of transmitting data to the host processor and retrieving data from the host processor may be performed without interrupting the execution of instructions. Furthermore, transmission and reception of data by the host processor may occur independently of each other.
In one embodiment, the host processor includes an input port and an output port. The input port of the host processor may be configured to be coupled to an output port of the service processor, while the output port may be configured to be coupled to an input port of the service processor. The input ports and output ports of both the host and service processors may each include a register configured to store a number of bits. Each register may be configured to store a valid bit that, when set, may indicate that the data stored is valid. The registers in the input ports may be configured such that they may only receive data when the valid bit is cleared. When data is transferred from an output port to an input port, the valid bit may be set in the register of the input port. Both the host processor and the service processor may be configured such that data may be retrieved from the register of their respective input ports responsive to detecting that the valid bit is set.
In one embodiment of the service processor, data may be loaded into the register of the output port or retrieved from the input port through a boundary scan test access port (TAP) which may conform to the IEEE 1149.1 standard. Data may be serially loaded into the register of the service processor output port through a test data in (TDI) pin. Similarly, data may be serially shifted out of the register in the service processor input port through a test data out (TDO) pin.
In various embodiments, the operation of the combinations of input ports and output ports may operate independently of one another. In other words, the output port of the service processor may transfer data to the input port of the host processor independently of any data transfers from the output port of the host processor to the input port of the service processor. Furthermore, in various embodiments, data may be transferred in regular intervals to or from the processor, or data may be transferred from the processor responsive to an individual query.
BRIEF DESCRIPTION OF DRAWINGS
Other aspects of the invention will become apparent upon reading the following detailed description and upon reference to the accompanying drawings in which:
Figure 1 is a block diagram of one embodiment of a processor;
Figure 2 is a block diagram of one embodiment of a system for determining the state of a processor;
Figure 3 is a block diagram of illustrating one embodiment of a host processor input port coupled to a service processor output port;
Figure 4 is a block diagram of one embodiment of a host processor output port coupled to a service processor input port;
Figure 5 A is a flow diagram of one embodiment of a method of querying a host processor; and
Figure 5B is a flow diagram of one embodiment of a method for outputting state data from a host processor.
While tire invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the drawings and description thereto are not intended to limit the invention to the particular form disclosed, but, on the contrary, the invention is to cover all modifications, equivalents, and alternatives falling with the spirit and scope of the present invention as defined by the appended claims. MODE(S) FOR CARRYING OUT THE INVENTION
Turning now to Figure 1, a block diagram of one embodiment of a processor 10 is shown. Other embodiments are possible and contemplated. As shown in Figure 1, processor 10 includes a prefetch/predecode unit 12, a branch prediction unit 14, an instruction cache 16, an instruction alignment unit 18, a plurality of decode units 20A-20C, a plurality of reservation stations 22A-22C, a plurality of functional units 24A-24C, a load/store unit 26, a data cache 28, a register file 30, a reorder buffer 32, an MROM unit 34, and a bus interface unit 37. Elements referred to herein with a particular reference number followed by a letter will be collectively referred to by the reference number alone. For example, decode units 20A-20C will be collectively referred to as decode units 20.
Prefetch/predecode unit 12 is coupled to receive instructions from bus interface unit 37, and is further coupled to instruction cache 16 and branch prediction unit 14. Similarly, branch prediction unit 14 is coupled to instruction cache 16. Still further, branch prediction unit 14 is coupled to decode units 20 and functional units 24. Instruction cache 16 is further coupled to MROM unit 34 and instruction alignment unit 18. Instruction alignment unit 18 is in turn coupled to decode units 20. Each decode unit 20A-20C is coupled to load/store unit 26 and to respective reservation stations 22A-22C. Reservation stations 22A-22C are further coupled to respective functional units 24A-24C. Additionally, decode units 20 and reservation stations 22 are coupled to register file 30 and reorder buffer 32. Functional units 24 are coupled to load/store unit 26, register file 30, and reorder buffer 32 as well. Data cache 28 is coupled to load/store unit 26 and to bus interface unit 37. Bus interface unit 37 is further coupled to an L2 interface to an L2 cache and a bus. Finally, MROM unit 34 is coupled to decode units 20.
Instruction cache 16 is a high speed cache memory provided to store instructions. Instructions are fetched from instruction cache 16 and dispatched to decode units 20. In one embodiment, instruction cache 16 is configured to store up to 64 kilobytes of instructions in a 2 way set associative structure having 64 byte lines (a byte comprises 8 binary bits). Alternatively, any other desired configuration and size may be employed. For example, it is noted that instruction cache 16 may be implemented as a fully associative, set associative, or direct mapped configuration.
Instructions are stored into instruction cache 16 by prefetch/predecode unit 12. Instructions may be prefetched prior to the request thereof from instruction cache 16 in accordance with a prefetch scheme. A variety of prefetch schemes may be employed by prefetch/predecode unit 12. As prefetch/predecode unit 12 transfers instructions to instruction cache 16, prefetch/predecode unit 12 may generate predecode data corresponding to the instructions. For example, in one embodiment, prefetch/predecode unit 12 generates three predecode bits for each byte of the instructions: a start bit, an end bit, and a functional bit. The predecode bits form tags indicative of the boundaries of each instruction. The predecode tags may also convey additional information such as whether a given instruction can be decoded directly by decode units 20 or whether the instruction is executed by invoking a microcode procedure controlled by MROM unit 34. Still further, prefetch/predecode unit 12 may be configured to detect branch instructions and to store branch prediction information corresponding to the branch instructions into branch prediction unit 14. Other embodiments may employ any suitable predecode scheme or no predecode, as desired.
One encoding of the predecode tags for an embodiment of processor 10 employing a variable byte length instruction set will next be described. A variable byte length instruction set is an instruction set in which different instructions may occupy differing numbers of bytes. An exemplary variable byte length instruction set employed by one embodiment of processor 10 is the x86 instruction set.
In the exemplary encoding, if a given byte is the first byte of an instruction, the start bit for that byte is set. If the byte is the last byte of an instruction, the end bit for that byte is set. Instructions which may be directly decoded by decode units 20 are referred to as "fast path" instructions. The remaining x86 instructions are referred to as MROM instructions, according to one embodiment. For fast path instructions, the functional bit is set for each prefix byte included in the instruction, and cleared for other bytes. Alternatively, for MROM instructions, the functional bit is cleared for each prefix byte and set for other bytes. The type of instruction may be determined by examining the functional bit corresponding to the end byte. If that functional bit is clear, the instruction is a fast path instruction. Conversely, if that functional bit is set, the instruction is an MROM instruction. The opcode of an instruction may thereby be located within an instruction which may be directly decoded by decode units 20 as the byte associated with the first clear functional bit in the instruction. For example, a fast path instruction including two prefix bytes, a Mod R/M byte, and an immediate byte would have start, end, and functional bits as follows:
Start bits 10000
End bits 00001
Functional bits 11000
MROM instructions are instructions which are determined to be too complex for decode by decode units 20. MROM instructions are executed by invoking MROM unit 34. More specifically, when an MROM instruction is encountered, MROM unit 34 parses and issues the instruction into a subset of defined fast path instructions to effectuate the desired operation. MROM unit 34 dispatches the subset of fast path instructions to decode units 20.
Processor 10 employs branch prediction in order to speculatively fetch instructions subsequent to conditional branch instructions. Branch prediction unit 14 is included to perform branch prediction operations. In one embodiment, branch prediction unit 14 employs a branch target buffer which caches up to two branch target addresses and corresponding taken/not taken predictions per 16 byte portion of a cache line in instruction cache 16. The branch target buffer may, for example, comprise 2048 entries or any other suitable number of entries. Prefetch/predecode unit 12 determines initial branch targets when a particular line is predecoded. Subsequent updates to the branch targets corresponding to a cache line may occur due to the execution of instructions within the cache line. Instruction cache 16 provides an indication of the instruction address being fetched, so that branch prediction unit 14 may determine which branch target addresses to select for forming a branch prediction. Decode units 20 and functional units 24 provide update information to branch prediction unit 14. Decode units 20 detect branch instructions which were not predicted by branch prediction unit 14. Functional units 24 execute the branch instructions and determine if the predicted branch direction is incorrect. The branch direction may be "taken", in which subsequent instructions are fetched from the target address of the branch instruction. Conversely, the branch direction may be "not taken", in which subsequent instructions are fetched from memory locations consecutive to the branch instruction. When a mispredicted branch instruction is detected, instructions subsequent to the mispredicted branch are discarded from the various units of processor 10. In an alternative configuration, branch prediction unit 14 may be coupled to reorder buffer 32 instead of decode units 20 and functional units 24, and may receive branch misprediction information from reorder buffer 32. A variety of suitable branch prediction algorithms may be employed by branch prediction unit 14.
Instructions fetched from instruction cache 16 are conveyed to instruction alignment unit 18. As instructions are fetched from instruction cache 16, the corresponding predecode data is scanned to provide information to instruction alignment unit 18 (and to MROM unit 34) regarding the instructions being fetched. Instruction alignment unit 18 utilizes the scanning data to align an instruction to each of decode units 20. In one embodiment, instruction alignment unit 18 aligns instructions from three sets of eight instruction bytes to decode units 20. Decode unit 20A receives an instruction which is prior to instructions concurrently received by decode units 20B and 20C (in program order). Similarly, decode unit 20B receives an instruction which is prior to the instruction concurrently received by decode unit 20C in program order. In some embodiments, (e.g. embodiments employing fixed-length instruction sets), the instruction alignment unit 18 may be eliminated.
Decode units 20 are configured to decode instructions received from instruction alignment unit 18. Register operand information is detected and routed to register file 30 and reorder buffer 32. Additionally, if the instructions require one or more memory operations to be performed, decode units 20 dispatch the memory operations to load/store unit 26. Each instruction is decoded into a set of control values for functional units 24, and these control values are dispatched to reservation stations 22 along with operand address information and displacement or immediate data which may be included with the instruction. In one particular embodiment, each instruction is decoded into up to two operations which may be separately executed by functional units 24A-24C.
Processor 10 supports out of order execution, and thus employs reorder buffer 32 to keep track of the original program sequence for register read and write operations, to implement register renaming, to allow for speculative instruction execution and branch misprediction recovery, and to facilitate precise exceptions. A temporary storage location within reorder buffer 32 is reserved upon decode of an instruction that involves the update of a register to thereby store speculative register states. If a branch prediction is incorrect, the results of speculatively-executed instructions along the mispredicted path can be invalidated in the buffer before they are written to register file 30. Similarly, if a particular instruction causes an exception, instructions subsequent to the particular instruction may be discarded. In this manner, exceptions are "precise" (i.e. instructions subsequent to the particular instruction causing the exception are not completed prior to the exception). It is noted that a particular instruction is speculatively executed if it is executed prior to instructions which precede the particular instruction in program order. Preceding instructions may be a branch instruction or an exception-causing instruction, in which case the speculative results may be discarded by reorder buffer 32.
The decoded instructions provided at the outputs of decode units 20 are routed directly to respective reservation stations 22. In one embodiment, each reservation station 22 is capable of holding instruction information (e.g. decoded instructions as well as operand values, operand tags and/or immediate data) for up to six pending instructions awaiting issue to the corresponding functional unit. It is noted that for the embodiment of Figure 1, each reservation station 22 is associated with a dedicated functional unit 24. Accordingly, three dedicated "issue positions" are formed by reservation stations 22 and functional units 24. In other words, issue position 0 is formed by reservation station 22A and functional unit 24A. Instructions aligned and dispatched to reservation station 22A are executed by functional unit 24A. Similarly, issue position 1 is formed by reservation station 22B and functional unit 24B; and issue position 2 is formed by reservation station 22C and functional unit 24C.
Upon decode of a particular instruction, if a required operand is a register location, register address information is routed to reorder buffer 32 and register file 30 simultaneously. The register file 30 comprises storage locations for each of the architected registers included in the instruction set implemented by the processor 10. Additional storage locations may be included within register file 30 for use by MROM unit 34. Reorder buffer 32 contains temporary storage locations for results which change the contents of these registers to thereby allow out of order execution. A temporary storage location of reorder buffer 32 is reserved for each instruction which, upon decode, is determined to modify the contents of one of the real registers. Therefore, at various points during execution of a particular program, reorder buffer 32 may have one or more locations which contain the speculatively executed contents of a given register. If following decode of a given instruction it is determined that reorder buffer 32 has a previous location or locations assigned to a register used as an operand in the given instruction, the reorder buffer 32 forwards to the corresponding reservation station either: 1) the value in the most recently assigned location, or 2) a tag for the most recently assigned location if the value has not yet been produced by the functional unit that will eventually execute the previous instruction. If reorder buffer 32 has a location reserved for a given register, the operand value (or reorder buffer tag) is provided from reorder buffer 32 rather than from register file 30. If there is no location reserved for a required register in reorder buffer 32, the value is taken directly from register file 30. If the operand corresponds to a memory location, the operand value is provided to the reservation station through load/store unit 26.
In one particular embodiment, reorder buffer 32 is configured to store and manipulate concurrently decoded instructions as a unit. This configuration will be referred to herein as "line-oriented". By manipulating several instructions together, the hardware employed within reorder buffer 32 may be simplified. For example, a line-oriented reorder buffer included in the present embodiment allocates storage sufficient for instruction information pertaining to three instructions (one from each decode unit 20) whenever one or more instructions are dispatched by decode units 20. By contrast, a variable amount of storage is allocated in conventional reorder buffers, dependent upon the number of instructions actually dispatched. A comparatively larger number of logic gates may be required to allocate the variable amount of storage. When each of the concurrently decoded instructions has executed, the instruction results are stored into register file 30 simultaneously. The storage is then free for allocation to another set of concurrently decoded instructions. Additionally, the amount of control logic circuitry employed per instruction is reduced because the control logic is amortized over several concurrently decoded instructions. A reorder buffer tag identifying a particular instruction may be divided into two fields: a line tag and an offset tag. The line tag identifies the set of concurrently decoded instructions including the particular instruction, and the offset tag identifies which instruction within the set corresponds to the particular instruction. It is noted that storing instruction results into register file 30 and freeing the corresponding storage is referred to as "retiring" the instructions. It is further noted that any reorder buffer configuration may be employed in various embodiments of processor 10.
As noted earlier, reservation stations 22 store instructions until the instructions are executed by the corresponding functional unit 24. An instruction is selected for execution if: (i) the operands of the instruction have been provided; and (ii) the operands have not yet been provided for instructions which are within the same reservation station 22A-22C and which are prior to the instruction in program order. It is noted that when an instruction is executed by one of the functional units 24, the result of that instruction is passed directly to any reservation stations 22 that are waiting for that result at the same time the result is passed to update reorder buffer 32 (this technique is commonly referred to as "result forwarding"). An instruction may be selected for execution and passed to a functional unit 24A-24C during the clock cycle that the associated result is forwarded. Reservation stations 22 route the forwarded result to the functional unit 24 in this case. In embodiments in which instructions may be decoded into multiple operations to be executed by functional units 24, the operations may be scheduled separately from each other
In one embodiment, each of the functional units 24 is configured to perform integer arithmetic operations of addition and subtraction, as well as shifts, rotates, logical operations, and branch operations. The operations are performed in response to the control values decoded for a particular instruction by decode units 20. It is noted that a floating point unit (not shown) may also be employed to accommodate floating point operations. The floating point unit may be operated as a coprocessor, receiving instructions from MROM unit 34 or reorder buffer 32 and subsequently communicating with reorder buffer 32 to complete the instructions. Additionally, functional units 24 may be configured to perform address generation for load and store memory operations performed by load/store unit 26. In one particular embodiment, each functional unit 24 may comprise an address generation unit for generating addresses and an execute unit for performing the remaining functions. The two units may operate independently upon different instructions or operations during a clock cycle.
Each of the functional units 24 also provides information regarding the execution of conditional branch instructions to the branch prediction unit 14. If a branch prediction was incorrect, branch prediction unit 14 flushes instructions subsequent to the mispredicted branch that have entered the instruction processing pipeline, and causes fetch of the required instructions from instruction cache 16 or main memory. It is noted that in such situations, results of instructions in the original program sequence which occur after the mispredicted branch instruction are discarded, including those which were speculatively executed and temporarily stored in load/store unit 26 and reorder buffer 32. It is further noted that branch execution results may be provided by functional units 24 to reorder buffer 32, which may indicate branch mispredictions to functional units 24.
Results produced by functional units 24 are sent to reorder buffer 32 if a register value is being updated, and to load/store unit 26 if the contents of a memory location are changed. If the result is to be stored in a register, reorder buffer 32 stores the result in the location reserved for the value of the register when the instruction was decoded. A plurality of result buses 38 are included for forwarding of results from functional units 24 and load/store unit 26. Result buses 38 convey the result generated, as well as the reorder buffer tag identifying the instruction being executed.
Load/store unit 26 provides an interface between functional units 24 and data cache 28. In one embodiment, load/store unit 26 is configured with a first load/store buffer having storage locations for data and address information for pending loads or stores which have not accessed data cache 28 and a second load/store buffer having storage locations for data and address information for loads and stores which have accessed data cache 28. For example, the first buffer may comprise 12 locations and the second buffer may comprise 32 locations. Decode units 20 arbitrate for access to the load/store unit 26. When the first buffer is full, a decode unit must wait until load/store unit 26 has room for the pending load or store request information. Load/store unit 26 also performs dependency checking for load memory operations against pending store memory operations to ensure that data coherency is maintained. A memory operation is a transfer of data between processor 10 and the main memory subsystem (although the transfer may be accomplished in the data cache 28). Memory operations may be the result of an instruction which utilizes an operand stored in memory, or may be the result of a load/store instruction which causes the data transfer but no other operation.
Data cache 28 is a high speed cache memory provided to temporarily store data being transferred between load/store unit 26 and the main memory subsystem. In one embodiment, data cache 28 has a capacity of storing up to 64 kilobytes of data in an two way set associative structure. It is understood that data cache 28 may be implemented in a variety of specific memory configurations, including a set associative configuration, a fully associative configuration, a direct-mapped configuration, and any suitable size of any other configuration.
Bus interface unit 37 is configured to communicate between processor 10 and other components in a computer system via a bus. For example, the bus may be compatible with the EV-6 bus developed by Digital Equipment Corporation. Alternatively, any suitable interconnect structure may be used including packet-based, unidirectional or bi-directional links, etc. An optional L2 cache interface may be employed as well for interfacing to a level two cache.
It is noted that, while the embodiment of Figure 1 is a superscalar implementation, other embodiments may employ scalar implementations. Furthermore, the number of functional units may be varied from embodiment to embodiment. Other embodiments may use a centralized reservation station rather than the individual reservation stations shown in Figure 1. Furthermore, other embodiments may employ a central scheduler rather than the reservation stations and reorder buffer shown in Figure 1.
Processor 10 may include a port, shown here as mailbox port 100, which allows it to be queried during the execution of an instruction stream. Mailbox port 100 may be configured to be coupled to a service processor or a debug processor that is external to processor 10. Test data, used for querying a state of processor 10 may be received through mailbox port 100. Similarly, state data, indicative of the state of processor 10 resulting from the query may be transmitted from mailbox port 100 to the service processor or debug processor. Mailbox port 100 may be coupled to one or more units of processor 10, such as decode units 20A-20C, register file 30, instruction cache 16, functional units 24A-24C, and so on. Information may be sent or received from mailbox port 100.
Moving now to Figure 2, a block diagram of one embodiment of a system for determining the state of a processor is shown. In the embodiment shown, processor 10, hereafter host processor 10, may be coupled to service processor 140. In some embodiments, service processor 140 may be located in another computer system that may be coupled to a computer system in which host processor 10 is implemented. In other embodiments, service processor 140 may be located on a board inserted into a peripheral slot of the computer system in which host processor 10 is located, or may even be mounted to the same board as host processor 10.
As previously noted, host processor 10 includes a mailbox port 100. Mailbox port 100 may include mailbox input port 102 and mailbox output port 104. Mailbox input port 102 may be configured to be coupled to a complementary output port 152 of service processor 140. Similarly, mailbox output port 104 may be configured to be coupled to a complementary input port 154 of service processor 140.
Mailbox input port 102 of host processor 10 may receive test data transmitted from service processor 140. The test data may be transmitted from output port 152 of service processor 140 to mailbox input port 102 of host processor 10. Similarly, service processor 140 may be configured to receive state data from host processor 10. The state data may be transmitted from mailbox output port 104 of host processor 10 to input port 154 of service processor 140. Each of the complementary pairs of input output ports may function independently of one another. In other words, output port 152 may transmit test data to mailbox input port 102 independently of any transmissions of state data from mailbox output port 104 to input port 154.
Test data may be serially loaded into a output port 152 of service processor 140 through a test data in (TDI) pin, which may be part of a test access port (TAP). The test access port may be a boundary scan port that is in compliance with IEEE standard 1149.1. Similarly, state data may be serially shifted from input port 154 through a test data out (TDO) pin. Additional details of loading test data and unloading state data from service processor 140 will be discussed below.
Turning now to Figure 3, a block diagram of illustrating one embodiment of a host processor input port coupled to a service processor output port. In the embodiment shown, mailbox input port 102 of host processor 10 is coupled to mailbox output port 152 of service processor 140. Mailbox input port 102 includes input register 112. Input register 112 is configured to receive and store test data. The test data may be received from output register 162 located in output port 152. Both output register 162 and input register 112 may be of various sizes. In one embodiment, both output register 162 and input register 112 are configured to store 32 bits of data and one valid bit. Other embodiments having different register sizes, as well as multiple registers (for both mailbox input ports and both mailbox output ports), are possible and contemplated.
In order to determine the state of host processor 10, the valid bit of input register 112 must be queried, followed by the loading of test data into output register 162. As previously noted, data may be loaded into mailbox output port 152 through a boundary scan TAP that complies with the IEEE 1149.1 standard. In the embodiment shown, output register 162 is coupled to a TDI pin. Test data may be serially shifted into output register 162 through the TDI pin. In addition to the test data, a valid bit may also be set in the output register through the TDI pin.
In order to transmit the test data to input register 112, it may be first necessary to poll the valid bit to make sure it is clear. Since this bit is in the host processor's clock domain, it must first be synchronized to the service processor clock domain. The synchronized version of the valid bit is captured into output register 162 and serially shifted out for examination. While the valid bit is being serially shifted out for examination, test data may be serially loaded into output register 162.
If during the polling of the valid bit of input register 112 it is determined that the valid bit is set, it may be an indication that test data has been loaded into mailbox input port 102 but has not been retrieved by host processor 10. Thus, the loading of test data into output register 162 and its subsequent transfer to input register 112 may be inhibited while this valid bit is set. Upon retrieval of the test data, the valid bit may be cleared from input register 112 by the host processor. Responsive to detecting that the valid bit stored in input register 112 is clear, output port 152 may initiate transfer of the test data to input register 112. In this embodiment, a separate TAP instruction is used to set the valid bit. Using this instruction causes a synchronized load of the data from output register 162 to input register 112 (See 'A' in Figure 3).
A processor core of host processor 10 may also poll the valid bit in input register 112. Upon detecting the setting of the valid bit indicating the successful loading of test data into input register 112, the processor core may retrieve the test data. The test data may then be used to generate state data to be transmitted back to the service processor, as will be discussed in further detail below.
The protocol for transmission and reception between input ports and output ports may be the same for both host processor 10 and service processor 140. Table 1 below illustrates the protocol for one embodiment of an input port/output port combination.
Table 1
In general, a transmitter in the system (i.e. an output port) must poll the host processor valid bit prior to transmitting data to a receiver. Upon detecting the host processor valid bit to be clear, data may be deposited into the output register and transferred to the input register of the receiver. Successful transfer of the data from the transmitter to the receiver may be indicated by the setting of the valid bit in the input register. A receiver in the system (i.e. an input port) may poll the host processor valid bit until it is set. The setting of the host processor valid bit indicates that valid data is present in the input register, thus allowing the receiver to retrieve the data. Following the retrieval of data, the host processor's valid bit may be cleared.
In various embodiments, the receiver in the service processor may periodically shift data from its input register and examine the valid bit subsequent to said shifting (as the valid bit is part of the data shifted out) in order to determine whether the data is valid.
Figure 4 is a block diagram of one embodiment of a host processor output port coupled to a service processor input port. In the embodiment shown, mailbox output port 104 of host processor 10 is coupled to input port 154 of service processor 140. Mailbox output port 104 includes an output register 114, which is configured to store state data received from the processor core of host processor 10. The state data received into output register 114 may be generated responsive to previously input test data. Mailbox output port includes a output register 114, while input port 154 includes a input register 164.
Prior to any transfers of data to output register 114, it is necessary to poll the valid bit stored in output register 114 to determine if it is clear. Upon determining that the valid bit is clear, mailbox output port 104 may deposit state data into output register 114 and subsequently set the valid bit in output register 114. The transfer of data to input register 164 is initiated by service processor 140. This is done in the Capture-DR state of the TAP controller. Once the state data and valid bit have been transferred to input register 164, the valid bit may be examined and the data may be retrieved by shifting it out through the test data out (TDO) pin. If the valid bit is set, service processor 140 determines that the data that has been shifted out along with the valid bit is viable (i.e. valid data).
The transfers of data to and from the mailbox input and output ports, respectively, may be controlled by sets of instructions for both the service processor and the host processor. For one embodiment, the TAP instructions for the service processor are: MBOXIN, MBOXINSETV, MBOXOUT, and MBOXOUTCLRV. The MBOXIN instruction may be used by service processor 140 in order to effect a transfer of test data from output port 152 to mailbox input port 102. Service processor 140 may execute the MBOXINSETV instruction responsive to the transfer of test data, thereby setting the valid bit in input register 112 in order to indicate to host processor 10 that valid data is present. The MBOXOUT instruction may be executed in order to initiate a transfer of state data from host processor 10 to service processor 140. The MBOXOUTCLRV instruction may be executed in order to clear the valid bit stored in output register 114.
Instructions executed by host processor 10 may include model specific register (MSR) reads and writes to the mnemonics UC_SPREG_MBOX_IN and UC_SPREG_MBOX_OUT. An MSR read of
UC_SPREG_MBOX_IN may initiate an access to mailbox input register 112 in order to retrieve test data from the register. An MSR write to UC_SPREG_MBOX_IN may be used to clear the valid bit. An MSR write to UC_SPREG_MBOX_OUT may initiate an access to mailbox output register 114 in order to deposit state data, or to set the valid bit. An MSR read of UC_SPREG_MBOX_OUT may be used to detect that the valid bit is clear. ' It should be noted that the mnemonics associated with the various instructions are exemplary for one particular embodiment. Embodiments having other mnemonics to describe the particular instructions used with the input and output ports are possible and contemplated.
It should be noted that output register 162 and input register 164 of service processor 140 may be any shift register in the TAP between the TDI pin and the TDO pin that includes a sufficient number of bit positions to store the test/state data and at least one valid bit. It should also be noted that other embodiments of service processor 140 are possible and contemplated wherein test data is loaded and state data retrieved through mechanisms other than the TAP described above. In addition, for the purposes of this description, the terms service processor and debug processor may be interchangeable, as a debug processor may be substituted for a service processor and configured in accordance with the description herein.
Moving now to Figure 5A a flow diagram of one embodiment of a method of querying a host processor is shown. Method 500 begins polling of the valid bit in the input register of a host processor (item 502). During polling, it is determined as to whether the valid bit is clear or set (item 504). If the valid bit is set, polling continues. A set valid bit may indicate that the input register of the host processor contains valid data that has not yet been retrieved. The serial loading of test data may be through a TDI pin as discussed above. Other embodiments wherein the test data is loaded in parallel are possible and contemplated. Following the loading of test data into the output register, the output port of the service processor may transfer the data to the input register of the host processor (item 508) and set the valid bit (item 510). The setting of the valid bit in the input register of the host processor may indicate to the processor that valid data is present and ready for retrieval. Responsive to detecting the setting of the valid bit, the host processor may retrieve the test data and generate state data based on the test data (item 512). The valid bit stored in the input register of the mailbox input port may be cleared by the host processor following the retrieval of the test data by the host processor.
Figure 5B is a flow diagram of one embodiment of a method for outputting state data from a host processor. The state data may be generated in accordance with the method described in Figure 5A and the mechanisms described in Figures 1-4. Method 550 begins with the polling of the valid bit of the output register of the host processor (item 552). Similar to the method described in reference to Figure 5 A, polling of the valid bit continues until the valid bit is determined to be clear (item 554). Once the valid bit is determined to be clear, the host processor may deposit state data into the output register of its mailbox output port (item 556). Following the loading of state data into the output register, the host processor sets the valid bit in the output register (Item 560). The service processor may transfer the data and the valid bit in the Capture-DR state and then shift it from the input register (Item 562). If the transferred valid bit is set, the data is also then known to be valid. Responsive to the retrieval of the state data from the input register, the host processor valid bit may be cleared, thereby enabling additional state data to be sent from the host processor. It is important to note that the operations described in reference to Figure 5B may occur independently of those described in reference to Figure 5 A.
It should be noted that the term 'test data' used herein may refer to any type of data that may be input into host processor 10 in order to receive a desired response. Similarly, the term 'state data' may refer to any type of data that may be used to provide information concerning the operation of host processor 10. In addition, it should also be noted that the loading of test data and/or the retrieval of state data may either be in response to individual queries of the processor, or may be an operation that is performed at regular intervals. Alternative embodiments are also possible and contemplated wherein the specific order of polling the valid bits and transferring data may be different from that described herein.
While the present invention has been described with reference to particular embodiments, it will be understood that the embodiments are illustrative and that the invention scope is not so limited. Any variations, modifications, additions, and improvements to the embodiments described are possible. These variations, modifications, additions, and improvements may fall within the scope of the inventions as detailed within the following claims.
INDUSTRIAL APPLICABILITY
This invention may generally be applicable to processors.

Claims

WHAT IS CLAIMED IS:
1. A method for determining a state of a host processor, the method comprising: polling a first valid bit in a first input register, the first input register located in the host processor, until the first valid bit is clear (502); loading test data into a first output register, the first output register located in a service processor (506); transmitting the test data from the first output register to the first input register (508); setting the first valid bit upon completing said transmitting (510); and retrieving the test data from the first input register responsive to detecting the setting of the first valid bit
(512); wherein said loading, said polling, said transmitting, said setting, and said retrieving does not interrupt an instruction stream executing in the host processor.
2. The method as recited in claim 1 further comprising: determining a host processor state based on said test data; and outputting state data to said service processor, the state data indicative of a host processor state, wherein said determining and said outputting are performed asynchronously with respect to the host processor clock.
3. The method as recited in claim 2, wherein said outputting includes: polling a second valid bit in a second output register until the second valid bit is clear, the second output register located in the host processor (552); loading state data into the second output register (556); transmitting the state data from the second output register to a second input register, the second input register located in the service processor (558); and outputting the state data from the second input register (562).
4. The method as recited in claim 3, wherein the first valid bit is cleared responsive to said retrieving the test data.
5. The method as recited in claim 3, wherein the second valid bit is set following the loading of the second input register.
6. A system comprising: a host processor (10) and a service processor (140), wherein the host processor and service processor include a first input register (102) and a first output register (152), respectively, and wherein the host processor and service processor further include a second output register (104) and a second input register (154), respectively; wherein the service processor is configured for determining the state of the host processor, said determining comprising: polling a first valid bit in the first input register until the first valid bit is clear; loading test data into the first output register; transmitting the test data from the first output register to the first input register; setting the first valid bit upon completing said transmitting; wherein the host processor is configured to, responsive to said setting the first valid bit, retrieve the test data from the first input register; and wherein said loading, said polling, said transmitting, said setting, and said retrieving does not interrupt an instruction stream executing in the host processor.
7. The system as recited in claim 6, wherein the host processor is further configured to: determine a host processor state based on said test data; and output state data to said service processor, the state data indicative of a host processor state, wherein said determining and said outputting are performed asynchronously with respect to the host processor clock.
8. The system as recited in claim 7, wherein the host processor is further configured to: poll a second valid bit in the second output register until the second valid bit is clear; deposit state data in the second output register; transmit the state data from the second output register to the second input register; and wherein the service processor is configured to output the state data received by the second input register.
9. The system as recited in claim 8, wherein the host processor is configured to clear the first valid bit responsive to retrieving the test data.
10. The system as recited in claim 8, wherein the host processor is configured to set the second valid bit responsive to depositing state data in the second output register.
EP03764379A 2002-07-11 2003-07-09 Method and apparatus for determining a processor state without interrupting processor operation Withdrawn EP1576475A2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US19383602A 2002-07-11 2002-07-11
US193836 2002-07-11
PCT/US2003/021288 WO2004008319A2 (en) 2002-07-11 2003-07-09 Method and apparatus for determining a processor state without interrupting processor operation

Publications (1)

Publication Number Publication Date
EP1576475A2 true EP1576475A2 (en) 2005-09-21

Family

ID=30114619

Family Applications (1)

Application Number Title Priority Date Filing Date
EP03764379A Withdrawn EP1576475A2 (en) 2002-07-11 2003-07-09 Method and apparatus for determining a processor state without interrupting processor operation

Country Status (6)

Country Link
EP (1) EP1576475A2 (en)
JP (1) JP2006514349A (en)
CN (1) CN1669004A (en)
AU (1) AU2003261128A1 (en)
TW (1) TW200401194A (en)
WO (1) WO2004008319A2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201018678A (en) 2006-01-27 2010-05-16 Astrazeneca Ab Novel heteroaryl substituted benzothiazoles
TW200813035A (en) 2006-06-19 2008-03-16 Astrazeneca Ab Novel heteroaryl substituted benzoxazoles
TW200901998A (en) 2007-03-06 2009-01-16 Astrazeneca Ab Novel 2-heteroaryl substituted benzothiophenes and benzofuranes
CN102621483B (en) * 2012-03-27 2014-04-16 中国人民解放军国防科学技术大学 Multi-link parallel boundary scanning testing device and method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69415600T2 (en) * 1993-07-28 1999-07-15 Koninklijke Philips Electronics N.V., Eindhoven Microcontroller with hardware troubleshooting support based on the boundary scan method
US5444716A (en) * 1993-08-30 1995-08-22 At&T Corp. Boundary-scan-based system and method for test and diagnosis
US6115763A (en) * 1998-03-05 2000-09-05 International Business Machines Corporation Multi-core chip providing external core access with regular operation function interface and predetermined service operation services interface comprising core interface units and masters interface unit

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See references of WO2004008319A3 *

Also Published As

Publication number Publication date
WO2004008319A2 (en) 2004-01-22
TW200401194A (en) 2004-01-16
JP2006514349A (en) 2006-04-27
AU2003261128A1 (en) 2004-02-02
WO2004008319A3 (en) 2004-05-21
AU2003261128A8 (en) 2004-02-02
CN1669004A (en) 2005-09-14

Similar Documents

Publication Publication Date Title
EP1228426B1 (en) Store buffer which forwards data based on index and optional way match
US6381689B2 (en) Line-oriented reorder buffer configured to selectively store a memory operation result in one of the plurality of reorder buffer storage locations corresponding to the executed instruction
JP3871884B2 (en) Mechanism for memory-to-load transfers
US5748978A (en) Byte queue divided into multiple subqueues for optimizing instruction selection logic
US6189089B1 (en) Apparatus and method for retiring instructions in excess of the number of accessible write ports
EP1224557B1 (en) Store to load forwarding using a dependency link file
US6065103A (en) Speculative store buffer
US5822575A (en) Branch prediction storage for storing branch prediction information such that a corresponding tag may be routed with the branch instruction
US6167507A (en) Apparatus and method for floating point exchange dispatch with reduced latency
US5961634A (en) Reorder buffer having a future file for storing speculative instruction execution results
US6085311A (en) Instruction alignment unit employing dual instruction queues for high frequency instruction dispatch
EP1204022A1 (en) A line-oriented reorder buffer for a superscalar microprocessor
EP1230592B1 (en) Method and apparatus for performing calculations on narrow operands
US5983342A (en) Superscalar microprocessor employing a future file for storing results into multiportion registers
US20070033385A1 (en) Call return stack way prediction repair
US5870579A (en) Reorder buffer including a circuit for selecting a designated mask corresponding to an instruction that results in an exception
US5878244A (en) Reorder buffer configured to allocate storage capable of storing results corresponding to a maximum number of concurrently receivable instructions regardless of a number of instructions received
US5920710A (en) Apparatus and method for modifying status bits in a reorder buffer with a large speculative state
US5813045A (en) Conditional early data address generation mechanism for a microprocessor
US6237082B1 (en) Reorder buffer configured to allocate storage for instruction results corresponding to predefined maximum number of concurrently receivable instructions independent of a number of instructions received
US5903741A (en) Method of allocating a fixed reorder buffer storage line for execution results regardless of a number of concurrently dispatched instructions
EP1012708B1 (en) A line-oriented reorder buffer for a superscalar microprocessor
EP1576475A2 (en) Method and apparatus for determining a processor state without interrupting processor operation
US6061775A (en) Apparatus and method for predicting a first microcode instruction of a cache line and using predecode instruction data to identify instruction boundaries and types
WO1999008185A1 (en) A dependency table for reducing dependency checking hardware

Legal Events

Date Code Title Description
PUAI Public reference made under article 153(3) epc to a published international application that has entered the european phase

Free format text: ORIGINAL CODE: 0009012

17P Request for examination filed

Effective date: 20050208

AK Designated contracting states

Kind code of ref document: A2

Designated state(s): AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LI LU MC NL PT RO SE SI SK TR

AX Request for extension of the european patent

Extension state: AL LT LV MK

DAX Request for extension of the european patent (deleted)
RBV Designated contracting states (corrected)

Designated state(s): DE FR GB

RIC1 Information provided on ipc code assigned before grant

Ipc: 7G 06F 11/267 A

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN

18D Application deemed to be withdrawn

Effective date: 20070201