A digital-to-analog conversion control method and system based on channel preemption

By configuring channel priorities and dynamic sequences in the analog-to-digital converter, channel preemption control is implemented, which solves the data loss problem of the analog-to-digital converter under multi-trigger source conflicts and improves the system's real-time response capability and conversion efficiency.

CN120508239BActive Publication Date: 2025-09-19江苏云途半导体有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510998744.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-09-19
Estimated Expiration
2045-07-21

AI Technical Summary

Technical Problem

In the prior art, when multiple trigger sources conflict with each other in an analog-to-digital converter, low-priority triggers are easily interrupted by high-priority triggers, resulting in data loss and an inability to respond in real time to channel switching requirements in complex application scenarios.

Method used

By combining system scenarios with application scenarios, configuring channel priorities and conversion rates, building dynamic channel sequences, and using stack storage devices for on-site data storage and recovery, channel preemption control is implemented to ensure efficient conversion and rapid response.

Benefits of technology

Without the need for software intervention, the channel sequence is automatically scheduled to save conversion time to the maximum extent, meet the real-time needs of complex application scenarios, and improve system efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508239B_ABST
    Figure CN120508239B_ABST
Patent Text Reader

Abstract

The present invention relates to a digital-to-analog conversion control method and system based on channel preemption, the method comprising: performing channel conversion on a current channel sequence based on a conversion mode of the current channel sequence; monitoring whether an external trigger signal is received, and if so, proceeding to the next step; determining a channel sequence to be scheduled based on a channel sequence priority, saving the field data of the current channel sequence, switching to the scheduled channel sequence to become a new current channel sequence; performing channel conversion on the new current channel sequence based on the conversion mode of the new current channel sequence; and restoring the field data of the previously preempted channel sequence after the channel conversion is completed. The present invention can combine underlying hardware acquisition tasks with operating system control and upper-level application scenarios, control the conversion scheduling of channel sequences based on differentiated scenarios, save conversion time to the greatest extent, and meet actual application needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent chips, and in particular relates to a digital-to-analog conversion control method and system based on channel preemption. Background Art

[0002] With the rapid development of computer technology, integrated circuit technology, electronics technology, communications technology, and automatic control technology, application scenarios are becoming increasingly diverse, and complex real-time channel acquisition is rapidly penetrating into applications. High-speed, real-time acquisition of field data has become an inevitable component of the development of electronic products and industrial control technology. An analog-to-digital converter (ADC), also known as an analog-to-digital converter (ADC), is an electronic device used to convert analog signals into digital signals. An ADC typically has multiple physical channels, each capable of independent conversion. The ADC converts analog voltage inputs into digital values. In current SoC (System-on-a-Chip) chips, it has become a standard peripheral for acquiring internal or external analog signals. To save chip area, ADCs are typically implemented in a multi-channel configuration, using polling switching to acquire data from multiple channels. ADC acquisition methods include continuous polling, triggered acquisition, and single-shot acquisition. Real-time acquisition typically uses triggered acquisition, using peripherals such as timers to generate signals that trigger ADC acquisition to meet real-time requirements. However, during the trigger acquisition process, when multiple trigger sources are encountered, there will be a conflict problem. At this time, the priority setting method is often used. When a high-priority trigger occurs during a low-priority trigger, the low-priority trigger will be interrupted by the high-priority trigger. At this time, the low-priority trigger will be discarded. The low-priority trigger may require multiple triggers to obtain a valid value.

[0003] ADCs are widely used in automotive engine management systems, braking systems, and cockpit electronics. The Automotive Open System Architecture (AUTOSAR) standard has clear requirements for ADC drivers, defining the concept of a virtual channel group. A channel group can contain one or more physical channels. Each ADC operation is actually an operation on the channel group, with multiple physical channels being linked and converted together. This means that channel switching is becoming increasingly complex. Conventional digital-to-analog converters convert selected channels sequentially according to a fixed channel sequence. In actual use, users may need to switch to other channels of interest in real-time monitoring or to respond to emergencies. In these cases, conventional digital-to-analog converters cannot preemptively insert other channels in real time. The switching method is static and cannot be adapted to specific application scenarios. To address these issues, the present invention combines underlying hardware acquisition tasks with operating system control and upper-level application scenarios, controlling the channel sequence conversion scheduling based on differentiated scenarios and minimizing conversion time. Summary of the Invention

