Patent Document ID: 9946668
Application ID: 14286359
Patent Flag: 1

Claim One:
1. A method comprising: receiving information associated with asynchronous interrupts in a block diagram model that models behavior of a dynamic system when executed, the block diagram model including blocks that represent each represent a hardware device or subsystem, the blocks being interconnected by lines that represent signals, the signals corresponding to time-varying quantities and representing inputs and outputs of the dynamic system, the asynchronous interrupts being generated by the blocks in the block diagram model, the information associated with the asynchronous interrupts including: information associated with a first interrupt and a second interrupt, and information associated with priorities of the asynchronous interrupts, a target system being configured to process the asynchronous interrupts, the target system being configured to service the first interrupt and the second interrupt via a non-prioritized interrupt handling method, and the receiving the information associated with the asynchronous interrupts being performed by a device; assigning, based on the information associated with the priorities of the asynchronous interrupts, a first priority to the first interrupt, the assigning the first priority being performed by the device; assigning, based on the information associated with the priorities of the asynchronous interrupts, a second priority to the second interrupt, the second priority being higher than the first priority, and the assigning the second priority being performed by the device; generating, based on the first priority and the second priority, code that, when executed on the target system, causes the target system to place servicing the first interrupt on hold upon receiving the second interrupt, the generating the code being performed by the device; and causing the target system to execute the code, the causing the target system to execute the code being performed by the device, the code including an interrupt service routine (ISR) for the first interrupt, the code, when executed on the target system, causing the target system to execute the ISR based on receiving the first interrupt, and the ISR causing the target system to: store information associated with an original hardware configuration for the blocks, set a new hardware configuration, for the blocks, that allows implementing an interrupt prioritization based on the first priority, call a task that corresponds to the first interrupt, and restore the original hardware configuration, for the blocks, based on the information associated with the original hardware configuration.