CN110442352B - Code downloading method and device for DSP - Google Patents

Code downloading method and device for DSP Download PDF

Info

Publication number
CN110442352B
CN110442352B CN201910668725.0A CN201910668725A CN110442352B CN 110442352 B CN110442352 B CN 110442352B CN 201910668725 A CN201910668725 A CN 201910668725A CN 110442352 B CN110442352 B CN 110442352B
Authority
CN
China
Prior art keywords
data
mcu
dsp
code
writing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910668725.0A
Other languages
Chinese (zh)
Other versions
CN110442352A (en
Inventor
陈建宇
谢炎飞
钟振华
胡毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Accelink Technologies Co Ltd
Original Assignee
Accelink Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Accelink Technologies Co Ltd filed Critical Accelink Technologies Co Ltd
Priority to CN201910668725.0A priority Critical patent/CN110442352B/en
Publication of CN110442352A publication Critical patent/CN110442352A/en
Application granted granted Critical
Publication of CN110442352B publication Critical patent/CN110442352B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Optical Communication System (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a code downloading method and a code downloading device of a Digital Signal Processor (DSP), wherein the optical module comprises a Micro Control Unit (MCU) and a storage device; the method comprises the following steps: obtaining code data, and converting the code data into first data in a specific format; the specific format is a data format supporting writing into a storage component in the MCU; writing the first data into a storage component in the MCU; and sending a code loading instruction to the MCU, and executing the code loading instruction by the MCU to write the stored first data into the storage device.

Description

Code downloading method and device for DSP
Technical Field
The present invention relates to the field of optical communications technologies, and in particular, but not limited to, to a method and an apparatus for downloading codes from a DSP.
Background
400G optical modules will be commercially available from a data center. For 400G applications, the biggest difference is the introduction of a new modulation format: the four-pulse amplitude modulation signal (4Pulse Amplitude Modulation,PAM-4) has the effect of doubling the transmission rate under the same baud rate (device bandwidth), for example, the four-generation double-rate synchronous dynamic random access memory DR4 applied to transmission under 500 meters is required to achieve 100Gbps for single-wave rate. In order to realize such rate applications, data center optical modules are beginning to introduce digital signal processor (Digital Signal Processor, DSP) based chips instead of the past clock recovery chips to address the sensitivity problem caused by insufficient optical device bandwidth. DSP chips will become the most widespread solution for optical modules.
But there is no Read-Only Memory (ROM) inside the DSP chip to store the code, so an external expansion ROM must be used, and FLASH Memory is commonly used in optical modules. As DSP codes become larger, how to quickly write DSP codes into FLASH becomes a problem that must be addressed and resolved. The current general method is to communicate the DSP codes with the micro control unit (Microcontroller Unit, MCU) in the optical module by using the customized protocol through the personal computer (Personal Computer, PC) software, and the MCU transmits the DSP codes to the MCU frame by frame, and then the MCU writes the DSP codes into the FLASH. The greatest disadvantage of the downloading method is long time, especially the current DSP codes are bigger and bigger, the downloading time is tens of minutes, and the efficiency is very low. As the output of optical modules increases, the DSP code downloading method obviously needs to be improved. There is currently no effective solution to this problem.
Disclosure of Invention
In view of this, the embodiment of the invention is expected to provide a method and a device for downloading codes of a DSP.
The technical embodiment of the invention is realized in the following way:
the embodiment of the invention provides a code downloading method of a DSP, wherein an optical module comprises a Micro Control Unit (MCU) and a storage device; the method comprises the following steps:
obtaining code data, and converting the code data into first data in a specific format; the specific format is a data format supporting writing into a storage component in the MCU;
writing the first data into a storage component in the MCU;
and sending a code loading instruction to the MCU, and executing the code loading instruction by the MCU to write the stored first data into the storage device.
In the above scheme, the first data includes address information in the storage component, where the address information is used to store the first data;
the writing the first data into a storage component within the MCU includes: the first data is written into a storage component within the MCU based on the address information in the first data.
In the above scheme, the optical module further includes a DSP; the DSP and the MCU are respectively connected with the storage device through a serial bus; the DSP and the MCU are connected through a communication interface;
the MCU executing the code loading instruction writes the stored first data into the storage device, including:
the MCU sends first configuration information to the DSP based on the code loading instruction, wherein the first configuration information is used for controlling the DSP to be in a first mode; the first mode characterizes a mode of releasing the serial bus;
the MCU writes the stored first data into the memory device based on the serial bus.
In the above scheme, the method further comprises: the MCU sends second configuration information to the DSP and controls the MCU to be in the first mode; the second configuration information is used for controlling the DSP to be in a second mode;
the DSP reads the first data from the memory device based on the serial bus, the first data being used by the DSP to perform a start-up operation.
In the above scheme, the method further comprises:
the DSP executes starting operation based on the first data to obtain and store a starting operation result;
and the MCU reads the starting operation result and sends third configuration information to the DSP based on the starting operation result.
The embodiment of the invention provides a code downloading method of a DSP, and the optical module code processing device comprises the following steps: the device comprises an optical module, a conversion unit, a writing unit and an execution unit, wherein the optical module comprises an MCU and a storage device; wherein:
the conversion unit is used for obtaining code data and converting the code data into first data in a specific format; the specific format is a data format supporting writing into a storage component in the MCU;
the writing unit is used for writing the first data obtained by the conversion unit into a storage component in the MCU;
the execution unit is used for sending a code loading instruction to the MCU;
and the MCU is used for executing the code loading instruction sent by the execution unit to write the stored first data into the storage device.
In the above scheme, the first data includes address information in the storage component, where the address information is used to store the first data;
the writing unit is used for writing the first data into a storage component in the MCU based on the address information in the first data.
In the above scheme, the optical module further includes a DSP; the DSP and the MCU are respectively connected with the storage device through a serial bus; the DSP and the MCU are connected through a communication interface;
the MCU is used for sending first configuration information to the DSP based on the code loading instruction, and the first configuration information is used for controlling the DSP to be in a first mode; the first mode characterizes a mode of releasing the serial bus; writing the stored first data into the memory device based on the serial bus.
In the above scheme, the MCU is further configured to send second configuration information to the DSP and control itself to be in the first mode; the second configuration information is used for controlling the DSP to be in a second mode;
the DSP is used for reading the first data from the storage device based on the serial bus, and the first data is used for the DSP to execute starting operation.
In the above scheme, the DSP is further configured to perform a startup operation based on the first data, and obtain and store a startup operation result;
the MCU is further used for reading the starting operation result from the DSP and sending third configuration information to the DSP based on the starting operation result.
The embodiment of the invention provides a method and a device for downloading codes of a DSP, wherein the method comprises the following steps: obtaining code data, and converting the code data into first data in a specific format; the specific format is a data format supporting writing into a storage component in the MCU; writing the first data into a storage component in the MCU; and sending a code loading instruction to the MCU, and executing the code loading instruction by the MCU to write the stored first data into the storage device. By adopting the technical scheme of the embodiment of the invention, the code data are converted into the first data in a specific format which is supported to be written into the storage component in the MCU, the first data are written into the storage component in the MCU, and then the code loading instruction is executed by the MCU to transfer the first data into the storage device outside the MCU.
Drawings
FIG. 1 is a schematic diagram of an implementation flow of an optical module code processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an MCU storage component in an optical module code processing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of another implementation flow of an optical module code processing method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an application scenario of an optical module code processing method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a composition structure of an optical module code processing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware entity structure of an optical module code processing device in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the following detailed description of the specific technical solutions of the present invention will be given with reference to the accompanying drawings in the embodiments of the present invention. The following examples are illustrative of the invention and are not intended to limit the scope of the invention.
FIG. 1 is a schematic diagram of an implementation flow of a method for processing codes of an optical module according to an embodiment of the present invention, as shown in FIG. 1, where the optical module includes an MCU and a memory device; the method comprises the following steps:
step S101: obtaining code data, and converting the code data into first data in a specific format; the particular format is a data format that supports writing to a storage component within the MCU.
The code data may be a DSP code, which is a code that can be executed by the DSP, and the DSP may be initialized by executing the code by the DSP, and the DSP code may be a code provided by a DSP code manufacturer. The code data may be stored in a communication device, which may be an interface type device, a photoelectric conversion type device, or an electronic type device, etc., without limitation, and as an example, the code directly provided by the DSP code manufacturer may be stored in an electronic device, for example, a computer, or may be stored in an interface type device, for example, a hard disk.
Here, the code data is converted into first data of a specific format; the particular format is a data format that supports writing to a storage component within the MCU. As an implementation manner, if the process of writing into the storage component in the MCU is implemented by using code programming software through a code programming tool, the specific format is a format that can be identified by the code programming software. Here, the conversion process of the code data may be implemented by software, which may be designed according to actual conditions, and which may be computer software, which may be PC software, as an example; the specific format is a data format supporting writing to a storage component within the MCU, and for ease of understanding, the specific format may be a HEX (Intel HEX) file format, and the first data may be HEX file format data.
In this embodiment, the storage component may be a memory in the MCU, and as an example, the memory may be a FLASH, and in particular may be an on-chip FLASH in the MCU.
Step S102: and writing the first data into a storage component in the MCU.
Here, the first data may be written into the storage component in the MCU by a device, which may be a communication device, which may be an interface type device, a photoelectric conversion type device, or an electronic type device, etc., without limitation, and as an example, the device may be an MCU code writing device, which may be connected to the MCU through an interface, and as an example, the MCU code writing device may include a writing tool and writing software, the MCU may write the first data into the storage component in the MCU through the writing tool and the writing software, and in particular, the MCU may perform the writing of the first data into the storage component in the MCU through the writing tool, which may be either hardware or software, and for convenience of understanding, the writing tool may be a single-chip microcomputer or an execution software, and the writing software may be a code program for executing a writing process by the writing tool, and may be a specific language.
In an optional embodiment of the present invention, the first data may include address information in the storage component for storing the first data; the writing the first data into a storage component within the MCU may include: the first data is written into a storage component within the MCU based on the address information in the first data.
For example, assuming that the obtained code data is a DSP code and the specific format is a HEX file format, the first data is data in the HEX file format, and the first data may include address information of the DSP code stored in a storage component within the MCU and DSP code data. Fig. 2 is a schematic diagram of an MCU storage device in an optical module code processing method according to an embodiment of the present invention, as shown in fig. 2, in the process of converting code data into first data by PC software, address information of first data in a HEX file format in the MCU storage device is set, for example, storage locations 0x08016000-0x0807FFFF of DSP code areas in the storage device in the MCU in fig. 2, and since only 2 bytes in the HEX file format represent addresses, addresses exceeding 0xFFFF (64K) must define offset addresses, for example, offset addresses of 0x08016000 may be 0x0801, and current addresses may be 0x6000. The first data may include a data length, data corresponding to the DSP code, a type of the data, an offset address, etc., and for convenience of understanding, it is assumed herein that the offset address is 0x0801, and the first data is written in the hex file format according to the data type 0x04, where the data is: 020000040801F1, wherein 02 represents the data length; 0000 may represent a data address; 04 denotes a data type; 0801 denotes an offset address; f1 is denoted as check code. And then reading 16 bytes of data from the DSP codes, if the read data is 16 bytes, writing the current address and the 16 bytes of data into the first data of the hex file format according to the data type 0x00, and increasing the current address by 16, so that the corresponding DSP codes are converted into the first data of the corresponding hex file format one by one. If the DSP code is greater than 64K, the offset address needs to be reset every 64K, 1 is added to the last offset address and the offset address is written into the hex file according to the data type 0x04, and the current address can be changed to 0x0000. When the actual byte read is less than 16 bytes, this is the last packet of DSP code, and the current address and the remaining bytes are written to the first data in the hex file format as data type 0x 00. Finally, the termination sequence '00000001 FF/n' is written into the first data of the hex file format. This generates first data in the hex file format containing both DSP code and address information.
Here, the writing the first data into a storage component within the MCU includes: and writing the first data into a storage component in the MCU by using code programming software through a code programming tool. The code programming tool utilizes code programming software to identify address information of first data in the process of reading the first data from a storage component of the MCU, and writes the first data into the storage component in the MCU based on the address information in the first data, namely writes the code of the first data into a corresponding position in the storage component in the MCU.
The code programming tool can be realized by a writer or a writer, and is used for writing data into a storage component (such as FLASH in the MCU) in the MCU. The code programming tool, in combination with the code programming software implementation, writes data to a storage component within the MCU, as an example, by executing the code programming software implementation.
As an example, the code programming tool and the memory storing the code programming software may be connected via a universal serial bus (Universal Serial Bus, USB), and the code programming tool may obtain the code programming software from the memory storing the code programming software via the USB connection. The code programming software and the code programming tool can be MCU code programming software and MCU code programming tool, the MCU code programming tool can read first data in a hex file format by using the MCU code programming software, address information and code information in the first data are identified, and the code information is written to a position corresponding to the address information based on the address information.
In an optional embodiment of the present invention, after the first data is written into the storage component in the MCU, the code programming tool in combination with the code programming software may further read a code in the storage component in the MCU, and verify whether the writing of the code is correct. Specifically, the code is compared with the code stored in the code programming tool, if the code is identical to the code stored in the code programming tool, the code is accurately written, and when the code programming software recognizes the code in the first data, the code is recorded through the code programming tool, namely, the code is stored, so that the code written in the MCU storage component is checked later.
Step S103: and sending a code loading instruction to the MCU, and executing the code loading instruction by the MCU to write the stored first data into the storage device.
Here, the code loading instruction may be transmitted to the MCU through software, which may be stored in an electronic device such as a computer, and which may be PC software as an example.
The MCU executes the code loading instruction to write the stored first data into the storage device, and the MCU executes the code loading instruction to write codes in the stored first data into the storage device, wherein the code loading instruction can be a code downloading instruction; the first data may be DSP code; the memory device may be any memory device, and as an example, the memory device may be a FLASH device, and in particular may be an off-chip FLASH device.
According to the optical module code processing method provided by the embodiment of the invention, the code data are converted into the first data in a specific format which is supported to be written into the storage component in the MCU, the first data are written into the storage component in the MCU, and then the code loading instruction is executed by the MCU to transfer the first data into the storage device outside the MCU.
In this embodiment, a code downloading method of a DSP is provided, and fig. 3 is a schematic diagram of another implementation flow of the code processing method of an optical module according to the embodiment of the present invention, as shown in fig. 3, where the optical module includes an MCU, a storage device, and a DSP; the DSP and the MCU are respectively connected with the storage device through a serial bus; the DSP and the MCU are connected through a communication interface; the method comprises the following steps:
step S201, code data is obtained, and the code data is converted into first data in a specific format; the particular format is a data format that supports writing to a storage component within the MCU.
Step S201 in this embodiment may refer to the description in step S101 in the foregoing embodiment, and will not be repeated here.
Step S202, writing the first data into a storage component in the MCU.
Step S202 in this embodiment may refer to the description in step S102 in the foregoing embodiment, and will not be repeated here.
Step S203, the MCU receives a code loading instruction, and sends first configuration information to the DSP based on the code loading instruction, wherein the first configuration information is used for controlling the DSP to be in a first mode; the first mode characterizes a mode of releasing the serial bus; the MCU writes the stored first data into the memory device based on the serial bus.
Here, the serial bus may be a universal serial bus, and as an example, the serial bus may be a serial peripheral interface (Serial Peripheral Interface, SPI) bus, the DSP and the MCU may be connected to the memory device through the SPI bus, and the bus between the DSP and the memory device and the bus between the MCU and the memory device may be the same SPI bus, respectively. The first configuration information may be set according to actual situations, and as an example, the first configuration information may be a mode in which a pin level is set to a first level value or a first SPI. For example, the first configuration information may be a RESET (RESET) pin set low, which indicates that the first mode is in; conversely, the RESET pin being set high indicates that it is in a second mode that characterizes a mode using the serial bus (i.e., SPI bus); at this point, the MCU is in the second mode, i.e., the MCU is currently available to use the SPI bus. The MCU may send first configuration information to the DSP based on the code loading instruction, causing the DSP to be in a mode of releasing the serial bus. In practical applications, the MCU may send the first configuration information to the DSP through a communication interface with the DSP, so that a RESET (RESET) pin of the DSP is set to a low level. And the SPI of the MCU is configured in the master mode at this time.
The writing of the stored first data into the memory device by the MCU based on the serial bus may be the writing of a code in the stored first data into the memory device by the MCU based on the serial bus, and the code may be a DSP code.
It should be noted that, after the MCU executes the code loading instruction to write the stored first data into the storage device, the method may further include: the MCU reads the first data written in the storage device and verifies the first data to obtain a second verification result; the second check result characterizes whether writing the stored first data to the memory device is correct.
Here, the MCU may read the code in the first data written in the storage device, compare the read code in the first data with the code in the first data stored in the storage component in the MCU, and if the two sets of data are the same, it indicates that writing the stored first data into the storage device is correct, and may continue to execute subsequent steps; if the two sets of data are not identical, indicating that the writing of the code in the stored first data into the memory device is incorrect, the code in the stored first data needs to be re-written into the memory device.
Step S204, the MCU sends second configuration information to the DSP and controls the MCU to be in the first mode; the second configuration information is used for controlling the DSP to be in a second mode; the DSP reads the first data from the memory device based on the serial bus, the first data being used by the DSP to perform a start-up operation.
Here, since the DSP and the MCU are connected to the memory device through serial buses (e.g., SPI buses), respectively, the serial buses are the same SPI bus. Therefore, only one SPI bus can be active at the same time, and the other SPI bus needs to be configured in an open drain state, i.e., the mode of the serial bus is released. The second configuration information may be set according to actual situations, and as an example, the second configuration information may be a mode in which a pin level is set to a second level value or a second SPI. Specifically, the second configuration information may be that a RESET (RESET) pin is set to a high level, and the set to the high level indicates that the second mode is in. The first mode characterizes a mode of releasing the serial bus, and the second mode characterizes a mode of using the serial bus (i.e., SPI bus); at this time, the MCU is in a first mode releasing the serial bus, and the DSP is in a second mode using the serial bus. In this embodiment, the MCU may send second configuration information to the DSP through a communication interface with the DPS, so that the DSP is in the second mode, and the MCU controls itself to be in the first mode, and after the DSP is in the second mode, the MCU may read, from the storage device, a code in the first data through the serial bus (for example, an SPI bus), where the code in the first data is used for the DSP to perform a start operation. As an example, the MCU and the DSP interact through a communication interface, the MCU configures its SPI pin into an open-drain state, and releases the serial bus mode, the MCU sends second configuration information to the DSP, so that the DSP sets a RESET (RESET) pin to a high level, and the DSP may read the code in the first data from the storage device based on the serial bus, and perform a start operation.
Step S205, the DSP executes a starting operation based on the first data, and obtains and stores a starting operation result; and the MCU reads the starting operation result and sends third configuration information to the DSP based on the starting operation result.
Here, the DSP performing the start-up operation based on the first data may perform the start-up operation for the DSP based on the code in the first data. The starting operation result can be the success or failure of the starting of the DSP, and the starting operation result can be stored by a specific register in the DSP. As an example, the particular register may be a state register of the DSP. The third configuration information may be parameter configuration information, which may be, as an example, parameter configuration of the optical module. Specifically, the MCU reads the starting operation result, sends third configuration information to the DSP based on the starting operation result, and may read a status register of the DSP for the MCU, and when it is determined that the DSP is started successfully based on data of the status register, send parameter configuration of the optical module to the DSP, so that the DSP works correctly.
Fig. 4 is a schematic diagram of an application scenario of a method for processing an optical module code according to an embodiment of the present invention, as shown in fig. 4, the memory and the processor may be both a memory and a processor in a communication device, where the communication device has a communication function, and may be an interface device, a photoelectric conversion device, or an electronic device, where the application program is not limited herein, and may be any software program, as an example, the application program may be code writing software, and the operating system may be a tool for executing software, as an example, and the operating system may be a code writing tool. The processor may convert the code data into first data in a specific format, and the processor may be hardware or software, and as an example, the processor may be PC software, and may convert the code data into first data in a specific format; the specific format is a data format supporting writing into a storage component in the MCU; the code data may be DSP code and the first data in the particular format may be data in a HEX file.
According to the optical module code processing method, the code data are converted into the first data in the specific format which is supported to be written into the storage component in the MCU, the first data are written into the storage component in the MCU, and then the code loading instruction is executed by the MCU to enable the storage device outside the MCU to store the first data.
In this embodiment, a further method for downloading a code of a DSP is provided, and fig. 5 is a schematic diagram of a composition structure of an optical module code processing apparatus according to an embodiment of the present invention, as shown in fig. 5, where the optical module code processing apparatus 300 includes: the device comprises a conversion unit 301, a writing unit 302, an execution unit 303 and an optical module 304, wherein the optical module 304 comprises an MCU3041 and a storage device 3042; wherein:
the conversion unit 301 is configured to obtain code data, and convert the code data into first data in a specific format; the particular format is a data format that supports writing to a storage component within the MCU.
The writing unit 302 is configured to write the first data obtained by the converting unit into a storage component in the MCU.
The execution unit 303 is configured to send a code loading instruction to the MCU;
the MCU3041 is configured to execute the code loading instruction sent by the execution unit to write the stored first data into the storage device.
In other embodiments, the first data includes address information in the storage component for storing the first data;
the writing unit 302 is configured to write the first data into a storage component in the MCU based on the address information in the first data.
In other embodiments, the optical module further includes a DSP; the DSP and the MCU are respectively connected with the storage device through a serial bus; the DSP and the MCU are connected through a communication interface;
the MCU3041 is configured to send first configuration information to the DSP based on the code loading instruction, where the first configuration information is used to control the DSP to be in a first mode; the first mode characterizes a mode of releasing the serial bus; writing the stored first data into the memory device based on the serial bus.
In other embodiments, the MCU3041 is configured to send second configuration information to the DSP and control itself to be in the first mode; the second configuration information is used for controlling the DSP to be in a second mode;
the DSP is used for reading the first data from the storage device based on the serial bus, and the first data is used for the DSP to execute starting operation.
In other embodiments, the DSP is further configured to perform a startup operation based on the first data, and obtain and store a startup operation result;
the MCU is further used for reading the starting operation result from the DSP and sending third configuration information to the DSP based on the starting operation result.
The description of the apparatus embodiments above is similar to that of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present invention, please refer to the description of the embodiments of the method of the present invention.
In the embodiment of the present invention, if the above-mentioned optical module code processing method is implemented in the form of a software functional module, and sold or used as a separate product, the optical module code processing method may also be stored in a computer readable storage medium. Based on such understanding, the technical embodiments of the present invention may be embodied essentially or in part in the form of a software product stored in a storage medium, including instructions for causing a light module code process (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the methods described in the various embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
Correspondingly, an embodiment of the present invention provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the steps in the optical module code processing method provided in the above embodiment.
It should be noted here that: the description of the storage medium and apparatus embodiments above is similar to that of the method embodiments described above, with similar benefits as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the apparatus of the present invention, please refer to the description of the method embodiments of the present invention.
Fig. 6 is a schematic diagram of a hardware entity structure of an optical module code processing device according to an embodiment of the present invention, and as shown in fig. 6, the hardware entity of the optical module code processing device 400 includes: processor 401 and memory 403, optionally, the optical module code processing device 400 may further comprise a communication interface 402. As an implementation manner, the optical module may access the communication interface 402, so that the processor 401 executes a computer program in the memory 403 to implement the processing of the optical module code in the embodiment of the present invention.
It will be appreciated that memory 403 may be volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. Wherein the nonvolatile Memory may be Read Only Memory (ROM), programmable Read Only Memory (PROM, programmable Read-Only Memory), erasable programmable Read Only Memory (EPROM, erasable Programmable Read-Only Memory), electrically erasable programmable Read Only Memory (EEPROM, electrically Erasable Programmable Read-Only Memory), magnetic random access Memory (FRAM, ferromagnetic random access Memory), flash Memory (Flash Memory), magnetic surface Memory, optical disk, or compact disk Read Only Memory (CD-ROM, compact Disc Read-Only Memory); the magnetic surface memory may be a disk memory or a tape memory. The volatile memory may be random access memory (RAM, random Access Memory), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available, such as static random access memory (SRAM, static Random Access Memory), synchronous static random access memory (SSRAM, synchronous Static Random Access Memory), dynamic random access memory (DRAM, dynamic Random Access Memory), synchronous dynamic random access memory (SDRAM, synchronous Dynamic Random Access Memory), double data rate synchronous dynamic random access memory (ddr SDRAM, double Data Rate Synchronous Dynamic Random Access Memory), enhanced synchronous dynamic random access memory (ESDRAM, enhanced Synchronous Dynamic Random Access Memory), synchronous link dynamic random access memory (SLDRAM, syncLink Dynamic Random Access Memory), direct memory bus random access memory (DRRAM, direct Rambus Random Access Memory). The memory 403 described in embodiments of the present invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the above embodiment of the present invention may be applied to the processor 401 or implemented by the processor 401. The processor 401 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 401 or by instructions in the form of software. The processor 401 described above may be a general purpose processor, a digital signal processor (DSP, digital Signal Processor), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. Processor 401 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiment of the invention can be directly embodied in the hardware of the decoding processor or can be implemented by combining hardware and software modules in the decoding processor. The software modules may be located in a storage medium in memory 403 and the processor 401 reads information in memory 403 to perform the steps of the method described above in connection with its hardware.
In an exemplary embodiment, the optical module code processing device may be implemented by one or more application specific integrated circuits (ASIC, application Specific Integrated Circuit), DSPs, programmable logic devices (PLD, programmable Logic Device), complex programmable logic devices (CPLD, complex Programmable Logic Device), field-programmable gate arrays (FPGA, field-Programmable Gate Array), general purpose processors, controllers, microcontrollers (MCU, micro Controller Unit), microprocessors (Microprocessor), or other electronic components for performing the aforementioned methods.
In the several embodiments provided in the present invention, it should be understood that the disclosed method and apparatus may be implemented in other manners. The above-described embodiment of the apparatus is merely illustrative, and for example, the division of the units is merely a logic function division, and there may be other division manners in actual implementation, such as: multiple units or components may be combined or may be integrated into another observational quantity or some features may be omitted or not performed. In addition, the various components shown or discussed may be connected in an indirect coupling or communication via interfaces, devices, or units, which may be electrical, mechanical, or other forms.
The units described as separate units may or may not be physically separate, and units displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units; some or all of the units may be selected according to actual needs to achieve the object of the present embodiment.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, where the program, when executed, performs steps including the above method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a magnetic disk or an optical disk, or the like, which can store program codes.
Alternatively, the integrated units of the embodiments of the present invention may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical embodiments of the present invention may be embodied essentially or in part in the form of a software product stored in a storage medium, including instructions for causing a light module code process (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the methods described in the various embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a removable storage device, a ROM, a magnetic disk, or an optical disk.
The method, the device and the computer storage medium for determining the quality of the observed satellite based measurement described in the examples are only examples of the embodiment of the invention, but are not limited thereto, and the method, the device and the computer storage medium for determining the quality of the observed satellite based measurement are all within the protection scope of the invention.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present invention, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present invention, and the changes and substitutions are intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. The code downloading method of the digital signal processor DSP is characterized in that the optical module comprises a micro control unit MCU and a storage device; the optical module also comprises a DSP; the DSP and the MCU are respectively connected with the storage device through a serial bus; the DSP and the MCU are connected through a communication interface; the method comprises the following steps:
obtaining code data, and converting the code data into first data in a specific format; the specific format is a data format supporting writing into a storage component in the MCU; the first data comprises address information used for storing the first data in the storage component;
writing the first data into a storage component in the MCU;
transmitting a code loading instruction to the MCU, and executing the code loading instruction by the MCU to write the stored first data into the storage device;
wherein the MCU executing the code loading instruction writes the stored first data into the storage device comprises:
the MCU sends first configuration information to the DSP based on the code loading instruction, wherein the first configuration information is used for controlling the DSP to be in a first mode; the first mode characterizes a mode of releasing the serial bus;
the MCU writes the stored first data into the memory device based on the serial bus.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the writing the first data into a storage component within the MCU includes: the first data is written into a storage component within the MCU based on the address information in the first data.
3. The method according to claim 1, wherein the method further comprises: the MCU sends second configuration information to the DSP and controls the MCU to be in the first mode; the second configuration information is used for controlling the DSP to be in a second mode;
the DSP reads the first data from the memory device based on the serial bus, the first data being used by the DSP to perform a start-up operation.
4. A method according to claim 3, characterized in that the method further comprises:
the DSP executes starting operation based on the first data to obtain and store a starting operation result;
and the MCU reads the starting operation result and sends third configuration information to the DSP based on the starting operation result.
5. A code downloading apparatus of a DSP, the apparatus comprising: the device comprises an optical module, a conversion unit, a writing unit and an execution unit, wherein the optical module comprises a micro control unit MCU and a storage device; the optical module also comprises a digital signal processor DSP; the DSP and the MCU are respectively connected with the storage device through a serial bus; the DSP and the MCU are connected through a communication interface; wherein:
the conversion unit is used for obtaining code data and converting the code data into first data in a specific format; the specific format is a data format supporting writing into a storage component in the MCU; the first data comprises address information used for storing the first data in the storage component;
the writing unit is used for writing the first data obtained by the conversion unit into a storage component in the MCU;
the execution unit is used for sending a code loading instruction to the MCU;
the MCU is used for executing the code loading instruction sent by the execution unit to write the stored first data into the storage device;
the MCU is further used for sending first configuration information to the DSP based on the code loading instruction, and the first configuration information is used for controlling the DSP to be in a first mode; the first mode characterizes a mode of releasing the serial bus; writing the stored first data into the memory device based on the serial bus.
6. The apparatus of claim 5, wherein the device comprises a plurality of sensors,
the writing unit is used for writing the first data into a storage component in the MCU based on the address information in the first data.
7. The apparatus of claim 5, wherein the MCU is further configured to send second configuration information to the DSP and to control itself in the first mode; the second configuration information is used for controlling the DSP to be in a second mode;
the DSP is used for reading the first data from the storage device based on the serial bus, and the first data is used for the DSP to execute starting operation.
8. The apparatus of claim 7, wherein the DSP is further configured to perform a boot operation based on the first data, obtain and store a boot operation result;
the MCU is further used for reading the starting operation result from the DSP and sending third configuration information to the DSP based on the starting operation result.
CN201910668725.0A 2019-07-23 2019-07-23 Code downloading method and device for DSP Active CN110442352B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910668725.0A CN110442352B (en) 2019-07-23 2019-07-23 Code downloading method and device for DSP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910668725.0A CN110442352B (en) 2019-07-23 2019-07-23 Code downloading method and device for DSP

Publications (2)

Publication Number Publication Date
CN110442352A CN110442352A (en) 2019-11-12
CN110442352B true CN110442352B (en) 2023-11-07

Family

ID=68431310

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910668725.0A Active CN110442352B (en) 2019-07-23 2019-07-23 Code downloading method and device for DSP

Country Status (1)

Country Link
CN (1) CN110442352B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112157339B (en) * 2020-09-23 2022-06-03 天津七所高科技有限公司 Method for initializing data of resistance welding equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103809987A (en) * 2012-11-07 2014-05-21 中国科学院微电子研究所 Method for replacing FPGA IP program in SOC chip
CN103823698A (en) * 2014-02-27 2014-05-28 四川九洲电器集团有限责任公司 Method and device for programming and starting FPGA target program and DSP target program
CN106557351A (en) * 2016-11-21 2017-04-05 广东高标电子科技有限公司 The data processing method and device of built-in application program
CN108363577A (en) * 2018-02-01 2018-08-03 四川泰瑞创通讯技术股份有限公司 The device of automatic classifying downloaded optical module firmware program
CN109656591A (en) * 2018-12-06 2019-04-19 上海荣泰健康科技股份有限公司 Program down-loading method, electronic equipment and cloud server
CN109710296A (en) * 2018-12-14 2019-05-03 上海航天控制技术研究所 A kind of sky and space plane inertial navigation embedded software on-line updating method
CN110035322A (en) * 2018-01-11 2019-07-19 中兴通讯股份有限公司 A kind of method, apparatus and computer readable storage medium of activation system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170177543A1 (en) * 2015-12-22 2017-06-22 Intel Corporation Aggregate scatter instructions

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103809987A (en) * 2012-11-07 2014-05-21 中国科学院微电子研究所 Method for replacing FPGA IP program in SOC chip
CN103823698A (en) * 2014-02-27 2014-05-28 四川九洲电器集团有限责任公司 Method and device for programming and starting FPGA target program and DSP target program
CN106557351A (en) * 2016-11-21 2017-04-05 广东高标电子科技有限公司 The data processing method and device of built-in application program
CN110035322A (en) * 2018-01-11 2019-07-19 中兴通讯股份有限公司 A kind of method, apparatus and computer readable storage medium of activation system
CN108363577A (en) * 2018-02-01 2018-08-03 四川泰瑞创通讯技术股份有限公司 The device of automatic classifying downloaded optical module firmware program
CN109656591A (en) * 2018-12-06 2019-04-19 上海荣泰健康科技股份有限公司 Program down-loading method, electronic equipment and cloud server
CN109710296A (en) * 2018-12-14 2019-05-03 上海航天控制技术研究所 A kind of sky and space plane inertial navigation embedded software on-line updating method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"一种基于以太网加载 FPGA 和 DSP 的实现方法;吴湘宁;微型机与应用;第55-58页 *

Also Published As

Publication number Publication date
CN110442352A (en) 2019-11-12

Similar Documents

Publication Publication Date Title
TWI416409B (en) A method for booting a host device from an mmc/sd device, a host device bootable from an mmc/sd device and an mmc/sd device a host device may be booted from
US10659553B2 (en) Memory system allowing host to easily transmit and receive data
TW486668B (en) A single-chip data processing apparatus incorporating an electrically rewritable nonvolatile memory and method of operating the same
JP2004222298A (en) Transceiver
US20090172219A1 (en) Device and method for automatically launching applications residing on usb flash drives
CN111611184A (en) Broadcast/multicast transactions to devices on an extended mode (XM) bus
TW201009588A (en) Information processing apparatus, information processing system, method of processing information, and computer program
US20230315213A1 (en) Program download method for intelligent terminal and intelligent terminal
CN110442352B (en) Code downloading method and device for DSP
US8386738B1 (en) Off-chip non-volatile memory access
US20160055853A9 (en) Method for processing sound data and circuit therefor
CN108920389B (en) Method and device for dynamically matching protocol type and application of multi-protocol USB device
US7424580B2 (en) Data transfer control device, electronic instrument, program and method of fabricating electronic instrument
EP2194458A2 (en) Request processing device, request processing system, and access testing method
Bogdanov et al. Flash programming low power microcontrollers over the Internet
CN102650877A (en) Extraction of foundation fieldbus device information for enhanced device selection and data validation
CN102096589A (en) DM642-based embedded general boot loading system
CN111104097B (en) Data writing and reading method and device
JP2020101889A (en) Module, information processing device provided with module, program data update method for updating program data of module
JPH04162300A (en) Semiconductor memory
US20090300223A1 (en) Method for communication between an electronic device and a target input/output device in a secure digital input/output card through a secure digital interface, and system for implementing the same
CN113360433B (en) Data communication method and device
CN114003535B (en) Device bandwidth configuration method and system, electronic device and storage medium
JP3334602B2 (en) Changing and setting the configuration register of a PCI device
CN111614900B (en) Camera driving method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant