CN117908668A - Method and device for constructing hybrid virtual equipment - Google Patents

Method and device for constructing hybrid virtual equipment Download PDF

Info

Publication number
CN117908668A
CN117908668A CN202311799980.1A CN202311799980A CN117908668A CN 117908668 A CN117908668 A CN 117908668A CN 202311799980 A CN202311799980 A CN 202311799980A CN 117908668 A CN117908668 A CN 117908668A
Authority
CN
China
Prior art keywords
module
data
input
target
output
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.)
Pending
Application number
CN202311799980.1A
Other languages
Chinese (zh)
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.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Zero Boundary Integrated Circuit Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Zero Boundary Integrated Circuit 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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Zero Boundary Integrated Circuit Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202311799980.1A priority Critical patent/CN117908668A/en
Publication of CN117908668A publication Critical patent/CN117908668A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the invention provides a method and a device for constructing hybrid virtual equipment, which are characterized in that a data source type is determined, and a starting point input/output module is determined based on the data source type; determining a functional module; determining an output data type, and determining an endpoint input/output module based on the output data type; generating a plurality of independent virtual devices by adopting the starting point input-output module, the functional module and the end point input-output module; and constructing the mixed virtual device by adopting a plurality of independent virtual devices, so that the virtual device realizes the function of the specific device on the chip, and the redundancy of the device is reduced.

Description