[0004] In order to solve the above problems in the prior art, the present invention proposes a digital-to-analog conversion control method and system based on channel preemption, the method comprising:

[0005] Step S1: Configure channels based on the system scenario, setting channel priority, conversion rate, and data overwrite permission parameters for the channels; system scenario data is data related to channel characteristics, and application scenario data is data related to the application scenario executable;

[0006] Step S2: Perform channel sequence configuration, build a channel sequence based on application scenario data, and determine the dynamic channel sequence priority and conversion mode based on the channel priority; specifically:

[0007] Step S21: Acquire application scenario data through the operating system;

[0008] Step S22: constructing a channel sequence based on the order in which the application scenario execution body places channel collection demands during execution;

[0009] Step S23: Based on channel sequence The mean value of the signal change rate of all channels, channel sequence The deadline of the middle channel and the priority of the application scenario executor corresponding to the channel sequence s determine the priority of the application scenario executor;

[0010] Step S24: determining a channel sequence conversion mode based on the execution mode of the application scenario execution body;

[0011] Step S3: Perform channel conversion on the current channel sequence based on the conversion mode of the current channel sequence; monitor in real time whether an external trigger signal is received, if so, proceed to step S4; if not, continue to execute this step;

[0012] Step S4: Determine the channel sequence to be scheduled based on the channel sequence priority, save the field data of the current channel sequence, switch to the scheduled channel sequence to become the new current channel sequence; perform channel conversion on the new current channel sequence based on the conversion mode of the new current channel sequence; store the channel conversion data after the channel conversion is completed, and set the conversion completion flag; restore the field data of the previous channel sequence that was preempted, and return to step S3.

[0013] Furthermore, the system scenario data includes one or more of the channel's signal type, real-time requirements, data change frequency, and / or system resource limitations; the application scenario executor is a task, subtask, thread, or application.

[0014] Furthermore, the channel types included in each channel sequence are the same or different.

[0015] Furthermore, the dynamic priority of the channel sequence is determined ; Specifically: Determine the dynamic priority of the channel sequence based on the following formula ;in: is the channel sequence The mean signal change rate of all channels in , is the channel sequence Middle Channel The deadline, is the current time; 0~ is the adjustment factor; is the priority of the application scenario executive corresponding to the channel sequence s; It is a channel The channel priority is a static priority;

[0016] ;

[0017] .

[0018] Furthermore, a stack storage device is used to store and restore the channel sequence field data, and the preempted current channel sequence field data is pushed into the stack.

[0019] Furthermore, the conversion mode includes step, single polling, continuous polling and / or injection mode.

[0020] A digital-to-analog conversion control system based on channel preemption is used to implement the above-mentioned digital-to-analog conversion control method based on channel preemption.

[0021] A digital-to-analog conversion control digital logic based on channel preemption is provided, wherein the digital-to-analog conversion control digital logic based on channel preemption is used to implement the above-mentioned digital-to-analog conversion control method based on channel preemption.

[0022] A digital-to-analog conversion controller based on channel preemption is used to implement the above-mentioned digital-to-analog conversion control method based on channel preemption.

[0023] A digital-to-analog conversion control circuit based on channel preemption is used to implement the above-mentioned digital-to-analog conversion control method based on channel preemption.

[0024] The beneficial effects of the present invention include:

[0025] (1) Only one set of analog-to-digital conversion analog hardware is needed. The channel priority is set through the system scenario, and the channel sequence is further configured according to the application scenario. After the conversion is enabled, the channel sequence is automatically scheduled according to the determined channel sequence priority without the need for software intervention, which reduces the kernel load. After the high-priority channel sequence is converted, it will switch to the interrupt position to continue the conversion at the original channel sequence position. On the basis of ensuring the normal conversion->preemption->preemption conversion->resumption of normal conversion process, the conversion time is saved to the maximum extent.

[0026] (2) On the basis of completing the inherent configuration of the channel according to the system scenario, the channel sequence is created in combination with the application scenario and the conversion requirements of the channel sequence, allowing the conversion mode configuration based on the execution body; by building a dynamic priority for the channel sequence, it can meet the actual needs of complex application scenarios to the greatest extent, and can feed back the demand changes to the hardware level in real time when the application scenario changes, thereby achieving rapid response to the application scenario and improving the overall work efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application, but do not constitute an improper limitation of the present invention. In the drawings:

