DSP (Digital Signal Processor) loading method and device based on Fudan microprocessor

By using shared memory handshake communication between the Fudan microprocessor and the DSP, the DSP was successfully loaded even with limited network port resources, solving the problem of insufficient network port resources and improving data transmission efficiency and speed.

CN119052218AActive Publication Date: 2024-11-29DATANG LIANCHENG INFORMATION SYST TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411006494.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-11-29
Estimated Expiration
2044-07-25

AI Technical Summary

Technical Problem

Given the limited network port resources, existing technologies face challenges in successfully loading DSPs, especially when the CPU needs to use multiple network ports simultaneously for DSP loading.

Method used

A DSP loading method based on Fudan microprocessor is adopted, which realizes DSP loading through one Ethernet interface. The handshake communication between Fudan microprocessor and DSP is carried out by utilizing the shared memory between Fudan microprocessor and DSP, including parameter acquisition, data packet request, initialization and software loading, to ensure the efficiency and success of data transmission.

Benefits of technology

With only one Ethernet interface provided, DSP loading was successfully completed, improving data transmission efficiency and speed, and making it suitable for processors with limited network port resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052218A_ABST
    Figure CN119052218A_ABST
Patent Text Reader

Abstract

The invention discloses a DSP (Digital Signal Processor) loading method and device based on a Feidan microprocessor, and the method comprises the steps: sending a parameter obtaining request to the Feidan microprocessor when a DSP loading instruction is received; when the IP address and the file name of the dsp.s file are received, a data packet request is sent to the Feidan microprocessor; after the dsp.s file is received, initialization is carried out, and a success mark is written into a first position of the memory; after the success mark is read from the second position of the memory, a software loading request is sent to the redan microprocessor; after the target dsp.s file is received, DSP software loading is carried out according to the target dsp.s file, and a success mark is written in a third position of the memory. According to the technical scheme of the invention, only one Ethernet interface needs to be provided by the Feidan microprocessor, and data transmission is carried out through one Ethernet interface, so that DSP loading is realized, and DSP loading can be successfully completed for a processor with fewer network interface resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a DSP loading method and device based on a Fudan microprocessor. Background Art

[0002] With the development of communication technology, the application of digital signal processors (DSP) is becoming more and more widespread. At the same time, communication equipment is developing towards miniaturization and localization, resulting in a reduction in board area and an increase in component density. In order to reduce the board area, the processor (Central Processing Unit, CPU) and DSP application are usually integrated into the same memory chip, which brings challenges to DSP loading.

[0003] The traditional DSP loading method is that the CPU reads the DSP software version from the FLASH memory on the board through the SGMII network port, and loads the DSP software version into the system for use. Since the CPU requires at least two Ethernet ports for DSP loading, for processors with fewer network port resources, if the CPU needs to use multiple network ports for DSP loading at the same time, and the processor itself has limited network port resources, this may cause DSP loading to fail.

[0004] Therefore, how to successfully load DSP when network port resources are limited has become an urgent problem to be solved in this field. Summary of the invention

[0005] The present application provides a DSP loading method and device based on a Fudan microprocessor, the purpose of which is to successfully load the DSP when network port resources are limited.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] A DSP loading method based on Fudan microprocessor, applied to DSP, comprising:

[0008] When receiving the DSP load instruction, it sends a parameter acquisition request to the Fudan microprocessor;

[0009] When receiving the IP address and the file name of the dsp.s file fed back by the Fudan microprocessor according to the parameter acquisition request, sending a data packet request to the Fudan microprocessor according to the IP address and the file name of the dsp.s file;

[0010] After receiving the dsp.s file fed back by the Fudan microprocessor according to the data packet request, initializing according to the dsp.s file, and after the initialization is completed, writing a success flag to the first position of the memory, so that the Fudan microprocessor writes the success flag in the second position of the memory according to the success flag;

[0011] After reading the success flag from the second position of the memory, sending a software loading request to the Fudan microprocessor;

[0012] After receiving the target dsp.s file fed back by the Fudan microprocessor according to the software loading request, DSP software loading is performed according to the target dsp.s file; the target dsp.s file is a DSP version file with the same file name as the dsp.s file;

[0013] When the DSP software is loaded, the success mark is written into the third position of the memory; the memory is a shared memory for handshake communication between the Fudan microprocessor and the DSP.

[0014] Optionally, when receiving the DSP loading instruction, sending a parameter acquisition request to the Fudan microprocessor includes:

[0015] When receiving the DSP loading instruction sent by the Fudan microprocessor, identifying the DSP loading instruction and obtaining a reset instruction;

[0016] Execute a reset operation according to the reset instruction;

[0017] When the reset operation is completed, determining the Ethernet interface according to the level of the GPIO pin in the reset instruction;

[0018] A parameter acquisition request is sent to the Fudan microprocessor through the Ethernet interface.

[0019] Optionally, sending a data packet request to the Fudan microprocessor according to the IP address and the file name of the dsp.s file includes:

[0020] Establishing a file transfer network with the Fudan microprocessor according to the IP address;

[0021] In the file transfer network, a data packet request is sent to the Fudan microprocessor according to the file name of the dsp.s file.

[0022] Optionally, the initialization according to the dsp.s file includes:

[0023] Read the file content of the dsp.s file to obtain register configuration data;

[0024] Initialization is performed according to the register configuration data.

[0025] A DSP loading method based on a Fudan microprocessor, applied to the Fudan microprocessor, comprises:

[0026] Sending a DSP loading instruction to the DSP, so that the DSP sends a parameter acquisition request according to the DSP loading instruction;

[0027] When receiving the parameter acquisition request, sending the IP address and the file name of the dsp.s file to the DSP;

[0028] When receiving a data packet request fed back by the DSP according to the IP address and the file name of the dsp.s file, sending the dsp.s file to the DSP, so that the DSP writes a success mark in the first position of the memory according to the dsp.s file;

