Apparatus and method for processing procedural language functions

By optimizing the execution flow of programming language functions through processing devices, the problem of low execution efficiency of the central processing unit was solved, resulting in faster execution of programming language functions and less memory usage.

CN116841515BActive Publication Date: 2026-06-26REALTEK SEMICON CORP

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
REALTEK SEMICON CORP
Filing Date
2022-03-24
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In the prior art, when the central processing unit executes programming language functions, it needs to read and write memory data multiple times, resulting in long processing time, large memory space consumption and large program space, and low efficiency.

Method used

The processing device includes a receiving module, a control module, a reading module, a writing module, and a transmission module. It receives and configures the access state through programming language functions, compares the count value with the length, determines the end of the data, reads and writes data, and transmits interrupt signals to optimize the execution of programming language functions.

Benefits of technology

It reduces the processing time and memory storage space of the central processing unit, and improves the execution speed of programming language functions and the execution efficiency of the central processing unit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116841515B_ABST
    Figure CN116841515B_ABST
Patent Text Reader

Abstract

An apparatus and method for processing a program language function, the processing apparatus comprising: a receiving module for receiving a configuration of the program language function, wherein the configuration comprises a destination address, a length, a fill-in value and a function type; a control module for setting an access state for accessing a slave device according to the function type, and comparing a count value with the length to generate a comparison result according to the function type, or determining whether data received from the slave device reaches an end to generate a determination result, or both; a reading module for reading data according to the access state; a writing module for writing the fill-in value into the destination address according to at least one of the access state, the determination result and the comparison result; and a transmitting module for transmitting an interrupt signal according to at least one of the determination result and the comparison result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an apparatus and method, and more particularly to an apparatus and method for executing programming language functions of a control device. Background Technology

[0002] In a computer system, the central processing unit (CPU) is responsible for executing programming language functions. According to current technology, when the CPU executes a data-setting programming language function, it must execute multiple lines of code to repeatedly read and write data to memory blocks. This not only consumes a significant amount of CPU processing time but also occupies a massive amount of memory space and a large portion of the program's processing space. Therefore, how to enable the CPU to execute programming language functions efficiently, thereby improving the execution speed of programming language functions and the overall efficiency of the CPU, is a pressing problem that needs to be solved. Summary of the Invention

[0003] The present invention provides a processing apparatus and method for executing programming language functions of a control device to solve the above-mentioned problems.

[0004] This invention discloses a processing apparatus for executing a programming language function of a control device, comprising a receiving module for receiving a configuration of the programming language function from the control device, wherein the configuration includes a destination address, a length, a fill value, and a function type; and a control module coupled to the receiving circuit for performing the following steps: (A) setting an access state for accessing a slave device according to the function type; (B) comparing a count value with the length according to the function type to generate a comparison result, or according to the data received from the slave device. The system includes: a data set, a data set that determines whether the data has reached an end to generate a judgment result, or the data set and the comparison result; a read module, coupled to the control module, for reading the data from the slave device according to the access state; a write module, coupled to the control module, for writing the input value to the destination address according to at least one of the access state, the judgment result, and the comparison result; and a transmit module, coupled to the control module, for transmitting an interrupt signal to the control device according to at least one of the judgment result and the comparison result.

[0005] The present invention further discloses a method for executing a programming language function of a control device, for use in the aforementioned processing device. Attached Figure Description

[0006] Figure 1 This is a schematic diagram of the processing system according to Embodiment 1 of the present invention.

[0007] Figure 2 This is a schematic diagram of the processing device according to Embodiment 1 of the present invention.

[0008] Figure 3 This is a schematic diagram of the control device according to Embodiment 1 of the present invention.

[0009] Figure 4 This is a flowchart of a first embodiment of the present invention.

[0010] Figure 5 This is a flowchart of a first embodiment of the present invention.

[0011] Figure 6 This is a flowchart of a first embodiment of the present invention.

[0012] Figure 7 This is a circuit diagram of the control module starting the reading module in Embodiment 1 of the present invention.