[0028] Figure 1 This is a schematic diagram of the digital-to-analog conversion control method based on channel preemption provided by the present invention.

[0029] Figure 2 This is a schematic diagram of the state machine in the digital-to-analog conversion control method based on channel preemption provided by the present invention.

[0030] Figure 3 This is a schematic diagram of the digital-to-analog conversion control ADC controller based on channel preemption provided by the present invention. DETAILED DESCRIPTION

[0031] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The exemplary embodiments and descriptions are only used to explain the present invention but are not intended to limit the present invention.

[0032] The present invention proposes a digital-to-analog conversion control method based on channel preemption, as shown in the attached Figure 1 As shown, the method includes:

[0033] Step S1: Configure channels based on the system scenario and set channel priority for each channel , conversion rate, data overwrite permission and other parameters; specifically: obtain system scenario data, and set channel priority for each channel based on the system scenario data; channel priority may depend on which signal is most critical to system control. For example, in industrial control, safety-related sensors may require a higher priority to ensure timely processing; considering that different signals may have different bandwidth requirements, for example, audio signals require a higher sampling rate, while temperature sensors may only require a lower sampling rate, users need to select an appropriate conversion rate based on the maximum frequency component of each signal to avoid aliasing; data overwrite involves buffer management. If the data of a certain channel is updated very quickly, if it cannot be processed, it may be necessary to allow overwriting of old data to prevent buffer overflow, and whether it is allowed needs to be set;

[0034] The system scenario data is data related to channel characteristics, including the channel's signal type, real-time requirements, data change frequency, system resource limitations, etc.; channel configuration is performed by obtaining data related to the channel characteristics corresponding to the system scenario, so that the channel configuration conforms to the channel characteristics;

[0035] Preferred: Channel priority for each channel , conversion rate, data coverage allowance and other parameters are the same or different;

[0036] Step S2: Perform channel sequence configuration; specifically, construct a channel sequence based on application scenario data, and determine the dynamic channel sequence priority and conversion mode based on the channel priority. For example, in a multi-task system, different tasks correspond to the same or different application scenarios. In the case of a single task on a dedicated terminal, the actual application scenarios of users may also be different due to the need to adapt to different users, resulting in different task types. For example, in a multi-parameter monitor in medical equipment, electrocardiogram (ECG) signals require high priority and high sampling rate, while body temperature may have a lower priority. However, when the user changes and body temperature becomes more important to the application scenario, the high priority may be body temperature data collection. Or sensors in automobiles, such as wheel speed sensors, require fast sampling, while oil temperature may be slower. However, this situation may also change in emergency processing tasks when the oil temperature exceeds the warning level.

[0037] Preferably, the channel types included in each channel sequence are the same or different;

[0038] The step S2 specifically includes the following steps:

[0039] Step S21: Acquire application scenario data; specifically, acquire application scenario data through the operating system; application scenario data is data related to the application scenario executable;

[0040] Step S22: Construct a channel sequence based on the order in which the application scenario execution body requests channel collection during execution. ;in: is the channel sequence number, Channel sequence The aisle; , is the channel sequence length;

[0041] Preferably, the occurrence sequence includes periodic and non-periodic occurrence sequences; for example, a channel sequence is constructed based on the occurrence sequence of channel acquisition requirements within a predetermined time range; when there are multiple identical periodic acquisition requirements within the predetermined time range, these periodic acquisition requirements can be expanded within the time range to form a channel sequence;

[0042] Preferably, the application scenario execution body is one or more of a task, a subtask, a thread, an application, etc.;

[0043] Alternatively, step S22 specifically includes: creating a channel sequence, forming a sequence of channels with the same channel priority, and specifying a conversion mode of the channel sequence based on the acquisition requirements of the application scenario executor for the channel, the default channel conversion mode, or the channel priority; that is, the channel priorities of all channels in each channel sequence are the same or close; and setting the channel conversion mode to step mode by default;