Method and device for constructing hybrid virtual equipment
Technical Field
The present invention relates to the field of hybrid virtual device construction technology, and in particular, to a hybrid virtual device construction method, a hybrid virtual device construction apparatus, an electronic device, and a computer readable storage medium.
Background
The functional modules of the chip are accessed as slave devices that are hung on the chip bus by the processor input/output I/O instructions. With the increase of chip versatility and integration, the number of functional modules gradually increases, but excessive devices on the bus may decrease access efficiency, while many device modules are not used for specific applications, so that redundancy is high, and chip area is increased.
Disclosure of Invention
Embodiments of the present invention provide a method, apparatus, electronic device, and computer-readable storage medium for constructing a hybrid virtual device, so as to overcome or at least partially solve the above-mentioned problems.
The embodiment of the invention discloses a method for constructing hybrid virtual equipment, which is characterized by comprising the following steps:
Determining a data source type, and determining a starting point input-output module based on the data source type;
Determining a functional module;
determining an output data type, and determining an endpoint input/output module based on the output data type;
generating a plurality of independent virtual devices by adopting the starting point input-output module, the functional module and the end point input-output module;
And constructing a mixed virtual device by adopting a plurality of independent virtual devices.
Optionally, the method further comprises:
Constructing a data source module configuration parameter table, an intermediate node module configuration parameter table and a data sink module configuration parameter table aiming at the independent virtual equipment;
determining a data source module configuration parameter aiming at the starting point input/output module, and writing the data source module configuration parameter into the data source module configuration parameter table;
When the functional module is a peripheral module, determining an intermediate node module configuration parameter for expressing an input/output data format for the functional module, and writing the intermediate node module configuration parameter into the intermediate node module configuration parameter table;
Determining data sink module configuration parameters aiming at the starting point input/output module, and writing the data sink module configuration parameters into the data sink module configuration parameter table;
and starting the mixed virtual equipment.
Optionally, the hybrid virtual device is provided with a bus arbiter, the independent virtual device is provided with a corresponding device identifier, and the functional module sets a corresponding input data buffer memory, and further includes:
when input data aiming at target virtual equipment is monitored, reading target data source module configuration parameters corresponding to the target virtual equipment from the data source module configuration parameter table according to target equipment identification corresponding to the target virtual equipment;
determining a target function module corresponding to the target virtual device based on the target device identifier;
Acquiring the input data based on the configuration parameters of the target data source module;
And storing the input data to the target input data buffer memory corresponding to the target functional module through the bus arbiter.
Optionally, the method further comprises:
acquiring state parameters of a data buffer memory aiming at the target input;
When the storage capacity of the target input data buffer memory exceeds a first preset threshold value based on the state parameter, the target functional module is up-regulated to a first frequency by adopting a first-level frequency multiplication coefficient;
when the storage capacity of the target input data buffer memory exceeds a second preset threshold value based on the state parameter, the target functional module is up-regulated to a second frequency by adopting a second-level frequency multiplication coefficient;
Wherein the second frequency is higher than the first frequency;
And when the storage capacity of the target input data buffer memory exceeds a third preset threshold value based on the state parameter, the target functional module is up-regulated to the highest frequency by adopting a three-level frequency multiplication coefficient.
Optionally, the target functional module is configured with a corresponding pipeline configuration table, including:
When the target functional module finishes processing the input data, sending out output request information to the bus arbiter; the output request information at least comprises the target equipment identification and output packet length information of a data packet of the input data;
Determining a next-stage function module identifier of a next-stage function module corresponding to the target function module in the pipeline configuration table according to the target equipment identifier and the target function module identifier of the currently requested target function module through a bus arbiter; the next-stage functional module is provided with a corresponding data sequence to be processed, and the data sequence to be processed is used for expressing the input data sequence to be processed of the target functional module; the input data has a corresponding priority identification;
encoding the input data into the data sequence to be processed according to the priority identification through a bus arbiter;
And storing the input data to a next-stage input data buffer memory corresponding to the next-stage functional module based on the data sequence to be processed through a bus arbiter.
Optionally, the functional module is provided with an input port and an output port, and the functional module is connected with the input data buffer memory through the input port and the output port.
Optionally, the functional module is configured with a corresponding state machine, and further includes:
judging whether the input data buffer memory is empty or not;
and if the input data buffer memory is judged not to be empty, resetting the state machine.
The embodiment of the invention also discloses a device for constructing the hybrid virtual device, which comprises the following steps:
the data source type determining module is used for determining the data source type and determining a starting point input and output module based on the data source type;
the function module determining module is used for determining the function module;
the output data type determining module is used for determining an output data type and determining an end point input/output module based on the output data type;
The independent virtual equipment generation module is used for generating a plurality of independent virtual equipment by adopting the starting point input and output module, the functional module and the end point input and output module;
And the mixed virtual device construction module is used for constructing the mixed virtual device by adopting a plurality of independent virtual devices.
The embodiment of the invention also discloses electronic equipment, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
The memory is used for storing a computer program;
the processor is configured to implement the method according to the embodiment of the present invention when executing the program stored in the memory.
Embodiments of the present invention also disclose a computer-readable storage medium having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the method according to the embodiments of the present invention.
The embodiment of the invention has the following advantages:
According to the embodiment of the invention, the data source type is determined, and the starting point input/output module is determined based on the data source type; determining a functional module; determining an output data type, and determining an endpoint input/output module based on the output data type; generating a plurality of independent virtual devices by adopting the starting point input-output module, the functional module and the end point input-output module; and constructing the mixed virtual device by adopting a plurality of independent virtual devices, so that the virtual device realizes the function of the specific device on the chip, and the redundancy of the device is reduced.
Drawings
FIG. 1 is a flow chart of steps of a method for constructing a hybrid virtual device according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a configuration of a stand-alone virtual device according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a user registering a virtual device according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a functional module according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a functional module storage threshold and doubling level relationship provided in an embodiment of the present invention;
FIG. 6 is a schematic diagram of a bus arbiter according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a reset procedure for a state machine according to an embodiment of the present invention;
FIG. 8 is a flow chart of a scheduling based on a bus arbiter provided in an embodiment of the present invention;
FIG. 9 is a block diagram of a construction apparatus of a hybrid virtual device according to an embodiment of the present invention;
FIG. 10 is a block diagram of the hardware architecture of an electronic device provided in an embodiment of the present invention;
FIG. 11 is a schematic diagram of a computer readable medium provided in an embodiment of the invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
In practical application, the virtual device is enabled to realize specific device functions on the chip in a configuration mode, so that the number of devices is reduced, and the flexibility of use can be improved under the condition that multiple paths of devices are needed. In order to further effectively reduce equipment redundancy, the embodiment of the invention provides a hybrid virtual equipment, which improves the expandability of the equipment and simultaneously enables the functional modules to be used with high efficiency.
Referring to fig. 1, a step flowchart of a method for constructing a hybrid virtual device provided in an embodiment of the present invention may specifically include the following steps:
Step 101, determining a data source type, and determining a starting point input/output module based on the data source type;
Step 102, determining a functional module;
Step 103, determining an output data type, and determining an end point input/output module based on the output data type;
104, generating a plurality of independent virtual devices by adopting the starting point input-output module, the functional module and the end point input-output module;
And 105, constructing a hybrid virtual device by adopting a plurality of independent virtual devices.
The hybrid virtual device may be composed of a plurality of independent virtual devices, so that in order to construct the hybrid virtual device, the embodiment of the invention may generate the independent virtual device.
GPIO (English: general-purpose input/output), the General-purpose input/output abbreviation, P0-P3 with a function similar to 8051, the PINs of which can be used freely by the user by program control, the PIN can be used as General-purpose input (GPI) or General-purpose output (GPO) or General-purpose input and output (GPIO) in real terms, such as clk generator, CHIP SELECT, etc.
Direct memory access (DMA, direct Memory Access) is a function provided by some computer bus architectures that enables data to be sent directly from an attached device (e.g., disk drive) to the memory of a computer motherboard.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an independent virtual device provided in an embodiment of the present invention, where the independent virtual device in the embodiment of the present invention may be formed by a start input/output module, one or more function modules, and an end input/output module, where the input/output module closest to the start input/output module may be a first-stage function module, the input/output module closest to the start input/output module may be a second-stage function module at a time, and so on, the embodiment of the present invention may combine multiple function modules to form multiple independent virtual devices in a data pipeline manner, alternatively, different virtual devices may use the same function module, for example, both virtual devices need to perform encryption and decryption operations on input/output data, where the two virtual devices may share the same encryption and decryption function module in different time periods, where the start and end of a stream are input/output modules, for example, a GPIO chip pin input/output module and a DMA memory input/output module, where a data flow between the function modules may be unidirectional or bidirectional.
If the structure of the independent virtual device is determined, the independent virtual device may be generated for the structure.
In a specific implementation, the embodiment of the invention can determine the type of the data source, determine the starting point input and output module based on the type of the data source, determine the function module according to the actual service requirement, determine the output data type, and determine the end point input and output module based on the output data type, so that independent virtual equipment is determined through the starting point input and output module, the function module and the end point input and output module, and a hybrid virtual equipment can be constructed through a plurality of independent virtual equipment.
Referring to fig. 3, fig. 3 is a schematic flow chart of a user registering a virtual device according to an embodiment of the present invention.
The user applies for the virtual device number to the virtual device manager, and the virtual device manager keeps the virtual device identification aiming at the virtual device in the virtual device pipeline configuration table;
A Static Random-Access Memory (SRAM) is one type of Random Access Memory. By "static", it is meant that such memory is constantly maintained for data stored therein as long as it remains powered on. In contrast, data stored in Dynamic Random Access Memory (DRAM) needs to be periodically updated. However, when the power supply is stopped, the data stored in the SRAM is lost (referred to as a volatile memory), unlike a ROM or a flash memory which can store data after power is turned off.
The starting point input/output module is used for sampling the data source, so that the starting point input/output module can be also regarded as a data source module, and a user can determine the virtual device data source module by the following method:
If the source data is obtained by sampling GPIO from a chip pin, namely the data source type is data aiming at the GPIO, a chip pin input/output module is adopted as a starting point input/output module;
If the source data is obtained from the system SRAM, namely the data source type is data for the SRAM, a DMA memory input/output module is adopted as a starting point input/output module.
The functional module can also be regarded as an intermediate node module, and can be determined according to actual service requirements, for example, an encryption and decryption data processing module for performing encryption and decryption operations on data;
the endpoint input output module may be used for data output, and thus may also be considered as a data sink module user may determine the data sink module by:
If the data is output from the chip pin through the GPIO, namely the output data type is data aiming at the GPIO, the chip pin input-output module can be adopted as the terminal input-output module;
If the source data is obtained from the system SRAM, namely the data source type is data aiming at the SRAM, a DMA memory input/output module is adopted as an end point input/output module;
in an alternative embodiment of the present invention, when there is no data sink module, the hybrid virtual device may be configured on a processor, such as a central processing unit CPU or the like, which may be configured with an IO bus through which the processor may take output data from the state parameter table of the last stage function module in the independent virtual device.
After the construction of the hybrid virtual device is completed, the hybrid virtual device may be started, at this time, the hybrid virtual device will process the input data obtained from the data source module step by step under the scheduling of the virtual device manager, and place the result in the input data buffer memory of the data sink module, and send an interrupt signal to the processor according to the user configuration.
Of course, the above examples are merely examples, and those skilled in the art may substitute manual selection according to preset rule codes, for example, and the embodiments of the present invention are not limited thereto.
According to the embodiment of the invention, the data source type is determined, and the starting point input/output module is determined based on the data source type; determining a functional module; determining an output data type, and determining an endpoint input/output module based on the output data type; generating a plurality of independent virtual devices by adopting the starting point input-output module, the functional module and the end point input-output module; and constructing the mixed virtual device by adopting a plurality of independent virtual devices, so that the virtual device realizes the function of the specific device on the chip, and the redundancy of the device is reduced.
On the basis of the above embodiments, modified embodiments of the above embodiments are proposed, and it is to be noted here that only the differences from the above embodiments are described in the modified embodiments for the sake of brevity of description.
In an alternative embodiment of the present invention, further comprising:
Constructing a data source module configuration parameter table, an intermediate node module configuration parameter table and a data sink module configuration parameter table aiming at the independent virtual equipment;
determining a data source module configuration parameter aiming at the starting point input/output module, and writing the data source module configuration parameter into the data source module configuration parameter table;
When the functional module is a peripheral module, determining an intermediate node module configuration parameter for expressing an input/output data format for the functional module, and writing the intermediate node module configuration parameter into the intermediate node module configuration parameter table;
Determining data sink module configuration parameters aiming at the starting point input/output module, and writing the data sink module configuration parameters into the data sink module configuration parameter table;
and starting the mixed virtual equipment.
Referring to fig. 3, fig. 3 is a schematic flow chart of a user registering a virtual device according to an embodiment of the present invention.
The user applies for the virtual device number to the virtual device manager, and the virtual device manager keeps the virtual device identification aiming at the virtual device in the virtual device pipeline configuration table;
the starting point input/output module is used for sampling the data source, so that the starting point input/output module can be also regarded as a data source module, and a user can configure the virtual device data source module in the following way:
Constructing a data source module configuration parameter table, an intermediate node module configuration parameter table and a data sink module configuration parameter table aiming at the independent virtual equipment;
If the source data is obtained by sampling GPIO from a chip pin, namely the data source type is data aiming at the GPIO, a chip pin input/output module is adopted as a starting point input/output module, and data source module configuration parameters such as a sampling clock source, clock frequency, a filtering coefficient and the like are written into a data source module configuration parameter table aiming at the virtual equipment;
if the source data is obtained from the system SRAM, namely the data source type is data aiming at the SRAM, a DMA memory input/output module is adopted as a starting point input/output module, and data source module configuration parameters such as a data input address, a length, a buffer threshold value, an interrupt and the like are written into a source module configuration parameter table aiming at the virtual equipment, and meanwhile, a first-stage functional module node of a virtual equipment identifier of the virtual equipment is inserted into a virtual equipment pipeline configuration table.
The English of SPI is known as SERIAL PERIPHERAL INTERFACE, and as the name implies, is a serial peripheral interface. SPI is a synchronous serial communication interface specification, and is mainly applied to short-distance communication in embedded systems.
A universal asynchronous receiver transmitter (Universal Asynchronous Receiver/transmitter, commonly referred to as UART) is an asynchronous receiver transmitter that is part of the computer hardware that transmits data via serial communication. It performs parallel-to-serial data conversion at the transmitting end and serial-to-parallel data conversion at the receiving end. It is versatile in that the parameters transmission speed, data speed, etc. are configurable. UARTs are commonly used in connection with other communication interfaces (e.g., EIARS-232).
The I2C bus is a simple, bi-directional two-wire synchronous serial bus. It requires only two wires to transfer information between devices connected to the bus. The master device is used to initiate the bus transfer of data and generate a clock to open the transfer device, where any addressed device is considered a slave device. If the host computer is to send data to the slave device, the host computer firstly addresses the slave device, then actively sends the data to the slave device, and finally the host computer terminates the data transmission; if the host is to receive data from the slave, the slave is addressed by the master first, then the host receives data sent by the slave, and finally the host terminates the receiving process. In this case, the host is responsible for generating the timing clock and terminating the data transfer.
The functional module can also be regarded as an intermediate node module, and can be determined according to actual service requirements, for example, an encryption and decryption data processing module for performing encryption and decryption operations on data; the user may configure the function module by using, if the function module is an external module such as SPI/UART/I2C, an intermediate node module configuration parameter for expressing an input/output data format for the function module, for example, a byte format of I2C, an address format of a bit, etc. may be used as the intermediate node module configuration parameter, and writing the intermediate node module configuration parameter table for the virtual device, and inserting the function module identifier of the virtual device in the virtual device pipeline configuration table.
The endpoint input output module may be used for data output, so it may also be considered that the data sink module user may configure the data sink module by:
If the data is output from the chip pin through the GPIO, namely the output data type is data aiming at the GPIO, the chip pin input-output module can be adopted as the terminal input-output module; writing configuration parameters of the data sink modules such as an output clock source, clock frequency and the like into a data sink module configuration parameter table aiming at the data sink module of the virtual equipment;
If the source data is obtained from the system SRAM, namely the data source type is data aiming at the SRAM, a DMA memory input/output module is adopted as an end point input/output module, and data sink module configuration parameters such as data output addresses, lengths, buffer threshold values, interruption and the like are written into a data sink module configuration parameter table aiming at the data sink module.
In an alternative embodiment of the present invention, when there is no data sink module, the hybrid virtual device may be configured on a processor, such as a central processing unit CPU or the like, which may be configured with an IO bus through which the processor may take output data from the state parameter table of the last stage function module in the independent virtual device.
After the construction of the hybrid virtual device is completed, the hybrid virtual device may be started, at this time, the hybrid virtual device will process the input data obtained from the data source module step by step under the scheduling of the virtual device manager, and place the result in the input data buffer memory of the data sink module, and send an interrupt signal to the processor according to the user configuration.
In an optional embodiment of the present invention, the hybrid virtual device is provided with a bus arbiter, the independent virtual device is provided with a corresponding device identifier, and the functional module is provided with a corresponding input data buffer memory, and further includes:
when input data aiming at target virtual equipment is monitored, reading target data source module configuration parameters corresponding to the target virtual equipment from the data source module configuration parameter table according to target equipment identification corresponding to the target virtual equipment;
determining a target function module corresponding to the target virtual device based on the target device identifier;
Acquiring the input data based on the configuration parameters of the target data source module;
And storing the input data to the target input data buffer memory corresponding to the target functional module through the bus arbiter.
Optionally, the functional module is provided with an input port and an output port, and the functional module is connected with the input data buffer memory through the input port and the output port.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a functional module according to an embodiment of the present invention; the input ports and the output ports of the functional modules and the input data buffer memories form a data exchange matrix, data is transmitted in a byte stream or bit stream mode, data in the data buffer region adopts a hybrid storage mode, data packets of the virtual devices enter the buffer region according to a sequence, and virtual device identifiers are used as guide codes for the data packets of the input data.
In a specific implementation, the bus arbiter may be a device for determining which data is preferentially processed by the same module when multiple data points to the same module, each independent virtual device may be configured with a unique device identifier, and it may be understood that the target device identifier may be an identifier for marking the target virtual device, and when input data for the target virtual device is monitored, a target data source module configuration parameter corresponding to the target virtual device may be read from a data source module configuration parameter table according to the target device identifier corresponding to the target virtual device, where the target data source module configuration parameter may be used to sample a data source, and the target device identifier may also be used to determine a target function module corresponding to the target virtual device, that is, a function module that is needed by the target virtual device when processing an actual service, and then store the input data to a target input data buffer memory corresponding to the target function module through the bus arbiter.
The embodiment of the invention realizes the input and output data buffer management of the hybrid virtual equipment, the input and output ports of a plurality of functional modules of the equipment and a plurality of data buffer static memories or registers form a data exchange matrix, data are transmitted in a byte stream or bit stream mode, the data packets of different virtual equipment are stored in a hybrid way, and the identification and the distinction are carried out by the packet front-end equipment identification.
In an alternative embodiment of the present invention, further comprising:
acquiring state parameters of a data buffer memory aiming at the target input;
When the storage capacity of the target input data buffer memory exceeds a first preset threshold value based on the state parameter, the target functional module is up-regulated to a first frequency by adopting a first-level frequency multiplication coefficient;
when the storage capacity of the target input data buffer memory exceeds a second preset threshold value based on the state parameter, the target functional module is up-regulated to a second frequency by adopting a second-level frequency multiplication coefficient;
Wherein the second frequency is higher than the first frequency;
And when the storage capacity of the target input data buffer memory exceeds a third preset threshold value based on the state parameter, the target functional module is up-regulated to the highest frequency by adopting a three-level frequency multiplication coefficient.
In practical application, the frequency multiplication coefficient refers to the relative proportional relation between the main frequency and the external frequency of the CPU.
Referring to fig. 5, fig. 5 is a schematic diagram of a relation between a storage threshold value and a frequency multiplication level of a functional module provided in an embodiment of the present invention, where the embodiment of the present invention may adjust an operation frequency of each functional module according to a speed of input data of an input data buffer memory corresponding to the functional module, and a three-level threshold mechanism is adopted, when input buffer data of the functional module increases to a first preset threshold value, a first-level frequency multiplication coefficient is adopted, when the input buffer data increases to a second preset threshold value, a second-level frequency multiplication coefficient is adopted, when the input buffer data increases to a third preset threshold value, a highest operation frequency is used, and when the input buffer data decreases to a next threshold value, a second-level frequency multiplication coefficient is adopted.
Specifically, a virtual device manager may be configured for the hybrid virtual device, where the virtual device manager may be a management system for the hybrid virtual device, and obtain, by using the virtual device manager, a state parameter for the target input data buffer memory, and monitor, based on the state parameter, a state of each functional module input data buffer, so as to prevent data loss caused by overflow;
when the data of the input buffer area of the target functional module is increased to a first preset threshold value, the virtual equipment manager adopts a first-level frequency multiplication coefficient to adjust the target functional module to a first frequency until the data of the input data buffer memory of the target is not increased any more;
when the data of the input buffer area of the target functional module is increased to a second preset threshold value, the virtual equipment manager adopts a second-level frequency multiplication coefficient to adjust the target functional module to a second frequency until the data of the input data buffer memory of the target is not increased any more;
S54, when the data of the input buffer area of the target functional module is increased to a third preset threshold value, the virtual equipment manager adopts a three-level frequency multiplication coefficient to adjust the target functional module to a third frequency until the data of the input data buffer memory of the target overflows;
In an alternative embodiment of the present invention, when the target function module input buffer data decreases, the virtual device manager may use the target function module divide-by-two coefficient to perform the frequency down until the data of the target input data buffer memory no longer decreases or reaches the minimum threshold or has reached the minimum operating frequency of the target function module.
According to the embodiment of the invention, the state parameters of the data buffer memory aiming at the target input are obtained; when the storage capacity of the target input data buffer memory exceeds a first preset threshold value based on the state parameter, the target functional module is up-regulated to a first frequency by adopting a first-level frequency multiplication coefficient; when the storage capacity of the target input data buffer memory exceeds a second preset threshold value based on the state parameter, the target functional module is up-regulated to a second frequency by adopting a second-level frequency multiplication coefficient; wherein the second frequency is higher than the first frequency; when the storage capacity of the target input data buffer memory exceeds a third preset threshold value based on the state parameters, the target functional module is up-regulated to the highest frequency by adopting the three-level frequency multiplication coefficient, so that the virtual equipment manager can carry out self-adaptive regulation on the operation frequency of each functional module according to the speed of data input by each functional module, and the balance of power consumption and throughput is realized.
In an alternative embodiment of the present invention, the target function module is configured with a corresponding pipeline configuration table, including:
When the target functional module finishes processing the input data, sending out output request information to the bus arbiter; the output request information at least comprises the target equipment identification and output packet length information;
Determining a next-stage function module identifier of a next-stage function module corresponding to the target function module in the pipeline configuration table according to the target equipment identifier and the target function module identifier of the currently requested target function module through a bus arbiter; the next-stage functional module is provided with a corresponding data sequence to be processed, and the data sequence to be processed is used for expressing the input data sequence to be processed of the target functional module; the input data has a corresponding priority identification;
encoding the input data into the data sequence to be processed according to the priority identification through a bus arbiter;
And storing the input data to a next-stage input data buffer memory corresponding to the next-stage functional module based on the data sequence to be processed through a bus arbiter.
Referring to FIG. 6, FIG. 6 is a schematic diagram of a bus arbiter according to an embodiment of the present invention;
In a specific implementation, the embodiment of the invention realizes the virtual device manager by using the data exchange matrix and the bus arbiter, and the bus arbiter refers to the configuration information of each virtual device pipeline and guides the output data into the input buffer of the next-stage functional module of the pipeline according to the virtual device identifier, the device priority and the functional module identifier which are output by the current request.
When the target functional module finishes processing the input data, the target functional module can send out output request information to the bus arbiter; the output request information at least comprises a target device identifier and output packet length information of a data packet of the input data, the bus arbiter can find out a next-stage function module identifier of a next-stage function module corresponding to the target function module in the pipeline configuration table according to the target device identifier and the target function module identifier of the target function module requested currently, a to-be-processed data sequence for expressing the input data sequence to be processed by the target function module can be configured for the next-stage function module, the input data has a corresponding priority identifier, the bus arbiter can program the input data into the to-be-processed data sequence according to the priority identifier, and finally the input data is stored into a next-stage input data buffer memory corresponding to the next-stage function module based on the to-be-processed data sequence through the bus arbiter.
For example, when multiple independent virtual devices apply for output to the same next-stage functional module to perform data processing at the same time from the bus arbiter, the data of the multiple independent virtual devices may be arranged into a data sequence to be processed, and the input data with high priority may be arranged before the input data with low priority, so that the input data with high priority may be processed by the next-stage functional module preferentially.
According to the embodiment of the invention, each functional module can be assigned with the input data buffer memory by software, the data bus arbiter transmits the output data of one functional module to the input data buffer memory of the next functional module through the data exchange matrix according to the configuration of each virtual device, and the data of the high-speed virtual device is processed preferentially according to the priority assigned by the user, so that the high-throughput low-delay scheduling operation mode of the functional module is realized.
In an alternative embodiment of the present invention, the functional module is configured with a corresponding state machine, and further includes:
judging whether the input data buffer memory is empty or not;
and if the input data buffer memory is judged not to be empty, resetting the state machine.
In practical applications, a state machine refers to a finite state machine (English: fine-STATE MACHINE, abbreviated as FSM) also called finite state automaton (English: fine-state automaton, abbreviated as FSA), and is a mathematical computation model that represents finite states and actions such as transitions and actions between the states.
Referring to fig. 7, fig. 7 is a schematic diagram of a reset procedure for a state machine according to an embodiment of the present invention, where before input data is stored in a target input data buffer memory corresponding to a target functional module through a bus arbiter, it may be determined whether the input data buffer memory is empty; if the input data buffer memory is judged not to be empty, resetting operation is carried out on the state machine so as to finish initializing the state machine.
In order that those skilled in the art will better understand the embodiments of the present invention, a complete example will be described below.
As shown in fig. 2, a plurality of functional modules are combined in a data pipeline manner to form a plurality of hybrid virtual devices, different virtual devices can use the same functional module (for example, two virtual devices both need to encrypt and decrypt input and output data and can share the same encryption and decryption functional module in a time sharing manner), wherein the start point and the end point of a stream are input and output modules, for example, a GPIO chip pin input and output module and a DMA memory input and output module, and the data flow between the functional modules can be unidirectional or bidirectional;
As shown in fig. 3, the input ports and the output ports of the multiple functional modules and the multiple data buffer static memories or registers form a data exchange matrix, data is transmitted in a byte stream or bit stream mode, the data in the data buffer area adopts a hybrid storage mode, the data packets of the multiple virtual devices enter the buffer area according to the sequence, and the virtual device identifiers are used as packet guide codes;
As shown in fig. 7, performing hybrid virtual device switching according to a device identifier in input data, including 4 steps of resetting a module and reading a next data packet, loading configuration parameters according to the virtual device identifier, loading state parameters according to the virtual device identifier, and starting a function module to process device data;
As shown in fig. 6, the virtual device manager is implemented by a data exchange matrix and a bus arbiter, the bus arbiter refers to configuration information of each virtual device pipeline, and according to the device identifier, the device priority and the function module identifier which are output by the current request, the output data is led into an input buffer of a function module at the next stage of the pipeline;
As shown in fig. 5, the operation frequency of each functional module is adjusted according to the speed of inputting data by the functional module, a three-level threshold mechanism is adopted, when the data of the functional module input buffer area is increased to a first-level threshold, a first-level frequency multiplication coefficient is adopted, when the data is increased to a second-level threshold, a second-level frequency multiplication coefficient is adopted, when the data is increased to a third-level threshold, the highest operation frequency is adopted, and when the data is reduced to a next-level threshold, a second-level frequency division and frequency reduction coefficient is uniformly adopted until the data is the lowest threshold.
As shown in fig. 3, the hybrid virtual device configuration data pipeline may be implemented as follows:
the user applies for the virtual device identifier from the virtual device manager, and the virtual device manager keeps the virtual device identifier in the virtual device pipeline configuration table;
The user configures the virtual device data source module:
if the source data is obtained by sampling the chip pins through GPIO, adopting the chip pin input/output module, and writing configuration parameters such as a sampling clock source, clock frequency, filter coefficients and the like into a configuration parameter table of a data source module of the virtual equipment;
If the source data is obtained from the system SRAM, a DMA memory input/output module is adopted, configuration parameters such as a data input address, a length, a buffer threshold value, interruption and the like are written into a configuration parameter table of a data source module of the virtual equipment, and meanwhile, a first-stage functional module node of the virtual equipment identifier is inserted into a virtual equipment pipeline configuration table;
the user configures the parameters of the intermediate node module of the virtual equipment:
if the virtual equipment is an SPI/UART/I2C external module, configuring parameters such as input and output data formats, writing the parameters into the node module configuration parameter table of the virtual equipment, and inserting the function module identifier of the virtual equipment into the virtual equipment pipeline configuration table;
User configuration data sink module parameters:
if the data is output from the chip pin through the GPIO, the chip pin input/output module is adopted, and configuration parameters such as an output clock source, clock frequency and the like are written into a configuration parameter table of a data sink module of the virtual equipment;
If the data is output to the system SRAM, a DMA memory input/output module is adopted, and configuration parameters such as data output address, length, buffer threshold value, interrupt and the like are written into a configuration parameter table of the data sink module; meanwhile, inserting the last stage of function module node of the virtual equipment identifier into a virtual equipment pipeline configuration table; there may be no data sink module, and at this time, the processor will directly take data from the state parameter table of the last stage function module in the virtual device through the IO bus;
The virtual device is started, at this time, the virtual device will process the input data obtained from the source data module step by step under the schedule of the virtual device manager, and place the result in the input buffer of the data sink module, and send an interrupt to the processor according to the user configuration.
As shown in fig. 7, the function module performs device switching by:
Resetting the state machine of the functional module and reading in the data packet when the input data buffer memory of the functional module is not empty, wherein the functional module reads the configuration parameters of the stage module of the virtual equipment from the configuration parameter table according to the virtual equipment identification;
the function module reads the state parameters of the virtual equipment stage module from the state parameter table according to the virtual equipment identifier;
The functional module starts to process the data packet and sends the result to the bus arbiter, which transfers the result to the input data buffer of the next stage module.
As shown in fig. 5, the adaptive frequency switching of the function module by the virtual device manager may be implemented as follows:
the virtual equipment manager monitors the state of the input data buffer of each functional module so as to prevent data loss caused by overflow;
When the data of the input buffer area of the functional module is increased to a first-level threshold value, the virtual equipment manager increases the frequency of the functional module by adopting a first-level frequency multiplication coefficient until the data of the input buffer area is not increased any more;
When the data of the input buffer area of the functional module is increased to a second-level threshold value, the virtual equipment manager increases the frequency of the functional module by adopting a second-level frequency multiplication coefficient until the data of the input buffer area is not increased any more;
when the data in the input buffer area of the function module is increased to the three-level threshold value, the virtual equipment manager adopts the highest operating frequency of the function module until the data in the input buffer area overflows;
When the data of the input buffer area of the functional module is reduced, the virtual equipment manager adopts the two-frequency division coefficient of the functional module to carry out frequency reduction until the data of the input buffer area is not reduced any more or reaches the lowest threshold value or the lowest running frequency of the module is reached.
FIG. 8 is a schematic diagram of a scheduling process based on a bus arbiter according to an embodiment of the present invention; the scheduling by the bus arbiter in the virtual device manager may be performed as follows:
the function module processes the current input data and sends an output request to the bus arbiter, wherein the output request contains information such as virtual equipment identification, output packet length and the like;
The bus arbiter searches a pipeline configuration table according to the virtual equipment identifier and the currently requested function module identifier to acquire the next-stage function module identifier;
if a plurality of devices apply for the input buffer memory of the same functional module to be output to the bus arbiter at the same time, the bus arbiter selects one device according to the priority of the device;
The bus arbiter switches the corresponding switch of the data exchange matrix and sends the output data of the equipment to the input buffer of the next functional module in a byte stream or bit stream mode;
And re-executing the bus arbiter to search the pipeline configuration table according to the virtual equipment identifier and the currently requested function module identifier, and obtaining the next-stage function module identifier.
By the mode, the data pipeline combined functional module is used for realizing the hybrid virtual equipment, and virtual equipment operation scheduling is carried out through the data exchange matrix and the bus arbiter, so that the operation efficiency of each functional module is greatly improved, the flexibility of equipment channel expansion and function expansion is also improved, meanwhile, the chip redundancy area is reduced, the chip cost is reduced, and the balance of power consumption and throughput can be realized.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
Referring to fig. 9, a block diagram of a device for constructing a hybrid virtual device according to an embodiment of the present invention may specifically include the following modules:
The data source type determining module 901 is configured to determine a data source type, and determine a starting point input/output module based on the data source type;
a function module determining module 902, configured to determine a function module;
An output data type determining module 903, configured to determine an output data type, and determine an endpoint input/output module based on the output data type;
An independent virtual device generating module 904, configured to generate a plurality of independent virtual devices using the start input output module, the function module, and the end input output module;
A hybrid virtual device construction module 905 is configured to construct a hybrid virtual device using a plurality of the independent virtual devices.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In addition, the embodiment of the invention also provides electronic equipment, which comprises: the processor, the memory, the computer program stored in the memory and capable of running on the processor, the computer program realizes each process of the above-mentioned method embodiment of constructing the hybrid virtual device when executed by the processor, and can achieve the same technical effects, and for avoiding repetition, the description is omitted here.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, realizes the processes of the above embodiment of the method for constructing the hybrid virtual device, and can achieve the same technical effects, so that repetition is avoided, and no further description is given here. The computer readable storage medium is, for example, a read-only memory (ROM), a random access memory (Random Access Memory RAM), a magnetic disk or an optical disk.
Fig. 10 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention.
The electronic device 1000 includes, but is not limited to: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, processor 1010, and power supply 1011. It will be appreciated by those skilled in the art that the electronic device structure shown in fig. 10 is not limiting of the electronic device and that the electronic device may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. In the embodiment of the invention, the electronic equipment comprises, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer and the like.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 1001 may be used to receive and send information or signals during a call, specifically, receive downlink data from a base station, and then process the downlink data with the processor 1010; and, the uplink data is transmitted to the base station. In general, the radio frequency unit 1001 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 1001 may also communicate with networks and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 1002, such as helping the user to send and receive e-mail, browse web pages, and access streaming media, etc.
The audio output unit 1003 may convert audio data received by the radio frequency unit 1001 or the network module 1002 or stored in the memory 1009 into an audio signal and output as sound. Also, the audio output unit 1003 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the electronic apparatus 1000. The audio output unit 1003 includes a speaker, a buzzer, a receiver, and the like.
The input unit 1004 is used for receiving an audio or video signal. The input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, the graphics processor 10041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 1006. The image frames processed by the graphics processor 10041 may be stored in the memory 1009 (or other storage medium) or transmitted via the radio frequency unit 1001 or the network module 1002. Microphone 10042 may receive sound and may be able to process such sound into audio data. The processed audio data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 1001 in the case of a telephone call mode.
The electronic device 1000 also includes at least one sensor 1005, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 10061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 10061 and/or the backlight when the electronic device 1000 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for recognizing the gesture of the electronic equipment (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; the sensor 1005 may further include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which are not described herein.
The display unit 1006 is used to display information input by a user or information provided to the user. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 1007 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 1007 includes a touch panel 10071 and other input devices 10072. Touch panel 10071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on touch panel 10071 or thereabout using any suitable object or accessory such as a finger, stylus, or the like). The touch panel 10071 can include two portions, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1010, and receives and executes commands sent by the processor 1010. In addition, the touch panel 10071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 1007 may include other input devices 10072 in addition to the touch panel 10071. Specifically, other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein.
Further, the touch panel 10071 may be overlaid on the display panel 10061, and when the touch panel 10071 detects a touch operation thereon or thereabout, the touch operation is transmitted to the processor 1010 to determine a type of touch event, and then the processor 1010 provides a corresponding visual output on the display panel 10061 according to the type of touch event. Although in fig. 10, the touch panel 10071 and the display panel 10061 are two independent components for implementing the input and output functions of the electronic device, in some embodiments, the touch panel 10071 and the display panel 10061 may be integrated to implement the input and output functions of the electronic device, which is not limited herein.
The interface unit 1008 is an interface to which an external device is connected to the electronic apparatus 1000. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 1008 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 1000 or may be used to transmit data between the electronic apparatus 1000 and an external device.
The memory 1009 may be used to store software programs as well as various data. The memory 1009 may mainly include a storage program area which may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, the memory 1009 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 1010 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 1009, and calling data stored in the memory 1009, thereby performing overall monitoring of the electronic device. The processor 1010 may include one or more processing units; preferably, the processor 1010 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 1010.
The electronic device 1000 may also include a power supply 1011 (e.g., a battery) for powering the various components, and preferably the power supply 1011 may be logically connected to the processor 1010 via a power management system whereby charge, discharge, and power consumption management functions are performed by the power management system.
In addition, the electronic device 1000 includes some functional modules that are not shown, and will not be described in detail herein.
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.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
In yet another embodiment provided by the present invention, as shown in fig. 11, there is further provided a computer readable storage medium 1101 having instructions stored therein, which when run on a computer, cause the computer to perform the method of constructing a hybrid virtual device described in the above embodiment.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown 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 purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. A method of constructing a hybrid virtual device, comprising:
Determining a data source type, and determining a starting point input-output module based on the data source type;
Determining a functional module;
determining an output data type, and determining an endpoint input/output module based on the output data type;
generating a plurality of independent virtual devices by adopting the starting point input-output module, the functional module and the end point input-output module;
And constructing a mixed virtual device by adopting a plurality of independent virtual devices.
2. The method as recited in claim 1, further comprising:
Constructing a data source module configuration parameter table, an intermediate node module configuration parameter table and a data sink module configuration parameter table aiming at the independent virtual equipment;
determining a data source module configuration parameter aiming at the starting point input/output module, and writing the data source module configuration parameter into the data source module configuration parameter table;
When the functional module is a peripheral module, determining an intermediate node module configuration parameter for expressing an input/output data format for the functional module, and writing the intermediate node module configuration parameter into the intermediate node module configuration parameter table;
Determining data sink module configuration parameters aiming at the starting point input/output module, and writing the data sink module configuration parameters into the data sink module configuration parameter table;
and starting the mixed virtual equipment.
3. The method according to claim 1 or 2, wherein the hybrid virtual device is provided with a bus arbiter, the individual virtual devices are provided with corresponding device identities, the functional modules are provided with corresponding input data buffers, further comprising:
when input data aiming at target virtual equipment is monitored, reading target data source module configuration parameters corresponding to the target virtual equipment from the data source module configuration parameter table according to target equipment identification corresponding to the target virtual equipment;
determining a target function module corresponding to the target virtual device based on the target device identifier;
Acquiring the input data based on the configuration parameters of the target data source module;
And storing the input data to the target input data buffer memory corresponding to the target functional module through the bus arbiter.
4. A method according to claim 3, further comprising:
acquiring state parameters of a data buffer memory aiming at the target input;
When the storage capacity of the target input data buffer memory exceeds a first preset threshold value based on the state parameter, the target functional module is up-regulated to a first frequency by adopting a first-level frequency multiplication coefficient;
when the storage capacity of the target input data buffer memory exceeds a second preset threshold value based on the state parameter, the target functional module is up-regulated to a second frequency by adopting a second-level frequency multiplication coefficient;
Wherein the second frequency is higher than the first frequency;
And when the storage capacity of the target input data buffer memory exceeds a third preset threshold value based on the state parameter, the target functional module is up-regulated to the highest frequency by adopting a three-level frequency multiplication coefficient.
5. The method of claim 4, wherein the target functional module is configured with a corresponding pipeline configuration table, comprising:
When the target functional module finishes processing the input data, sending out output request information to the bus arbiter; the output request information at least comprises the target equipment identification and output packet length information of a data packet of the input data;
Determining a next-stage function module identifier of a next-stage function module corresponding to the target function module in the pipeline configuration table according to the target equipment identifier and the target function module identifier of the currently requested target function module through a bus arbiter; the next-stage functional module is provided with a corresponding data sequence to be processed, and the data sequence to be processed is used for expressing the input data sequence to be processed of the target functional module; the input data has a corresponding priority identification;
encoding the input data into the data sequence to be processed according to the priority identification through a bus arbiter;
And storing the input data to a next-stage input data buffer memory corresponding to the next-stage functional module based on the data sequence to be processed through a bus arbiter.
6. A method according to claim 3, wherein the functional module is provided with an input port and an output port, the functional module being connected to the input data buffer memory via the input port and the output port.
7. The method of claim 5, wherein the functional module is configured with a corresponding state machine, further comprising:
judging whether the input data buffer memory is empty or not;
and if the input data buffer memory is judged not to be empty, resetting the state machine.
8. A hybrid virtual device building apparatus, comprising:
the data source type determining module is used for determining the data source type and determining a starting point input and output module based on the data source type;
the function module determining module is used for determining the function module;
the output data type determining module is used for determining an output data type and determining an end point input/output module based on the output data type;
The independent virtual equipment generation module is used for generating a plurality of independent virtual equipment by adopting the starting point input and output module, the functional module and the end point input and output module;
And the mixed virtual device construction module is used for constructing the mixed virtual device by adopting a plurality of independent virtual devices.
9. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
The memory is used for storing a computer program;
The processor is configured to implement the method according to any one of claims 1-7 when executing a program stored on a memory.
10. A computer-readable storage medium having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the method of any of claims 1-7.
CN202311799980.1A 2023-12-25 2023-12-25 Method and device for constructing hybrid virtual equipment Pending CN117908668A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311799980.1A CN117908668A (en) 2023-12-25 2023-12-25 Method and device for constructing hybrid virtual equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311799980.1A CN117908668A (en) 2023-12-25 2023-12-25 Method and device for constructing hybrid virtual equipment