[0029] After the success mark is read from the first position of the memory, a target dsp.s file is determined according to the dsp.s file, and the success mark is written to the second position of the memory; the target dsp.s file is a DSP version file with the same file name as the dsp.s file;

[0030] After receiving the software loading request sent by the DSP according to the success mark, sending the target dsp.s file to the DSP, so that the DSP writes the success mark in the third position of the memory according to the target dsp.s file;

[0031] When the success flag is read from the third position of the memory, it is determined that the DSP loading is completed.

[0032] Optionally, determining a target dsp.s file according to the dsp.s file includes:

[0033] Deleting the dsp.s file from the preset memory;

[0034] After the dsp.s file is deleted, the DSP version file is read from the preset memory, and the file name of the DSP version file is modified to the dsp.s file;

[0035] When the file name modification is completed, the DSP version file having the same file name as the dsp.s file is used as the target dsp.s file.

[0036] Optionally, before deleting the dsp.s file from the preset memory, the method further includes:

[0037] Get register configuration data and board location information;

[0038] The dsp.s file is generated based on the register configuration data and the board location information, and the dsp.s file is stored in a preset memory.

[0039] Optionally, also include:

[0040] When the success flag is not read from the first position of the memory within a first preset time, it is determined that the DSP loading fails;

[0041] When the success flag is not read from the third position of the memory within the second preset time, it is determined that the DSP loading fails, and the dsp.s file in the preset memory is deleted;

[0042] If the DSP loading fails, the process returns to the step of sending a DSP loading instruction to the DSP, so that the DSP sends a parameter acquisition request according to the DSP loading instruction, until the DSP loading is completed.

[0043] A DSP loading device based on Fudan microprocessor, applied to DSP, comprising:

[0044] A first sending unit is used to send a parameter acquisition request to the Fudan microprocessor when receiving a DSP loading instruction;

[0045] A second sending unit is used for sending a data packet request to the Fudan microprocessor according to the IP address and the file name of the dsp.s file when receiving the IP address and the file name of the dsp.s file fed back by the Fudan microprocessor according to the parameter acquisition request;

[0046] An initialization unit, for, after receiving the dsp.s file fed back by the Fudan microprocessor according to the data packet request, performing initialization according to the dsp.s file, and after the initialization is completed, writing a success flag to a first position of a memory, so that the Fudan microprocessor writes the success flag to a second position of the memory according to the success flag;

[0047] A reading unit, configured to send a software loading request to the Fudan microprocessor after reading the success flag from the second position of the memory;

[0048] A loading unit is used for, after receiving the target dsp.s file fed back by the Fudan microprocessor according to the software loading request, loading the DSP software according to the target dsp.s file; the target dsp.s file is a DSP version file with the same file name as the dsp.s file;

[0049] A writing unit is used to write the success mark in the third position of the memory after the DSP software is loaded; the memory is a shared memory for handshake communication between the Fudan microprocessor and the DSP.

[0050] A DSP loading device based on a Fudan microprocessor, applied to the Fudan microprocessor, comprising:

[0051] A first sending unit, configured to send a DSP loading instruction to the DSP, so that the DSP sends a parameter acquisition request according to the DSP loading instruction;

[0052] A second sending unit, configured to send an IP address and a file name of a dsp.s file to the DSP when receiving the parameter acquisition request;

[0053] A third sending unit is used for sending the dsp.s file to the DSP when receiving a data packet request fed back by the DSP according to the IP address and the file name of the dsp.s file, so that the DSP writes a success mark in the first position of the memory according to the dsp.s file;

[0054] a determination unit, configured to determine a target dsp.s file according to the dsp.s file after reading the success flag from the first position of the memory, and write the success flag to the second position of the memory; the target dsp.s file is a DSP version file with the same file name as the dsp.s file;

[0055] a fourth sending unit, configured to send the target dsp.s file to the DSP after receiving the software loading request sent by the DSP according to the success mark, so that the DSP writes the success mark in the third position of the memory according to the target dsp.s file;

[0056] The data determination unit is used to determine that the DSP loading is completed after the success flag is read from the third position of the memory.

[0057] The technical solution provided by the present application includes: when a DSP loading instruction is received, a parameter acquisition request is sent to the Fudan microprocessor; when the IP address and the file name of the dsp.s file fed back by the Fudan microprocessor according to the parameter acquisition request are received, a data packet request is sent to the Fudan microprocessor according to the IP address and the file name of the dsp.s file; after receiving the dsp.s file fed back by the Fudan microprocessor according to the data packet request, initialization is performed according to the dsp.s file, and after the initialization is completed, a success flag is written to the first position of the memory, so that the Fudan microprocessor writes the success flag in the second position of the memory according to the success flag; after the success flag is read out from the second position of the memory, a software loading request is sent to the Fudan microprocessor; after receiving the target dsp.s file fed back by the Fudan microprocessor according to the software loading request, DSP software is loaded according to the target dsp.s file; after the DSP software loading is completed, the success flag is written to the third position of the memory. In this application, the Fudan microprocessor only needs to provide one Ethernet interface to transmit data through the Ethernet interface, thereby realizing DSP loading. For processors with fewer network port resources, DSP loading can also be successfully completed. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0059] Figure 1 A flowchart of a DSP loading method based on a Fudan microprocessor provided in an embodiment of the present application;

[0060] Figure 2 A flowchart of a method for sending a parameter acquisition request provided in an embodiment of the present application;

[0061] Figure 3 A schematic diagram of an S-Record file provided in an embodiment of the present application;

[0062] Figure 4 A schematic diagram of data transmission provided in an embodiment of the present application;

[0063] Figure 5 A flowchart of another DSP loading method based on a Fudan microprocessor provided in an embodiment of the present application;

[0064] Figure 6A flowchart of a method for determining a target dsp.s file provided in an embodiment of the present application;

[0065] Figure 7 A flowchart of a DSP loading method provided in an embodiment of the present application;

