CN105718248B - System on chip and method and device for initializing port function of system on chip - Google Patents

System on chip and method and device for initializing port function of system on chip Download PDF

Info

Publication number
CN105718248B
CN105718248B CN201410719970.7A CN201410719970A CN105718248B CN 105718248 B CN105718248 B CN 105718248B CN 201410719970 A CN201410719970 A CN 201410719970A CN 105718248 B CN105718248 B CN 105718248B
Authority
CN
China
Prior art keywords
chip
port
configuration information
configuration
storage space
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
CN201410719970.7A
Other languages
Chinese (zh)
Other versions
CN105718248A (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.)
BYD Semiconductor Co Ltd
Original Assignee
BYD 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 BYD Co Ltd filed Critical BYD Co Ltd
Priority to CN201410719970.7A priority Critical patent/CN105718248B/en
Publication of CN105718248A publication Critical patent/CN105718248A/en
Application granted granted Critical
Publication of CN105718248B publication Critical patent/CN105718248B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for initializing a system-on-chip port function, which comprises the following steps: powering on the system on chip; the nonvolatile storage space sends a flag bit to a starting control program of the system on chip; starting a control program to judge whether the system on chip is powered on for the first time according to the flag bit; if the system on chip is not powered on for the first time, the nonvolatile storage space sends a mark interrupt to a starting control program of the system on chip so that the starting control program skips a program segment process of a software initialization port; the configuration circuit reads the configuration information in the nonvolatile storage space to configure the port of the system on chip. When the power-on times of the system on chip is more than one time, the invention quickly responds and completes the initialization operation of the port function through hardware, improves the efficiency of the system from power-on to the completion of the initialization of the port function, and enhances the instantaneity and the reliability of the system. The invention also discloses a device for initializing the port function of the system-on-chip and the system-on-chip comprising the device.

Description