Publications (1)

Publication Number Publication Date
CN117908668A true CN117908668A (en) 2024-04-19

Family

ID=90688906

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311799980.1A Pending CN117908668A (en) 2023-12-25 2023-12-25 Method and device for constructing hybrid virtual equipment

Country Status (1)

Country Link
CN (1) CN117908668A (en)

Similar Documents

Publication Publication Date Title
JP7326577B2 (en) Emission antenna switching method and terminal device
WO2021027513A1 (en) Antenna port mapping determination method, and terminal
CN109768926B (en) Data processing method, terminal equipment and computer readable storage medium
CN109995862B (en) Resource scheduling method and terminal
US11099898B2 (en) Method for allocating memory resources and terminal device
EP3962204A1 (en) Method and apparatus for indicating spatial relation information, and communication device
WO2018006841A1 (en) Qr code information transmission method, device and apparatus
WO2020200096A1 (en) Ssb transmission indication method and apparatus, terminal, device, and medium
CN109144723B (en) Method and terminal for allocating storage space
CN108984066B (en) Application icon display method and mobile terminal
KR20220104258A (en) QCL determination method, terminal and network-side device
CN113115101B (en) LED display screen, distributed information display system and control method
WO2019072179A1 (en) Application running control method and apparatus
CN115733549B (en) PCIE network card, switching method of interface modes of PCIE network card, electronic equipment and storage medium
WO2024007809A1 (en) Method and apparatus for outputting application product prompt information
JP7332688B2 (en) Receiving method, transmitting method, terminal and network equipment
CN109889568B (en) Data export method, server and system
CN117908668A (en) Method and device for constructing hybrid virtual equipment
CN108377291B (en) Communication method based on earphone interface, mobile terminal and storage medium
CN111601383A (en) Resource allocation method, terminal and network equipment
RU2789451C1 (en) Method for indication information transmission and communication device
CN112929793B (en) Audio framework, audio control method, device and equipment
CN115795519B (en) Data encryption and decryption processing method and device, electronic equipment and storage medium
CN112905243B (en) Method and device for simultaneously operating double systems
CN115905160B (en) Verification method and device for data storage, electronic equipment and storage medium

Legal Events

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