[0066] Figure 8 A schematic diagram of the architecture of a DSP loading platform provided in an embodiment of the present application;

[0067] Fig. 9 An interactive flow chart of a DSP loading method based on a Fudan microprocessor provided in an embodiment of the present application;

[0068] Fig.10 A schematic diagram of a DSP loading process provided in an embodiment of the present application;

[0069] Fig.11 A structural diagram of a DSP loading process provided in an embodiment of the present application;

[0070] Fig.12 A schematic diagram of the architecture of a DSP loading device based on a Fudan microprocessor provided in an embodiment of the present application;

[0071] Fig.13 A schematic diagram of the architecture of another DSP loading device based on a Fudan microprocessor provided in an embodiment of the present application. DETAILED DESCRIPTION

[0072] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0073] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0074] like Figure 1 As shown, it is a flowchart of a DSP loading method based on a Fudan microprocessor provided in an embodiment of the present application, which is applied to a DSP and includes the following steps:

[0075] S101: When receiving a DSP loading instruction, a parameter acquisition request is sent to the Fudan microprocessor.

[0076] The parameter acquisition request indicates a request for acquiring an IP address and a file name.

[0077] Optionally, the Fudan microprocessor (Program Logic, PL) is a high-performance microprocessor.

[0078] It is understandable that when receiving the DSP loading instruction, the DSP sends a broadcast packet request (i.e., a parameter acquisition request) to the Fudan microprocessor through the DHCP client, and sends a request to obtain the IP address and file name to the Fudan microprocessor, so that the Fudan microprocessor feeds back the IP address and file name.

[0079] Optionally, in another embodiment of the present application, the specific implementation of step S101 is as follows: Figure 2 As shown, the following steps are included:

[0080] S201: When receiving a DSP loading instruction sent by the Fudan microprocessor, the DSP loading instruction is identified to obtain a reset instruction.

[0081] The reset instruction indicates an instruction for resetting the DSP.

[0082] It is understandable that when the DSP loading instruction sent by the Fudan microprocessor is received, since the DSP loading action can only be executed after the DSP is reset, the reset instruction is first identified from the DSP loading instruction to reset the DSP.

[0083] S202: Execute a reset operation according to the reset instruction.

[0084] It is understandable that the Fudan microprocessor pulls the DSP reset pin (ie, the GPIO pin) low or high through the GPIO pin, that is, performs a reset operation according to a reset instruction, thereby resetting the DSP.

[0085] S203: When the reset operation is completed, the Ethernet interface is determined according to the level of the GPIO pin in the reset instruction.

[0086] It is understandable that after the reset operation is completed, the DSP bootloader will read the level of the GPIO pin and determine the DSP loading mode according to the level of the GPIO pin. Specifically, the loading mode is determined by the three GPIO pins of the DSP, namely GPIO9, GPIO8, and GPIO7. When the DSP reads the level high and low states of these three GPIO pins as 101b (1 is high, 0 is low), that is, GPIO9 is high, GPIO8 is low, and GPIO7 is high, the Ethernet interface (such as the SGMII interface) is selected for DSP loading.

[0087] S204: Send a parameter acquisition request to the Fudan microprocessor via the Ethernet interface.

[0088] It can be understood that since the Ethernet interface supports a data transmission rate of 1.25 Gbps and can meet the requirements of high-speed Ethernet communication, sending a parameter acquisition request to the Fudan microprocessor through the Ethernet interface can ensure the efficiency and speed of data transmission.

[0089] S102: When receiving the IP address and the file name of the dsp.s file fed back by the Fudan microprocessor according to the parameter acquisition request, sending a data packet request to the Fudan microprocessor according to the IP address and the file name of the dsp.s file.

[0090] The data packet request indicates a file request for obtaining the file name of the dsp.s file.

[0091] It can be understood that when the IP address and the file name of the dsp.s file are fed back by the Fudan microprocessor according to the parameter acquisition request, a configuration success message is sent to the Fudan microprocessor. After the information is sent, a data packet request is also sent to the Fudan microprocessor according to the IP address and the file name of the dsp.s file.

[0092] Optionally, in another embodiment of the present application, the specific implementation of sending a data packet request to the Fudan microprocessor according to the IP address and the file name of the dsp.s file in step S102 includes:

[0093] Establish a file transfer network with Fudan microprocessor based on IP address.

[0094] It can be understood that after sending the configuration success information to the Fudan microprocessor, a file transfer network is established with the Fudan microprocessor according to the IP address. Specifically, a simple file transfer protocol (Trivial File Transfer Protocol, TFTP) based on TCP / IP is established between the SGMII network port of the Fudan microprocessor.

[0095] In the file transfer network, a data packet request is sent to the Fudan microprocessor according to the file name of the dsp.s file.

[0096] After the file transfer network is established, data can be transferred in the file transfer network. Therefore, in the file transfer network, a data packet request is sent to the Fudan microprocessor according to the file name of the dsp.s file.

[0097] S103: After receiving the dsp.s file fed back by the Fudan microprocessor according to the data packet request, initialization is performed according to the dsp.s file, and after the initialization is completed, a success flag is written to the first position of the memory, so that the Fudan microprocessor writes a success flag in the second position of the memory according to the success flag.

[0098] The memory includes but is not limited to: a dual-port RAM, and the first position of the memory may be an address Addr.

[0099] Optionally, the success flag includes but is not limited to: 0xA5A50000.

[0100] It can be understood that after receiving the dsp.s file fed back by the Fudan microprocessor according to the data packet request, it is initialized according to the file content of the dsp.s file. After the initialization is completed, the success flag 0xA5A50000 is written to the dual-port RAM address Addr. The indicator light can be used to confirm that the first stage of DSP loading is completed.

[0101] Optionally, in another embodiment of the present application, the specific implementation of initialization according to the dsp.s file in step S103 includes:

[0102] Read the file content of the dsp.s file to obtain the register configuration data.

[0103] The register configuration data is configuration data written into the register, for example, memory clock frequency, delay, and timing parameters.