System on chip and method and device for initializing port function of system on chip
Technical Field
The present invention relates to the field of embedded technologies, and in particular, to a method for initializing a port function of a system-on-chip, an apparatus for initializing a port function of a system-on-chip, and a system-on-chip.
Background
The current embedded field is developed rapidly, and the functions of a single chip microcomputer and a system on a chip are more and more powerful. Because each single chip microcomputer and the system on chip comprise a plurality of complex functions, the ports of the system on chip gradually tend to be complex functionalized and multiplexed, and even each pin corresponds to three, four or more multiplexing functions, so that the development and the use of multiple functions can be supported in application, wherein the functions of the ports are dynamically switched in use.
When the single chip microcomputer and the system on chip start working, the port functions of the single chip microcomputer and the system on chip are firstly allocated to the initialization function of system hardware solidification (for example, the chip hardware logic default external pins are all the functions of the universal input and output ports after the single chip microcomputer and the system on chip are powered on and reset), then the function initial configuration of software is carried out on all the ports one by one according to a driving program in the system so as to meet the port functions of the system in the application occasion of the software, and then the system can carry out corresponding work according to the port functions configured by the software. The mode of initializing the port functions of the singlechip and the system on chip specifically comprises the following steps: when the singlechip and the system-on-chip are in the process from power-on to stable power-on of the system, the port is controlled by the reset of the system hardware logic, the functional state of the port is always the only functional state set by the system hardware logic, and the functional state is mostly not in accordance with the specific functional application of the system, so that after the system is stably powered on, the system can carry out software initialization again through a software driver to configure the functional state of the port, and then the system and the port can execute correct functions.
The above-mentioned current singlechip and system on chip still have certain shortcoming and limitation from beginning to work in the mode of external port function initialization: when the singlechip and the system-on-chip are powered on to start working each time, the application requirements of the system can be met only through a software initialization process of the port, and the software initialization process is actually a process executed by a software driver and needs to consume a certain processing time, and especially under the condition that the number and the functions of system ports are numerous or the operating frequency of the system is low, the consumed processing time is longer. In addition, in an application with a high demand for instantaneity, it may be necessary for the function of the external port to operate correctly in a very short time after the system is powered on, and the way of initializing the port by software is very limited. Meanwhile, the risk of operation and operation of software initialization is higher than that of system hardware logic control initialization, and the reliability is relatively lower.
Disclosure of Invention
The object of the present invention is to solve at least one of the above-mentioned technical problems to a certain extent.
Therefore, an object of the present invention is to provide a method for initializing a port function of a system-on-chip, which enables the system-on-chip to avoid a port software initialization process from each time when the system-on-chip is powered on to start working, thereby effectively saving the time of the port function initialization process, improving the instantaneity of the system, and realizing the port function initialization through hardware, and having high reliability.
Another object of the present invention is to provide an apparatus for initializing a port function of a system-on-chip.
It is a further object of the invention to propose a system on chip.
In order to achieve the above object, an embodiment of an aspect of the present invention provides a method for initializing a port function of a system-on-chip, where the system-on-chip has a non-volatile memory space, and the non-volatile memory space stores configuration information for initializing the port of the system-on-chip and a flag bit for marking a start state of the system-on-chip, and the method for initializing the port function of the system-on-chip includes the following steps: the system on chip is powered on; the nonvolatile storage space sends the flag bit to a starting control program of the system on chip; the starting control program judges whether the system on the chip is powered on for the first time according to the flag bit; if the system on chip is not powered on for the first time, the nonvolatile storage space sends a flag interrupt to a starting control program of the system on chip so that the starting control program skips a program segment process of a software initialization port; and the configuration circuit reads the configuration information in the nonvolatile storage space to configure the port of the system on chip.
The method for initializing the port function of the system on chip provided by the embodiment of the invention comprises the steps that after the system on chip is powered on, the nonvolatile storage space sends the zone bit to the starting control program of the system on chip, the starting control program judges whether the system on chip is powered on for the first time according to the zone bit, if the system on chip is not powered on for the first time, the nonvolatile storage space sends the zone interrupt to the starting control program of the system on chip, so that the starting control program skips the program segment process of the software initialization port, and finally the configuration circuit reads the configuration information in the nonvolatile storage space to configure the port of the system on chip. The method for initializing the port function of the system-on-chip avoids unnecessary multiple redundant operations in the subsequent port function initialization process except the first power-on of the system-on-chip, effectively saves the time of the port function initialization process, improves the instantaneity of the system, improves the starting efficiency of the system, and quickly realizes the port function initialization through hardware, and has high reliability and extremely low cost.
In order to achieve the above object, another embodiment of the present invention further provides an apparatus for initializing a port function of a system-on-chip, where the apparatus for initializing a port function of a system-on-chip includes: the non-volatile storage space is used for storing configuration information used for initializing the port of the system-on-chip and a flag bit used for marking the starting state of the system-on-chip, when the system-on-chip is powered on, the non-volatile storage space sends the flag bit to a starting control program of the system-on-chip, and if the starting control program judges that the system-on-chip is not powered on for the first time, the non-volatile storage space sends a flag interrupt to the starting control program so that the starting control program skips a program segment process of a software initialization port; and the configuration circuit reads the configuration information in the nonvolatile storage space to configure the port of the system on chip.
The device for initializing the port function of the system-on-chip provided by the embodiment of the invention stores the configuration information for initializing the port of the system-on-chip and the flag bit for marking the starting state of the system-on-chip through the nonvolatile storage space, when the system-on-chip is electrified, the nonvolatile storage space sends the flag bit to the starting control program of the system-on-chip, and if the starting control program judges that the system-on-chip is not electrified for the first time, the nonvolatile storage space sends the flag interrupt to the starting control program so that the starting control program skips the program segment process of the software initialization port, and the configuration circuit reads the configuration information in the nonvolatile storage space to configure the port of the system-on-chip. The device for initializing the port function of the system on chip can avoid unnecessary repeated redundant operations in the subsequent port function initialization process except the first power-on of the system on chip, effectively save the time of the system port function initialization process, improve the condition that the instantaneity of the system is relatively insufficient due to the initialization process, improve the starting efficiency of the system, and quickly realize the port function initialization through hardware, and has high reliability and extremely low cost.
In order to achieve the above object, an embodiment of a further aspect of the present invention further provides a system on chip, where the system on chip includes at least one port; starting a control program, wherein when the system on chip is electrified, the starting control program judges whether the system on chip is electrified for the first time according to the flag bit; and said means for initializing a system-on-chip port function.
According to the system on chip provided by the embodiment of the invention, unnecessary multiple redundant operations in the subsequent port function initialization process except for the first power-on of the system on chip are avoided through the device for initializing the port function of the system on chip, so that the time of the system port function initialization process is effectively saved, the instantaneity of the system is improved, the starting efficiency of the system is improved, and the device is quickly realized through hardware, has high reliability and extremely low port function initialization cost.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow diagram of a method for system-on-chip port function initialization according to an embodiment of the invention;
FIG. 2 is a diagram illustrating a port function list for a method for initializing a system-on-chip port function according to an embodiment of the invention;
FIG. 3 is a flowchart of a method for system-on-chip port function initialization, according to an embodiment of the invention;
FIG. 4 is a diagram illustrating configuration information storage order and format list for a method for initializing a system-on-chip port function according to an embodiment of the invention;
FIG. 5 is a block diagram illustrating an apparatus for system-on-chip port function initialization according to an embodiment of the present invention;
FIG. 6 is a block diagram illustrating an apparatus for system-on-chip port function initialization, according to an embodiment of the invention; and
FIG. 7 is a block diagram illustrating a system on a chip according to an embodiment of the invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Of course, they are merely examples and are not intended to limit the present invention. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. In addition, the present invention provides examples of various specific processes and materials, but one of ordinary skill in the art may recognize the applicability of other processes and/or the use of other materials. In addition, the structure of a first feature described below as "on" a second feature may include embodiments in which the first and second features are formed in direct contact, and may also include embodiments in which additional features are formed between the first and second features, such that the first and second features may not be in direct contact.
In the description of the present invention, it should be noted that, unless otherwise specified and limited, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, mechanically or electrically connected, or interconnected between two elements, directly or indirectly through an intermediate medium, and the specific meanings of the terms as described above will be understood by those skilled in the art according to the specific situation.
A method for initializing a port function of a system-on-chip, an apparatus for initializing a port function of a system-on-chip, and a system-on-chip according to embodiments of the present invention are described below with reference to the accompanying drawings.
In the embodiment of the invention, the system on chip is provided with a nonvolatile storage space, and the nonvolatile storage space stores configuration information for initializing a port of the system on chip and a flag bit for marking the starting state of the system on chip. As shown in fig. 1, the method for initializing the port function of the system-on-chip according to the embodiment of the present invention includes the following steps:
s1, the system on chip is powered on.
S2, the nonvolatile memory space sends the flag bit to the start control program of the system on chip.
And S3, the start control program judges whether the system on chip is powered on for the first time according to the flag bit.
In one embodiment of the present invention, the boot control program determines that the system-on-chip is powered on for the first time when the boot control program determines that the flag bit is invalid, and determines that the system-on-chip is not powered on for the first time when the boot control program determines that the flag bit is valid. In one embodiment of the present invention, the start control program determines that the flag bit is invalid when the flag bit is 1, and determines that the flag bit is valid when the flag bit is 0.
S4, if the system-on-chip is not powered on for the first time, the nonvolatile storage space sends a flag interrupt to the start control program of the system-on-chip, so that the start control program skips the program segment process of the software initialization port.
S5, the configuration circuit reads the configuration information in the nonvolatile storage space to configure the port of the system on chip.
Specifically, if the system on chip is not powered on for the first time, that is, the system on chip has already performed the process of powering on and working for the first time before the power on this time, at this time, the configuration information for the port configuration when the port function initialization is performed for the first time is already stored in the nonvolatile storage space. It should be noted that, after the configuration circuit reads the configuration information in the nonvolatile storage space, the configuration circuit automatically completes the configuration of the port of the system on chip through hardware, thereby quickly implementing the process of initializing the port function, and then the system on chip normally operates.
Further, in an embodiment of the present invention, after the step S5 of the configuration circuit reading the configuration information in the non-volatile storage space to configure the port of the system on chip, the method for initializing the port function of the system on chip may further include:
s6, the startup control program eliminates the flag interrupt after skipping the program segment procedure of the software initialization port.
Further, in another embodiment of the present invention, the method for initializing a port function of a system on chip may further include:
s7, if the system-on-chip is powered on for the first time, the control program is started to send the configuration information to the configuration circuit.
When the system-on-chip is powered on and works for the first time, the configuration circuit cannot read the configuration information from the nonvolatile storage space, and at this time, the configuration information exists in the start-up control program.
S8, the configuration circuit configures the port of the system on chip according to the configuration information.
Further, in an embodiment of the present invention, the method for initializing a port function of a system on chip may further include:
s9, the configuration circuit stores the configuration information in the nonvolatile storage space.
Further, in an embodiment of the present invention, after the step S9 of the configuration circuit storing the configuration information in the non-volatile storage space, the method for initializing the port function of the system on chip may further include:
s10, the configuration circuit modifies the flag bit.
In one embodiment of the invention, in step S10, the configuration circuit modifies the flag bit to a valid value.
In one embodiment of the invention, the configuration circuit may include: the device comprises a configuration information detection unit, an initialization information acquisition unit and a port configuration area. The configuration information detection unit is connected with the nonvolatile storage space and used for detecting the configuration information sent by the starting control program, storing the configuration information into the nonvolatile storage space and modifying the zone bit after the configuration information is stored into the nonvolatile storage space. The initialization information acquisition unit is respectively connected with the configuration information detection unit and the nonvolatile storage space, and acquires the configuration information from the configuration information detection unit if the system on chip is powered on for the first time, and reads the configuration information from the nonvolatile storage space if the system on chip is not powered on for the first time. The port configuration area is connected with the initialization information acquisition unit and used for configuring a port of the system on chip according to the configuration information.
In an embodiment of the present invention, the system on chip has 20 ports, wherein a function list of the 20 ports is as shown in fig. 2, and when in application, each port requirement initialization function is as shown in an application initial function column in fig. 2, as shown in fig. 3, the method for initializing the port function of the system on chip includes the following steps:
s31, the system on chip is powered on.
S32, the reset of the system on chip is completed.
All ports are initialized to function 1 by default upon a system-on-chip hardware reset.
And S33, judging whether the system on chip works for the first time.
After the reset of the system-on-chip is completed, the hardware logic of the nonvolatile storage space reads the flag bit and latches the flag bit in the latch unit of the nonvolatile storage space for the first time, and after the start control program judges that the system-on-chip is powered on for the first time according to the flag bit, the process goes to step S34, and after the start control program judges that the system-on-chip is not powered on for the first time according to the flag bit, the process goes to step S311.
S34, the start control program sends out configuration information.
And starting the control program to send the configuration information to the configuration information detection unit.
S35, detecting the configuration information.
The configuration information detection unit detects configuration information.
And S36, detecting that the first configuration flag bit is invalid.
The configuration information detecting unit judges whether or not the flag bit in the nonvolatile memory unit is a valid value, and when the flag bit is an invalid value, for example, 1, sends the invalid value to the initialization information acquiring unit.
And S37, starting the control program to perform port function initialization configuration.
When the initialization information acquisition unit detects that the flag bit is an invalid value, the initialization information acquisition unit collects configuration information sent to the configuration information detection unit by the starting control program and sends the configuration information to the port configuration area, and the port configuration area performs port function initialization configuration according to the configuration information.
And S38, storing the configuration information into the nonvolatile storage space.
The configuration information detection unit stores the configuration information into a first configuration information unit in the non-volatile storage space. The width of the nonvolatile storage space is 16 bits, and the configuration information storage sequence and format list are shown in fig. 4.
And S39, setting a flag bit.
The configuration information detection unit sets the flag bit to a valid value, for example, 0.
And S310, completing the initialization of the port function.
S311, a flag interrupt is generated.
When the starting control program judges that the system on chip does not work for the first time of power-on, the latch unit of the nonvolatile storage space immediately generates mark interruption and keeps the mark interruption.
S312, starting the control program to perform interrupt processing and skip the program segment process of the software initialization port.
S313, the hardware automatically reads the configuration information.
The hardware here refers to an initialization information obtaining unit that automatically reads out a flag bit in the nonvolatile storage space, and when the flag bit is judged to be a valid value, for example, 0, the initialization information obtaining unit automatically reads out the configuration information in the nonvolatile storage space and sends the configuration information to the port configuration area, and the configuration information is 11111011_10101010_11110101_ 11111111111 _10101010 according to the port number from 1 to 20.
And S314, configuring the port function according to the configuration information.
And the port configuration area performs port function configuration according to the configuration information.
And S315, completing the initialization of the port function.
In the process of steps S312-S315, the start-up control program receives the flag interrupt at the first time when it just starts to run, so that the start-up control program skips the process of the program segment of the software initialization port according to the flag interrupt during the running, starts to run from the normal operating program segment, and clears the flag interrupt at the same time, and the system on chip starts to operate normally.
The method for initializing the port function of the system on chip provided by the embodiment of the invention comprises the steps that after the system on chip is powered on, the nonvolatile storage space sends the zone bit to the starting control program of the system on chip, the starting control program judges whether the system on chip is powered on for the first time according to the zone bit, if the system on chip is not powered on for the first time, the nonvolatile storage space sends the zone interrupt to the starting control program of the system on chip, so that the starting control program skips the program segment process of the software initialization port, and finally the configuration circuit reads the configuration information in the nonvolatile storage space to configure the port of the system on chip. According to the method for initializing the port function of the system on chip, when the power-on times of the system on chip are more than once, the hardware quickly responds and completes the port function initialization operation, so that the redundant process of the software initialization port function does not occur any more, the efficiency of the system on chip from power-on to the completion of the port function initialization is improved, the instantaneity and the reliability of the system are enhanced, and the cost is extremely low.
In another aspect, an embodiment of the present invention further provides an apparatus 1 for initializing a port function of a system on chip, where, as shown in fig. 5, the apparatus 1 for initializing a port function of a system on chip includes: a non-volatile memory space 10 and a configuration circuit 20. The nonvolatile storage space 10 stores configuration information for initializing a system-on-chip port and a flag bit for marking a system-on-chip startup state, when the system-on-chip is powered on, the nonvolatile storage space 10 sends the flag bit to a startup control program of the system-on-chip, and if the startup control program judges that the system-on-chip is not powered on for the first time, the nonvolatile storage space 10 sends a flag interrupt to the startup control program, so that the startup control program skips a program segment process of the software initialization port. The configuration circuit 20 reads the configuration information in the non-volatile memory space 10 to configure the port 2 of the system on chip.
Further, in an embodiment of the present invention, when the start-up control program determines that the flag bit is invalid, the start-up control program determines that the system-on-chip is powered on for the first time, and when the start-up control program determines that the flag bit is valid, the start-up control program determines that the system-on-chip is not powered on for the first time. In one embodiment of the present invention, the start control program determines that the flag bit is invalid when the flag bit is 1, and determines that the flag bit is valid when the flag bit is 0.
Specifically, in an embodiment of the present invention, if the system on chip is not powered on for the first time, that is, the system on chip has already performed the process of powering on and operating for the first time before the current power on, at this time, the configuration information for the port configuration when the port function initialization is performed for the first time is already stored in the nonvolatile storage space 10. It should be noted that, after the configuration circuit 20 reads the configuration information in the nonvolatile memory space 10, the port 2 of the system on chip is automatically configured through hardware, so that the process of initializing the port function is quickly implemented, and then the system on chip normally operates.
Further, in an embodiment of the present invention, after the configuration circuit 20 reads the configuration information in the non-volatile memory space 10 to configure the port 2 of the system on chip, and the start control program skips the program segment process of the software initialization port, the start control program removes the flag interrupt.
Further, in another embodiment of the present invention, if the system on chip is powered on for the first time, the control program is started to send the configuration information to the configuration circuit 20, and the configuration circuit 20 configures the port 2 of the system on chip according to the configuration information. It should be noted that, when the system on chip is powered on and operating for the first time, the configuration circuit 20 cannot read the configuration information from the nonvolatile memory space 10, and at this time, the configuration information exists in the boot control program.
Further, in one embodiment of the invention, the configuration circuit 20 stores the configuration information to the non-volatile memory space 10 if the system-on-chip is powered on for the first time. Further, in one embodiment of the present invention, after configuration circuitry 20 stores the configuration information to non-volatile memory space 10, configuration circuitry 20 modifies the flag bits. Specifically, in one embodiment of the present invention, configuration circuitry 20 modifies the flag bit to a valid value.
In one embodiment of the present invention, as shown in fig. 6, the configuration circuit 20 may include: a configuration information detection unit 21, an initialization information acquisition unit 22, and a port configuration area 23. The configuration information detection unit 21 is connected to the nonvolatile storage space 10, and the configuration information detection unit 21 is configured to detect configuration information sent by the start control program, store the configuration information in the nonvolatile storage space 10, and modify the flag bit after storing the configuration information in the nonvolatile storage space 10. The initialization information acquisition unit 22 is connected to the configuration information detection unit 21 and the non-volatile storage space 10, respectively, and acquires the configuration information from the configuration information detection unit if the system on chip is powered on for the first time, and reads the configuration information from the non-volatile storage space 10 if the system on chip is not powered on for the first time. The port configuration area 23 is connected to the initialization information obtaining unit 22, and the port configuration area is used for configuring the port 2 of the system on chip according to the configuration information.
The device for initializing the port function of the system-on-chip provided by the embodiment of the invention stores the configuration information for initializing the port of the system-on-chip and the flag bit for marking the starting state of the system-on-chip through the nonvolatile storage space, when the system-on-chip is electrified, the nonvolatile storage space sends the flag bit to the starting control program of the system-on-chip, and if the starting control program judges that the system-on-chip is not electrified for the first time, the nonvolatile storage space sends the flag interrupt to the starting control program so that the starting control program skips the program segment process of the software initialization port, and the configuration circuit reads the configuration information in the nonvolatile storage space to configure the port of the system-on-chip. The device for initializing the port function of the system-on-chip enables the redundancy process of the software initialization port function not to occur through the quick response of hardware and the completion of the port function initialization operation under the condition that the power-on times of the system-on-chip is more than one, thereby improving the efficiency from the power-on of the system-on-chip to the completion of the port function initialization, enhancing the instantaneity and the reliability of the system and having extremely low cost.
In addition, an embodiment of a further aspect of the present invention further provides a system on chip, as shown in fig. 7, the system on chip includes the above apparatus 1 for initializing a port function of the system on chip, at least one port 2, and a start control program. When the system on chip is powered on, the control program is started to judge whether the system on chip is powered on for the first time according to the flag bit.
According to the system on chip provided by the embodiment of the invention, unnecessary multiple redundant operations in the subsequent port function initialization process except for the first power-on of the system on chip are avoided through the device for initializing the port function of the system on chip, so that the time of the system port function initialization process is effectively saved, the instantaneity of the system is improved, the starting efficiency of the system is improved, and the device is quickly realized through hardware, has high reliability and extremely low port function initialization cost.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (13)

