# US 11,119,149 B2 · Debug command execution using existing datapath circuitry

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,119,149 B2
- Document ID: US11119149B2
- Status: Granted
- Kind: B2
- Application number: 16/264,039
- Filed: 2019-01-31
- Published: 2020-06-04
- Granted: 2021-09-14
- Earliest claimed: 2018-11-30
- Assignees: Western Digital Technologies, Inc.
- Applicants: Western Digital Technologies, Inc.
- Inventors: Deepak Panwar; Muhammad Tauseef Rab; Robert T. Golla; Matthew B. Smittle
- Web page: https://patentgrep.com/patent/US11119149B2

## CPC

- G01R 31/31705: {Debugging aspects, e.g. using test circuits for debugging, using dedicated debugging test circuits (generation of test sequences therefor G01R31/31835, using scan test therefor G01R31/318544)}
- G06F 11/2236: {to test CPU or processors}
- G06F 9/30029: {Logical and Boolean instructions, e.g. XOR, NOT}
- G06F 9/30141: {Implementation provisions of register files, e.g. ports}
- G06F 11/263: Generation of test inputs, e.g. test vectors, patterns or sequences {; with adaptation of the tested hardware for testability with external testers}
- G01R: MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES (indicating correct tuning of resonant circuits H03J3/12)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques are disclosed relating to using non-debug path circuitry to perform debug commands. In some embodiments, an apparatus includes a processor core that includes path circuitry configured to access data for instructions executed by the processor core and storage elements which the path circuitry is configured to access via one or more ports. In some embodiments, the apparatus includes debug circuitry configured to receive external debug inputs and send abstract commands to the processor core based on the external debug inputs. In some embodiments, the apparatus includes control circuitry in the processor core configured to, in response to an abstract command to access one or more of the storage elements: generate signaling to access the one or more storage elements using the path circuitry, access read data from the one or more storage elements based on the signaling, and transmit the accessed read data to the debug circuitry.

## Claims

### Claim 1

An apparatus, comprising:
a processor core that includes:
control circuitry;
path circuitry configured to access data for instructions executed by the processor core;
a plurality of storage elements, wherein the path circuitry is configured to access the storage elements via a port; and
intercept circuitry configured to intercept, between the port and the path circuitry, data accessed from the storage elements and provide the intercepted data to the control circuitry; and
debug circuitry configured to receive external debug inputs and send abstract commands to the processor core based on the external debug inputs;
wherein the control circuitry is configured to, in response to an abstract command to access one or more of the storage elements:
generate an instruction that causes data to be read from one or more of the plurality of storage elements such that the read data proceeds to the path circuitry and the intercept circuitry, wherein the path circuitry is configured to execute the instruction to process the read data and the execution does not change the architectural state of the processor core;
access, via the intercept circuitry, the read data based on the execution of the instruction; and
transmit the accessed read data to the debug circuitry.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the one or more storage elements include one or more general purpose registers and the instruction is an OR instruction that specifies a logical OR of logical zeros with the contents of the one or more general purpose registers.

### Claim 3 (depends on 1)

The apparatus of claim 1, wherein the one or more storage elements include one or more control status registers and the instruction is an instruction that transfers a value between the one or more control status registers and one or more other registers.

### Claim 4 (depends on 3)

The apparatus of claim 3, wherein the instruction that transfers the value is a RISC-V csrrs or csrrw instruction.

### Claim 5 (depends on 1)

The apparatus of claim 1, wherein the control circuitry is further configured to:
insert write data from the debug circuitry for storage in the one or more storage elements.

### Claim 6 (depends on 1)

The apparatus of claim 1, wherein the one or more storage elements include memory and the control circuitry is further configured to issue a direct memory access (DMA) command to DMA circuitry of the apparatus based on an abstract command.

### Claim 7 (depends on 6)

The apparatus of claim 6, wherein the control circuitry is further configured to send a request to the DMA circuitry to stop accepting requests and to wait to send the DMA command until the DMA circuitry sends a ready signal.

### Claim 8

A method, comprising:
receiving, by debug circuitry of a processor, external debug inputs;
sending, by the debug circuitry, abstract commands to a processor core based on the external debug inputs, wherein the processor core includes:
control circuitry;
a plurality of storage elements,
path circuitry that accesses data for instructions executed by the processor core, including accessing the storage elements via one or more ports; and
intercept circuitry that intercepts, between the port and the path circuitry, data accessed from the storage elements and provides the intercepted data to the control circuitry;
generating, by the control circuitry in response to an abstract command to access one or more of the storage elements, an instruction that causes data to be read from one or more of the plurality of storage elements such that the read data proceeds to the path circuitry and the intercept circuitry;
executing, by the path circuitry, the instruction to process the read data, wherein the executing does not change the architectural state of the processor core;
accessing, by the control circuitry via the intercept circuitry, the read data based the execution of the instruction; and
transmitting the accessed read data to the debug circuitry.

### Claim 9 (depends on 8)

The method of claim 8, wherein the instruction is an OR instruction that specifies a logical OR of logical zeros with the contents of one or more general purpose registers.

### Claim 10 (depends on 8)

The method of claim 8, wherein the instruction transfers a value between one or more control status registers and one or more other registers.

### Claim 11 (depends on 8)

The method of claim 8, further comprising:
inserting write data from the debug circuitry for storage in the one or more storage elements.

### Claim 12

A non-transitory computer readable storage medium having stored thereon design information that specifies a design of at least a portion of a hardware integrated circuit in a format recognized by a semiconductor fabrication system that is configured to use the design information to produce the circuit according to the design, including:
a processor core that includes:
control circuitry;
path circuitry configured to access data for instructions executed by the processor core;
a plurality of storage elements, wherein the path circuitry is configured to access the storage elements via a port; and
intercept circuitry configured to intercept, between the port and the path circuitry, data accessed from the storage elements and provide the intercepted data to the control circuitry; and
debug circuitry configured to receive external debug inputs and send abstract commands to the processor core based on the external debug inputs;
wherein the control circuitry is configured to, in response to an abstract command to access one or more of the storage elements:
generate an instruction that causes data to be read from one or more of the plurality of storage elements such that the read data proceeds to the path circuitry and the intercept circuitry, wherein the path circuitry is configured to execute the instruction to process the read data and the execution does not change the architectural state of the processor core;
access, via the intercept circuitry, the read data based on the execution of the instruction; and
transmit the accessed read data to the debug circuitry.

### Claim 13 (depends on 12)

The non-transitory computer readable storage medium of claim 12, wherein the one or more storage elements include one or more general purpose registers and the instruction is an OR instruction that specifies a logical OR of logical zeros with the contents of the one or more general purpose registers.

### Claim 14 (depends on 12)

The non-transitory computer readable storage medium of claim 12, wherein the one or more storage elements include one or more control status registers and the instruction transfers a value between the one or more control status registers and one or more other registers.

### Claim 15 (depends on 12)

The non-transitory computer readable storage medium of claim 12, wherein the control circuitry is further configured to:
insert write data from the debug circuitry for storage in the one or more storage elements.