[0104] Optionally, the register includes but is not limited to: Double Data Rate Synchronous Dynamic Random Access Memory (DDR).

[0105] Initialize according to register configuration data.

[0106] Among them, initialization is performed according to the register configuration data, that is, the initialization of itself and DDR is completed according to the register configuration data.

[0107] It can be understood that the dsp.s file is received packet by packet and placed in the internally planned memory. After receiving, the dsp.s file is read from the memory by the bootloader program. The dsp.s file is an S-Record file, which is an ASCII text file used to express binary content. The bootloader program can read the S-Record file, parse and read the DDR configuration data contained in the dsp.s file according to the S-Record file, and write the DDR configuration data into the corresponding DDR control register, thereby initializing the DDR. Specifically, the specific form of the S-Record file is as follows: Figure 3 shown.

[0108] It should be noted that since the DSP does not initialize DDR when it is powered on, it cannot access the DDR memory. Only after DDR is initialized can data be written to the DDR memory.

[0109] S104: After the success flag is read from the second position of the memory, a software loading request is sent to the Fudan microprocessor.

[0110] Optionally, the second location of the memory includes but is not limited to: the address at the dual-port RAM Addr2.

[0111] It is understandable that after the success flag is read from the second position of the memory, a software loading request is sent to the Fudan microprocessor through the TFTP client, so that the DSP software is subsequently loaded according to the information fed back by the Fudan microprocessor.

[0112] S105: After receiving the target dsp.s file fed back by the Fudan microprocessor according to the software loading request, the DSP software is loaded according to the target dsp.s file.

[0113] The target dsp.s file is a DSP version file having the same file name as the dsp.s file.

[0114] It can be understood that after receiving the target dsp.s file, the bootloader program jumps to the beginning of the application program and directly executes the application program code, that is, executes the step of loading the DSP software.

[0115] For details, see Figure 4A schematic diagram of data transmission is shown. When the DSP loading mode is performed, the IP address and the file name of the dsp.s file fed back by the Fudan microprocessor are received, and a data packet request is sent to the Fudan microprocessor according to the IP address and the file name of the dsp.s file. The Fudan microprocessor transmits the dsp.s file in packets to the DSP through the TFTP server. When the dsp.s file is received, the DSP sends a message of successful data reception to the Fudan microprocessor. When the success flag is read from the second position of the memory, the DSP sends a software loading request to the Fudan microprocessor. After receiving the DSP data request, the Fudan microprocessor transmits the target dsp.s file in packets to the DSP through the TFTP server.

[0116] S106: When the DSP software is loaded, a success flag is written into the third location of the memory.

[0117] Among them, the memory is a shared memory for handshake communication between Fudan microprocessor and DSP.

[0118] Optionally, the third location of the memory includes but is not limited to: dual-port RAMAddr3 address.

[0119] It is understandable that, when the DSP software is loaded, a success flag is written in the third position of the memory, indicating that the DSP is loaded successfully at this time.

[0120] In summary, the Fudan microprocessor only needs to provide one Ethernet interface to transmit data through one Ethernet interface (SGMII network port) to realize DSP loading. For processors with fewer network port resources, DSP loading can also be successfully completed.

[0121] like Figure 5 As shown, it is a flowchart of another DSP loading method based on Fudan microprocessor provided in an embodiment of the present application, which is applied to Fudan microprocessor and includes the following steps:

[0122] S501: Send a DSP loading instruction to the DSP, so that the DSP sends a parameter acquisition request according to the DSP loading instruction.

[0123] Among them, before the DSP sends the DSP loading instruction, it is necessary to build the SGMII (Serial Gigabit Media Independent Interface, SGMII) IP core first, output the SGMII interface through the processor system (PS) side, and initialize the dual-port RAM (i.e. memory) after power-on, turn on the Dynamic Host Configuration Protocol (Dynamic Host Configuration Protocol, DHCP) service, the Trivial File Transfer Protocol (Trivial File Transfer Protocol, TFTP) service, and set the TFTP IP address.

[0124] Initialize the dual-port RAM because the dual-port RAM is used as the shared memory for the interaction between the Fudan microprocessor and the DSP. Clear the dual-port RAM memory value to zero and put the interaction state between the two parties in a certain initial state.

[0125] The DHCP Server service is enabled because the DSP acts as a DHCP client. When the DSP requests an IP address, the Fudan microprocessor acts as a DHCP server and can allocate the corresponding IP address to the DSP. The TFTP Server service is enabled because when the DSP sends a software loading request, the DSP acts as a TFTP client. The Fudan microprocessor can respond to the software loading request sent by the DSP and transmit data via TFTP. The TFTP protocol is an application layer protocol. When transmitting data, it needs to use the IP address as the source address and destination for communication. Setting the IP address complies with the UDP protocol.

[0126] In short, initializing the dual-port RAM, starting the DHCP Server service, TFTP Server service, and setting the TFTP IP address are all preparations for the subsequent communication between the Fudan microprocessor and DSP and the transmission of DSP data.

[0127] In addition, after initializing the dual-port RAM, starting the DHCP Server service, TFTP Server service, and setting the TFTP IP address, you also need to bind the Ethernet interrupt and TFTP Server task to any CPU core except core 0, and monopolize the CPU core to ensure the stability of data transmission during the DSP loading process and prevent interference from other tasks, which may cause the TFTP Server to time out.

[0128] S502: When receiving the parameter acquisition request, the IP address and the file name of the dsp.s file are sent to the DSP.

[0129] It can be understood that when a parameter acquisition request is received, the IP address and the file name of the dsp.s file are sent to the DSP through the DHCP server, so that the subsequent DSP can perform DSP loading based on the IP address and the file name of the dsp.s file.

[0130] S503: When a packet request is received from the DSP based on the IP address and the file name of the dsp.s file, the dsp.s file is sent to the DSP to make the DSP write a success flag at the first location of the memory according to the dsp.s file.