1. A method for initializing a port function of a system-on-chip, wherein the system-on-chip has a non-volatile memory space, and the non-volatile memory space stores configuration information for initializing the port function of the system-on-chip and a flag bit for marking a start-up state of the system-on-chip, comprising the steps of:
the system on chip is powered on;
the nonvolatile storage space sends the flag bit to a starting control program of the system on chip;
the starting control program judges whether the system on the chip is powered on for the first time according to the flag bit;
if the system on chip is not powered on for the first time, the nonvolatile storage space sends a flag interrupt to the starting control program, so that the starting control program skips a program segment process of a software initialization port; and
and the configuration circuit reads the configuration information in the nonvolatile storage space to configure the port of the system on chip so as to skip the process of initializing the port by software and finish the initialization configuration of the port function of the system on chip only by hardware.
2. The method for system-on-chip port function initialization of claim 1, further comprising:
if the system on chip is powered on for the first time, the starting control program sends the configuration information to the configuration circuit; and
and the configuration circuit configures the port of the system on chip according to the configuration information.
3. The method for system-on-chip port function initialization of claim 2, further comprising:
the configuration circuit stores the configuration information to the non-volatile storage space.
4. The method for system-on-chip port function initialization of claim 3, wherein after the configuration circuit stores the configuration information to the non-volatile storage space, further comprising:
the configuration circuit modifies the flag bit.
5. The method for system-on-chip port function initialization of claim 4, wherein the configuration circuit comprises: the configuration method comprises a configuration information detection unit, an initialization information acquisition unit and a port configuration area, wherein the configuration information detection unit is connected with the nonvolatile storage space, the initialization information acquisition unit is respectively connected with the configuration information detection unit and the nonvolatile storage space, the port configuration area is connected with the initialization information acquisition unit, and a configuration circuit reads configuration information in the nonvolatile storage space to configure a port of the system on chip, and the configuration method comprises the following steps:
the configuration information detection unit detects the configuration information sent by the starting control program, stores the configuration information into the nonvolatile storage space, and modifies the flag bit after storing the configuration information into the nonvolatile storage space;
the initialization information acquisition unit acquires the configuration information from the configuration information detection unit if the system-on-chip is powered on for the first time, and reads the configuration information from the nonvolatile storage space if the system-on-chip is not powered on for the first time; and
and the port configuration area configures the port of the system on chip according to the configuration information.
6. The method for system-on-chip port function initialization of claim 1, wherein after the configuration circuitry reads configuration information in the non-volatile storage space to configure the ports of the system-on-chip, further comprising:
the start control program eliminates the flag interrupt after skipping a program segment procedure of the software initialization port.
7. An apparatus for system-on-chip port function initialization, comprising:
the non-volatile storage space is used for storing configuration information used for initializing the port of the system-on-chip and a flag bit used for marking the starting state of the system-on-chip, when the system-on-chip is powered on, the non-volatile storage space sends the flag bit to a starting control program of the system-on-chip, and if the starting control program judges that the system-on-chip is not powered on for the first time, the non-volatile storage space sends a flag interrupt to the starting control program so that the starting control program skips a program segment process of a software initialization port; and
and the configuration circuit reads the configuration information in the nonvolatile storage space to configure the port of the system on chip so as to skip the process of initializing the port by software and finish the initialization configuration of the port function of the system on chip only by hardware.
8. The apparatus for initialization of a system-on-chip port function of claim 7,
if the system on chip is powered on for the first time, the starting control program sends the configuration information to the configuration circuit; and
and the configuration circuit configures the port of the system on chip according to the configuration information.
9. The apparatus of claim 8, wherein the configuration circuitry is to store the configuration information to the non-volatile storage space if the system-on-chip is first powered on.
10. The apparatus of claim 9, wherein the configuration circuit modifies the flag bit after the configuration circuit stores the configuration information to the non-volatile storage space.
11. The apparatus of claim 10, wherein the configuration circuit comprises:
the configuration information detection unit is connected with the nonvolatile storage space and is used for detecting the configuration information sent by the starting control program, storing the configuration information into the nonvolatile storage space and modifying the flag bit after the configuration information is stored into the nonvolatile storage space;
an initialization information obtaining unit, which is respectively connected with the configuration information detecting unit and the nonvolatile storage space, and obtains the configuration information from the configuration information detecting unit if the system on chip is powered on for the first time, and reads the configuration information from the nonvolatile storage space if the system on chip is not powered on for the first time; and
and the port configuration area is connected with the initialization information acquisition unit and is used for configuring the port of the system on chip according to the configuration information.
12. The apparatus of claim 7, wherein the boot control program removes the flag interrupt after the configuration circuit reads configuration information in the non-volatile memory space to configure the port of the system-on-chip and after the boot control program skips a program segment procedure of the software-initialized port.
13. A system on a chip, comprising:
at least one port;
starting a control program, wherein when the system on chip is electrified, the starting control program judges whether the system on chip is electrified for the first time according to a flag bit; and
the apparatus for initialization of a system-on-chip port function of any of claims 7 to 12.
CN201410719970.7A 2014-12-02 2014-12-02 System on chip and method and device for initializing port function of system on chip Active CN105718248B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410719970.7A CN105718248B (en) 2014-12-02 2014-12-02 System on chip and method and device for initializing port function of system on chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410719970.7A CN105718248B (en) 2014-12-02 2014-12-02 System on chip and method and device for initializing port function of system on chip

