A method and apparatus for constructing a hybrid virtual device
By constructing hybrid virtual devices, using data sources and output types to determine independent virtual devices, and combining them with a bus arbiter to manage data flow, the problems of device redundancy and low access efficiency on the chip are solved, achieving efficient utilization of device functions and space optimization.
Patent Information
- Application Number
- CN202311799980.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2043-12-25
AI Technical Summary
As chip versatility and integration increase, the number of functional modules increases, leading to reduced bus access efficiency and redundancy in many device modules, which increases chip area.
By determining the data source type and output data type, independent virtual devices are generated, and hybrid virtual devices are constructed. Data flow is managed using a bus arbiter and input/output modules to achieve efficient utilization of device functions.
It reduces equipment redundancy, improves the scalability of equipment and the efficiency of functional modules, and optimizes the space utilization of chips.
Smart Images

Figure CN117908668B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of mixed virtual device construction, and in particular to a mixed virtual device construction method, a mixed virtual device construction device, an electronic device, and a computer readable storage medium. BACKGROUND
[0002] The functional modules of a chip are accessed by a processor input / output (I / O) instruction as a slave device hung on a chip bus. With the improvement of the versatility and integration of the chip, the number of functional modules gradually increases. However, too many devices on the bus will reduce the access efficiency, and for a specific application, many device modules are not used, which is redundant and increases the chip area. SUMMARY
[0003] Embodiments of the present application provide a mixed virtual device construction method, device, electronic device, and computer readable storage medium to overcome the above problems or at least partially solve the above problems.
[0004] Embodiments of the present application disclose a mixed virtual device construction method, characterized in that it comprises:
[0005] determining a data source type and determining a starting point input / output module based on the data source type;
[0006] determining a functional module;
[0007] determining an output data type and determining a terminal point input / output module based on the output data type;
[0008] generating a plurality of independent virtual devices using the starting point input / output module, the functional module, and the terminal point input / output module;
[0009] constructing a mixed virtual device using a plurality of independent virtual devices.
[0010] Optionally, it further comprises:
[0011] constructing a data source module configuration parameter table, an intermediate node module configuration parameter table, and a data sink module configuration parameter table for the independent virtual device;
[0012] determining a data source module configuration parameter for the starting point input / output module and writing the data source module configuration parameter into the data source module configuration parameter table;
[0013] when the functional module is a peripheral module, determining an intermediate node module configuration parameter for expressing an input / output data format of the functional module and writing the intermediate node module configuration parameter into the intermediate node module configuration parameter table;
[0014] determining a data sink module configuration parameter for the start input / output module, and writing the data sink module configuration parameter into a data sink module configuration parameter table;
[0015] starting the hybrid virtual device.
[0016] Optionally, the hybrid virtual device is provided with a bus arbitrator, the independent virtual device is provided with a corresponding device identifier, and the function module is provided with a corresponding input data buffer memory, and the method further comprises:
[0017] when input data for a target virtual device is monitored, reading a target data source module configuration parameter corresponding to the target virtual device from the data source module configuration parameter table according to a target device identifier corresponding to the target virtual device;
[0018] determining a target function module corresponding to the target virtual device based on the target device identifier;
[0019] obtaining the input data based on the target data source module configuration parameter;
[0020] storing the input data into the target input data buffer memory corresponding to the target function module through the bus arbitrator.
[0021] Optionally, the method further comprises:
[0022] obtaining a state parameter for the target input data buffer memory;
[0023] when it is determined based on the state parameter that the storage amount of the target input data buffer memory exceeds a first preset threshold, up-regulating the target function module to a first frequency using a first frequency multiplication coefficient;
[0024] when it is determined based on the state parameter that the storage amount of the target input data buffer memory exceeds a second preset threshold, up-regulating the target function module to a second frequency using a second frequency multiplication coefficient;
[0025] wherein the second frequency is higher than the first frequency;
[0026] when it is determined based on the state parameter that the storage amount of the target input data buffer memory exceeds a third preset threshold, up-regulating the target function module to a highest frequency using a third frequency multiplication coefficient.
[0027] Optionally, the target function module is configured with a corresponding pipeline configuration table, comprising:
[0028] When the target function module finishes processing the input data, an output request message is sent to the bus arbiter; the output request message at least includes the target device identifier and the output packet length information of the data packet for the input data;
[0029] The bus arbiter determines the next stage function module identifier of the 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 currently requested target function module; the next stage function module has a corresponding to-be-processed data sequence, and the to-be-processed data sequence is used to express the input data order to be processed by the target function module; the input data has a corresponding priority identifier;
[0030] The bus arbiter encodes the input data into the to-be-processed data sequence according to the priority identifier;
[0031] The bus arbiter stores the input data into the next stage input data buffer memory corresponding to the next stage function module based on the to-be-processed data sequence.
[0032] Optionally, the function module is provided with an input port and an output port, and the function module is connected with the input data buffer memory through the input port and the output port.
[0033] Optionally, the function module is configured with a corresponding state machine, and further comprises:
[0034] determining whether the input data buffer memory is empty;
[0035] if it is determined that the input data buffer memory is not empty, the state machine is reset.
[0036] The embodiment of the application further discloses a construction device of a hybrid virtual device, comprising:
[0037] a data source type determination module, configured to determine a data source type and determine a starting point input and output module based on the data source type;
[0038] a function module determination module, configured to determine a function module;
[0039] an output data type determination module, configured to determine an output data type and determine an ending point input and output module based on the output data type;
[0040] an independent virtual device generation module, configured to generate a plurality of independent virtual devices by using the starting point input and output module, the function module and the ending point input and output module;
[0041] A hybrid virtual device construction module is configured to construct a hybrid virtual device by using a plurality of the independent virtual devices.
[0042] The embodiment of the present application further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus.
[0043] The memory is used for storing a computer program.
[0044] The processor is used for executing the program stored on the memory, and the method is realized.
[0045] The embodiment of the present application further discloses a computer readable storage medium, which stores instructions, and when executed by one or more processors, causes the processor to execute the method.
[0046] The embodiment of the present application has the following advantages:
[0047] The embodiment of the present application determines the data source type, determines the start point input and output module based on the data source type, determines the function module, determines the output data type, determines the end point input and output module based on the output data type, generates a plurality of independent virtual devices by using the start point input and output module, the function module and the end point input and output module, constructs a hybrid virtual device by using a plurality of the independent virtual devices, and realizes the chip specific device function of the virtual device, thereby reducing the device redundancy. BRIEF DESCRIPTION OF DRAWINGS
[0048] Figure 1 is a step flow chart of a hybrid virtual device construction method provided in the embodiment of the present application;
[0049] Figure 2 is a structure schematic diagram of an independent virtual device provided in the embodiment of the present application;
[0050] Figure 3 is a flow chart of a user registration virtual device provided in the embodiment of the present application;
[0051] Figure 4 is a structure schematic diagram of a function module provided in the embodiment of the present application;
[0052] Figure 5 is a function module storage threshold and frequency multiplication level relationship schematic diagram provided in the embodiment of the present application;
[0053] Figure 6 is a structure schematic diagram of a bus arbiter provided in the embodiment of the present application;
[0054] Figure 7 is a reset flowchart for a state machine provided in an embodiment of the present application;
[0055] Figure 8 is a flowchart of a scheduling process based on a bus arbiter provided in an embodiment of the present application;
[0056] Figure 9 is a structural block diagram of a mixed virtual device construction device provided in an embodiment of the present application;
[0057] Figure 10 is a hardware structural block diagram of an electronic device provided in an embodiment of the present application;
[0058] Figure 11 is a schematic diagram of a computer readable medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to make the above-mentioned objects, features and advantages of the present application more apparent and easy to understand, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0060] In actual applications, the virtual device is configured to realize the specific device function on the chip, so as to reduce the number of devices, and the flexibility of use can be improved in the case of multiple paths and multiple types of devices. In order to further effectively reduce device redundancy, an embodiment of the present application provides a mixed virtual device, which improves the device scalability and efficiently uses the function modules.
[0061] Referring to Figure 1 , a step flowchart of a mixed virtual device construction method provided in an embodiment of the present application is shown, which can specifically include the following steps:
[0062] Step 101, determining a data source type, and determining a starting point input and output module based on the data source type;
[0063] Step 102, determining a function module;
[0064] Step 103, determining an output data type, and determining an ending point input and output module based on the output data type;
[0065] Step 104, generating a plurality of independent virtual devices by using the starting point input and output module, the function module and the ending point input and output module;
[0066] Step 105, constructing a mixed virtual device by using a plurality of the independent virtual devices.
[0067] The hybrid virtual device can be composed of multiple independent virtual devices, and therefore, in order to construct the hybrid virtual device, the embodiment of the present application can first generate the independent virtual device.
[0068] GPIO (General-purpose input / output) is a general-purpose input / output, which is similar to P0-P3 of 8051, and the pin thereof can be freely used by a user through program control, and the PIN can be used as a general-purpose input (GPI) or a general-purpose output (GPO) or a general-purpose input and output (GPIO) according to actual conditions, such as clk generator and chip select.
[0069] Direct Memory Access (DMA) is a function provided by some computer bus architectures, which can enable data to be directly sent from an additional device (such as a disk drive) to the memory of a computer mainboard.
[0070] Reference Figure 2 , Figure 2 is a structural schematic diagram of an independent virtual device provided in the embodiment of the present application, the independent virtual device of the embodiment of the present application can be composed of a start input / output module, one or more function modules, and an end input / output module, wherein the first function module closest to the start input / output module, the second function module next to the start input / output module, and so on, the embodiment of the present application can combine multiple function modules in a data flow pipeline manner to construct multiple independent virtual devices, and optionally, different virtual devices can use the same function module, for example, two virtual devices both need to perform encryption and decryption operations on input / output data, at this time, the two virtual devices can share the same encryption and decryption function module in different time periods, wherein the start and end of the flow are input / output modules, such as a GPIO chip pin input / output module and a DMA memory input / output module, and the data flow direction between the function modules can be unidirectional or bidirectional.
[0071] After the structure of the independent virtual device is determined, the independent virtual device can be generated based on the structure.
[0072] In a specific implementation, the embodiment of the present application can determine the data source type, determine the start input / output module based on the data source type, determine the function module according to actual business requirements, determine the output data type, and determine the end input / output module based on the output data type, so as to determine the independent virtual device through the start input / output module, the function module, and the end input / output module, and the hybrid virtual device can be constructed through multiple independent virtual devices.
[0073] Exemplarily, reference is made to Figure 3 , Figure 3Fig. 1 is a flowchart of a process for user registration of a virtual device according to an embodiment of the present application.
[0074] The user applies for a virtual device number to the virtual device manager, and the virtual device manager reserves a virtual device identifier for the virtual device in the virtual device pipeline configuration table;
[0075] Static Random-Access Memory (SRAM) is a type of random-access memory. The so-called "static" means that as long as the power is kept on, the data stored in the memory can be constantly maintained. In contrast, the data stored in dynamic random access memory (DRAM) needs to be updated periodically. However, when the power supply stops, the data stored in SRAM will also disappear (referred to as volatile memory), which is different from ROM or flash memory that can still store data after power off.
[0076] The start input / output module is used to sample the data source, so it can also be regarded as a data source module. The user can determine the virtual device data source module in the following way:
[0077] If the source data is sampled from the chip pin through GPIO, that is, the data source type is GPIO data, then the chip pin input / output module is used as the start input / output module.
[0078] If the source data is obtained from the system SRAM, that is, the data source type is SRAM data, then the DMA memory input / output module is used as the start input / output module.
[0079] The function module can also be regarded as an intermediate node module. The function module can be determined according to actual business requirements, for example, a decryption and encryption data processing module for performing decryption and encryption operations on data.
[0080] The end input / output module can be used for data output, so it can also be regarded as a data sink module. The user can determine the data sink module in the following way:
[0081] If the data is output from the chip pin through GPIO, that is, the output data type is GPIO data, then the chip pin input / output module can be used as the end input / output module.
[0082] If the source data is obtained from the system SRAM, that is, the data source type is SRAM data, then the DMA memory input / output module is used as the end input / output module.
[0083] In an alternative embodiment of the present application, when there is no data sink module, the hybrid virtual device can be configured on a processor, such as a central processing unit (CPU) or the like, and the processor can be configured with an IO bus, and the processor can take output data from a state parameter table of the last stage functional module of the independent virtual device through the IO bus.
[0084] After the construction of the hybrid virtual device is completed, the hybrid virtual device can be started, and at this time, the hybrid virtual device will process input data obtained from the data source module stage by stage 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.
[0085] Of course, the above examples are only examples, for example, a person skilled in the art can replace manual selection with preset rule code according to the present application, and the present application is not limited thereto.
[0086] In the embodiment of the present application, the type of the data source is determined, and the starting point input / output module is determined based on the type of the data source; the functional module is determined; the type of the output data is determined, and the terminal point input / output module is determined based on the type of the output data; the starting point input / output module, the functional module and the terminal point input / output module are used to generate a plurality of independent virtual devices; and the plurality of independent virtual devices are used to construct a hybrid virtual device, so that the virtual device realizes the specific device function on the chip, and the device redundancy is reduced.
[0087] On the basis of the above embodiment, a variant embodiment of the above embodiment is proposed, and it should be noted that, in order to make the description brief, only the differences from the above embodiment are described in the variant embodiment.
[0088] In an alternative embodiment of the present application, it further comprises:
[0089] The data source module configuration parameter table, the intermediate node module configuration parameter table and the data sink module configuration parameter table for the independent virtual device are constructed;
[0090] The data source module configuration parameter for the starting point input / output module is determined, and the data source module configuration parameter is written into the data source module configuration parameter table;
[0091] When the functional module is an external device module, the intermediate node module configuration parameter for expressing the input / output data format of the functional module is determined, and the intermediate node module configuration parameter is written into the intermediate node module configuration parameter table;
[0092] The data sink module configuration parameter for the starting point input / output module is determined, and the data sink module configuration parameter is written into the data sink module configuration parameter table;
[0093] starting the mixed virtual device.
[0094] Exemplarily, refer to Figure 3 , Figure 3 is a flow diagram of user registration of a virtual device provided in an embodiment of the present application.
[0095] The user applies for a virtual device number to the virtual device manager, and the virtual device manager reserves a virtual device identifier for the virtual device in a virtual device pipeline configuration table;
[0096] The start input / output module is used for sampling a data source, and can also be regarded as a data source module. The user can configure the virtual device data source module in the following manner:
[0097] The data source module configuration parameter table, the intermediate node module configuration parameter table and the data sink module configuration parameter table for the independent virtual device are constructed;
[0098] If the source data is obtained by sampling from a chip pin through GPIO, that is, the data source type is GPIO data, the chip pin input / output module is used as the start input / output module, and the sampling clock source, clock frequency, filtering coefficient and other data source module configuration parameters are written into the data source module configuration parameter table for the virtual device;
[0099] If the source data is obtained from a system SRAM, that is, the data source type is SRAM data, the DMA memory input / output module is used as the start input / output module, and the data input address, length, buffer threshold, interrupt and other data source module configuration parameters are written into the source module configuration parameter table for the virtual device, and the first-level function module node of the virtual device identifier of the virtual device is inserted into the virtual device pipeline configuration table.
[0100] The full name of SPI is Serial Peripheral Interface, which means serial peripheral interface. SPI is a synchronous serial communication interface specification, mainly applied to short-distance communication in embedded systems.
[0101] The universal asynchronous receiver / transmitter (Universal Asynchronous Receiver / Transmitter, commonly referred to as UART) is an asynchronous receiver / transmitter, which is a part of computer hardware for transmitting data through serial communication. It performs parallel-to-serial data conversion at the sending end and serial-to-parallel data conversion at the receiving end. It is universal because the transmission speed, data speed and other parameters are configurable. UART is usually used in connection with other communication interfaces (such as EIARS-232).
[0102] I2C bus is a simple, bidirectional two-wire synchronous serial bus. It only needs two lines to transmit information between devices connected to the bus. The master device is used to start the bus to transmit data, and generates a clock to open the transmitting device, at this time any addressed device is considered as a slave device. The relationship between master and slave, sender and receiver on the bus is not constant, but depends on the direction of data transmission at this time. If the host wants to send data to the slave device, the host first addresses the slave device, then actively sends data to the slave device, and finally terminates the data transmission by the host; if the host wants to receive data from the slave device, the host first addresses the slave device. Then the host receives the data sent by the slave device, and finally terminates the receiving process by the host. In this case, the host is responsible for generating the timing clock and terminating the data transmission.
[0103] The function module can also be regarded as an intermediate node module, and the function module can be determined according to actual business requirements, for example, a data encryption and decryption processing module for performing encryption and decryption operations on data; the user can configure the function module in the following manner: if the function module is an SPI / UART / I2C peripheral module, the intermediate node module configuration parameters for expressing the input and output data format of the function module can be configured, for example, the byte format of I2C, the address format of bits, etc. can be used as intermediate node module configuration parameters, and written into the intermediate node module configuration parameter table of the virtual device, and the function module identifier of the virtual device is inserted into the virtual device pipeline configuration table.
[0104] The terminal input and output module can be used for data output, so it can also be regarded as a data sink module. The user can configure the data sink module in the following manner:
[0105] If the data is output from the chip pin through the GPIO, that is, the output data type is data for GPIO, the chip pin input and output module can be used as the terminal input and output module; and the output clock source, clock frequency and other data sink module configuration parameters are written into the data sink module configuration parameter table of the virtual device;
[0106] If the source data is obtained from the system SRAM, that is, the data source type is data for SRAM, the DMA memory input and output module is used as the terminal input and output module, and the data output address, length, buffer threshold, interrupt and other data sink module configuration parameters are written into the data sink module configuration parameter table of the data sink module.
[0107] In an optional embodiment of the present application, when there is no data sink module, the hybrid virtual device can be configured on a processor, such as a central processing unit CPU, etc. The processor can be configured with an IO bus, and the processor can take output data from the state parameter table of the last stage function module of the independent virtual device through the IO bus.
[0108] After the construction of the hybrid virtual device is completed, the hybrid virtual device can be started, at which time the hybrid virtual device will process the input data obtained from the data source module in stages under the scheduling of the virtual device manager, and place the results in the input data buffer memory of the data sink module, and send an interrupt signal to the processor according to the user configuration.
[0109] In an optional embodiment of the present application, 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 the present application further comprises:
[0110] When input data for a target virtual device is monitored, target data source module configuration parameters corresponding to the target virtual device are read from the data source module configuration parameter table according to a target device identifier corresponding to the target virtual device;
[0111] A target functional module corresponding to the target virtual device is determined based on the target device identifier;
[0112] The input data are obtained based on the target data source module configuration parameters;
[0113] The input data are stored in the target input data buffer memory corresponding to the target functional module through the bus arbiter.
[0114] 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.
[0115] Reference Figure 4 , Figure 4 is a structural schematic diagram of a functional module provided in an embodiment of the present application; a plurality of functional modules and a plurality of input data buffer memories can be in a one-to-one correspondence, the input port and the output port of the plurality of functional modules are connected with the plurality of input data buffer memories or registers to form a data exchange matrix, data are transmitted in a byte stream or bit stream mode, data in the data buffer area are stored in a mixed manner, and data packets of a plurality of virtual devices enter the buffer area in a sequential order, and a virtual device identifier is used as a guide code for the data packets of the input data.
[0116] In a specific implementation, the bus arbiter can be a device used to determine which data is preferentially processed by a module when multiple data are directed to the module, each independent virtual device can be configured with a bit-unique device identifier, and it can be understood that the target device identifier can be an identifier used to mark the target virtual device. When input data directed to the target virtual device is monitored, the target data source module configuration parameter corresponding to the target virtual device can be read from the data source module configuration parameter table according to the target device identifier corresponding to the target virtual device. The target data source module configuration parameter can be used to sample the data source. The target device identifier can also be used to determine the target function module corresponding to the target virtual device, that is, the function module needed by the target virtual device when processing actual services. Then, the bus arbiter stores the input data to the target input data buffer memory corresponding to the target function module.
[0117] In the embodiment of the application, the mixed virtual device input and output data buffer management is implemented. The input and output ports of the multiple function modules of the device and the multiple data buffer static memories or registers form a data exchange matrix. Data is transmitted in a byte stream or bit stream manner. The data packets of different virtual devices are mixed and stored, and are identified and distinguished by a packet preposition device identifier.
[0118] In an optional embodiment of the application, the method further comprises:
[0119] Obtaining a state parameter of the target input data buffer memory;
[0120] When it is determined based on the state parameter that the storage amount of the target input data buffer memory exceeds a first preset threshold, the target function module is up-regulated to a first frequency by using a first frequency multiplication coefficient.
[0121] When it is determined based on the state parameter that the storage amount of the target input data buffer memory exceeds a second preset threshold, the target function module is up-regulated to a second frequency by using a second frequency multiplication coefficient.
[0122] The second frequency is higher than the first frequency.
[0123] When it is determined based on the state parameter that the storage amount of the target input data buffer memory exceeds a third preset threshold, the target function module is up-regulated to a highest frequency by using a third frequency multiplication coefficient.
[0124] In actual application, the frequency multiplication coefficient refers to the relative proportional relationship between the CPU main frequency and the external frequency.
[0125] Reference Figure 5 , Figure 5is a function module storage threshold and frequency level relationship schematic diagram provided in the embodiment of the present application, the embodiment of the present application can adjust the running frequency of each function module according to the speed of the input data of the input data buffer memory corresponding to the function module, adopts a three-level threshold mechanism, when the input buffer data of the function module grows to the first preset threshold, adopts a first frequency multiplication coefficient, grows to the second preset threshold, adopts a second frequency multiplication coefficient, grows to the third preset threshold, uses the highest running frequency, when reduces to the next level threshold, uniformly adopts a frequency division coefficient of two until the lowest threshold.
[0126] Specifically, the hybrid virtual device can be configured with a virtual device manager, which can be a management system for the hybrid virtual device, the state parameters of the target input data buffer memory are obtained through the virtual device manager, and the state of each function module input data buffer is monitored based on the state parameters to prevent overflow and data loss;
[0127] When the target function module input buffer data grows to the first preset threshold, the virtual device manager adopts a first frequency multiplication coefficient to increase the target function module to the first frequency, until the data of the target input data buffer memory no longer grows;
[0128] When the target function module input buffer data grows to the second preset threshold, the virtual device manager adopts a second frequency multiplication coefficient to increase the target function module to the second frequency, until the data of the target input data buffer memory no longer grows;
[0129] S54: When the target function module input buffer data grows to the third preset threshold, the virtual device manager adopts a third frequency multiplication coefficient to increase the target function module to the third frequency, until the data of the target input data buffer memory produces overflow;
[0130] In an optional embodiment of the present application, when the target function module input buffer data decreases, the virtual device manager can adopt a frequency division coefficient of the target function module to reduce the frequency, until the data of the target input data buffer memory no longer decreases or reaches the lowest threshold or has reached the lowest running frequency of the target function module.
[0131] The embodiment of the present application acquires the state parameter of the target input data buffer memory, adopts a first frequency multiplication coefficient to up-regulate the target function module to a first frequency when determining that the storage amount of the target input data buffer memory exceeds a first preset threshold based on the state parameter, adopts a second frequency multiplication coefficient to up-regulate the target function module to a second frequency when determining that the storage amount of the target input data buffer memory exceeds a second preset threshold based on the state parameter, wherein the second frequency is higher than the first frequency, and adopts a third frequency multiplication coefficient to up-regulate the target function module to a highest frequency when determining that the storage amount of the target input data buffer memory exceeds a third preset threshold based on the state parameter, so that the virtual device manager can adaptively adjust the running frequency of each function module according to the speed of the input data of each function module, to balance the power consumption and throughput.
[0132] In an optional embodiment of the present application, the target function module is configured with a corresponding pipeline configuration table, which comprises:
[0133] When the target function module processes the input data, an output request information is sent to the bus arbiter, wherein the output request information at least comprises the target device identifier and the output packet length information.
[0134] The bus arbiter determines the next-level function module identifier of the next-level 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 currently requested target function module, wherein the next-level function module has a corresponding to-be-processed data sequence, and the to-be-processed data sequence is used to express the input data order to be processed by the target function module, and the input data has a corresponding priority identifier.
[0135] The bus arbiter encodes the input data into the to-be-processed data sequence according to the priority identifier.
[0136] The bus arbiter stores the input data into the next-level input data buffer memory corresponding to the next-level function module based on the to-be-processed data sequence.
[0137] Reference Figure 6 , Figure 6 is a structural schematic diagram of a bus arbiter provided in the embodiment of the present application;
[0138] In a specific implementation, the embodiment of the present application implements the virtual device manager by using a data exchange matrix and a bus arbiter, the bus arbiter references the virtual device pipeline configuration information of each virtual device, and according to the virtual device identifier, the device priority and the function module identifier of the currently requested output, the output data is guided into the input buffer of the next-level function module of the pipeline.
[0139] When the target function module finishes processing the input data, an output request information can be sent to the bus arbiter; the output request information at least includes the target device identification and the output packet length information of the data packet for the input data, the bus arbiter can find the next level function module identification of the next level function module corresponding to the target function module in the pipeline configuration table according to the target device identification and the target function module identification of the current requested target function module, the next level function module can be configured with a to-be-processed data sequence for expressing the order of the input data to be processed by the target function module, the input data has a corresponding priority identification, the bus arbiter can encode the input data into the to-be-processed data sequence according to the priority identification, and finally the input data is stored to the next level input data buffer memory corresponding to the next level function module through the bus arbiter based on the to-be-processed data sequence.
[0140] For example, when multiple independent virtual devices simultaneously apply for output to the same next level function module to the bus arbiter for data processing, the data of the multiple independent virtual devices will be arranged into a to-be-processed data sequence, and the input data with high priority can be arranged before the input data with low priority and is preferentially processed by the next level function module.
[0141] In the embodiment of the application, each function module can be specified by software with an input data buffer memory, the data bus arbiter transmits the output data of one function module to the input data buffer memory of the next function module through the data exchange matrix according to the configuration of each virtual device, and preferentially processes the data of the high-speed virtual device according to the priority specified by the user, so as to realize the scheduling running mode of the function module with high throughput and low delay.
[0142] In an optional embodiment of the application, the function module is configured with a corresponding state machine, and further comprises:
[0143] determining whether the input data buffer memory is empty;
[0144] If it is determined that the input data buffer memory is not empty, the state machine is reset.
[0145] In practical applications, the state machine refers to a finite state machine (English: finite-state machine, abbreviation: FSM) or a finite state automaton (English: finite-state automaton, abbreviation: FSA), which is a mathematical calculation model for representing a finite number of states and transitions and actions between these states.
[0146] Reference Figure 7 , Figure 7Is a reset flowchart for state machine provided in the embodiment of the application, before storing the input data to the target input data buffer memory corresponding to the target function module through the bus arbiter, whether the input data buffer memory is empty can be judged; if it is judged that the input data buffer memory is not empty, the state machine is reset to complete the initialization of the state machine.
[0147] In order to make the skilled in the art better understand the embodiments of the application, the following uses a complete example to explain the embodiments of the application.
[0148] As Figure 2 The data flow line method is used to combine a plurality of function modules to form a plurality of hybrid virtual devices, different virtual devices can use the same function module (such as two virtual devices need to encrypt and decrypt the input and output data, and can share the same encryption and decryption function module), wherein the starting point and the end point of the flow are input and output modules, such as GPIO chip pin input and output module and DMA memory input and output module, wherein the data flow between the function modules can be unidirectional or bidirectional;
[0149] As Figure 3 The input port and the output port of the plurality of function modules and the plurality of data buffer static memories or registers form a data exchange matrix, the data is transmitted in byte stream or bit stream mode, the data in the data buffer is mixed in storage mode, the data packets of the plurality of virtual devices enter the buffer in order, and the virtual device identifier is used as the packet guide code;
[0150] As Figure 7 The mixed virtual device switching is performed according to the device identifier in the input data, including four steps of resetting the module and reading the next data packet, loading the configuration parameters according to the virtual device identifier, loading the state parameters according to the virtual device identifier, and starting the function module to process the device data;
[0151] As Figure 6 The data exchange matrix and the bus arbiter are used to realize the virtual device manager, the bus arbiter references the pipeline configuration information of each virtual device, according to the device identifier, the device priority and the function module identifier of the current request output, the output data is guided into the input buffer of the next function module in the pipeline;
[0152] As Figure 5 According to the speed of the input data of each function module, the running frequency of the function module is adjusted, a three-level threshold mechanism is used, when the input buffer data of the function module increases to the first threshold, a first frequency multiplication coefficient is used, when the input buffer data increases to the second threshold, a second frequency multiplication coefficient is used, when the input buffer data increases to the third threshold, the highest running frequency is used, when it decreases to the next threshold, a halving frequency reduction coefficient is used until the lowest threshold.
[0153] As Figure 3 shown, the mixed virtual device configuration data pipeline can be implemented in the following way:
[0154] The user applies for a virtual device identification to the virtual device manager, which will reserve the virtual device identification in the virtual device pipeline configuration table;
[0155] The user configures the virtual device data source module:
[0156] If the source data is obtained by sampling from the chip pin through GPIO, the chip pin input and output module is used, and the sampling clock source, clock frequency, filtering coefficient and other configuration parameters are written into the configuration parameter table of the data source module of the virtual device;
[0157] If the source data is obtained from the system SRAM, the DMA memory input and output module is used, and the data input address, length, buffer threshold, interrupt and other configuration parameters are written into the configuration parameter table of the data source module of the virtual device, and the first level function module node of the virtual device identification is inserted into the virtual device pipeline configuration table;
[0158] The user configures the virtual device intermediate node module parameters:
[0159] If it is an SPI / UART / I2C peripheral module, the input and output data format and other parameters are configured and written into the node module configuration parameter table of the virtual device, and the function module identification of the virtual device is inserted into the virtual device pipeline configuration table;
[0160] The user configures the data sink module parameters:
[0161] If the data is output from the chip pin through GPIO, the chip pin input and output module is used, and the output clock source, clock frequency and other configuration parameters are written into the configuration parameter table of the data sink module of the virtual device;
[0162] If the data is output to the system SRAM, the DMA memory input and output module is used, and the data output address, length, buffer threshold, interrupt and other configuration parameters are written into the configuration parameter table of the data sink module; At the same time, the last level function module node of the virtual device identification is inserted into the virtual device pipeline configuration table; There can be no data sink module, at which time the processor will directly take the data from the state parameter table of the last level function module in the virtual device through the IO bus;
[0163] Start the virtual device, at which time the virtual device will process the input data obtained from the source data module step by step under the scheduling 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.
[0164] As shown in Figure 7 , the function module performs device switching can be performed by the following way:
[0165] When determining that the input data buffer memory of the function module is not empty, the function module state machine is reset, and the data packet is read in, the function module reads the configuration parameters of the virtual device at this level from the configuration parameter table according to the virtual device identifier;
[0166] The function module reads the state parameters of the virtual device at this level from the state parameter table according to the virtual device identifier;
[0167] The function module starts processing the data packet, and sends the result to the bus arbiter, which is transmitted to the input data buffer of the next level module.
[0168] As shown in Figure 5 , the virtual device manager performs adaptive frequency switching on the function module can be implemented by the following way:
[0169] The virtual device manager monitors the state of each function module input data buffer to prevent data loss caused by overflow;
[0170] When the function module input buffer data grows to a first threshold, the virtual device manager increases the frequency of the function module by a first frequency multiplication coefficient until the input buffer data no longer grows;
[0171] When the function module input buffer data grows to a second threshold, the virtual device manager increases the frequency of the function module by a second frequency multiplication coefficient until the input buffer data no longer grows;
[0172] When the function module input buffer data grows to a third threshold, the virtual device manager uses the highest running frequency of the function module until the input buffer data produces overflow;
[0173] When the function module input buffer data decreases, the virtual device manager uses the function module frequency division coefficient to reduce the frequency until the input buffer data no longer decreases or reaches the minimum threshold or has reached the minimum running frequency of the module.
[0174] As shown in Figure 8 , Figure 8 is a flowchart of scheduling based on a bus arbiter provided in an embodiment of the present application; the bus arbiter in the virtual device manager can be scheduled by the following way:
[0175] The function module processes the current input data, and sends an output request to the bus arbiter, the output request containing a virtual device identifier, an output packet length and other information;
[0176] The bus arbiter looks up the pipeline configuration table according to the virtual device identifier and the identifier of the currently requested function module to obtain the identifier of the next function module;
[0177] If multiple devices simultaneously apply to the bus arbiter for outputting to the input buffer memory of the same function module, the bus arbiter selects one device according to the priority of the device;
[0178] The bus arbiter switches the corresponding switch of the data exchange matrix to send the output data of the device to the input buffer of the next function module in the form of byte stream or bit stream;
[0179] The bus arbiter re-executes the step of looking up the pipeline configuration table according to the virtual device identifier and the identifier of the currently requested function module to obtain the identifier of the next function module.
[0180] In the above manner, the mixed virtual device is implemented by combining function modules using a data pipeline, and the virtual device is scheduled by the data exchange matrix and the bus arbiter, which not only greatly improves the running efficiency of each function module, but also increases the flexibility of device channel expansion and function expansion, reduces the chip redundancy area and chip cost, and balances the power consumption and throughput.
[0181] It should be noted that, for the method embodiments, in order to simply describe, they are all described as a series of action combinations, but those skilled in the art should know that the embodiments of the present application are not limited to the order of the described actions, because according to the embodiments of the present application, certain steps can be performed in other order or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions involved are not necessarily necessary for the embodiments of the present application.
[0182] Referring to Figure 9 , a structure block diagram of a construction device of a mixed virtual device provided in the embodiments of the present application is shown, which can specifically include the following modules:
[0183] A data source type determination module 901 is configured to determine a data source type, and determine a starting point input / output module based on the data source type;
[0184] A function module determination module 902 is configured to determine a function module;
[0185] An output data type determination module 903 is configured to determine an output data type, and determine a terminal point input / output module based on the output data type;
[0186] The independent virtual device generation module 904 is used to generate multiple independent virtual devices using the starting point input / output module, the function module, and the ending point input / output module.
[0187] Hybrid Virtual Device Construction Module 905 is used to construct a hybrid virtual device using multiple independent virtual devices.
[0188] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0189] In addition, this invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described method for constructing a hybrid virtual device and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0190] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described hybrid virtual device construction method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0191] Figure 10 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.
[0192] The electronic device 1000 includes, but is not limited to, components such as: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, a processor 1010, and a power supply 1011. Those skilled in the art will understand that... Figure 10 The electronic device structures shown are not intended to limit the electronic device. An electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements. In embodiments of the present invention, the electronic device includes, but is not limited to, mobile phones, tablet computers, laptops, PDAs, in-vehicle terminals, wearable devices, and pedometers.
[0193] It should be understood that, in this embodiment of the invention, the radio frequency unit 1001 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink data from the base station and processes it with the processor 1010; additionally, it transmits uplink data to the base station. Typically, 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, etc. Furthermore, the radio frequency unit 1001 can also communicate with networks and other devices through a wireless communication system.
[0194] The electronic device provides users with wireless broadband internet access through the network module 1002, such as helping users send and receive emails, browse web pages, and access streaming media.
[0195] The audio output unit 1003 can convert audio data received by the radio frequency unit 1001 or the network module 1002 or stored in the memory 1009 into audio signals and output them as sound. Furthermore, the audio output unit 1003 can also provide audio output related to specific functions performed by the electronic device 1000 (e.g., call signal reception sound, message reception sound, etc.). The audio output unit 1003 includes a speaker, a buzzer, and a receiver, etc.
[0196] Input unit 1004 is used to receive audio or video signals. Input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042. GPU 10041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on display unit 1006. The image frames processed by GPU 10041 can be stored in memory 1009 (or other storage medium) or transmitted via radio frequency unit 1001 or network module 1002. Microphone 10042 can receive sound and process such sound into audio data. The processed audio data can be converted into a format that can be transmitted to a mobile communication base station via radio frequency unit 1001 in telephone call mode.
[0197] 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. The ambient light sensor can adjust the brightness of the display panel 10061 according to the ambient light level, and the proximity sensor can turn off the display panel 10061 and / or backlight when the electronic device 1000 is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used to identify the posture of the electronic device (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. The sensor 1005 may also include a fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., which will not be described in detail here.
[0198] The display unit 1006 is used to display information input by the user or information provided to the user. The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0199] User input unit 1007 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of electronic devices. Specifically, user input unit 1007 includes touch panel 10071 and other input devices 10072. Touch panel 10071, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 10071). Touch panel 10071 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to processor 1010, which receives and executes commands from processor 1010. In addition, touch panel 10071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 10071, the user input unit 1007 may also include other input devices 10072. Specifically, other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, joysticks, etc., which will not be described in detail here.
[0200] Furthermore, the touch panel 10071 can cover the display panel 10061. When the touch panel 10071 detects a touch operation on or near it, it transmits the information to the processor 1010 to determine the type of touch event. Subsequently, the processor 1010 provides corresponding visual output on the display panel 10061 based on the type of touch event. Although in Figure 10 In this embodiment, the touch panel 10071 and the display panel 10061 are two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 10071 and the display panel 10061 can be integrated to realize the input and output functions of the electronic device. The specific implementation is not limited here.
[0201] Interface unit 1008 serves as an interface for connecting external devices to electronic device 1000. For example, external devices may include a wired or wireless headphone port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 1008 can be used to receive input from external devices (e.g., data, power, etc.) and transmit the received input to one or more components within electronic device 1000, or it can be used to transmit data between electronic device 1000 and external devices.
[0202] The memory 1009 can be used to store software programs and various data. The memory 1009 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 1009 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0203] The processor 1010 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 1009, and by calling data stored in the memory 1009, it performs various functions and processes data, thereby providing 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 and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 1010.
[0204] The electronic device 1000 may also include a power supply 1011 (such as a battery) for supplying power to various components. Preferably, the power supply 1011 can be logically connected to the processor 1010 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system.
[0205] In addition, the electronic device 1000 includes some functional modules not shown, which will not be described in detail here.
[0206] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0207] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0208] like Figure 11 As shown, in another embodiment of the present invention, a computer-readable storage medium 1101 is also provided, which stores instructions that, when executed on a computer, cause the computer to perform the hybrid virtual device construction method described in the above embodiments.
[0209] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.
[0210] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0211] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0212] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0213] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0214] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0215] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0216] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for constructing a hybrid virtual device, characterized in that, include: Determine the data source type, and determine the starting input / output module based on the data source type; Determine the functional modules; Determine the output data type, and determine the endpoint input / output module based on the output data type; Multiple independent virtual devices are generated using the starting point input / output module, the functional module, and the ending point input / output module. A hybrid virtual device is constructed using multiple independent virtual devices; Construct configuration parameter tables for the data source module, intermediate node module, and data sink module of the independent virtual device; Determine the data source module configuration parameters for the starting input / output module, and write the data source module configuration parameters into the data source module configuration parameter table; When the functional module is a peripheral module, determine the intermediate node module configuration parameters used to express the input and output data format for the functional module, and write the intermediate node module configuration parameters into the intermediate node module configuration parameter table. Determine the configuration parameters of the data collection module for the starting input / output module, and write the configuration parameters of the data collection module into the data collection module configuration parameter table; Start the hybrid virtual device.
2. The method according to claim 1, characterized in that, The hybrid virtual device is equipped with a bus arbiter, the independent virtual device is equipped with a corresponding device identifier, the functional module is equipped with a corresponding input data buffer memory, and further includes: When input data for a target virtual device is detected, the target data source module configuration parameters corresponding to the target virtual device are read from the data source module configuration parameter table according to the target device identifier corresponding to the target virtual device. Based on the target device identifier, determine the target functional module corresponding to the target virtual device; The input data is obtained based on the configuration parameters of the target data source module. The input data is stored in the target input data buffer memory corresponding to the target functional module through the bus arbiter.
3. The method according to claim 2, characterized in that, Also includes: Obtain the state parameters for the target input data buffer memory; When the storage capacity of the target input data buffer exceeds the first preset threshold based on the state parameters, the target functional module is adjusted to the first frequency using a first-level frequency multiplication factor. When the storage capacity of the target input data buffer exceeds the second preset threshold based on the state parameters, the target functional module is adjusted to the second frequency using a second-order frequency multiplication factor. The second frequency is higher than the first frequency; When the storage capacity of the target input data buffer exceeds the third preset threshold based on the state parameters, the target functional module is adjusted to the highest frequency using a three-level frequency multiplication factor.
4. The method according to claim 3, characterized in that, The target functional module is configured with a corresponding pipeline configuration table, including: When the target functional module finishes processing the input data, it sends an output request message to the bus arbiter; the output request message includes at least the target device identifier and the output packet length information of the data packet for the input data. The bus arbitrator determines the next-level functional module identifier of the next-level functional module corresponding to the target functional module in the pipeline configuration table based on the target device identifier and the target functional module identifier of the currently requested target functional module. The next-level functional module has a corresponding data sequence to be processed, which is used to express the order of the input data to be processed by the target functional module. The input data has a corresponding priority identifier. The input data is encoded into the data sequence to be processed by the bus arbitrator according to the priority identifier; The bus arbitrator stores the input data into the next-level input data buffer memory corresponding to the next-level functional module based on the data sequence to be processed.
5. The method according to claim 2, characterized in that, The functional module is provided with an input port and an output port, and the functional module is connected to the input data buffer memory through the input port and the output port.
6. The method according to claim 4, characterized in that, The functional module is configured with a corresponding state machine and also includes: Determine whether the input data buffer is empty; If it is determined that the input data buffer is not empty, then the state machine is reset.
7. A device for constructing a hybrid virtual device, characterized in that, include: A data source type determination module is used to determine the data source type and, based on the data source type, determine the starting input / output module. Functional module determination module, used to determine functional modules; An output data type determination module is used to determine the output data type and, based on the output data type, determine the endpoint input / output module. An independent virtual device generation module is used to generate multiple independent virtual devices using the starting input / output module, the functional module, and the ending input / output module. A hybrid virtual device construction module is used to construct a hybrid virtual device using multiple independent virtual devices; construct a data source module configuration parameter table, an intermediate node module configuration parameter table, and a data sink module configuration parameter table for the independent virtual devices; determine the data source module configuration parameters for the starting input / output module and write the data source module configuration parameters into the data source module configuration parameter table; when the functional module is a peripheral module, determine the intermediate node module configuration parameters used to express the input / output data format for the functional module and write the intermediate node module configuration parameters into the intermediate node module configuration parameter table; determine the data sink module configuration parameters for the starting input / output module and write the data sink module configuration parameters into the data sink module configuration parameter table. Start the hybrid virtual device.
8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the method as described in any one of claims 1-6.
9. A computer-readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Virtual machine calculation and storage cluster based on Rocks cluster technology and building method thereof
CN103577247A
Virtual machine operation system and virtual machine operation method
CN103902351A