[0131] It can be understood that when a packet request is received by the DSP based on the IP address and the file name of the dsp.s file, the dsp.s file is sub-packed to the DSP.s file. When the DSP receives the dsp.s file, the feedback data receives the information of successful results and writes a success flag at the first location of the memory.

[0132] S504: After the success mark is read from the first position of the memory, a target dsp.s file is determined according to the dsp.s file, and the success mark is written to the second position of the memory.

[0133] The target dsp.s file is a DSP version file having the same file name as the dsp.s file.

[0134] Optionally, the success flag is periodically read from the first position of the memory. When the success flag is read out within the first preset time, the target dsp.s file is determined according to the dsp.s file, and the success flag is written to the second position of the memory.

[0135] It can be understood that the target dsp.s file is determined according to the dsp.s file. Specifically, the DSP version file is first determined according to the dsp.s file; and the target dsp.s file is determined according to the DSP version file.

[0136] Optionally, in another embodiment of the present application, in step S504, a specific implementation method of determining the target dsp.s file is determined according to the dsp.s file, such as Figure 6 As shown, the following steps are included:

[0137] S601: Deleting the dsp.s file from the preset memory.

[0138] It is understandable that when transferring files between the Fudan microprocessor and the DSP, the DSP only recognizes the file name dsp.s. The file name is assigned to the DSP by the Fudan microprocessor as a DHCP server. In the embodiment of the present application, DSP loading is divided into two stages. The first stage transmits the configuration parameter file (i.e., the dsp.s file), and the second stage transmits the DSP software version file. The two files can only use the file name dsp.s. In order to prevent the files in the first stage from being confused with the files in the second stage, dsp.s will be deleted first.

[0139] Optionally, before step S601, it is also necessary to store the dsp.s file in the preset memory first, so that the dsp.s file can be directly obtained from the preset memory later, without manually loading the dsp.s file at each startup or update. Therefore, in another embodiment of the present application, a storage method for the dsp.s file is provided, including:

[0140] Get register configuration data and board location information.

[0141] The board location information indicates which slot in the chassis the board is located in. The destination MAC address can be determined through the board operation information.

[0142] Generate a dsp.s file based on register configuration data and board location information, and store the dsp.s file in a preset memory.

[0143] Optionally, the preset memory includes but is not limited to: emmc flash.

[0144] It can be understood that the dsp.s file is generated based on the register configuration data and the board location information. Specifically, a dsp.s file in S-Record format is first generated; the register configuration data and the board location information are written into the dsp.s file; after the information is written, the dsp.s file is stored in a preset memory.

[0145] S602: When the dsp.s file is deleted, the DSP version file is read from the preset memory, and the file name of the DSP version file is modified to the dsp.s file.

[0146] It is understandable that, when transferring files between the Fudan microprocessor and the DSP, the DSP only recognizes the file name dsp.s, therefore, the file name of the DSP version file needs to be modified to the dsp.s file.

[0147] S603: When the file name modification is completed, the DSP version file having the same file name as the dsp.s file is used as the target dsp.s file.

[0148] In order to distinguish the DSP version file and the dsp.s file after the file name is modified, the DSP version file with the same file name as the dsp.s file is used as the target dsp.s file.

[0149] S505: After receiving the software loading request sent by the DSP according to the success mark, the target dsp.s file is sent to the DSP, so that the DSP writes the success mark in the third position of the memory according to the target dsp.s file.

[0150] When receiving the software loading request sent by the DSP according to the success mark, the target dsp.s file is sent to the DSP so that the DSP loads the DSP according to the target dsp.s file. When the DSP loading is completed, the DSP writes the success mark in the third position of the memory.

[0151] S506: After the success flag is read from the third position of the memory, it is determined that the DSP loading is completed.

[0152] When the success flag is read from the third position of the memory, it indicates that the DSP has completed the DSP loading action, and it is determined that the DSP loading is completed.

[0153] It should be noted that after the DSP is loaded, the target dsp.s file in the preset memory is read, and the name of the target dsp.s file is changed to the original file name, and the status of the DSP is monitored in real time. When the DSP fails, the Fudan microprocessor deletes the target dsp.s file and triggers a DSP reset, and then loads the DSP program again.

[0154] It should be emphasized that dual-port RAM is used as the shared memory between Fudan microprocessor and DSP for handshake communication. The two parties conduct three handshakes in total. The first handshake represents the successful loading of the first stage software of DSP, the second handshake represents the request of Fudan microprocessor to load the DSP application software version, and the third handshake represents the successful loading of the second stage of DSP software.

[0155] Optionally, there may be a situation where the success flag cannot be successfully read from the memory. Failure to read the success flag indicates that the DSP loading fails at this time. In order to ensure that the DSP is successfully loaded, a DSP loading method is provided in another embodiment of the present application, such as Figure 7 As shown, the following steps are included:

[0156] S701: When a success flag is not read from a first position of a memory within a first preset time, it is determined that the DSP loading fails.

[0157] Optionally, the first preset time includes but is not limited to: 3 minutes.

[0158] S702: When the success flag is not read from the third position of the memory within the second preset time, it is determined that the DSP loading fails, and the dsp.s file in the preset memory is deleted.

[0159] Optionally, the second preset time includes but is not limited to: 5 minutes.

[0160] S703: If the DSP loading fails, the process returns to the step of sending a DSP loading instruction to the DSP, so that the DSP sends a parameter acquisition request according to the DSP loading instruction, until the DSP loading is completed.

[0161] It is understandable that if DSP loading fails, the DSP is triggered to reset again and the DSP loading step is re-executed, that is, returning to execute the step of sending a DSP loading instruction to the DSP so that the DSP sends a parameter acquisition request according to the DSP loading instruction until the DSP loading is completed.