[0013] Figure 8 This is a circuit diagram showing the data reading path of the reading module in Embodiment 1 of the present invention.

[0014] Figure 9 This is a circuit diagram showing the path for writing data by the writing module in Embodiment 1 of the present invention.

[0015] Figure 10 This is a circuit diagram of the control module in Embodiment 1 of the present invention that determines the interruption condition based on the function type.

[0016] Symbol Explanation

[0017] 10: Processing System

[0018] 100: Control device

[0019] 110: Processing device

[0020] 120: Subordinate device

[0021] 20: Processing device

[0022] 200: Receiver module

[0023] 210: Control Module

[0024] 220: Read module

[0025] 230: Write Module

[0026] 240: Transmission Module

[0027] 300: Receiver Module

[0028] 310: Conversion Module

[0029] 320: Transmission Module

[0030] S40, S50, S60: Process

[0031] S400, S402, S40S4, S406, S408, S410, S412, S414, S500, S502,

[0032] S504, S506, S508, S510, S512, S514, S600, S602, S604, S606, S608,

[0033] S610, S612, S614, S616, S618: Steps

[0034] 70, 80, 90, 1000: Circuit Diagram

[0035] MU1~MU3: Multitasking

[0036] DMU1: Multitasking Decoder Detailed Implementation

[0037] Figure 1 This is a schematic diagram of a processing system 10 according to an embodiment of the present invention. The processing system 10 may be a system-on-a-chip (SoC), but is not limited thereto. The processing system 10 may include a control device 100, a processing device 110, and a slave device 120. The control device 100 may be a central processing unit (CPU), a master control unit (MCU), or a digital signal processor (DSP), but is not limited thereto. The instruction set architecture used by the central processing unit may include the x86 instruction set architecture developed based on the Intel 8086, a microprocessor without interlocked pipeline stages (MIPS), an Advanced Reduced Instruction Set Computing Machine (ARM), or a Reduced Instruction Set Computing V (RISC-V), but is not limited thereto. The processing device 110 may include a direct memory access controller (DMAC), but is not limited thereto. Slave device 120 may include, but is not limited to, a memory controller.

[0038] Furthermore, the processing system 10 may include a data exchange interface, such as a bus or an interconnect interface, but is not limited thereto. In one embodiment, the data exchange interface 110 may be simultaneously connected to the control device 100, the processing device 110, and the slave device 120. Through the data exchange interface, the control device 100, the processing device 110, and the slave device 120 can communicate with each other (e.g., transmit and receive data, configurations, information, signals, read commands, or write commands). In one embodiment, the data exchange interface 110 may also be connected to at least one peripheral device. Through the data exchange interface, the control device 100, the processing device 110, the slave device 120, and at least one peripheral device can communicate with each other. In one embodiment, according to a communication protocol for the data exchange interface, the processing device 110 may transmit read commands or write commands to the slave device 120. The communication protocol may include, but is not limited to, the Advanced Microcontroller Bus Architecture (AMBA) protocol or the Open Core Protocol (OCP).

[0039] In one embodiment, the control device 100 may be a master device or a slave device of the data exchange interface. The processing device 110 may be a master device or a slave device of the data exchange interface. The slave device 120 and / or at least one peripheral device may be a slave device of the data exchange interface. In one embodiment, depending on the receiving capability of the slave device 120, the control device 100 may configure the processing device 110 to transmit bus requests in a manner such as a single bus request or a burst bus request, but is not limited thereto.