[0044] Alternatively, step S22 specifically includes creating a channel sequence, grouping channels with the same channel priority and default channel conversion mode into a channel sequence, and specifying the conversion mode of the channel sequence as the same conversion mode. The same priority here can be relaxed to close, that is, within a certain threshold range. In these two alternative methods, the initial construction of the channel sequence is irrelevant to or has low relevance to the application scenario. This is the channel sequence construction method that is closest to the traditional method.

[0045] Step S23: Determine the dynamic priority of the channel sequence Specifically: Determine the dynamic priority of the channel sequence based on the following formulas (1) and (2): ;in: is the channel sequence The mean signal change rate of all channels in , is the channel sequence Middle Channel The deadline, is the current time; 0~ is the adjustment factor; is the priority of the application scenario executive corresponding to the channel sequence s; It is a channel Channel priority ;

[0046] (1);

[0047] (2);

[0048] Preferred: ~ is the default value;

[0049] Preferably: the priority of the application scenario execution body is static or dynamically changing;

[0050] Preferably: when the channel sequence s corresponds to an application scenario execution body, the The value is the priority of the application scenario executive body; when the channel sequence s corresponds to multiple application scenario executive bodies with large differences, the The value is the characteristic value of the execution priority of each corresponding application scenario; the characteristic value is the average, maximum, minimum, etc. of the priority of the application scenario execution body;

[0051] Preferably: when the channel sequence s corresponds to an application scenario execution body, when the application scenario execution body corresponds to multiple acquisition requirements with large differences, the The value is the characteristic value of the priority reflected by each corresponding collection requirement; the characteristic value is the average, maximum, minimum, etc. of the priority reflected by the collection requirement;

[0052] Alternatively: Determine the dynamic priority of the channel sequence based on the following formula (3): This replacement method can be used when the priorities of the acquisition requirements of the application scenario execution bodies corresponding to the channel sequence s are significantly different;

[0053] ) (3);

[0054] Preferably: the channel sequence contains one or more channels; in general, the priority of the application scenario execution body and the channel priority corresponding to the channel sequence s It is a static priority or a relative static priority. However, if the priorities of the application scenario executors are different, even if they are the same for a channel sequence, the dynamic priorities of the corresponding channel sequence are also different. This allows differentiated channel collection services to be provided for different users or scenarios.

[0055] Alternatively: Determine the priority of the application scenario execution body based on the following formula (4) (5) ;in: is the cutoff time of channel sequence s, is the maximum cumulative conversion time of channel sequence s; It is The channel's sample-and-hold time (the time it takes for the signal to settle to the ADC input capacitance); It is The analog-to-digital conversion time of the channel (depends on the ADC resolution and clock frequency); It is the additional overhead time of context switching, interrupt latency, DMA configuration, etc.

[0056] (4);

[0057] (5);

[0058] Preferably: the cutoff time of the channel sequence s can be set to the minimum value of the cutoff times of the channels contained therein;

[0059] Preferred: If a channel sequence If the value approaches a smaller value (for example, 0), and the static priority of the corresponding application scenario executable is greater than the preset priority (the priority level that needs to be guaranteed for its execution), it is necessary to trigger critical channel protection, rate adaptation, and / or coverage strategy adjustment. Among them, critical channel protection means forcibly retaining the conversion time of safety-related channels (such as emergency stop signals) in the channel sequence at the expense of non-critical channels; rate adaptation means dynamically reducing the sampling rate of non-critical channels in the channel sequence (for example, from 100kSPS to 50kSPS); and the coverage strategy is adjusted to allow data buffer overwriting of low-priority channels (the data status needs to be marked as "partially valid").

[0060] Preferably, the dynamic priority of the channel sequence corresponding to each application scenario execution body is calculated in real time by background operation; the degree of change of the dynamic priority is determined, and when the degree of change of the dynamic priority is greater than a preset degree (for example, the degree of change is greater than 2-10%), the dynamic priority calculated in real time is written into the channel sequence priority configuration storage space; the background operation here can be running in the operating system; when writing is required, the writing is performed by interruption or self-trap;

[0061] Preferably, the channel sequence priority configuration storage space is provided in the hardware portion (ADC controller) of the channel preemption-based digital-to-analog conversion control system; a register storage space is provided in the hardware portion for storing the channel sequence priority; when the multiplexer selects the channel sequence based on the priority, the multiplexer selects the channel sequence by reading the storage space to obtain the changed channel sequence priority; and determines the preemption mode based on the changed dynamic priority;

[0062] Alternatively, the determination of the channel sequence dynamic priority in step S23 Specifically, the dynamic priority of the channel sequence is set to the average of the priorities of each channel in the channel sequence; in this case, the dynamic priority is extremely insensitive to changes in the application scenario;

[0063] Alternatively, the determination of the channel sequence dynamic priority in step S23 Specifically: Determine the dynamic priority based on the following formulas (6) and (7): At this time, the dynamic priority is less sensitive to changes in application scenarios; the dynamic priority is more sensitive to changes in system scenarios;

[0064] (6);

[0065] (7);

[0066] Preferred: ~ is the default value;

[0067] Step S24: determining a channel sequence conversion mode based on the execution mode of the application scenario executable. Specifically, if the channel sequence conversion mode is not configured in the previous step, obtaining the execution mode of the executable from the application scenario and obtaining the channel sequence conversion mode corresponding to the execution mode.

[0068] Preferably: the conversion modes include stepping, single polling, continuous polling and injection modes; the stepping mode usually converts channels one by one in sequence, which is suitable for periodic scanning of multiple sensors; single polling may refer to triggering the conversion of a single channel on demand, which is suitable for event-driven scenarios; continuous polling is to continuously convert a certain channel, which is suitable for high-speed data acquisition, such as audio or vibration signals; the stepping mode is set for the executor of periodic application scenarios, the single polling mode is set for the executor of burst application scenarios, the continuous polling mode is set for the executor of continuous high-speed sampling application scenarios, and the injection mode is set for the executor of safety-critical application scenarios;

[0069] Of course, when constructing a channel sequence, multiple channel sequences can be created for the same application scenario executable body, taking into account the differences in channel conversion modes and / or execution modes; thereby ensuring that their execution modes and conversion modes are consistent. In this case, alternatively, step S24 may specifically include setting the conversion mode of the channel sequence to the same conversion mode as the default conversion mode of the majority of channels in the channel sequence; optionally, channel splitting may be performed to include channels that are not in the default channel conversion mode of the majority of channels into another channel sequence. In fact, due to the existence of dynamic priority, even if the conversion modes are different, preemption will occur due to priority, thereby ensuring channel conversion.

[0070] Alternatively: the step S24 is specifically: setting the conversion mode of the channel sequence to the polling mode;

[0071] Step S3: Perform channel conversion on the current channel sequence based on the conversion mode of the current channel sequence; monitor whether an external trigger signal is received. If so, proceed to step S4; if not, continue executing this step; the external trigger signal is a trigger signal for changing the execution order of the channel sequence, for example, for emergency event response (such as overvoltage protection, fault detection);

[0072] Step S4: Determine the channel sequence to be scheduled based on the channel sequence priority, save the field data of the current channel sequence, switch to the scheduled channel sequence to become the new current channel sequence; perform channel conversion on the new current channel sequence based on the conversion mode of the new current channel sequence; after the channel conversion is completed, store the channel conversion data and set a conversion completion flag; restore the field data of the previously preempted channel sequence, and return to step S3;

[0073] Preferably: the conversion completion flag is a corresponding flag generated after the conversion of each channel or channel sequence is completed, which is used to store the converted data or trigger subsequent operations;

[0074] Preferably, a stack storage device is used to store and restore the channel sequence field data, and the preempted current channel sequence field data is pushed into the stack; when restoring, the channel sequence identifier corresponding to the field data is determined based on the current stack pointer, and when the channel sequence identifier is consistent with the channel sequence identifier currently being restored, the field data is popped out of the stack and data restoration is performed;

[0075] Preferably, the above steps S3 to S4 are executed by a state machine, that is, the state machine is used to control the conversion and preemption of the channel sequence, including normal channel conversion, preemption, recovery and other states;

[0076] As attached Figure 2 As shown, the ADC controller is started and waits for the ADC to be ready, the trigger signal is received in real time, the corresponding channel information is loaded and the corresponding channel is sampled. After the channel sampling is completed, the next channel conversion information is loaded and the pre-sampling cache state is entered; finally, the data quantization conversion state is entered; in the above process, if any trigger with a higher priority than the current priority arrives, it will jump to the preemptive state to temporarily store information, and then switch to the high-priority sequence for conversion until the conversion is completed and jump to the recovery state. In this state, the temporarily stored data will be reloaded and the original conversion will continue; according to this process, the required conversion can be automatically scheduled and completed without the intervention of software and operating system, and the priority conversion and recovery can be completed in real time and efficiently;