Publications (2)

Publication Number Publication Date
CN105718248A CN105718248A (en) 2016-06-29
CN105718248B true CN105718248B (en) 2020-02-21

Family

ID=56146392

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410719970.7A Active CN105718248B (en) 2014-12-02 2014-12-02 System on chip and method and device for initializing port function of system on chip

Country Status (1)

Country Link
CN (1) CN105718248B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109698696B (en) * 2017-10-24 2021-06-18 比亚迪半导体股份有限公司 Clock frequency division method, device, system on chip and storage medium
CN108595212A (en) * 2018-03-30 2018-09-28 上海康斐信息技术有限公司 A kind of method and wireless router of quick startup wireless router
CN110677357B (en) * 2018-07-03 2021-07-13 北京东土科技股份有限公司 Method and device for rapidly forwarding port data of switching equipment
CN110187894B (en) * 2019-05-22 2023-07-21 青岛海信宽带多媒体技术有限公司 Initialization method and device of optical module and electronic equipment
CN110489169B (en) * 2019-08-06 2021-10-19 晶晨半导体(上海)股份有限公司 Quick starting method for memory of system on chip
CN114500902B (en) * 2021-12-20 2024-02-02 北京镁伽科技有限公司 Determination method and device of output module, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100472444C (en) * 2006-08-28 2009-03-25 中兴通讯股份有限公司 Device and method capable of improving starting speed of chip
CN101763279B (en) * 2010-01-15 2012-12-12 上海维宏电子科技股份有限公司 BootLoader architectural design method
CN102314354A (en) * 2010-06-30 2012-01-11 无锡中星微电子有限公司 Embedded system starting method and embedded device

