IP Library Granted Patent US 9,880,787
Granted Patent B2
US 9,880,787 · App. 14/819,515 · Granted Jan 30, 2018

System and method for memory patching circuits

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,880,787
App. No.
14/819,515
Granted
Jan 30, 2018
Kind
B2
Abstract

A patching system and a patching circuit provide a type of patching entry which can replace several sequential memory positions with hardcoded and dynamically configured assembly instructions, thus injecting a small piece of code. The operation of the injected code can be for any purpose, but as an example may be used to seamlessly redirect the execution flow of a processing unit.

Claims (48)

1. A memory patching circuit comprising:

a code generation unit coupled with a memory via an input data bus and coupled with a processor via an output data bus;

an address memory storing an address of a location in the memory to be patched;

a distance calculator unit arranged to:

receive a first address from an address bus connecting the memory and the processor,

receive a second address from the address memory,

compare the first and second addresses, and output a distance indication based on the comparison;

wherein the code generation unit is arranged to receive the distance indication and to either pass through data from the input data bus to the output data bus or to inject code to the output data bus, based on the distance indication; and

wherein the code generation unit is arranged to receive the address from the address memory to determine the location for the injected code.

2. The memory patching circuit of claim 1 , wherein the distance calculator is arranged to subtract the first address from the second address and provide a signed value as the distance indication.

3. The memory patching circuit of claim 1 , wherein the distance calculator unit comprises a plurality of subtractors each coupled to the address bus and arranged to subtract successive offsets from the first address.

4. The memory patching circuit of claim 3 , wherein the distance calculator unit comprises a plurality of comparators each coupled with one of said subtractors, and the outputs of the comparators provide the distance indication.

5. The memory patching circuit of claim 1 , wherein the distance calculator unit comprises a plurality of adders each coupled to the address memory and arranged to add successive offsets from the second address.

6. The memory patching circuit of claim 5 , wherein the distance calculator unit comprises a plurality of comparators each coupled with one of said adders, and the outputs of the comparators provide the distance indication.

7. The memory patching circuit of claim 1 , wherein the distance indication indicates whether the logical distance between the first address and the second address is within a predetermined range.

8. The memory patching circuit of claim 7 , wherein, if the logical distance between the first address and the second address is within the predetermined range, the distance indication represents the distance and, if the logical distance between the first address and the second address is not within the predetermined range, the distance indication indicates that no address within the range has been found.

9. The memory patching circuit of claim 1 , comprising a control signal generator which sends a control signal to enable or disable operation of the memory patching circuit.

10. The memory patching circuit of claim 9 , wherein the control signal generator comprises a control memory and a configuration unit arranged to write a value to the control memory.

11. The memory patching circuit of claim 9 , wherein the control signal generator is coupled with the distance calculator unit.

12. The memory patching circuit of claim 11 , wherein a control signal for disabling the memory patching circuit or disabling the patching entry associated with the distance calculator unit, causes the distance calculator unit to output a distance indication indicating that no address within the range has been found.

13. The memory patching circuit of claim 9 , wherein the control signal generator is coupled with the code generation unit.

14. The memory patching circuit of claim 13 , wherein a control signal for disabling the memory patching circuit or disabling a specific patching entry, causes the code generation unit to ignore any positive distance indication within the predetermined limits to be ignored, considering that no matching has been detected from the disabled patching entry, regardless of the output of the corresponding comparison unit.

15. The memory patching circuit of claim 1 , comprising a configuration unit for storing a memory address in the address memory.

16. The memory patching circuit of claim 1 , comprising a plurality of patching groups, each group comprising an address register and a distance calculator unit.

17. The memory patching circuit of claim 16 , wherein each patching group further comprises a control register for outputting a control signal.

18. The memory patching circuit of claim 16 , comprising a memory storing a table with pointers to replacement functions, one for each patch group.

19. The memory patching circuit of claim 1 , wherein the code generation unit comprises an instruction generation unit arranged to implement a required sequence of instruction opcodes in order to implement the predefined injected code.

20. The memory patching circuit of claim 19 , wherein the code generation unit comprises a decision unit arranged to receive distance indications from the or each distance calculator unit and to control the data output to the output data bus based on the received distance indications.

21. A system comprising;

a memory;

a processor;

an address bus coupled between the memory and the processor; and a memory patching circuit comprising:

a code generation unit coupled with a memory via an input data bus and coupled with a processor via an output data bus;

an address memory storing an address of a location in the memory to be patched;

a distance calculator unit arranged to:

receive a first address from an address bus connecting the memory and the processor,

receive a second address from the address memory,

compare the first and second addresses, and output a distance indication based on the comparison;

wherein the code generation unit is arranged to receive the distance indication and to either pass through data from the input data bus to the output data bus or to inject code to the output data bus, based on the distance indication; and

wherein the code generation unit is arranged to receive the address from the address memory to determine the location for the injected code.

22. A method of patching a memory comprising replacing a plurality of memory positions with hardcoded assembly instructions;

at a distance calculator unit;

receiving a first address from an address bus connecting a memory and a processor,

receiving a second address from an address memory, comparing the first and second addresses, and obtaining a distance indication based on the comparison; and

at a code generation unit;

either passing through data from an input data bus to an output data bus or injecting code to the output data bus, based on the distance indication; and

wherein the code generation unit is arranged to receive the address from the address memory to determine the location for the injected code.

23. The method of claim 22 , comprising dynamically generating the hardcoded assembly instructions.

Assignments (3)
SECURITY INTEREST Recorded May 11, 2023
From: DAKTRONICS, INC.
To: JPMORGAN CHASE BANK, N.A., AS ADMINISTRATIVE AGENT
Reel/Frame 063622/0039 →
CORRECTIVE ASSIGNMENT TO CORRECT THE NAME OF RECEIVING PARTY TO DIALOG SEMICONDUCTOR B.V. PREVIOUSLY RECORDED ON REEL 036767 FRAME 0775. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Oct 4, 2016
From: NINOS, KONSTANTINOS
To: DIALOG SEMICONDUCTOR B.V.
Reel/Frame 040223/0384 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 9, 2015
From: NINOS, KONSTANTINOS
To: DIALOG SEMICONDUCTOR (UK) LIMITED
Reel/Frame 036767/0775 →