[0077] Specifically, the state machine includes the following states: off state OFF, initial startup state STARTUP, ready state RDY, normal sampling state N_SMP, preempted sampling state P_SMP, normal sampling buffer state N_BUF, normal sampling conversion state N_CONV, recovery state RECONVER, preempted buffer state P_BUF, preempted conversion state P_CONV, preempted state PREEMPT, conversion completion state conversedone; the workflow of the state machine is:

[0078] Step SX1: Startup control; in the off state OFF, the ADC controller is not enabled; in this state, in response to the enable signal enable signal, the controller enters the initial startup state START UP; after the controller startup is completed, the controller enters the ready state RDY;

[0079] Step SX2: trigger response control; in the ready state RDY, if a normal trigger is received, the normal channel sequence is loaded and the normal sampling state N_SMP is entered; if a high-priority trigger is received, it is directly preempted and enters the preempted state PREEMPT, and then enters step SX4;

[0080] Step SX3: Sampling and conversion control; after entering the normal sampling state N_SMP, enter the normal sampling buffer state N_BUF to perform normal sampling. After normal sampling is completed, enter the normal sampling conversion state N_CONV to perform data conversion; after completing data conversion, return to the normal sampling state N_SMP; after entering the preemptive sampling state P_SMP, enter the preemptive buffer state P_BUF to perform preemptive sampling. After completing preemptive sampling, enter the preemptive conversion state P_CONV to perform data conversion; after completing data conversion, enter the recovery state RECONVER (preemptive entry) or the preemptive sampling state P_SMP (non-preemptive entry); when entering the recovery state RECONVER, enter step SX5;

[0081] Preferably: in the N_SMP or N_CONV state, if a preemption request preempt is detected, the preemption state PREEMPT is entered;

[0082] Preferably, after detecting the preemption request preempt, determining whether the jump condition is met, if so, entering the preemption state PREEMPT; the jump condition is: the priority of the preempted sequence is higher than the current channel sequence, and the new trigger of the same priority will be ignored to prevent unlimited preemption;

[0083] Step SX4: In the preemptive state, save the current ordinary channel sequence field data, load the high priority sequence and enter the preemptive sampling state P_SMP, after entering the preemptive state enters step SX3;

[0084] Preferably, the field data includes channel serial number, unfinished sampling data or conversion data;

[0085] Step SX5: Perform on-site recovery; specifically, recover the on-site data of the preempted common channel sequence from the breakpoint position, and continue to execute the original process after the recovery is completed (enter the N_SMP or N_CONV state for recovery);

[0086] The present invention proposes a digital-to-analog conversion control method and system based on channel preemption, wherein the system is used to execute the above method steps;

[0087] The present invention proposes an ADC controller based on channel preemption digital-to-analog conversion control, as shown in the attached Figure 3As shown, the ADC controller internally contains a state machine, channel configuration information, and two MUX selectors for priority selection and sequence selection, respectively; the state machine enables the channel and enables the ADC analog unit for sampling, and the ADC analog unit sends the sampled data stream to the ADC controller and then saves it in the memory; during the conversion process, if other high-priority triggers arrive, as shown in the upper part of the figure, the field data of the current channel sequence being converted will be temporarily stored, the high-priority sequence information and the sequence conversion mode will be reloaded, and the conversion will begin. After the conversion of the sequence defined by the high priority is completed, the original preempted sequence will be immediately restored to continue the conversion;

[0088] Each channel can be configured with a different conversion rate, priority level, and whether data can be overwritten. After defining different channels, channels with the same priority are loaded into the same sequence, and the order in the same sequence is sorted by channel number. At this time, wait for the arrival of an external trigger and perform conversion according to the established priority. If a lower-level trigger arrives at this time, the conversion of the corresponding priority is triggered. If another high-priority trigger arrives during the conversion process, as shown in the upper part of the figure, the channel information being converted will be temporarily stored, the high-priority sequence information and sequence conversion mode will be reloaded, and conversion will begin. After the conversion of the sequence defined by the high priority is completed, the original preempted sequence will be immediately restored to continue conversion.