[0040] Figure 2 This is a schematic diagram of a processing device 20 in an embodiment of the present invention, which can be used to implement... Figure 1 The processing unit 110 is used to execute the programming language functions of the control unit 100. The processing unit 20 may include a receiving module 200, a control module 210, a reading module 220, a writing module 230, and a transmitting module 240. The receiving module 200 can receive data from the control unit (e.g.,...) Figure 1 The control device 100 receives the configuration of a programming language function, which may include (e.g., an indication) a destination address, length (e.g., data length), input values, and function type. The control module 210 may be coupled to the receiving module 200 and may perform the following steps (A) and (B): (A) Based on the function type, the control module 210 may configure itself to access a slave device (e.g., ...). Figure 1The access status of the slave device 120. (B) Depending on the function type, the control module 210 can compare the count value with the length to generate a comparison result, or depending on the data received from the slave device, the control module 210 can determine whether the data has reached the end to generate a judgment result, or both (i.e., the control module 210 can perform both determining whether the data has reached the end to generate a judgment result and comparing the count value with the length to generate a comparison result). The read module 220 can be coupled to the control module 210. Depending on the access status, the read module 220 can read data from the slave device. The write module 230 can be coupled to the control module 210. Depending on at least one of the access status, judgment result, and comparison result, the write module 230 can write the filled value to the destination address. The transmit module 240 can be coupled to the control module 210. Depending on at least one of the judgment result and comparison result, the transmit module 240 can transmit an interrupt signal to the control device. That is, by configuring the processing device 20 to execute the program language function of the control device, the control device can execute other program language functions. In one embodiment, when an interrupt signal is received, the control device can process the interrupt signal to continue completing the program related to the programming language function.