Also Published As

Publication number Publication date
CN105718248A (en) 2016-06-29

Similar Documents

Publication Publication Date Title
CN105718248B (en) System on chip and method and device for initializing port function of system on chip
RU2402804C2 (en) Method of booting host device from mmc/sd device, host device bootable from mmc/sd device and mmc/sd device from which host device may be booted
TWI284284B (en) Selective apparatus for main/backup basic input/output system (BIOS)
CN105027080B (en) Start-up sequence for multiple start-up devices
JP5801380B2 (en) Staged NAND power-on reset
US20090283600A1 (en) Automatic detection of an enabled interface of a card reader
US7856614B2 (en) Programmable system-on-chip apparatus and method for updating firmware
US7996667B2 (en) System with at least two BIOS memories for starting the system
JP2006276967A (en) Semiconductor apparatus
CN105814541A (en) Computer device and memory starting method for computer device
US20040123088A1 (en) Method and apparatus for detecting an interruption in memory initialization
CN107111575B (en) Method and storage management device for transmitting data in computer system, storage system and computer system
US20080235428A1 (en) Method and system for dynamic switching between multiplexed interfaces
US9772795B2 (en) Processing apparatus to recognize peripheral component interconnect express devices during bootup
TWI467579B (en) Electronic device, method for controlling memory thereof and associated computer-readable storage medium
US20130132740A1 (en) Power Control for Memory Devices
CN116149742B (en) Chip, chip starting method and computer readable storage medium
CN109976958B (en) Method and device for improving firmware test efficiency and storage medium
JP2007299227A (en) Information processing apparatus and method for booting the same
US20160078967A1 (en) Power Loss Test Device And Method For Nonvolatile Memory Device
CN114341769B (en) System management bus isolation based on power management integrated circuit
CN116069147A (en) Vehicle-mounted controller dormancy method and device and vehicle
CN107844446B (en) Configuring default voltage levels for dual voltage input/output pad cells via voltage rail ramp up timing
CN108513656B (en) Control method, USB system and electronic device
JP2013222397A (en) Microcomputer, and terminal sharing method for reset terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210219

Address after: 518119 No.1 Yan'an Road, Kuiyong street, Dapeng New District, Shenzhen City, Guangdong Province

Patentee after: BYD Semiconductor Co.,Ltd.

Address before: 518118 BYD Road, Pingshan New District, Shenzhen, Guangdong 3009

Patentee before: BYD Co.,Ltd.

TR01 Transfer of patent right