[0089] A computer program (also referred to as a program, software, software application, script, or code) can be written in any form of programming language, including assembly or interpreted languages, declarative or procedural languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, object, or other unit suitable for use in a computing environment. A computer program may, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program, or in multiple collaborative files (e.g., files storing one or more modules, subroutines, or code portions). A computer program can be deployed to execute on one computer or on multiple computers located at one site or distributed across multiple sites and interconnected by a communication network.

[0090] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0091] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0092] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0093] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.

Claims

1. A digital-to-analog conversion control method based on channel preemption, characterized in that: Include: Step S1: Configure channels based on the system scenario, setting channel priority, conversion rate, and data overwrite permission parameters for the channels; system scenario data is data related to channel characteristics, and application scenario data is data related to the application scenario executable; Step S2: Perform channel sequence configuration, build a channel sequence based on application scenario data, and determine the dynamic channel sequence priority and conversion mode based on the channel priority; specifically: Step S21: Acquire application scenario data through the operating system; Step S22: constructing a channel sequence based on the order in which the application scenario execution body places channel collection demands during execution; Step S23: determining the priority of the application scenario executor based on the average value of the signal change rate of all channels in the channel sequence, the cutoff time of the channels in the channel sequence, and the priority of the application scenario executor corresponding to the channel sequence; Step S24: determining a channel sequence conversion mode based on the execution mode of the application scenario execution body; Step S3: performing channel conversion on the current channel sequence based on the conversion mode of the current channel sequence; Monitor in real time whether an external trigger signal is received, if so, proceed to step S4; if not, continue to execute this step; Step S4: determining a channel sequence to be scheduled based on the channel sequence priority, saving the field data of the current channel sequence, switching to the scheduled channel sequence as a new current channel sequence; and performing channel conversion on the new current channel sequence based on the conversion mode of the new current channel sequence; After the channel conversion is completed, the channel conversion data is stored and a conversion completion flag is set; the field data of the channel sequence when it was preempted is restored, and the process returns to step S3; Determine the dynamic priority of channel sequence Specifically: Determine the dynamic priority of channel sequence s based on the following formula ;in: is the channel sequence The mean signal change rate of all channels in , is the channel sequence Middle Channel The deadline, is the current time; 0~ is the adjustment factor; is the priority of the application scenario executive corresponding to the channel sequence s; It is a channel The channel priority is a static priority; is the channel sequence length; ; 。 2. The digital-to-analog conversion control method based on channel preemption according to claim 1, characterized in that: The system scenario data includes one or more of the channel's signal type, real-time requirements, data change frequency, and / or system resource limitations; the application scenario executor is a task, subtask, thread, or application.

3. The digital-to-analog conversion control method based on channel preemption according to claim 2, characterized in that: The channel types contained in each channel sequence are the same or different.

4. The digital-to-analog conversion control method based on channel preemption according to claim 3, characterized in that: A stack storage device is used to store and restore the channel sequence field data, and the preempted current channel sequence field data is pushed into the stack.

5. The digital-to-analog conversion control method based on channel preemption according to claim 4, characterized in that: Conversion modes include step, single polling, continuous polling, and / or injection mode.

6. A digital-to-analog conversion control system based on channel preemption, characterized in that: The channel preemption-based digital-to-analog conversion control system is used to implement the channel preemption-based digital-to-analog conversion control method according to any one of claims 1 to 5.

7. A digital logic for digital-to-analog conversion control based on channel preemption, characterized in that: The channel preemption-based digital-to-analog conversion control digital logic is used to implement the channel preemption-based digital-to-analog conversion control method described in any one of claims 1 to 5.

8. A digital-to-analog conversion controller based on channel preemption, characterized in that: The channel preemption-based digital-to-analog conversion controller is used to implement the channel preemption-based digital-to-analog conversion control method according to any one of claims 1 to 5.

9. A digital-to-analog conversion control circuit based on channel preemption, characterized in that: The channel preemption-based digital-to-analog conversion control circuit is used to implement the channel preemption-based digital-to-analog conversion control method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for mapping service flow to service transmission path and optical network terminal

    CN101005445A

  • Fuzzy dynamic scheduling data communication detection system based on virtual-real interaction scene

    CN120186238A