Signal source processing method, controller, electronic device, storage medium and program
By using the input signal processing module and control register of the target protocol host-side controller in the control system for delay processing, multiple target bit signal sources are generated, which solves the problem of high demand for multiple signal sources in the existing technology and achieves Reduce hardware costs and improve efficiency.
Patent Information
- Application Number
- CN202410791905.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-10-15
AI Technical Summary
In a control system, when multiple control signals with the same period and duty cycle but only phase offset need to be generated, the existing technology requires multiple signal source generation modules, resulting in high hardware costs.
By configuring the input signal processing module and control register in the target protocol host-side controller, using the preset delay configuration information to determine the delay output time of the signal source input signal, and performing delay processing to generate multiple target bit signal sources , thereby reducing the number of signal sources.
It effectively reduces the number of signal sources, reduces hardware costs, and improves the efficiency of signal source processing.
Smart Images

Figure CN118784483A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of communication technology, and in particular to a signal source processing method, a controller, an electronic device, a storage medium, and a program product. Background Art
[0002] In some control scenarios, some types of control signals have a need for phase differences, resulting in the need for multiple control signals with the same period and duty cycle but only phase offset in some control scenarios. In a specific example, taking the automotive domain control chip as an example, in the control scenario of PWM signals, there is a need for the same period and duty cycle but phase differences between signals, such as engine control signals, brake system signals, lighting control signals, and temperature control system signals in the automotive control system. The MSC (Micro Second Channel) protocol is a protocol that can transmit PWM signals. By controlling the frame data of the MSC protocol, the above requirements can be achieved. MSC is a high-speed serial interface protocol, which is characterized by being able to send PWM (Pulse Width Modulation) signals, and thus in the application scenario of the PWM control system, it can effectively reduce the occupation of the IO (Input / Output) port of the microcontroller chip. Due to the advantages of the MSC protocol in power control, automotive control chips, dedicated ICs (integrated circuits), etc. are currently beginning to support the MSC protocol.
[0003] At present, when a data frame contains multiple bits, the data source of the data frame bits can be obtained through an external module, that is, each bit of the data frame needs to be configured with a separate data source. For example, for an MSC host, the data source of the data frame bits can be obtained through an external module (other modules integrated on the microcontroller, or a signal source outside the microcontroller), usually a PWM signal, that is, each bit of the MSC host data frame needs to be configured with a separate data source to generate a signal for the corresponding bit.
[0004] In the process of implementing the present invention, the inventors found that in the control system, the routing of multiple control signals with the same period and duty cycle and only phase offset is required to be generated by multiple signal sources, and the multiple signal sources are respectively routed to multiple corresponding bits of the data frame. Therefore, the number of hardware modules generating signal sources also needs to be adapted to one-to-one configuration. The more the number of similar control signals mentioned above, the more the number of hardware modules generating signal sources, and the higher the hardware cost. Summary of the invention
[0005] The embodiments of the present invention provide a signal source processing method, a controller, an electronic device, a storage medium and a program product, which can reduce the number of signal sources used to generate signals, thereby reducing the hardware cost of signal source processing.
[0006] According to one aspect of the present invention, a signal source processing method is provided, which is applied to a target protocol host side controller, wherein the target protocol host side controller is configured with an input signal processing module and a control register, and the method comprises:
[0007] Determine the delayed output time matched by the current signal source input signal according to the preset delay configuration information through the control register, and send the delayed output time to the input signal processing module; wherein the current signal source input signal is the input signal sent by the target signal source generating module at the current moment;
[0008] The input signal processing module performs delay processing on the current signal source input signal according to the delayed output time to obtain a target bit signal source; wherein the number of the target bit signal sources is multiple;
[0009] A signal source output signal is generated according to the target bit signal source.
[0010] According to another aspect of the present invention, a target protocol host side controller is provided, the target protocol host side controller comprising:
[0011] A control register, used to determine the delayed output time matched by the current signal source input signal according to the preset delay configuration information, and send the delayed output time to the input signal processing module; wherein the current signal source input signal is the input signal sent by the target signal source generating module at the current moment;
[0012] An input signal processing module, used for delaying the current signal source input signal according to the delayed output time to obtain a target bit signal source; wherein the number of the target bit signal sources is multiple;
[0013] A signal source output signal generating module is used to generate a signal source output signal according to the target bit signal source.
[0014] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the signal source processing method described in any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the signal source processing method described in any embodiment of the present invention when executed.
[0019] According to another aspect of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the signal source processing method according to any embodiment of the present invention is implemented.
[0020] After the embodiment of the present invention sends the current signal source input signal to the target protocol host side controller through the target signal source generating module, the control register of the target protocol host side controller determines the delayed output time that matches the current signal source input signal according to the preset delay configuration information, and sends the delayed output time to the input signal processing module of the target protocol host side controller, so that the current signal source input signal is delayed according to the delayed output time through the input signal processing module, thereby obtaining the target bit signal source, and then generating the signal source output signal according to the multiple target bit signal sources. It can be seen that the above technical solution can generate multiple required target bit signal sources according to the delay strategy by configuring the input signal processing module and the control register of the target protocol host side controller, solves the problem that the existing multiple bit signal sources need to be configured with multiple signal source generating modules, and can reduce the number of signal sources used to generate signals, thereby reducing the hardware cost of signal source processing.
[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 is a flow chart of a signal source processing method provided by Embodiment 1 of the present invention;
[0024] Figure 2It is a schematic diagram of a flow chart of generating target bit signal sources corresponding to different bits by using multiple signal source generating modules in the prior art;
[0025] Figure 3 It is a schematic diagram of a process of generating target bit signal sources corresponding to different bits by a target signal source generating module provided in the first embodiment of the present invention;
[0026] Figure 4 is a flow chart of a signal source processing method provided by Embodiment 2 of the present invention;
[0027] Figure 5 It is a schematic diagram of a flow chart of each input signal processing module processing a signal source provided by the second embodiment of the present invention;
[0028] Figure 6 This is a schematic diagram of the internal structure of an MSC host provided by Embodiment 2 of the present invention;
[0029] Figure 7 This is a schematic diagram of the effect of a signal source processing flow provided by Embodiment 2 of the present invention;
[0030] Figure 8 It is a partial structural diagram of a target protocol host-side controller provided by Embodiment 3 of the present invention;
[0031] Fig. 9 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0033] It should be noted that the terms "include", "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or apparatus.
[0034] Embodiment 1
[0035] Figure 1This is a flowchart of a signal source processing method provided in the first embodiment of the present invention. This embodiment is applicable to the case where a signal source input signal sent by a target signal source generating module is subjected to delay processing according to an input signal processing module and a control register configured on a target protocol host side controller to generate a plurality of bit signal sources. The method can be executed by a signal source processing device, which can be implemented by software and / or hardware, and can generally be integrated in a target protocol host side controller. The target protocol host side controller can be integrated in an electronic device, which can be a terminal device or a server device. As long as the target protocol host side controller can be integrated for data communication, the embodiment of the present invention does not limit the specific device type of the electronic device. Accordingly, Figure 1 As shown, the method includes the following operations:
[0036] S110, determining the delayed output time matching the current signal source input signal according to the preset delay configuration information through the control register, and sending the delayed output time to the input signal processing module; wherein the current signal source input signal is the input signal sent by the target signal source generating module at the current moment.
[0037] S120. Delay processing is performed on the current signal source input signal according to the delayed output time by the input signal processing module to obtain a target bit signal source; wherein the number of the target bit signal sources is multiple.
[0038] Among them, the target protocol host side controller can be a host side controller that performs data processing based on the target protocol. Optionally, the target protocol can be of any type, and can support protocol types that send signals with the same period and duty cycle but with phase differences. Exemplarily, the target protocol can be an MSC protocol, etc., and correspondingly, the target protocol host side controller can be an MSC host side controller. The embodiment of the present invention does not limit the specific protocol type of the target protocol. As a host side controller, that is, the control module is integrated on the chip, it can control the slave side module. For example, the MSC host side controller can control the MSC peripheral, that is, the power device.
[0039] Among them, the input signal processing module is a module configured inside the target protocol host side controller, which can be a hardware module or a software type functional module. The embodiment of the present invention does not limit the implementation type of the input signal processing module. The input signal processing module is mainly used to delay the signal source input signal corresponding to each bit signal. One bit signal can be configured with an input signal processing module. The control register is a hardware module configured inside the target protocol host side controller, which is mainly used to determine the delayed output time matching the signal source input signal corresponding to each bit signal. Optionally, the number of control registers can be one or more, which can be configured as needed. The embodiment of the present invention does not limit the specific number of control registers. The target signal source generating module can be a module that sends the signal source input signal to the target protocol host side controller. Optionally, the target signal source generating module can be one or more.
[0040] Among them, the preset delay configuration information can be the delayed output time that matches each signal source input signal pre-configured for the control register, and the control register can determine the delayed output time corresponding to different bit signals according to the preset delay configuration information. In an embodiment of the present invention, the preset delay configuration information can be dynamically configured on demand, and the so-called dynamic on-demand configuration can be to configure one or more required delayed output times for a control register. The current signal source input signal can be the signal source input signal corresponding to the current bit signal, and the signal is sent to the target protocol host side controller by the target signal source generating module at the current moment. The delayed output time is also the time for delaying the output of the signal source input signal. It can be understood that due to the phase difference, the delayed output time of the signal source input signal corresponding to different bit signals is different. The target bit signal source is also the signal source of each corresponding bit obtained after delay processing of the current signal source input signal.
[0041] First of all, the technical solution of this embodiment is mainly applicable to such an application scenario: a target signal source generating module is set to communicate with a target protocol host side controller, and the target signal source generating module sends an input signal to the target protocol host side controller at a set frequency. It can be understood that at different times, the high and low level states of the current signal source input signal received by the target protocol host side controller may be the same or different. Accordingly, after the target signal source generating module sends the current signal source input signal to the target protocol host side controller, the control register can determine the delayed output time that matches the current signal source input signal according to the pre-configured preset delay configuration information, and send the delayed output time to the input signal processing module.
[0042] Correspondingly, after receiving the delayed output time, the input signal processing module can use the delayed output time to delay the current signal source input signal, so that the current signal source input signal is output after delay. Thus, based on the signal source input signal sent by a target signal source generating module, after different delay processing processes, the target bit signal source corresponding to different bits can be generated, without the need to configure a signal source generating module for each bit to generate the target bit signal source corresponding to different bits.
[0043] In a specific example, assuming that the target signal source generation module can generate a current signal source input signal with a period of 1ms and a duty cycle of 50%, then based on the target signal source generation module, multiple target bit signal sources with a period of 1ms, a duty cycle of 50% and phase differences can be generated by configuring multiple input signal processing modules. Assuming that the target signal source generation module can generate a current signal source input signal with a period of 2ms and a duty cycle of 50%, then based on the target signal source generation module, multiple target bit signal sources with a period of 2ms, a duty cycle of 50% and phase differences can be generated by configuring multiple input signal processing modules. It can be understood that the target protocol host side controller can simultaneously configure the corresponding control registers and input signal processing modules for multiple target signal source generation modules, so as to simultaneously generate multiple target bit signal sources corresponding to each target signal source generation module using a delay strategy for multiple target signal source generation modules. Among them, the multiple target bit signal sources corresponding to a target signal source generation module can be signals with the same period and duty cycle but with phase differences.
[0044] Figure 2 It is a flow chart of generating target bit signal sources corresponding to different bits by using multiple signal source generating modules in the prior art. Figure 3 It is a flowchart of generating a target bit signal source corresponding to different bits through a target signal source generating module provided by the first embodiment of the present invention. In a specific example, taking the processing scenario of the MSC data frame signal source as an example, in the processing scenario of the MSC data frame signal source, a PWM generating source is used as the target signal source generating module, and the MSC host controller is used as the target protocol host side controller, which is usually an integrated host side controller of the MSC communication module, and supports two types of communication frames: command frames and data frames. Among them, the command frame is usually used to control the function of the MSC slave, and the data frame is usually used to control the output of the MSC slave, usually pin output control. A data frame of the MSC host contains multiple bits, and the peripheral supporting MSC usually outputs the status of the data frame bit to the pin of the MSC peripheral for controlling the power device, and the bit and the pin have a clear mapping relationship. Such as Figure 2As shown, there are some scenarios that require multiple PWM signals with the same period and duty cycle, but only phase offset, such as engine control signals, brake system signals, lighting control signals, and temperature control system signals in automobile control systems. In the traditional MSC implementation, for the routing of such multiple similar PWM (same period and duty cycle, only phase offset) control signals, multiple PWM generation sources are required. Each PWM generation source generates a signal source input signal and sends it to the MSC host. The MSC host configures each received signal source input signal as a signal source of the corresponding bit position, and outputs it to the MSC slave to obtain the signal of the corresponding bit position. As a result, multiple PWM signal sources are routed to multiple corresponding bits of the MSC host data frame.
[0045] like Figure 3 As shown, the embodiment of the present invention generates a signal source input signal based on only one PWM generation source, and sends the generated signal source input signal to the MSC host. After the MSC host receives the current signal source input signal, it determines the delayed output time matched by the current signal source input signal according to the preset delay configuration information through the internally configured control register, and sends the determined delayed output time to the input signal processing module. The input signal processing module performs delay processing on the current signal source input signal according to the delayed output time. After the delay processing, the phase of the signal source of the corresponding bit is shifted by a certain value, such as x, 2x, 3x or 4x, etc. Finally, the multiple PWM signal sources configured by the MSC host are respectively routed to multiple corresponding bits of the MSC host data frame. It can be seen that the signal source processing method provided by the embodiment of the present invention can generate multiple PWM signals with the same periodic duty cycle but different phases based on one PWM generation source, thereby reducing the number of signal sources required. Compared with the traditional implementation scheme, the signal source processing method provided by the embodiment of the present invention can reduce the number of PWM hardware signal sources in a specific scenario (multiple PWM control signals only have a phase difference), thereby reducing the hardware cost of signal source processing.
[0046] It should be noted that Figure 2 and Figure 3 Only four target bit signal sources are schematically illustrated, namely, BIT[w] signal source, BIT[x] signal source, BIT[y] signal source, and BIT[z] signal source. In actual scenarios, the number of target bit signal sources can be configured as needed, for example, it can be 2, 4, 6 or 8, etc. The embodiments of the present invention do not limit the specific number of target bit signal sources.
[0047] It should also be noted that different types of target signal source generation modules may have different numbers of target bit signal sources configured. For example, target signal source generation module 1 may have 4 target bit signal sources configured, and target signal source generation module 2 may have 8 target bit signal sources configured.
[0048] S130. Generate a signal source output signal according to the target bit signal source.
[0049] In an embodiment of the present invention, the target protocol host side controller may also be configured with a data filling module and a signal output module. Accordingly, after the target protocol host side controller generates multiple target bit signal sources through the input signal processing module, the data filling module can be used to fill each target bit signal source in the data frame to be sent to obtain a complete data frame, which is the signal source output signal generated by the target protocol host side controller. The target protocol host side controller can send the generated signal source output signal to the corresponding target protocol slave in the form of a data frame through the signal output module. Accordingly, after the target protocol slave receives the signal source output signal, it parses it and obtains the signal corresponding to each bit.
[0050] After the embodiment of the present invention sends the current signal source input signal to the target protocol host side controller through the target signal source generating module, the control register of the target protocol host side controller determines the delayed output time that matches the current signal source input signal according to the preset delay configuration information, and sends the delayed output time to the input signal processing module of the target protocol host side controller, so that the current signal source input signal is delayed according to the delayed output time through the input signal processing module, thereby obtaining the target bit signal source, and then generating the signal source output signal according to the multiple target bit signal sources. It can be seen that the above technical solution can generate multiple required target bit signal sources according to the delay strategy by configuring the input signal processing module and the control register of the target protocol host side controller, solves the problem that the existing multiple bit signal sources need to be configured with multiple signal source generating modules, and can reduce the number of signal sources used to generate signals, thereby reducing the hardware cost of signal source processing.
[0051] Embodiment 2
[0052] Figure 4is a flow chart of a signal source processing method provided by the second embodiment of the present invention. This embodiment is specific based on the above embodiment. In this embodiment, multiple specific optional implementations are provided for configuring the delayed output time, determining the delayed output time matching the current signal source input signal according to the preset delay configuration information through the control register, and delaying the current signal source input signal according to the delayed output time through the input signal processing module. Accordingly, as Figure 4 As shown, the method of this embodiment may include:
[0053] S210 , determining register configuration bits that match input signals of each signal source according to a signal delay time range.
[0054] The signal delay time range may be a time range formed by the delay time of each bit signal. The register configuration bit may be a bit in the control register for storing preset delay configuration information.
[0055] In an embodiment of the present invention, the preset delay configuration information stored in the control register may be a machine delay time that can be directly identified by the register, and the unit of the machine delay time may be Tick (the basic time unit of the operating system). Accordingly, before the preset delay configuration information is flexibly configured on demand in the control register, the delayed output time corresponding to the input signal of each signal source may be first determined, thereby comprehensively processing the delayed output time corresponding to the input signal of each signal source to obtain the signal delay time range.
[0056] Accordingly, after determining the signal delay time range corresponding to each bit signal, the number of bits of the control register that a delayed output time needs to occupy can be determined according to the signal delay time range. Further, according to the total number of bits of the control register and the number of bits of the control register that a delayed output time needs to occupy, the number of preset delay configuration information that can be configured by a control register can be determined, and the number of control registers can be determined, so as to further determine the register configuration bits that match the input signals of each signal source for each determined control register.
[0057] In an optional embodiment of the present invention, the signal delay time range can be determined in the following manner: obtaining the actual delay time of each of the signal source input signals; calculating the machine delay time of each of the signal source input signals based on the actual delay time of each of the signal source input signals and the unit machine cycle time; wherein the unit machine cycle time is determined based on the counting frequency of the counter; determining the signal delay time range based on the machine delay time of each of the signal source input signals.
[0058] The actual delay time may be an actual time measurement quantity, and its unit may be seconds or minutes, etc. The unit machine cycle time may be a unit cycle time used by a control register for timing.
[0059] It is understandable that, since the timing method of the control register is different from the actual time unit, it is necessary to convert the machine timing method that the control register can recognize according to the actual delay time of the signal source input signal to obtain the timing time that the control register can recognize. Specifically, the actual delay time of each signal source input signal can be obtained first, and the unit machine cycle time used by the control register for timing can be determined, so as to calculate the machine delay time of each signal source input signal according to the actual delay time and unit machine cycle time of each signal source input signal. Accordingly, after determining the machine delay time of each signal source input signal, the signal delay time range can be determined according to the minimum and maximum values of the machine delay time of the signal source input signal.
[0060] In a specific example, assuming that one of the signal source input signals corresponds to bit signal 1, its actual delay time is 2 seconds. The unit machine cycle time of the control register is 1 Tick, and the actual time represented by each Tick is: 1 / counter counting frequency, that is, That is, the unit machine cycle time is Furthermore, the formula: actual delay time = machine delay time * unit machine cycle can be used to calculate the machine delay time corresponding to the bit signal 1 using the actual delay time and the known unit machine cycle. Among them, the machine delay time is also the number of ticks used by the control register to control the time, that is, how many ticks are delayed. Correspondingly, after the matching machine delay time is calculated for each signal source input signal, the total signal delay time range can be determined according to the machine delay time of each signal source input signal.
[0061] S220, configuring the delayed output time of each of the signal source input signals for the register configuration bits that match the input signals of each of the signal sources.
[0062] Accordingly, after determining the register configuration bit that matches each signal source input signal in the corresponding control register, the register configuration bit of the control register can be configured with the delayed output time of the corresponding signal source input signal. Thus, after each control register completes the configuration process of the register configuration bit, the process of storing the preset delay configuration information through the control register can be completed.
[0063] In a specific example, assuming that there are 8 bit signals, bit signal 0 to bit signal 7, each bit signal corresponds to a signal source input signal, assuming that the minimum delayed output time in each bit signal is 0 Ticks and the maximum is 15 Ticks, then it can be determined that the signal delay time range corresponding to the 8 bit signals of bit signal 0 to bit signal 7 is: 0-15 Ticks. It can be understood that the signal delay time range requires 4 bits of binary data to be configured. That is, the control register needs to reserve at least 4 bits of register configuration bits to configure the delayed output time corresponding to a signal source input signal.
[0064] Correspondingly, assuming that the total number of bits of a control register is 32 bits, if only one control register is used to store the preset delay configuration information of all signal source input signals, the control register can be configured with matching delayed output times for 8-bit bit signals in a 4-bit manner. For example, the 1st to 4th bits of the control register can store the delayed output time of bit signal 0, and the 5th to 8th bits of the control register can store the delayed output time of bit signal 1, and so on, until all bit signals are configured with corresponding delayed output times in the control register. In this way, all preset delay configuration information can be stored in one control register.
[0065] Alternatively, if multiple control registers are used to store preset delay configuration information respectively, for example, two control registers are used to store preset delay configuration information respectively, then four 4-bit register configuration bits can be selected for control register 1 to store the delayed output time of bit signal 0-bit signal 3, and four 4-bit register configuration bits can be selected for control register 2 to store the delayed output time of bit signal 4-bit signal 7. Alternatively, a control register can be configured for each bit signal respectively, and each control register only stores the delayed output time of the corresponding bit signal. For example, control register 1 stores the delayed output time of bit signal 0, control register 2 stores the delayed output time of bit signal 1, and so on.
[0066] In an optional embodiment of the present invention, the target protocol host side controller may include an MSC protocol host side controller; the current signal source input signal may be used to configure each bit state of the MSC protocol data frame. The corresponding input signal processing module may include an edge detection unit, a timer unit and a delayed bit output unit.
[0067] Among them, the edge detection unit can be used to detect the upper edge and / or lower edge of the current signal source input signal. The timer unit can be used for timing processing. The delayed bit output unit can be used to output the required bit signal source. Optionally, the edge detection unit, the timer unit and the delayed bit output unit can be functional units in the form of hardware, or they can also be functional units in the form of software. As long as they can perform the corresponding functions, the embodiment of the present invention does not limit the functional implementation method of the edge detection unit, the timer unit and the delayed bit output unit.
[0068] Accordingly, the above method may also include the following process:
[0069] S230. Acquire the current signal source input signal through the edge detection unit, and perform edge detection on the current signal source input signal. When it is determined that an edge signal is detected for the current signal source input signal, request the control register to determine the delayed output time that matches the current signal source input signal according to the preset delay configuration information.
[0070] In an embodiment of the present invention, the current signal source input signal can be obtained and detected by an edge detection unit configured inside the input signal processing module. Optionally, the edge detection unit can be configured to detect the upper edge and / or lower edge of the current signal source input signal. Once the edge detection unit determines that the edge signal of the upper edge and / or lower edge appears in the current signal source input signal, the control register can be requested to determine the delayed output time that matches the current signal source input signal according to the preset delay configuration information, thereby determining the delayed output time that matches the current signal source input signal according to the preset delay configuration information through the control register. It can be understood that since the number of input signal processing modules can be multiple, different input signal processing modules can simultaneously request the control register to obtain the corresponding delayed output time.
[0071] Exemplarily, the input signal processing module 0 may request the control register to obtain the delayed output time of the bit signal 0 as 0 ticks, the input signal processing module 1 may request the control register to obtain the delayed output time of the bit signal 1 as 3 ticks, and so on.
[0072] In an optional embodiment of the present invention, determining the delayed output time matching the current signal source input signal through the control register according to the preset delay configuration information may include: when the preset delay configuration information of the control register is one, determining the target control register from each of the control registers, and determining the delayed output time matching the current signal source input signal through the preset delay configuration information stored in the target control register; and / or, when there are multiple preset delay configuration information of the control register, determining the target control register from each of the control registers, and determining the target register configuration bit matching the current signal source input signal through the target control register; obtaining the target preset delay configuration information of the target register configuration bit through the target control register, and determining the delayed output time matching the current signal source input signal according to the target preset delay configuration information.
[0073] The target control register may be a control register for storing the delayed output time of the current input signal processing module for processing the current signal source input signal. The target register configuration bit may be a bit in the target control register for storing the delayed output time of the current input signal processing module for processing the current signal source input signal. The target preset delay configuration information may be the delayed output information specifically stored in the target register configuration bit.
[0074] Optionally, if a control register is configured for each input signal processing module to store the delayed output time corresponding to the input signal processing module, only one preset delay configuration information is stored in each control register. In this scenario, after each input signal processing module detects the edge signal through the built-in edge detection unit, it can first determine the corresponding target control register from each control register, and then request the corresponding target control register to obtain the delayed output time matching the current signal source input signal. Exemplarily, bit signal 0 can request control register 0 to obtain the delayed output time matching the current signal source input signal as 0Tick, bit signal 3 can request control register 3 to obtain the delayed output time matching the current signal source input signal as 5Tick, and so on.
[0075] Optionally, if one or more control registers are used to store the delayed output time matched by each input signal processing module, such as using one or two control registers to store the delayed output time matched by each input signal processing module, then one control register can include multiple preset delay configuration information at the same time. In this scenario, after each input signal processing module detects the edge signal through the built-in edge detection unit, it can first determine the corresponding target control register from each control register. After determining the target control register, further determine the target register configuration bit corresponding to the input signal processing module in the target control register, thereby obtaining the target preset delay configuration information of the target register configuration bit through the target control register, and determining the delayed output time matched by the current signal source input signal according to the target preset delay configuration information. Exemplarily, bit signal 0 can request the first 4 bits of control register 1 to obtain the delayed output time matched by the current signal source input signal as 0Tick, and bit signal 3 can request the last 4 bits of control register 1 to obtain the delayed output time matched by the current signal source input signal as 5Tick.
[0076] S240: Perform timing processing according to the delayed output time by the timer unit.
[0077] Correspondingly, after each input signal processing module obtains the delayed output time matching the current signal source input signal, the obtained delayed output time can be sent to the internal timer unit, and the timer unit starts timing processing according to the delayed output time.
[0078] S250. When the timing is determined to be over by the timer unit, the delayed bit output unit obtains a target bit signal source that matches the current signal source input signal by outputting a reverse level of the current level of the current signal source input signal.
[0079] S260: Generate a signal source output signal according to the target bit signal source.
[0080] The current level refers to the level state of the current signal source input signal before the edge signal is detected.
[0081] When the timer unit determines that the timing is over, each input signal processing module can trigger the internal delayed bit output unit to output the reverse level of the current level of the current signal source input signal, thereby obtaining a target bit signal source matching the current signal source input signal.
[0082] Figure 5 is a schematic diagram of a flow chart of each input signal processing module processing a signal source provided by Embodiment 2 of the present invention, Figure 6is a schematic diagram of the internal structure of an MSC host provided by the second embodiment of the present invention. Figure 7 FIG. 1 is a schematic diagram of the effect of a signal source processing flow provided by Embodiment 2 of the present invention. For example, Figure 5 , Figure 6 and Figure 7 As shown, assuming that each input signal processing module detects based on the falling edge, when the timer unit in the input signal processing module 0 determines that the timing is over, the input signal processing module 0 triggers the internal delayed bit output unit to output the reverse level of the current level of the current signal source input signal. If the current level of the current signal source input signal is high, a low level signal can be output to obtain the bit signal source of the bit signal 0 that matches the current signal source input signal; when the timer unit in the input signal processing module 1 determines that the timing is over, the input signal processing module 1 triggers the internal delayed bit output unit to output the reverse level of the current level of the current signal source input signal. If the current level of the current signal source input signal is high, a low level signal can be output to obtain the bit signal source of the bit signal 1 that matches the current signal source input signal. Exemplarily, assuming that the state of the current level is SL, when the timer unit determines that the timing is over, the data filling module can be used to insert the SL (opposite to SL) state in the corresponding bit of the MSC host data frame to complete the data filling of the corresponding bit. Correspondingly, the data filling module can fill the bit signal source output by the delayed bit output unit in each input signal processing module into the bit corresponding to the data frame to obtain the signal source output signal in the final data frame form, and send the signal source output signal to the signal output module, and the signal output module sends the signal source output signal to the MSC slave.
[0083] In a specific example, assuming that the delay output time corresponding to the rising edge of a certain input signal processing module is x, and the current MSC input signal is at a low level, the input signal processing module on the MSC host side detects the rising edge signal of the input signal and keeps the current output unchanged, that is, keeps the output at a low level, and the timer unit starts timing x time. When the timer counts overflow, that is, when the counter completes the timing of the edge delay time, it immediately outputs a reverse level, that is, a high level. The same is true for falling edge detection. Therefore, the state delay of the PWM signal source can be collected to the corresponding bit of the data frame of the MSC host through the input signal processing module.
[0084] In an optional embodiment of the present invention, the target protocol host side controller may also be configured with a data filling module and a signal output module, and the target protocol host side controller may include an MSC protocol host side controller; the current signal source input signal may be used to configure the respective bit states of the MSC protocol data frame; generating a signal source output signal according to the target bit signal source may include: performing data frame filling according to the target bit signal source through the data filling module to obtain the signal source output signal; and sending the signal source output signal to the MSC slave through the signal output module, so that the MSC slave outputs the corresponding bit signal.
[0085] In the embodiment of the present invention, when the above signal source processing method is applied to the communication scenario of the MSC protocol, since the data frame supported by the MSC protocol has multiple bits, the state of each bit (0 or 1) can be parsed by the MSC slave and output on the pin, specifically, 0 or 1, i.e., low level or high level, can be output. Figure 3 As shown, the state of each PWM signal will be collected to the corresponding bit of the data frame of the MSC host, that is, Figure 3 BIT[w] and BIT[y] in the data frame. Correspondingly, the MSC host can combine the target bit signal sources into a data frame through the data filling module to obtain the corresponding signal source output signal, and send the generated signal source output signal to the signal output module, and the signal output module further sends the signal source output signal to the MSC slave. Optionally, the MSC slave parses the received data frame to obtain each bit signal, and can output each bit signal to the IC pin corresponding to the MSC slave, such as outputting the status of the corresponding BIT bit to the pin corresponding to the MSC slave IC. Alternatively, the MSC slave parses the received data frame to obtain each bit signal, so as to directly control the IC using each bit signal. The embodiment of the present invention does not limit the usage of the bit signal output by the MSC slave.
[0086] The above technical solution configures the input signal control module and the control register on the target protocol host side controller, so as to control the input signal control module through the control register to delay the input signal of the signal source. The input signal control module can be located between the input signal of the host data frame and the data frame filling unit, and it performs a specified delay control on the input signal so that when it is routed to multiple data frame bits, the bit states of multiple bits produce a time offset, thereby flexibly controlling the phase of multiple bit signals of the data frame sent by the target protocol host side controller. In the scenario of "multiple control signals with the same period and duty cycle and only phase offset are required", the number of signal generation sources is effectively reduced, and the more control signals with only phase differences are present, the more obvious the effect of reducing the hardware cost of the signal generation source is.
[0087] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are in compliance with the relevant laws and regulations and do not violate public order and good morals.
[0088] It should be noted that any arrangement and combination of the technical features in the above embodiments also falls within the protection scope of the present invention.
[0089] Embodiment 3
[0090] Figure 8 FIG. 1 is a partial structural diagram of a target protocol host side controller provided by Embodiment 3 of the present invention. Figure 8 As shown, the target protocol host side controller may include: a control register 310, an input signal processing module 320 and a signal output module 330, wherein:
[0091] The control register 310 is used to determine the delayed output time matched by the current signal source input signal according to the preset delay configuration information, and send the delayed output time to the input signal processing module; wherein the current signal source input signal is the input signal sent by the target signal source generating module at the current moment;
[0092] An input signal processing module 320 is used to perform delay processing on the current signal source input signal according to the delayed output time to obtain a target bit signal source; wherein the number of the target bit signal sources is multiple;
[0093] The signal source output signal generating module 330 is used to generate a signal source output signal according to the target bit signal source.
[0094] After the embodiment of the present invention sends the current signal source input signal to the target protocol host side controller through the target signal source generating module, the control register of the target protocol host side controller determines the delayed output time that matches the current signal source input signal according to the preset delay configuration information, and sends the delayed output time to the input signal processing module of the target protocol host side controller, so that the current signal source input signal is delayed according to the delayed output time through the input signal processing module, thereby obtaining the target bit signal source, and then generating the signal source output signal according to the multiple target bit signal sources. It can be seen that the above technical solution can generate multiple required target bit signal sources according to the delay strategy by configuring the input signal processing module and the control register of the target protocol host side controller, solves the problem that the existing multiple bit signal sources need to be configured with multiple signal source generating modules, and can reduce the number of signal sources used to generate signals, thereby reducing the hardware cost of signal source processing.
[0095] Optionally, the target protocol host side controller further includes a target control register determination module, which is used to determine the target control register from each of the control registers when there is only one preset delay configuration information of the control register, and the control register 310 is also used to determine the delayed output time that matches the current signal source input signal according to the stored preset delay configuration information; and / or, the target control register determination module is also used to: when there are multiple preset delay configuration information of the control register, determine the target control register from each of the control registers, and the control register 310 is also used to determine the target register configuration bit that matches the current signal source input signal; obtain the target preset delay configuration information of the target register configuration bit, and determine the delayed output time that matches the current signal source input signal according to the target preset delay configuration information.
[0096] Optionally, the above-mentioned target protocol host side controller also includes a delayed output time configuration module, which is used to determine the register configuration bit that matches the input signal of each signal source according to the signal delay time range; and configure the delayed output time of each signal source input signal for the register configuration bit that matches the input signal of each signal source.
[0097] Optionally, the signal delay time range is determined by: obtaining the actual delay time of each signal source input signal; calculating the machine delay time of each signal source input signal based on the actual delay time of each signal source input signal and the unit machine cycle time; wherein the unit machine cycle time is determined according to the counting frequency of the counter; determining the signal delay time range according to the machine delay time of each signal source input signal.
[0098] Optionally, the input signal processing module includes an edge detection unit, a timer unit and a delay bit output unit; the edge detection unit is used to: obtain the current signal source input signal, and perform edge detection on the current signal source input signal, and when it is determined that an edge signal is detected on the current signal source input signal, request the control register to determine the delayed output time matching the current signal source input signal according to preset delay configuration information; the timer unit is also used to: perform timing processing according to the delayed output time; the delay bit output unit is also used to: when the timing is determined to be over by the timer unit, obtain the target bit signal source matching the current signal source input signal according to the reverse level of the current level of the output current signal source input signal.
[0099] Optionally, the signal source output signal generating module includes a data filling module and a signal output module, and the target protocol host side controller includes an MSC protocol host side controller; the current signal source input signal is used to configure each bit state of the MSC protocol data frame; the data filling module is used to: fill the data frame according to the target bit signal source to obtain the signal source output signal; the signal output module is used to: send the signal source output signal to the MSC slave, so that the MSC slave outputs the corresponding bit signal.
[0100] The target protocol host side controller can execute the signal source processing method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, please refer to the signal source processing method provided by any embodiment of the present invention.
[0101] Since the target protocol host side controller introduced above is a controller that can execute the signal source processing method in the embodiment of the present invention, based on the signal source processing method introduced in the embodiment of the present invention, the technical personnel of the field can understand the specific implementation of the target protocol host side controller of the present embodiment and its various variations, so how the target protocol host side controller implements the signal source processing method in the embodiment of the present invention is not introduced in detail here. As long as the technical personnel of the field implement the controller used by the signal source processing method in the embodiment of the present invention, it belongs to the scope of protection of this application.
[0102] Embodiment 4
[0103] Fig. 9 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0104] like Fig. 9As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0105] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0106] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a signal source processing method.
[0107] Optionally, the signal source processing method is applied to a target protocol host side controller, the target protocol host side controller is configured with an input signal processing module and a control register, the target protocol host side controller is communicatively connected to a signal source generating module, the signal source processing method may include: determining a delayed output time matching a current signal source input signal according to preset delay configuration information through the control register, and sending the delayed output time to the input signal processing module; wherein the current signal source input signal is the input signal sent by the signal source generating module at the current moment; performing delay processing on the current signal source input signal according to the delayed output time through the input signal processing module to obtain a target bit signal source matching the current signal source input signal; wherein the number of the target bit signal sources is multiple; and generating a signal source output signal according to the target bit signal source.
[0108] In some embodiments, the signal source processing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the signal source processing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the signal source processing method in any other appropriate manner (e.g., by means of firmware).
[0109] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0110] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0111] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0112] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0113] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0114] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0115] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0116] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A signal source processing method, characterized in that: Applied to a target protocol host side controller, the target protocol host side controller is configured with an input signal processing module and a control register, the method comprises: Determine the delayed output time matched by the current signal source input signal according to the preset delay configuration information through the control register, and send the delayed output time to the input signal processing module; wherein the current signal source input signal is the input signal sent by the target signal source generating module at the current moment; The input signal processing module performs delay processing on the current signal source input signal according to the delayed output time to obtain a target bit signal source; wherein the number of the target bit signal sources is multiple; A signal source output signal is generated according to the target bit signal source.
2. The method according to claim 1, characterized in that The step of determining the delayed output time matched by the current signal source input signal according to the preset delay configuration information through the control register includes: In the case where there is only one preset delay configuration information in the control register, a target control register is determined from each of the control registers, and a delayed output time matching the input signal of the current signal source is determined by the preset delay configuration information stored in the target control register; and / or In the case where there are multiple preset delay configuration information of the control register, determining a target control register from each of the control registers, and determining a target register configuration bit that matches the current signal source input signal through the target control register; The target preset delay configuration information of the target register configuration bit is obtained through the target control register, and the delayed output time matched by the current signal source input signal is determined according to the target preset delay configuration information.
3. The method according to claim 1, characterized in that Before determining the delayed output time matched by the current signal source input signal according to the preset delay configuration information through the control register, the method further includes: Determine the register configuration bit position that matches the input signal of each signal source according to the signal delay time range; The register configuration bits that match the input signals of each of the signal sources configure the delayed output time of the input signals of each of the signal sources.
4. The method according to claim 3, characterized in that The signal delay time range is determined by the following method: Obtaining the actual delay time of the input signal of each of the signal sources; Calculating the machine delay time of each of the signal source input signals according to the actual delay time of each of the signal source input signals and the unit machine cycle time; wherein the unit machine cycle time is determined according to the counting frequency of the counter; The signal delay time range is determined according to the machine delay time of the input signal of each signal source.
5. The method according to claim 1, characterized in that The input signal processing module includes an edge detection unit, a timer unit and a delay bit output unit; The determining, through the control register according to preset delay configuration information, the delayed output time matched by the current signal source input signal comprises: The current signal source input signal is acquired through the edge detection unit, and edge detection is performed on the current signal source input signal. When it is determined that an edge signal is detected for the current signal source input signal, the control register is requested to determine a delayed output time matched with the current signal source input signal according to preset delay configuration information; The delay processing of the current signal source input signal according to the delayed output time by the input signal processing module to obtain a target bit signal source matching the current signal source input signal includes: Performing timing processing according to the delayed output time by the timer unit; When the timing is determined to be over by the timer unit, the delayed bit output unit obtains a target bit signal source that matches the current signal source input signal by outputting a reverse level of the current level of the current signal source input signal.
6. The method according to any one of claims 1 to 5, characterized in that: The target protocol host side controller is also configured with a data filling module and a signal output module, and the target protocol host side controller includes an MSC protocol host side controller; The current signal source input signal is used to configure the status of each bit of the MSC protocol data frame; The step of generating a signal source output signal according to the target bit signal source comprises: Filling the data frame according to the target bit signal source by the data filling module to obtain the signal source output signal; The signal source output signal is sent to the MSC slave through the signal output module, so that the MSC slave outputs a corresponding bit signal.
7. A target protocol host side controller, characterized in that: The target protocol host side controller comprises: A control register, used to determine the delayed output time matched by the current signal source input signal according to the preset delay configuration information, and send the delayed output time to the input signal processing module; wherein the current signal source input signal is the input signal sent by the target signal source generating module at the current moment; An input signal processing module, used for delaying the current signal source input signal according to the delayed output time to obtain a target bit signal source; wherein the number of the target bit signal sources is multiple; A signal source output signal generating module is used to generate a signal source output signal according to the target bit signal source.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the signal source processing method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the signal source processing method described in any one of claims 1 to 6 when executed.
10. A computer program product comprising a computer program / instructions, wherein: When the computer program / instructions are executed by a processor, the signal source processing method according to any one of claims 1 to 6 is implemented.
