Patent Document ID: 7751884
Application ID: 11550912
Patent Flag: 1

Claim One:
1. An implantable medical device (IMD) comprising: stimulation circuitry adapted to provide at least one neural stimulation energy to at least one neural stimulation electrode; one or more timers, including at least one neural event timer, each timer having an output indicating a timer state and an input for changing the timer state; a device behavior memory including a neural table, wherein the neural table maps a particular device state defined at least in part by the neural event timer to one or more associated device actions that include: one or more of a neural stimulation energy delivery and a change in state of at least one neural event timer and a set of one or more action inputs, wherein an action input includes at least one of an input to the neural stimulation circuitry and an input to the one or more timers; a state change detector configured to detect a change in a current device state and initiate, in response to the detected change, a search in the neural table for a matching device state; a comparison circuit adapted to compare the current device state to a device state in the neural table and, if found to match, causing performance of one or more associated device actions; and a buffer queue coupled to the device behavior memory, and wherein at least one action input causes an event represented in a current status word to be loaded into the buffer queue along with a time stamp.