[0162] In summary, the dual-port RAM is used as the shared memory between the Fudan microprocessor and the DSP for the handshake communication of DSP loading, so that the Fudan microprocessor and the DSP can access the shared memory at the same time without waiting for the other party to complete the operation. This can effectively improve the efficiency and speed of data transmission, and the Fudan microprocessor only needs to provide one Ethernet interface, and data transmission is carried out through one Ethernet interface (SGMII network port) to realize DSP loading. For processors with fewer network port resources, DSP loading can also be successfully completed.

[0163] like Figure 8 FIG. 1 is a schematic diagram of the architecture of a DSP loading platform provided in an embodiment of the present application, including:

[0164] Fudan microprocessor 100 and DSP200, wherein the information interaction process between Fudan microprocessor 100 and DSP200 is as follows: Fig. 9 As shown, the following steps are included:

[0165] S901: The Fudan microprocessor sends a DSP loading instruction to the DSP.

[0166] It should be noted that the specific implementation of step S901 may refer to step S501 accordingly, and will not be repeated here.

[0167] S902: After receiving the DSP loading instruction, the DSP sends a parameter acquisition request to the Fudan microprocessor.

[0168] It should be noted that the specific implementation of step S902 may refer to step S101 accordingly, and will not be repeated here.

[0169] S903: After receiving the parameter acquisition request, the Fudan microprocessor sends the IP address and the file name of the dsp.s file to the DSP.

[0170] It should be noted that the specific implementation of step S903 may refer to step S502 accordingly, and will not be repeated here.

[0171] S904: After receiving the IP address and the file name of the dsp.s file, the DSP sends a data packet request to the Fudan microprocessor according to the IP address and the file name of the dsp.s file.

[0172] It should be noted that the specific implementation of step S904 may refer to step S102 accordingly, and will not be repeated here.

[0173] S905: After receiving the data packet request, the Fudan microprocessor sends the dsp.s file to the DSP.

[0174] It should be noted that the specific implementation of step S905 may refer to step S503 accordingly, and will not be repeated here.

[0175] S906: After receiving the dsp.s file, the DSP is initialized according to the dsp.s file, and after the initialization is completed, a success flag is written to the first position of the memory.

[0176] It should be noted that the specific implementation of step S906 may refer to step S103 accordingly, and will not be described in detail here.

[0177] S907: After reading the success flag from the first position of the memory, the Fudan microprocessor determines the target dsp.s file according to the dsp.s file, and writes the success flag to the second position of the memory.

[0178] It should be noted that the specific implementation of step S907 may refer to step S504 accordingly, and will not be described in detail here.

[0179] S908: After reading the success flag from the second position of the memory, the DSP sends a software loading request to the Fudan microprocessor.

[0180] It should be noted that the specific implementation of step S908 may refer to step S104 accordingly, and will not be repeated here.

[0181] S909: After receiving the software loading request, the Fudan microprocessor sends the target dsp.s file to the DSP.

[0182] It should be noted that the specific implementation of step S909 may refer to step S505 accordingly, and will not be repeated here.

[0183] S910: After receiving the target dsp.s file, the DSP loads the DSP software according to the target dsp.s file.

[0184] It should be noted that the specific implementation of step S910 may refer to step S105 accordingly, and will not be repeated here.

[0185] S911: When the DSP software is loaded, the DSP writes a success flag in the third location of the memory.

[0186] It should be noted that the specific implementation of step S911 may refer to step S106 accordingly, and will not be repeated here.

[0187] S912: After reading the success flag from the third position of the memory, the Fudan microprocessor determines that the DSP loading is completed.

[0188] It should be noted that the specific implementation of step S912 may refer to step S506 accordingly, and will not be repeated here.

[0189] Combination Fig. 9 For the contents shown, see Fig.10 The schematic diagram of the DSP loading process shown in the figure, the DHCP client of the DSP sends a parameter acquisition request to the Fudan microprocessor. After receiving the parameter acquisition request, the Fudan microprocessor sends the IP address and the file name of the dsp.s file to the DSP through the DHCP server. The DSP transmits data with the TFTP server through the TETP client, and completes the DSP loading through the data. The DSP and the Fudan microprocessor determine whether the DSP loading is completed by reading / writing messages to the dual-port RAM.

[0190] Combination Fig. 9 For the contents shown, see Fig.11 The structural diagram of the DSP loading process is shown. The Fudan microprocessor includes an SDMMC interface, a DDR3 interface, and an SGMII interface. The SGMII IP core is built on the PL side of the Fudan microprocessor, and the SGMII network port is output through the PS side. The DSP includes an SGMII interface and a DDR3 interface, and data is transmitted through two SGMII interfaces.

[0191] In summary, the dual-port RAM is used as the shared memory between the Fudan microprocessor and the DSP for the handshake communication of DSP loading, so that the Fudan microprocessor and the DSP can access the shared memory at the same time without waiting for the other party to complete the operation. This can effectively improve the efficiency and speed of data transmission, and the Fudan microprocessor only needs to provide one Ethernet interface, and data transmission is carried out through one Ethernet interface (SGMII network port) to realize DSP loading. For processors with fewer network port resources, DSP loading can also be successfully completed.

[0192] like Fig.12 As shown, it is a schematic diagram of the architecture of a DSP loading device based on a Fudan microprocessor provided in an embodiment of the present application, which is applied to a DSP. The DSP loading device includes: a first sending unit 1201, a second sending unit 1202, an initialization unit 1203, a reading unit 1204, a loading unit 1205 and a writing unit 1206.

[0193] The first sending unit 1201 is used to send a parameter acquisition request to the Fudan microprocessor when receiving a DSP loading instruction.

[0194] The first sending unit 1201 is specifically used for: when receiving the DSP loading instruction sent by the Fudan microprocessor, identifying the DSP loading instruction and obtaining the reset instruction; performing the reset operation according to the reset instruction; when the reset operation is completed, determining the Ethernet interface according to the level of the GPIO pin in the reset instruction; and sending a parameter acquisition request to the Fudan microprocessor through the Ethernet interface.

