Deterministic cycle accurate execution of software
AssigneeTexas Instruments Incorporated
InventorsAlexander Tessarolo, Venkatesh Natarajan
Life of this patent
Estimating the term…
Abstract
Various embodiments include systems and methods to provide deterministic execution times for computer processors. In one example, a hardware module may include hardware logic, which is configured to track a value stored in a counter. The hardware module may detect a read or write access request from a processor, determine whether the value stored in the counter has reached a specified value, and then stall the processor using a hardware signal in response thereto. Once the counter reaches the specified value, the hardware logic may then un-stalls the processor using the hardware signal.
Claims20
An apparatus comprising:
- a processor core configured to execute machine code instructions over a plurality of clock cycles and to receive a hardware signal;
- and
- a circuit coupled to the processor core, wherein the circuit includes a counter, wherein the circuit is configured to generate the hardware signal and is further configured to:
- change a value stored in the counter by either incrementing or decrementing the value according to a clock associated with the clock cycles;
- receive a read operation, directed to the counter, from the processor core;
- in response to receiving the read operation, determine the value stored in the counter;
- determine whether to change a state of the hardware signal based at least in part upon the value stored in the counter;
- change the state of the hardware signal to a first state;
- and
- change the state of the hardware signal to a second state in response to the value stored in the counter being equal to a specified value;
- and
- wherein the processor core is further configured to:
- stall in response to the state of the hardware signal being changed to the first state;
- read a first register, associated with a peripheral device, in response to the second state of the hardware signal.
A method comprising:
- initiating a counter;
- receiving a read operation from a processor core, wherein the read operation is directed to the counter;
- stalling the processor core, including causing a hardware signal to attain a first state, in response to the read operation from the processor core, wherein the hardware signal is transmitted on a bus from a hardware logic unit to the processor core;
- holding the first state of the hardware signal during a time period in which the counter performs a counter operation;
- and
- causing the hardware signal to attain a second state, thereby un-stalling the processor core, in response to the counter reaching a specified value;
- wherein initiating the counter is performed in response to detecting an interrupt signal from a peripheral, and wherein the method further comprises:
- reading a register associated with the peripheral subsequent to the hardware signal attaining the second state.
A method comprising:
- initiating a counter;
- receiving a read operation from a processor core, wherein the read operation is directed to the counter;
- stalling the processor core, including causing a hardware signal to attain a first state, in response to the read operation from the processor core, wherein the hardware signal is transmitted on a bus from a hardware logic unit to the processor core;
- holding the first state of the hardware signal during a time period in which the counter performs a counter operation;
- and
- causing the hardware signal to attain a second state, thereby un-stalling the processor core, in response to the counter reaching a specified value;
- wherein initiating the counter includes receiving a write operation from the processor core during runtime, wherein the write operation is configured to store a non-zero value to the counter, wherein the non-zero value corresponds to a quantity of clock cycles of the processor core associated with the specified value.
A method comprising:
- initiating a counter;
- receiving a read operation from a processor core, wherein the read operation is directed to the counter;
- stalling the processor core, including causing a hardware signal to attain a first state, in response to the read operation from the processor core, wherein the hardware signal is transmitted on a bus from a hardware logic unit to the processor core;
- holding the first state of the hardware signal during a time period in which the counter performs a counter operation;
- causing the hardware signal to attain a second state, thereby un-stalling the processor core, in response to the counter reaching a specified value;
- and
- storing a value of the counter corresponding to a time at which the read operation is received, including replacing a previously stored value of the counter in response to the value of the counter being greater than the previously stored value or in response to the value of the counter being lesser than the previously stored value.
An apparatus comprising:
- a hardware counter circuit, coupled to a first bus, wherein the first bus comprises a data bus configured to support read and write access to the hardware counter circuit from a processing unit;
- hardware logic coupled to the hardware counter circuit and to a second bus, wherein the second bus is coupled to the processing unit, further wherein the hardware logic is configured to assert and de-assert a hardware signal on the second bus in response to a value of the hardware counter circuit at a read operation on the first bus;
- a register configured to populate a value from the register to the hardware counter circuit to begin a counting operation;
- and
- a third bus, coupling the register to the processing unit, the third bus configured for read and write access of the register during runtime, including a write operation from the processing unit of a non-zero value corresponding to a quantity of clock cycles of the processing unit associated with the value.
Dependencies are inferred from the claim text.