[0041] In one embodiment, after receiving the configuration of the programming language functions from the control device and enabling the processing device 20, the processing device 20 can execute the programming language functions of the control device. In one embodiment, when the control device (e.g., Figure 1 When the control device 100 executes a programming language function, it can convert the programming language function into machine code through a compiler, based on the instruction set architecture used by the control device, to generate a configuration.

[0042] In one embodiment, the processing device 20 may include at least one register (not shown in the figure). This register may be coupled to the receiving module 200 and may include a register for storing the destination address (e.g., a DAR register), a register for storing the length (e.g., a Block_TS register), a register for storing the filled value (e.g., a Fill_Value register), and a register for storing the function type (e.g., a Func_Type register) to store the configuration. In one embodiment, the control module 210 may be coupled to this register to perform steps (A) and (B) above according to the configuration in this register.

[0043] In one embodiment, the processing device 20 may include a first-in-first-out (FIFO) buffer (not shown). The FIFO buffer may be coupled to the read module 220 and the write module 230. In one embodiment, the read module 220 may transmit read commands to a slave device (e.g., via the transmit module 240). Figure 1 The slave device 120 can read data from the destination address and transmit the data to the processing device 20 according to a read command. The processing device 20 can store the data in a first-in-first-out buffer. In one embodiment, the write module 230 can transmit a write command and data to the slave device via the transmit module 240. According to the write command, the slave device can write data to the destination address.

[0044] In one embodiment, when the function type includes (for example,) a first function for setting memory, the control module 210 may set the access state for accessing the slave device to start the write module 230 (e.g., to the write module 230). The first function may include, but is not limited to, the C language's memset function.

[0045] In one embodiment, when the function type includes a second function for setting a string, the control module 210 can set the access state for accessing the slave device to start the read module 220 (e.g., to the read module 220) and the write module 230 (e.g., to the write module 230). The second function may include, but is not limited to, the C language's strset or strnset. In one embodiment, when the access state is started by the read module 220, the read module 220 can send a read command to the slave device via the transmission module 240. According to the read command, the slave device can read data from the destination address and send the data to the processing device 20. Through the control module 210, the processing device 20 can perform the above-described step (B) on the data.

[0046] In one embodiment, the data may contain at least one character of a string. In one embodiment, when the data is a null character (i.e., '\0'), the control module 210 may determine that the data has reached the end. In one embodiment, when the processing device 20 finishes executing the programming language function of the control device, the count value may be reset to the value 0, but is not limited thereto.

[0047] In one embodiment, when the function type includes a first function, the control module 210 can compare the count value with the length to generate a comparison result. In one embodiment, when the function type includes the strset of a second function, the control module 210 can determine whether the data has reached the end based on the data received from the subordinate device to generate a determination result. In one embodiment, when the function type includes the strnset of a second function, the control module 210 can compare the count value with the length to generate a comparison result, or it can determine whether the data has reached the end to generate a determination result.

[0048] In one embodiment, the control module 210, being an accessory device, can receive a write response message in response to the write-fill value being entered into the destination address. In one embodiment, based on the write response message, the control module 210 can update the count value (e.g., increment the count value by 1) and the destination address. Furthermore, the control module 210 can repeat the above step (B) until a determination result indicates that the data has reached the end or a comparison result indicates that the count equals the length.

[0049] In one embodiment, when the comparison result indicates that the count value is less than the length, the write module 230 can (e.g., via the transmission module 240) write the input value to the destination address. Specifically, via the transmission module 240, the write module 230 can transmit a write command and the input value to the slave device (e.g., ...). Figure 1 The slave device 120 can write a value to the destination address according to a write command. In one embodiment, when the comparison result indicates that the count is equal to (or greater than) the length, the transmission module 240 can transmit an interrupt signal to the control device (e.g., ...). Figure 1 The control device 100 mentioned above.

[0050] In one embodiment, when the determination result indicates that the data has not reached the end, the writing module 230 can (e.g., via the transmission module 240) write the input value to the destination address. Specifically, via the transmission module 240, the writing module 230 can transmit the write command and the input value to the slave device (e.g., ...). Figure 1 The slave device 120, according to the write command, can write a value into the destination address. In one embodiment, when the determination result indicates that the data has reached the end, the transmission module 240 can (e.g., via the transmission module 240) transmit an interrupt signal to the control device (e.g., ...). Figure 1 The control device 100 mentioned above.

[0051] In one embodiment, when the judgment result indicates that the data has not reached the end and the comparison result indicates that the count value is less than the length, the writing module 230 can (e.g., via the transmission module 240) write the input value to the destination address. Specifically, via the transmission module 240, the writing module 230 can transmit the write command and the input value to the slave device (e.g., via the transmission module 240). Figure 1 The slave device 120, according to the write command, can write a value into the destination address.

[0052] Figure 3 This is a schematic diagram of a control device 30 in an embodiment of the present invention, which can be used to implement... Figure 1 The control device 100. The control device 30 may include a receiving module 300, a conversion module 310, and a transmission module 320. The receiving module 300 can receive data from a processing device (e.g., a processing device). Figure 1 The processing device 110 receives an interrupt signal or an address translation request message. The address translation request message may contain a destination address. A translation module 310 may be coupled to a receiving module 300. Based on the address translation request message, the translation module 310 may translate (e.g., by means of segmentation mapping logic) the destination address to generate at least one translated destination address. A transmission module 320 may be coupled to the translation module 310. The transmission module 320 may transmit an address translation request response message to the processing device, the address translation request response message containing at least one translated destination address. In one embodiment, the translation module 310 may include (e.g., a memory management unit, MMU), but is not limited thereto.

[0053] In one embodiment, the destination address may include a virtual address, and the translated destination address may include a physical address. That is, the translation module 310 can translate a virtual address into at least one physical address. In one embodiment, when the size of the destination address included (e.g., an indication) in the configuration received by the processing device is greater than a threshold (e.g., 4000 bytes), the processing device may transmit an address translation request to the control device 30. In one embodiment, when at least one translated destination address is received from the control device 30, the processing device may continue executing the programming language functions of the control device 30.

[0054] The operation of the processing device 20 can be summarized as a process S40, such as... Figure 4 As shown, and including the following steps:

[0055] Step S400: Begin.

[0056] Step S402: Receive a configuration of a programming language function from a control device (e.g., control device 100), wherein the configuration includes a destination address, a length, a fill value, and a function type.

[0057] Step S404: Based on the function type, set an access state for accessing a slave device (e.g., slave device 120).

[0058] Step S406: Read data from the slave device based on the access status.

[0059] Step S408: Based on the function type, compare a count value with the length to generate a comparison result, or based on the data received from the slave device, determine whether the data has reached an end to generate a judgment result, or generate the judgment result and generate the comparison result.

[0060] Step S410: Write the input value into the destination address based on at least one of the access status, the judgment result, and the comparison result.

[0061] Step S412: Based on at least one of the judgment result and the comparison result, transmit an interrupt signal to the control device.

[0062] Step S414: End.

[0063] For details and changes to process S40, please refer to the foregoing explanation, which will not be repeated here.

[0064] The execution of the program language functions of the control device 100 by the processing device 20 can be summarized as a process S50, such as... Figure 5 As shown, and including the following steps:

[0065] Step S500: Begin.

[0066] Step S502: Receive the configuration of programming language functions from the control device 100.

[0067] Step S504: When the function type in the configuration is strset or strnset, read data from the dependent device 120.

[0068] Step S506: When the function type in the configuration is memset, start the write module 230 and compare whether the count value is equal to the length. If yes, execute step S512; if no, execute step S508 through the write module 230. When the function type in the configuration is strset, start the read module 220 and the write module 230, determine whether the data has reached the end. If yes, execute step S512; if no, execute step S508 through the write module 230. When the function type in the configuration is strnset, determine whether the data has reached the end or compare whether the count value is equal to the length. If yes, execute step S512; if neither, execute step S508 through the write module 230.

[0069] Step S508: Write the input value to slave device 120.

[0070] Step S510: Update the count value and destination address, and return to step S504.

[0071] Step S512: Transmit an interrupt signal to the control device 100.

[0072] Step S514: End.

[0073] For a detailed explanation and changes to process S50, please refer to the foregoing description, which will not be repeated here.

[0074] The operation of the control device 100, the processing device 110, and the slave device 120 can be summarized into a process S60, such as... Figure 6 As shown, and including the following steps:

[0075] Step S600: Begin.

[0076] Step S602: The control device 100 transmits the configuration of the programming language functions to the processing device 110.

[0077] Step S604: Processing device 110 transmits a read command to slave device 120.

[0078] Step S606: The slave device 120 transmits the read response message to the processing device 110.

[0079] Step S608: The processing device 110 determines whether the data has reached the end or compares whether the count value is equal to the length.

[0080] Step S610: The processing device 110 transmits the write command and the filled value to the slave device 120.

[0081] Step S612: The slave device 120 transmits a write response message to the processing device 110.

[0082] Step S614: Processing device 110 updates the count value and destination address.

[0083] Step S616: The processing device 110 transmits an interrupt signal to the control device 100.

[0084] Step S618: End.

[0085] According to process S60, steps S604 to S614 involve operations not involving the control device 100. That is, during the period from steps S604 to S614, the control device 100 can execute other programming language functions.

[0086] For a detailed explanation and changes to process S60, please refer to the foregoing description, which will not be repeated here.

[0087] Figure 7 This is a circuit diagram 70 illustrating how a control module 210 activates a reading module 220 in an embodiment of the present invention. Circuit diagram 70 may include a multiplexer MU1. The multiplexer MU1 may include a selection control input terminal, which receives the result of the control module 210's judgment condition "whether the function type is not equal to memset" (for example, if the judgment result is yes, it receives a signal "1", and if the judgment result is no, it receives a signal "0"). Furthermore, the multiplexer MU1 may include an output terminal coupled to the reading module 220, a first input terminal receiving a start signal "CHN EN" (which can be understood as a start signal for activating the processing device 20) to activate the reading module 220, and a second input terminal receiving a signal "0". In one embodiment, when the judgment result is that the function type is not equal to memset, the selection control input terminal receives a signal "1", that is, the multiplexer MU1 selects the start signal "CHN EN" from the first input terminal to output. Accordingly, the reading module 220 is activated. In one embodiment, when the determination result is that the function type is equal to memset, the control input terminal receives the signal "0", that is, the multiplexer MU1 selects the signal "0" at the second input terminal for output. Accordingly, the read module 220 is not started. The start signal "CHN EN" used to start the read module 220 can also be the start signal used to start the processing device 20. That is, when the function type is not equal to memset and the processing device 20 is started, the read module 220 is started. Furthermore, the start signal used to start the processing device 20 can also be the start signal used to start the write module 230. That is, regardless of the function type (i.e., when the function type is equal to any of the above function types) and the processing device 20 is started, the write module 230 is started.

[0088] Figure 8This is a circuit diagram 80 illustrating the data reading path of a reading module 220 in an embodiment of the present invention. Circuit diagram 80 may include a demultiplexer (DMU1). The DMU1 may include a selection data input terminal, used to receive the result of the control module 210's judgment condition "whether the function type is equal to strset or strnset" (for example, if the judgment result is yes, a signal "1" is received; if the judgment result is no, a signal "0" is received). Furthermore, the DMU1 may include an input terminal for receiving the "read data" signal, a first output terminal coupled to the control module 210, and a second output terminal coupled to a first-in-first-out (FIFO) buffer, which respectively output the "read data" signal to the control module 210 and the FIFO buffer. In one embodiment, when the judgment result is that the function type is equal to strset or strnset, the selection control input terminal receives the signal "1," that is, the DMU1 selects the first output terminal to output the "read data" signal. Accordingly, the reading module 220 can output the "read data" signal to the control module 210 to read data from the control module 210. In one embodiment, when the determination result is that the function type is not equal to strset and strnset, the control input terminal is selected to receive the signal "0", that is, the first demultiplexer DMU1 selects the second output terminal to output the signal "read data". Accordingly, the reading module 220 can output the signal "read data" to the first-in-first-out buffer to read the data in the first-in-first-out buffer.

[0089] Figure 9 This is a circuit diagram 90 illustrating the data writing path of a write module 230 in an embodiment of the present invention. Circuit diagram 90 may include a multiplexer MU2. The multiplexer MU2 may include a selection control input terminal, which receives the result of the judgment condition "whether the function type is equal to a non-function (e.g., not_function)" from the control module 210 (e.g., if the judgment result is yes, a signal "1" is received; if the judgment result is no, a signal "0" is received). Furthermore, the multiplexer MU2 may include an output terminal coupled to the write module 230, a first input terminal receiving the signal "FIFO buffer", and a second input terminal receiving the signal "control module". In one embodiment, when the judgment result is that the function type is equal to a non-function, the selection control input terminal receives the signal "1", that is, the multiplexer MU2 selects the signal "FIFO buffer" from the first input terminal to write data. Accordingly, the write module 230 can write data from the FIFO buffer to a slave device (e.g., slave device 120). In one embodiment, when the determination result is that the function type is not equal to a non-function, the control input terminal is selected to receive the signal "0", that is, the multiplexer MU2 selects the signal "control module" at the second input terminal to write data. Accordingly, the writing module 230 can write the data of the control module (i.e., fill in the value) to the slave device.

[0090] Figure 10 This is a circuit diagram 1000 of a control module 210 in an embodiment of the present invention, which determines an interrupt condition based on a function type (e.g., to transmit an interrupt signal to the control device 30). Circuit diagram 1000 may include a multiplexer MU3. The multiplexer MU3 may include a selection control input terminal, which receives the "function type" determined by the control module 210. For example, when the function type is non-function, the received signal is "00"; when the function type is memset, the received signal is "01"; when the function type is strset, the received signal is "10"; and when the function type is strnset, the received signal is "11". Furthermore, the multiplexer MU3 may include an output terminal for outputting the "interrupt condition", a first input terminal and a second input terminal for receiving the signal "count value is greater than or equal to length", a third input terminal for receiving the signal "data has reached the end", and a fourth input terminal for receiving the signal "count value is greater than or equal to length or data has reached the end". In one embodiment, when the function type is memset, the control input terminal receives signal "01", meaning the multiplexer MU3 selects the signal "count value is greater than or equal to length" from the second input terminal for output. Accordingly, the control module 210 can determine that the interrupt condition is "count value is greater than or equal to length". In another embodiment, when the function type is strnset, the control input terminal receives signal "11", meaning the multiplexer MU3 selects the signal "count value is greater than or equal to length or data has reached the end" from the fourth input terminal for output. Accordingly, the control module 210 can determine that the interrupt condition is "count value is greater than or equal to length or data has reached the end". The method for determining the interrupt condition for non-function or strnset functions is described above and will not be repeated here.

[0091] In the above embodiments, "determine" can be replaced by "operation", "calculation", "obtain", "generate", or "output". "Based on" can be replaced by "through" or "by using". "Includes" can be replaced by "for".

[0092] It should be noted that the processing device 20, the control device 30, or their modules can be implemented in many ways. For example, the modules in the above-mentioned devices can be integrated into at least one module. Furthermore, the processing device 20, the control device 30, or their modules can be implemented in hardware (e.g., circuitry), software, firmware (a combination of hardware devices and computer instructions and data, where the computer instructions and data are read-only software on the hardware device), electronic systems, or combinations of the above modules, and are not limited thereto.

[0093] In summary, by executing the programming language functions of the control device 30 through the processing device 20, the processing time of the central processing unit (CPU) is reduced, as is the memory storage space and program space. Therefore, the CPU can execute programming language functions efficiently and the execution speed of these functions can be improved.

[0094] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made within the scope of the claims of the present invention should be included in the scope of the present invention.

Claims

1. A processing apparatus for executing a programming language function of a control device, characterized in that, Include: A receiving module is used to receive a configuration of the programming language function from the control device, wherein the configuration includes a destination address, a length, a fill value and a function type; A control module, coupled to the receiving module, is used to perform the following steps: (A) Based on the function type, set an access state for accessing a slave device; and (B) Based on the function type, compare a count value with the length to produce a comparison result, or based on data received from the slave device, determine whether the data has reached an end to produce a determination result, or produce the determination result and the comparison result. A read module, coupled to the control module, is used to read the data from the slave device according to the access status; A write module, coupled to the control module, is used to write the input value into the destination address based on at least one of the access status, the judgment result, and the comparison result. as well as A transmission module, coupled to the control module, is used to transmit an interrupt signal to the control device based on at least one of the judgment result and the comparison result.

2. The processing apparatus as described in claim 1, characterized in that, (A) Steps include: When the function type contains a first function for setting a memory location, the access state is set to initiate the write module; and When the function type contains a second function for setting a string, the access state is set to start the read module and the write module.

3. The processing apparatus as described in claim 2, characterized in that, (B) Steps include: When the function type contains the first function, the count value is compared with the length to produce the comparison result; and When the function type includes the second function, based on the data received from the slave device, it is determined whether the data has reached the end to generate the determination result, or the determination result and the comparison result are generated.

4. The processing apparatus as described in claim 1, characterized in that, The steps performed by this control module also include: The slave device receives a write response message in response to the writing of the input value into the destination address; Update the count value and the destination address based on the write response message; as well as Repeat step (B) until the judgment result indicates that the data has reached the end or the comparison result indicates that the count value is equal to the length.

5. The processing apparatus as claimed in claim 1, characterized in that, When the comparison result indicates that the count value is less than the length, the writing module writes the input value to the destination address.

6. The processing apparatus as claimed in claim 1, characterized in that, When the comparison result indicates that the count value is equal to the length, the transmission module transmits the interrupt signal to the control device.

7. The processing apparatus as claimed in claim 1, characterized in that, When the judgment result indicates that the data has not reached the end, the writing module writes the input value to the destination address.

8. The processing apparatus as claimed in claim 1, characterized in that, When the judgment result indicates that the data has reached the end, the transmission module sends the interrupt signal to the control device.

9. The processing apparatus as claimed in claim 1, characterized in that, When the judgment result indicates that the data has not reached the end and the comparison result indicates that the count value is less than the length, the writing module writes the input value into the destination address.

10. A method for executing a programming language function of a control device, for a processing device, characterized in that, Include: The control device receives a configuration of the programming language function, wherein the configuration includes a destination address, a length, a fill value, and a function type; Based on the function type, set an access state for accessing a slave device; Based on the access status, read data from the slave device; Depending on the function type, a count value is compared with the length to produce a comparison result, or the data received from the slave device is used to determine whether the data has reached an end to produce a judgment result, or the judgment result and the comparison result are both generated. Based on at least one of the access status, the judgment result, and the comparison result, write the input value into the destination address; as well as Based on at least one of the judgment result and the comparison result, an interrupt signal is transmitted to the control device.