[0195] The second sending unit 1202 is used to send a data packet request to the Fudan microprocessor according to the IP address and the file name of the dsp.s file when receiving the IP address and the file name of the dsp.s file fed back by the Fudan microprocessor according to the parameter acquisition request.

[0196] The second sending unit 1202 is specifically used for: establishing a file transfer network with the Fudan microprocessor according to the IP address; and sending a data packet request to the Fudan microprocessor according to the file name of the dsp.s file in the file transfer network.

[0197] Initialization unit 1203 is used to initialize according to the dsp.s file after receiving the dsp.s file fed back by the Fudan microprocessor according to the data packet request, and after the initialization is completed, write a success flag to the first position of the memory so that the Fudan microprocessor writes a success flag in the second position of the memory according to the success flag.

[0198] The initialization unit 1203 is specifically used for: reading the file content of the dsp.s file to obtain the register configuration data; and performing initialization according to the register configuration data.

[0199] The reading unit 1204 is used to send a software loading request to the Fudan microprocessor after reading the success flag from the second position of the memory.

[0200] The loading unit 1205 is used to load the DSP software according to the target dsp.s file after receiving the target dsp.s file fed back by the Fudan microprocessor according to the software loading request; the target dsp.s file is a DSP version file with the same file name as the dsp.s file.

[0201] The writing unit 1206 is used to write a success mark in the third position of the memory after the DSP software is loaded; the memory is a shared memory for handshake communication between the Fudan microprocessor and the DSP.

[0202] In summary, the Fudan microprocessor only needs to provide one Ethernet interface to transmit data through one Ethernet interface (SGMII network port) to realize DSP loading. For processors with fewer network port resources, DSP loading can also be successfully completed.

[0203] like Fig.13 As shown, it is a schematic diagram of the architecture of another DSP loading device based on Fudan microprocessor provided in an embodiment of the present application, which is applied to Fudan microprocessor. The DSP loading device includes: a first sending unit 1301, a second sending unit 1302, a third sending unit 1303, a determination unit 1304, a fourth sending unit 1305 and a data determination unit 1306.

[0204] The first sending unit 1301 is used to send a DSP loading instruction to the DSP, so that the DSP sends a parameter acquisition request according to the DSP loading instruction.

[0205] The second sending unit 1302 is used to send the IP address and the file name of the dsp.s file to the DSP when receiving the parameter acquisition request.

[0206] The third sending unit 1303 is used to send the dsp.s file to the DSP when receiving a data packet request fed back by the DSP according to the IP address and the file name of the dsp.s file, so that the DSP writes a success mark in the first position of the memory according to the dsp.s file.

[0207] The determination unit 1304 is used to determine the target dsp.s file according to the dsp.s file after reading the success mark from the first position of the memory, and write the success mark to the second position of the memory; the target dsp.s file is a DSP version file with the same file name as the dsp.s file.

[0208] The determination unit 1304 is specifically used to: delete the dsp.s file from the preset memory; when the dsp.s file is deleted, read the DSP version file from the preset memory, and modify the file name of the DSP version file to the dsp.s file; when the file name modification is completed, the DSP version file with the same file name as the dsp.s file is used as the target dsp.s file.

[0209] The fourth sending unit 1305 is used to send the target dsp.s file to the DSP after receiving the software loading request sent by the DSP according to the success mark, so that the DSP writes the success mark in the third position of the memory according to the target dsp.s file.

[0210] The data determination unit 1306 is used to determine that the DSP loading is completed after reading the success flag from the third position of the memory.

[0211] In summary, the dual-port RAM is used as the shared memory between the Fudan microprocessor and the DSP for the handshake communication of DSP loading, so that the Fudan microprocessor and the DSP can access the shared memory at the same time without waiting for the other party to complete the operation. This can effectively improve the efficiency and speed of data transmission, and the Fudan microprocessor only needs to provide one Ethernet interface, and data transmission is carried out through one Ethernet interface (SGMII network port) to realize DSP loading. For processors with fewer network port resources, DSP loading can also be successfully completed.

[0212] Preferably, combined Fig.13 As shown in the figure, the DSP loading device also includes: an acquisition unit and a production unit.

[0213] An acquisition unit, used to acquire register configuration data and board location information;

[0214] The generating unit is used for generating a dsp.s file based on register configuration data and board location information, and storing the dsp.s file in a preset memory.

[0215] Preferably, combined Fig.13 As shown in the content, the DSP loading device also includes: an information determination unit, a deletion unit, and a return unit.

[0216] an information determination unit, configured to determine that the DSP loading has failed when a success flag is not read from a first position of the memory within a first preset time;

[0217] A deleting unit, configured to determine that the DSP loading fails and delete the dsp.s file in the preset memory when a success flag is not read from the third position of the memory within a second preset time;

[0218] The return unit is used for returning to the step of sending a DSP load instruction to the DSP if the DSP loading fails, so that the DSP sends a parameter acquisition request according to the DSP load instruction, until the DSP loading is completed.

[0219] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0220] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0221] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A DSP loading method based on Fudan microprocessor, characterized in that: Applied to DSP, including: When receiving the DSP load instruction, it sends a parameter acquisition request to the Fudan microprocessor; When receiving the IP address and the file name of the dsp.s file fed back by the Fudan microprocessor according to the parameter acquisition request, sending a data packet request to the Fudan microprocessor according to the IP address and the file name of the dsp.s file; After receiving the dsp.s file fed back by the Fudan microprocessor according to the data packet request, initializing according to the dsp.s file, and after the initialization is completed, writing a success flag to the first position of the memory, so that the Fudan microprocessor writes the success flag in the second position of the memory according to the success flag; After reading the success flag from the second position of the memory, sending a software loading request to the Fudan microprocessor; After receiving the target dsp.s file fed back by the Fudan microprocessor according to the software loading request, DSP software loading is performed according to the target dsp.s file; the target dsp.s file is a DSP version file with the same file name as the dsp.s file; When the DSP software is loaded, the success mark is written into the third position of the memory; the memory is a shared memory for handshake communication between the Fudan microprocessor and the DSP.

2. The method according to claim 1, characterized in that When receiving the DSP loading instruction, sending a parameter acquisition request to the Fudan microprocessor includes: When receiving the DSP loading instruction sent by the Fudan microprocessor, identifying the DSP loading instruction and obtaining a reset instruction; Execute a reset operation according to the reset instruction; When the reset operation is completed, determining the Ethernet interface according to the level of the GPIO pin in the reset instruction; A parameter acquisition request is sent to the Fudan microprocessor through the Ethernet interface.

3. The method according to claim 1, characterized in that The step of sending a data packet request to the Fudan microprocessor according to the IP address and the file name of the dsp.s file comprises: Establishing a file transfer network with the Fudan microprocessor according to the IP address; In the file transfer network, a data packet request is sent to the Fudan microprocessor according to the file name of the dsp.s file.

4. The method according to claim 1, characterized in that: The initialization according to the dsp.s file includes: Read the file content of the dsp.s file to obtain register configuration data; Initialization is performed according to the register configuration data.

5. A DSP loading method based on Fudan microprocessor, characterized in that: Applied to Fudan microprocessors, including: Sending a DSP loading instruction to the DSP, so that the DSP sends a parameter acquisition request according to the DSP loading instruction; When receiving the parameter acquisition request, sending the IP address and the file name of the dsp.s file to the DSP; When receiving a data packet request fed back by the DSP according to the IP address and the file name of the dsp.s file, sending the dsp.s file to the DSP, so that the DSP writes a success mark in the first position of the memory according to the dsp.s file; After the success mark is read from the first position of the memory, a target dsp.s file is determined according to the dsp.s file, and the success mark is written to the second position of the memory; the target dsp.s file is a DSP version file with the same file name as the dsp.s file; After receiving the software loading request sent by the DSP according to the success mark, sending the target dsp.s file to the DSP, so that the DSP writes the success mark in the third position of the memory according to the target dsp.s file; When the success flag is read from the third position of the memory, it is determined that the DSP loading is completed.

6. The method according to claim 5, characterized in that The step of determining a target dsp.s file according to the dsp.s file comprises: Deleting the dsp.s file from the preset memory; After the dsp.s file is deleted, the DSP version file is read from the preset memory, and the file name of the DSP version file is modified to the dsp.s file; When the file name modification is completed, the DSP version file having the same file name as the dsp.s file is used as the target dsp.s file.

7. The method according to claim 6, characterized in that Before deleting the dsp.s file from the preset memory, the method further comprises: Get register configuration data and board location information; The dsp.s file is generated based on the register configuration data and the board location information, and the dsp.s file is stored in a preset memory.

8. The method according to claim 5, characterized in that Also includes: When the success flag is not read from the first position of the memory within a first preset time, it is determined that the DSP loading fails; When the success flag is not read from the third position of the memory within the second preset time, it is determined that the DSP loading fails, and the dsp.s file in the preset memory is deleted; If the DSP loading fails, the process returns to the step of sending a DSP loading instruction to the DSP, so that the DSP sends a parameter acquisition request according to the DSP loading instruction, until the DSP loading is completed.

9. A DSP loading device based on Fudan microprocessor, characterized in that: Applied to DSP, including: A first sending unit is used to send a parameter acquisition request to the Fudan microprocessor when receiving a DSP loading instruction; A second sending unit is used for sending a data packet request to the Fudan microprocessor according to the IP address and the file name of the dsp.s file when receiving the IP address and the file name of the dsp.s file fed back by the Fudan microprocessor according to the parameter acquisition request; An initialization unit, for, after receiving the dsp.s file fed back by the Fudan microprocessor according to the data packet request, performing initialization according to the dsp.s file, and after the initialization is completed, writing a success flag to a first position of a memory, so that the Fudan microprocessor writes the success flag to a second position of the memory according to the success flag; A reading unit, configured to send a software loading request to the Fudan microprocessor after reading the success flag from the second position of the memory; A loading unit is used for, after receiving the target dsp.s file fed back by the Fudan microprocessor according to the software loading request, loading the DSP software according to the target dsp.s file; the target dsp.s file is a DSP version file with the same file name as the dsp.s file; A writing unit is used to write the success mark in the third position of the memory after the DSP software is loaded; the memory is a shared memory for handshake communication between the Fudan microprocessor and the DSP.

10. A DSP loading device based on Fudan microprocessor, characterized in that: Applied to Fudan microprocessors, including: A first sending unit, configured to send a DSP loading instruction to the DSP, so that the DSP sends a parameter acquisition request according to the DSP loading instruction; A second sending unit, configured to send an IP address and a file name of a dsp.s file to the DSP when receiving the parameter acquisition request; A third sending unit is used for sending the dsp.s file to the DSP when receiving a data packet request fed back by the DSP according to the IP address and the file name of the dsp.s file, so that the DSP writes a success mark in the first position of the memory according to the dsp.s file; a determination unit, configured to determine a target dsp.s file according to the dsp.s file after reading the success flag from the first position of the memory, and write the success flag to the second position of the memory; the target dsp.s file is a DSP version file with the same file name as the dsp.s file; a fourth sending unit, configured to send the target dsp.s file to the DSP after receiving the software loading request sent by the DSP according to the success mark, so that the DSP writes the success mark in the third position of the memory according to the target dsp.s file; The data determination unit is used to determine that the DSP loading is completed after the success flag is read from the third position of the memory.

Citation Information

Patent Citations

  • Method and device for loading digital signal processor

    CN102890635A

  • Ethernet loading method of DSP and FPGA and signal processing system

    CN108153561A

  • Multi-channel CANFD bus communication device and method

    CN116049071A

  • Online upgrading method based on domestic FPGA soft core

    CN117519765A

  • Satellite-borne DSP software on-orbit reconstruction method and device, storage medium and terminal

    CN117667167A