WO2020133691A1 - 一种嵌入式系统驱动层的实现方法和装置 - Google Patents

一种嵌入式系统驱动层的实现方法和装置 Download PDF

Info

Publication number
WO2020133691A1
WO2020133691A1 PCT/CN2019/077047 CN2019077047W WO2020133691A1 WO 2020133691 A1 WO2020133691 A1 WO 2020133691A1 CN 2019077047 W CN2019077047 W CN 2019077047W WO 2020133691 A1 WO2020133691 A1 WO 2020133691A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
data
module
interface
drive
Prior art date
Application number
PCT/CN2019/077047
Other languages
English (en)
French (fr)
Inventor
闫海英
Original Assignee
北京图森未来科技有限公司
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 北京图森未来科技有限公司 filed Critical 北京图森未来科技有限公司
Publication of WO2020133691A1 publication Critical patent/WO2020133691A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7807System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Definitions

  • the invention relates to the embedded field, in particular to an implementation method and device of an embedded system drive layer, an embedded system, a system on chip, and a camera.
  • Embedded system is a complete computer system with software and hardware. It has the features of special functions, streamlined system and wide application range.
  • the embedded system runs on the system on chip (System on Chip, SOC), including the driver layer and the user layer.
  • SOC System on Chip
  • the corresponding driver function function and application function function are usually set.
  • the driving function functions and the application function functions there are dependencies between the driving function functions and the application function functions, and there are also dependencies between the driving function functions and the application function functions.
  • some functions share register resources such as global variables, and operate on shared registers; there are cases where the output of some functions is the input of other functions.
  • This implementation leads to a high coupling between the internal driver layer and the application layer of the embedded system, and the portability of the system is poor.
  • the shared resources and the operation logic of the function need to be modified according to the specific characteristics of the product. Low efficiency and prone to errors.
  • the present application provides an implementation method and device of an embedded system driver layer, an embedded system, a system on chip, and a camera to solve the existing system implementation methods of embedded systems that are highly coupled and available The problem of poor portability.
  • the driver layer of the embedded system includes multiple driver interfaces and a driver module corresponding to each driver interface.
  • the method includes:
  • the drive interface calls the corresponding drive module
  • the drive module performs the corresponding drive operation on the peripheral and returns the operation result to the drive interface;
  • the drive interface returns the operation result from the drive module to the user layer.
  • an apparatus for implementing a drive layer of an embedded system includes a plurality of drive interfaces and a drive module corresponding to each drive interface; wherein,
  • the drive interface is used to call the corresponding drive module according to the call from the user layer; return the operation result from the drive module to the user layer;
  • the driving module is used to perform the corresponding driving operation on the peripheral according to the call of the driving interface, and return the operation result to the driving interface.
  • an embedded system the system includes the above-mentioned embedded system drive layer implementation device, the device includes a plurality of drive interfaces, and each drive interface corresponds to a drive module; among them,
  • the drive interface is used to call the corresponding drive module according to the call from the user layer; return the operation result from the drive module to the user layer;
  • the driving module is used to perform the corresponding driving operation on the peripheral according to the call of the driving interface, and return the operation result to the driving interface.
  • a system on chip including an embedded system, the embedded system includes a plurality of drive interfaces, and each drive interface corresponds to a drive module;
  • the drive interface is used to call the corresponding drive module according to the call from the user layer; return the operation result from the drive module to the user layer;
  • the driving module is used to perform the corresponding driving operation on the peripheral according to the call of the driving interface, and return the operation result to the driving interface.
  • a camera including a system on a chip, the system on a chip includes an embedded system, the embedded system includes a plurality of drive interfaces, and each drive interface corresponds to a drive Module;
  • the drive interface is used to call the corresponding drive module according to the call from the user layer; return the operation result from the drive module to the user layer;
  • the driving module is used to perform the corresponding driving operation on the peripheral according to the call of the driving interface, and return the operation result to the driving interface.
  • the user layer is separated from the driving layer, and the internal driving layer is loosely coupled, which can improve the portability of the embedded system. Therefore, the embedded system provided by the embodiments of the present application can solve the problems of high coupling and poor portability of the embedded system in the prior art.
  • FIG. 1 is a structural block diagram of an embedded system provided by an embodiment of the present application.
  • FIG. 2 is a structural block diagram of another embedded system provided by an embodiment of the present application.
  • FIG. 3 is a processing flowchart of an implementation method of a driving layer of an embedded system provided by an embodiment of the present application
  • FIG. 4 is a flowchart of a peripheral initialization process performed by a driver layer provided by an embodiment of this application;
  • FIG. 5 is a flowchart of a user registration process performed by a driver layer provided by an embodiment of this application;
  • FIG. 6 is a flowchart of data transmission processing performed by a driver layer provided by an embodiment of the present application.
  • FIG. 7 is a flowchart of a data receiving process performed by a driver layer provided by an embodiment of the present application.
  • FIG. 8 is a processing flowchart of step 704 in FIG. 7;
  • FIG. 9 is another processing flowchart of step 704 in FIG. 7;
  • FIG. 10 is a structural block diagram of an apparatus for implementing a driving layer of an embedded system provided by an embodiment of the present application
  • FIG. 11 is another structural block diagram of an apparatus for implementing a driving layer of an embedded system provided by an embodiment of the present application.
  • FIG. 1 shows an embedded system provided by an embodiment of the present application.
  • the embedded system 1 includes a user layer 11 and a driving layer 12, and the driving layer 12 includes a plurality of driving interfaces 121 and a plurality of driving modules 122, wherein One drive interface 121 corresponds to one drive module 122.
  • the peripheral device may be a network card, serial port, I2C, or other device.
  • the configuration of the driving layer 12 may be as shown in FIG. 1, that is, the driving layer 12 includes a plurality of driving interfaces 121 and a driving module 122 corresponding to each driving interface 121.
  • the driving interface 121 and the driving module 122 in the driving layer 12, the internal structure of the driving layer 12 can be planned and separated, and the loose coupling state of the internal interface and the module of the driving layer 12 can be achieved.
  • a drive interface unit 123 and at least one drive execution unit 124 may be configured in the drive layer 12, and multiple drive interfaces 121 may be configured in the drive interface unit 123 to be executed on each drive.
  • At least one driving module 122 is configured in the unit 124.
  • the drive interface unit 123 is a drive interface layer facing the user layer 11, and the drive execution unit 124 is a drive execution layer facing peripherals. After loading the drive interface unit 123, the user layer 11 calls the drive interface 121 in the drive interface unit 123, and the drive interface 121 further calls the drive module 122.
  • one drive interface unit 123 may be configured as one drive interface file, and one drive execution unit 124 may be configured as one drive execution file.
  • FIG. 3 shows the processing flow of the implementation method of the driving layer of the embedded system provided by the embodiment of the present application, that is, the working principle of the driving layer 12 in FIG. 1, including:
  • Step 301 According to the call from the user layer, the drive interface calls the corresponding drive module
  • Step 302 The drive module performs corresponding drive operations on the peripheral according to the call of the drive interface, and returns the operation result to the drive interface;
  • Step 303 The driving interface returns the operation result from the driving module to the user layer.
  • the driver interface provides an interface for peripheral-related operations to the user layer, the driver module performs specific peripheral-related operations, and the driver interface returns the result returned by the driver module to the user layer .
  • the operation and processing of the user layer is separated from the operation and processing of the driver layer.
  • the user layer implements peripheral-related operations by calling the driver layer.
  • the driver layer is in a black box state relative to the user layer, that is, the user layer and the driver
  • the dependence between the layers is low and the state is loosely coupled.
  • the drive layer has a modular setting inside.
  • the corresponding interfaces and modules only perform operations in response to calls from the user layer. There is no dependency between the interfaces and modules.
  • the corresponding interfaces and modules are only related to the operation.
  • the driver layer A loosely coupled state can be achieved internally.
  • the embedded system provided by the embodiments of the present application the user layer and the driving layer are separated, and the internal driving layer is loosely coupled, which can improve the portability of the embedded system. Therefore, the embedded system provided by the embodiments of the present application can solve the problems of high coupling and poor portability of the embedded system in the prior art.
  • operations triggered by the user layer may be divided into peripheral operations and user operations.
  • Peripheral operations perform operations such as initialization for peripherals
  • user operations perform operations such as registration and data transmission/reception for users.
  • the peripheral operation and user operation may also include other operations, which are not specifically limited herein.
  • the driving interface may include a peripheral interface and a user interface
  • the driving module includes a peripheral module and a user module. The embodiments of the present application perform operation-related modular settings within the drive layer, and set corresponding drive interfaces and drive modules according to the operation category, which can further plan and separate the internal structure of the drive layer to realize the internal interface of the drive layer and The loosely coupled state of the module.
  • the drive interface and the drive module perform different operations.
  • the peripheral interface includes an initialization interface
  • the peripheral module includes an initialization module
  • preset drive data is stored in the driver layer
  • the drive data includes address parameters and storage parameters configured for the peripheral, and the address
  • the parameters may include the IP address and MAC address configured for the peripheral
  • the storage parameters may include the cache address, cache size, and register information configured for the peripheral.
  • the driving parameters may also be saved in the driving execution unit.
  • the drive parameters may also include other parameters, and the drive data may be further saved as a structure. In the embodiment of the present application, saving preset drive data in the drive layer can facilitate the subsequent modification of the embedded system only for this part of the content, without modifying the drive interface and drive module.
  • FIG. 4 shows the peripheral initialization processing flow of the driver layer, including:
  • Step 401 The initialization interface calls the initialization module in response to the initialization operation call from the user layer;
  • the initialization module responds to the call of the initialization interface, performs an initialization operation on the peripheral device, performs address configuration on the peripheral device according to the address parameter in the preset drive data, and obtains a peripheral address resource.
  • Peripherals allocate storage resources and obtain peripheral storage resources;
  • the initialization module after the initialization module performs an initialization operation on the peripheral, it performs address configuration for the peripheral according to the address parameters in the drive data, such as configuring the IP address and MAC address for the peripheral, and allocates storage resources for the peripheral according to the storage parameters, such as external Set the cache and register resources with the specified address and size;
  • Step 403 The initialization module establishes a corresponding relationship between peripheral devices, the corresponding relationship includes a corresponding relationship between a peripheral device identifier, peripheral address resource data, and peripheral storage resource data, and assigns a peripheral device identifier to the established peripheral device corresponding relationship;
  • the peripheral identification can be a combination of numbers, letters or words, the peripheral identification uniquely points to the peripheral, and the address resources and storage resources possessed by the peripheral;
  • the initialization module also saves the established correspondence
  • Step 404 the initialization module returns the peripheral identification to the initialization interface
  • Step 405 The initialization interface returns the peripheral identification from the initialization module to the user layer.
  • the driver layer returns the peripheral identification to the user layer.
  • the user layer does not know the operations and processing performed by the peripherals in the driver layer, and the user layer only knows the identifier of the peripheral.
  • the peripheral device is designated according to the peripheral device identifier.
  • the driver module locates the peripheral device and its address resources and storage resources according to the peripheral device identification.
  • the user interface includes a registration interface and the user module includes a registration module.
  • Figure 5 shows the user registration processing flow of the driver layer, including:
  • Step 501 The registration interface responds to the call from the user layer and obtains the peripheral identification and user data channel parameters passed by the user layer.
  • the peripheral identification is returned to the user layer by the driver layer in the process shown in FIG. 4.
  • the user data channel parameters include peripheral port numbers.
  • the user data channel parameters may further include an identifier of the protocol resolution module of the callable resolution layer. In the subsequent process of receiving data, the data reception module will call the protocol resolution module.
  • the user data channel parameters may also include storage resource parameters allocated to users in the storage resources of the peripheral, including storage addresses and storage sizes. In other embodiments, according to the needs of the application scenario, the user data channel parameters may also include other parameters, which are not specifically limited herein.
  • Step 502 The registration interface calls the registration module and passes the peripheral identification and user data channel parameters to the registration module.
  • Step 503 The registration module obtains the peripheral identification and user data channel parameters in response to the call of the registration interface.
  • Step 504 The registration module determines the corresponding peripheral device and the corresponding relationship of the peripheral device according to the peripheral device identifier, and configures the user storage resource for the user in the storage resource of the peripheral device according to the determined corresponding relationship of the peripheral device.
  • the registration module locates the corresponding peripheral device according to the peripheral device identifier, and configures the user's storage resource for the user among the storage resources configured for the peripheral device.
  • the registration module allocates storage resources for the user
  • the registration module can configure storage for the user in the storage resources of the peripheral according to the storage resource parameters Specify address and size of storage resources.
  • the registration module may configure the storage resource of the specified address and size for the user in the storage resource of the peripheral device according to a predetermined allocation rule; wherein the allocation rule includes a rule for allocating the storage resource of the peripheral device, For example, the storage resources of the specified ratio or the specified size in the storage resources of the peripherals are allocated to the newly registered users in sequence.
  • Step 505 The registration module configures data channel resources for the user on the determined peripheral device according to the user data channel parameters.
  • the registration module configures the peripheral port number specified by the user data channel parameter to the user.
  • the registration module when the user data channel parameter further includes the protocol resolution module identifier, the registration module also configures the protocol resolution module identifier for the user.
  • Step 506 The registration module establishes a user correspondence, where the correspondence includes the correspondence between peripheral device identifiers, user data channel resource data, and user storage resource data, and assigns a user identifier to the established user correspondence.
  • the registration module also saves the established user correspondence.
  • the established user ID can uniquely identify a user
  • the peripheral device can be used to locate the peripheral device registered by the user
  • the data channel resource is user-specific, not multiplexed, and can uniquely correspond to the user.
  • the user data channel resource data (For example, the peripheral port number) can locate the corresponding user.
  • the user descriptor may link the following information: the peripheral device registered by the user, the address resources of the peripheral device (for example, including the IP address and MAC address of the peripheral device), and the user registered on the peripheral device The port number of, and the storage resources allocated to the user in the storage resources of the peripheral.
  • Step 507 The registration module returns the user ID to the registration interface
  • Step 508 The registration interface returns the user identification from the registration module to the user layer.
  • the driver layer returns the user identification to the user layer.
  • the user layer does not know the specific information of the user registration, and the registration process and operation performed by the driver layer.
  • the user layer subsequently triggers the operation on the user, it locates the corresponding user according to the user identifier.
  • the driver module locates the peripheral device according to the peripheral device identifier corresponding to the user ID, and locates the corresponding user on the peripheral device according to the user data channel resource data (eg, peripheral port number) in the user ID.
  • the user interface includes a data transmission interface
  • the user module includes a data transmission module.
  • Step 601 The data sending interface responds to the call from the user layer and obtains the user identifier passed by the user layer.
  • the user ID is what is returned by the driver layer to the user layer in the process shown in FIG. 5, and the user layer specifies users according to the user ID.
  • Step 602 The data sending interface calls the data sending module and passes the user identification to the data sending module.
  • Step 603 The data sending module responds to the call of the data sending interface and obtains the user identifier passed by the data sending module.
  • Step 604 The data sending module determines the address of the user's storage resource according to the user identifier, obtains data from the user's storage address, and sends it through the user's data channel resource.
  • the data sending module can determine the corresponding user correspondence according to the user identification, and determine the user registered peripherals and the user’s storage resources on the peripheral according to the user correspondence Address, and obtain the data to be sent by the user from the storage resource, and send the data through the user data channel indicated in the user correspondence.
  • Step 605 The data sending module returns the sending operation result to the data sending interface.
  • the data sending module feeds back information about whether the sending operation is successful to the data sending interface.
  • Step 606 The data sending interface returns the sending operation result from the data sending module to the user layer.
  • the user ID is passed to the driver layer, and information on whether the data transmission is successfully fed back by the driver layer is obtained.
  • the user layer does not participate in or execute the specific data sending process.
  • the driver layer responds to the user layer calls and sends user data according to the user ID.
  • the user interface includes a data receiving interface
  • the user module includes a data receiving module.
  • Step 701 The data receiving interface obtains the user identifier transmitted by the user layer in response to the call from the user layer.
  • the identifier is what is returned by the driver layer to the user layer in the process shown in FIG. 5, and the user layer specifies users according to the user identifier.
  • Step 702 The data receiving interface calls the data receiving module, and passes the user identification to the data receiving module.
  • Step 703 The data receiving module obtains the user identification passed by the data receiving module in response to the call of the data receiving interface.
  • Step 704 The data receiving module receives data according to the user identification.
  • Step 705 The data receiving module determines the storage address of the user according to the user identification, and stores the received data in the determined storage address.
  • the data receiving module can determine the corresponding user correspondence according to the user identification, and determine the user registered peripherals and the user’s storage resources on the peripheral according to the user correspondence Address, cache the received data to the user's storage address on the peripheral.
  • Step 706 The data receiving module returns the receiving operation result to the data receiving interface.
  • the data receiving module feeds back information to the data receiving interface whether the sending and receiving is successful.
  • Step 707 The data receiving interface returns the receiving result from the data receiving module to the user layer.
  • the user ID is passed to the driver layer, and the driver layer receives information on whether the reception is successful or not.
  • the user layer does not participate in or execute the specific data receiving process.
  • the driver layer receives the data sent to the user according to the user layer call and the user ID.
  • the operation of receiving data by the data receiving module in step 704 may be implemented by different receiving methods.
  • the embodiments of the present application provide the following two ways to implement data reception.
  • FIG. 8 shows a flow of data reception processing performed by a driver layer provided by an embodiment of the present application, including:
  • Step 704a The data receiving module queries whether the embedded system receives the data.
  • the protocol parsing module is called according to the identifier of the protocol parsing module to obtain the destination address data of the data returned by the protocol parsing module.
  • the process proceeds to step 704b; in the case where the embedded system does not receive the data, the process ends.
  • the data receiving module queries whether the embedded system receives the data, and can determine whether the embedded system receives the data by querying the state of the register in which the embedded system stores the received data.
  • the user data channel parameters include the identification of the protocol resolution module of the resolution layer.
  • the protocol can be called The parsing module obtains the destination address data of the data, and the destination address data includes IP address, MAC address and port number information, so that the data receiving module can compare the destination address data parsed by the protocol parsing module with the user linked in the user correspondence The IP address of the registered peripheral, the MAC address of the peripheral, and the port number of the registered peripheral of the user to determine whether the data is sent to the user.
  • Step 704b The data receiving module compares the destination address information with the user data channel resource indicated by the user ID, and when the comparison determines that the data is consistent, stores the data received by the embedded system into the storage address of the user indicated by the user ID. In the case where the comparison determines inconsistency, the process ends.
  • the destination address of the data parsed by the protocol parsing module includes the IP address a, the MAC address b, and the port number c, and the data receiving module determines the peripheral IP address indicated in the user correspondence relationship according to the user ID as a, The MAC address is b and the port number is c.
  • the data receiving module can determine that the data is sent to the user indicated by the user identification, otherwise it is determined that the data is not sent to the user indicated by the user identification.
  • the data receiving module determines that the data received by the embedded system is sent to the user, the data received by the embedded system is stored in the storage address allocated to the user according to the storage address indicated by the user identification.
  • the data receiving module can query and receive the data sent to the user.
  • FIG. 9 shows a flow of data reception processing performed by a driver layer provided by an embodiment of the present application, including:
  • Step 704x The data receiving module obtains data source address information and destination address information transmitted by the protocol parsing module of the parsing layer;
  • the protocol analysis module will actively analyze the data received by the embedded system, obtain the destination address data of the data, and send the obtained destination address data of the data to the data receiving module;
  • Step 704y the data receiving module compares the destination address data with the user data channel resource data and the peripheral address resource data indicated by the user identification, and when the comparison determines that the data is consistent, stores the data received by the embedded system to the user identification indication Users' storage addresses.
  • the data receiving module compares the destination address data obtained by parsing the protocol parsing module with the peripheral port number of the user correspondence stored in the user correspondence to determine whether the data is sent to the user of.
  • the data received by the embedded system is stored in the storage address allocated to the user according to the storage address indicated by the user identification.
  • the data receiving module can receive the data sent to the user according to the notification of the protocol analysis module.
  • peripheral operations and user operations may include other operations.
  • the driver layer may include corresponding interfaces and modules to respond to user layer calls and implement specific operations.
  • the drive layer and the user layer are separately set, and the call relationship between the user layer and the drive layer can achieve a loosely coupled state and be set up modularly within the drive layer
  • the drive interface and drive module can realize the loose coupling state inside the drive layer.
  • the drive interface and the drive module only correspond according to the operation. There is no dependence between the drive interface and the drive module corresponding to different operations. The corresponding drive interface and the drive module perform the corresponding operation, which can realize the operation process. Separation, reducing the dependence between different operations. Therefore, the embedded system provided by the embodiments of the present application can achieve lower coupling and higher portability, and can solve the problems of high coupling and poor portability existing in the implementation manner of the embedded system in the prior art.
  • the drive interface and drive module are configured through modularization inside the drive layer.
  • the key preset information can be modified, such as modifying the drive parameters involved in the initialization operation.
  • the configuration relationship of the drive module, the processing logic inside the module and the specific processing procedure are modified. In specific application scenarios, a small amount of code modification can be achieved, the embedded system has a high degree of reuse, and high portability.
  • the embodiments of the present application also provide a device for implementing an embedded system driver layer.
  • FIG. 10 shows an apparatus for implementing an embedded system drive layer provided by an embodiment of the present application.
  • the apparatus includes a plurality of drive interfaces 1001, and a drive module 1002 corresponding to each drive interface; wherein,
  • the drive interface 1001 is used to call the corresponding drive module 1002 according to the call from the user layer; return the operation result from the drive module 1002 to the user layer;
  • the driving module 1002 is configured to perform a corresponding driving operation on the peripheral device according to the call of the driving interface, and return the operation result to the driving interface 1001.
  • FIG. 11 shows another apparatus for implementing an embedded system driver layer provided by an embodiment of the present application.
  • the apparatus includes a driver interface unit 1101 and at least one driver execution unit 1102.
  • One driver interface unit 1101 includes multiple drivers In the interface 1001, one drive execution unit 1102 includes multiple drive modules 1002.
  • the device shown in FIG. 11 is provided with a drive interface unit 1101 and a drive execution unit 1102.
  • the driving interface unit 1101 can be loaded by the user layer, and after being loaded, the driving interface 1001 can be called by the user layer.
  • the device shown in FIG. 10 or FIG. 11 further stores preset drive data, and the drive data includes address parameters and storage parameters configured for the peripheral device.
  • the preset driving data may be saved in the driving execution unit 1102 shown in FIG. 11.
  • the driving interface 1001 includes a peripheral interface and a user interface (not shown in the figure), and the driving module 1002 includes a peripheral module and a user module (not in the (Shown in the figure).
  • the peripheral interface includes an initialization interface
  • the peripheral module includes an initialization module
  • the initialization interface is used to call the corresponding initialization module according to the call from the user layer
  • the peripheral identification from the initialization module is returned to the user layer
  • the initialization module is used to respond to the call of the initialization interface, perform the initialization operation of the peripheral device, configure the address of the peripheral device according to the address parameter in the preset drive data, obtain the peripheral address resource, and store the peripheral data according to the preset drive data. Allocate storage resources to obtain peripheral storage resources; establish peripheral correspondence, which includes the correspondence between peripheral identification, peripheral address resource data, and peripheral storage resource data, and allocate peripherals to the established peripheral correspondence Identification; returns the peripheral identification to the initialization interface; where the address parameters include IP address and MAC address, and the storage parameters include cache address, cache size, and register information.
  • the user interface includes a registration interface
  • the user module includes a registration module
  • the registration interface is used to respond to calls from the user layer to obtain the peripheral identification and user data channel parameters passed by the user layer; call the registration module and pass the peripheral identification and user data channel parameters to the registration module; transfer the user identification from the registration module Return to the user layer;
  • the registration module is used to obtain the peripheral identification and user data channel parameters in response to the call of the registration interface; determine the corresponding peripheral and peripheral corresponding relationship according to the peripheral identification, and according to the determined peripheral corresponding relationship in the storage resource of the peripheral Users configure user storage resources; configure data channel resources for users on the determined peripherals according to user data channel parameters; establish user correspondence, which includes correspondence between peripheral identification, user data channel resource data, and user storage resource data Relationship, assigning a user ID to the established user correspondence; returning the user ID to the registration interface; where the user data channel parameters include peripheral and peripheral port numbers.
  • the user interface includes a data sending interface
  • the user module includes a data sending module
  • the data sending interface is used to respond to the call from the user layer and obtain the user identification passed by the user layer; call the data sending module and pass the user identification to the data sending module; return the sending operation result from the data sending module to the user layer;
  • the data sending module is used to respond to the call of the data sending interface and obtain the user identification passed by the data sending module; determine the address of the user's storage resource according to the user identification, obtain data from the user's storage address, and send through the user's data channel resource ; Return the sending operation result to the data sending interface.
  • the user interface includes a data receiving interface
  • the user module includes a data receiving module
  • the data receiving interface is used to obtain the user identification passed by the user layer in response to the call from the user layer; call the data receiving module and pass the user identification to the data receiving module; and return the receiving result from the data receiving module to the user layer;
  • the data receiving module is used to obtain the user identification passed by the data receiving module in response to the call of the data receiving interface; receive the data according to the user identification; determine the storage address of the user according to the user identification, and store the received data in the determined storage address;
  • the data receiving interface returns the result of the receiving operation.
  • the drive layer and the user layer are separately set, and the call relationship between the user layer and the drive layer can achieve a loosely coupled state and be set up modularly within the drive layer
  • the drive interface and drive module can realize the loose coupling state inside the drive layer.
  • the drive interface and the drive module only correspond according to the operation. There is no dependence between the drive interface and the drive module corresponding to different operations. The corresponding drive interface and the drive module perform the corresponding operation, which can realize the operation process. Separation, reducing the dependence between different operations. Therefore, the embedded system provided by the embodiments of the present application can achieve lower coupling and higher portability, and can solve the problems of high coupling and poor portability existing in the implementation manner of the embedded system in the prior art.
  • embodiments of the present application also provide a non-transitory volatile machine-readable storage medium, characterized in that the storage medium stores at least one machine-executable instruction, and the machine executes at least one machine-executable Instruction to execute the implementation method of the drive layer of the embedded system as shown in FIG. 3.
  • the embodiments of the present application also provide an embedded system, which includes an implementation device of an embedded system driver layer as shown in FIG. 10 or FIG. 11.
  • the embodiments of the present application also provide an embedded system including the non-transitory volatile machine-readable storage medium as described above.
  • embodiments of the present application also provide a system-on-chip including any embedded system as described above, the embedded system includes the embedded system as shown in FIG. 10 or FIG. 11 Implementation device of the driving layer.
  • the embodiments of the present application further provide a camera including the above-mentioned system on chip, the system on chip includes any embedded system as described above, and the embedded system includes as shown in FIG. 10 Or an implementation device of an embedded system driving layer shown in FIG. 11.
  • each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or software function modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
  • the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer usable program code.
  • each flow and/or block in the flowchart and/or block diagram and a combination of the flow and/or block in the flowchart and/or block diagram may be implemented by computer program instructions.
  • These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processing machine, or other programmable data processing device to produce a machine that enables the generation of instructions executed by the processor of the computer or other programmable data processing device
  • These computer program instructions may also be stored in a computer readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, the instructions
  • the device implements the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operating steps are performed on the computer or other programmable device to produce computer-implemented processing, which is executed on the computer or other programmable device
  • the instructions provide steps for implementing the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.

Abstract

一种嵌入式系统驱动层的实现方法和装置,以解决现有技术中嵌入式系统的实现方式存在的耦合性高、可移植性差的问题。嵌入式系统的驱动层包括多个驱动接口、以及每个驱动接口各自对应的一个驱动模块,该方法包括:根据来自用户层的调用,驱动接口调用对应的驱动模块(301);驱动模块根据驱动接口的调用,对外设执行相应的驱动操作,并向驱动接口返回操作结果(302);驱动接口向用户层返回来自驱动模块的操作结果(303)。

Description

一种嵌入式系统驱动层的实现方法和装置
本申请要求在2018年12月29日提交中国专利局、申请号为201811639898.1、发明名称为“一种嵌入式系统驱动层的实现方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及嵌入式领域,特别涉及一种嵌入式系统驱动层的实现方法和装置、嵌入式系统、片上系统、相机。
背景技术
嵌入式系统是一种具备软件和硬件的完整的计算机系统,它具有功能专一、系统精简、应用范围广的特点。嵌入式系统运行于片上系统(System on Chip,SOC),包括驱动层和用户层两部分。
在实现驱动层功能和用户层功能时,通常会设置相应的驱动功能函数和应用功能函数。在系统运行过程中,驱动功能函数和应用功能函数之间存在依赖性,驱动功能函数之间、应用功能函数之间也都分别存在依赖性。例如,有些函数之间共享全局变量等的寄存器资源,并对共享的寄存器进行操作;还有一些函数的输出是另一些函数的输入的情况。
这种实现方式导致嵌入式系统内部驱动层和应用层的耦合性很高,系统的可移植性较差。当要将一个产品中的SOC及其上的嵌入式系统移植到另一个产品中时,需要根据产品的具体特性来修改共享资源、以及函数的运行逻辑,该修改工作的工作量较大,工作效率低,容易出现错误。
可见,目前嵌入式系统的实现方式存在耦合性高、可移植性差的问题。
发明内容
有鉴于此,本申请提供了一种嵌入式系统驱动层的实现方法和装置、嵌入式系统、片上系统、相机,用以解决现有技术中嵌入式系统的实现方式存在的耦合性高、可移植性差的问题。
根据本申请的一个方面,提供了一种嵌入式系统驱动层的实现方法,嵌入式系统的驱动层包括多个驱动接口、以及每个驱动接口各自对应的一个驱动模块,该方法包括:
根据来自用户层的调用,驱动接口调用对应的驱动模块;
驱动模块根据驱动接口的调用,对外设执行相应的驱动操作,并向驱动接口返回操作 结果;
驱动接口向用户层返回来自驱动模块的操作结果。
根据本申请的一个方面,提供了一种嵌入式系统驱动层的实现装置,该装置包括多个驱动接口、以及每个驱动接口各自对应的一个驱动模块;其中,
驱动接口用于根据来自用户层的调用,调用对应的驱动模块;向用户层返回来自驱动模块的操作结果;
驱动模块用于根据驱动接口的调用,对外设执行相应的驱动操作,并向驱动接口返回操作结果。
根据本申请的一个方面,提供了一种嵌入式系统,该系统包括如上所述的嵌入式系统驱动层实现装置,该装置包括多个驱动接口、以及每个驱动接口各自对应的一个驱动模块;其中,
驱动接口用于根据来自用户层的调用,调用对应的驱动模块;向用户层返回来自驱动模块的操作结果;
驱动模块用于根据驱动接口的调用,对外设执行相应的驱动操作,并向驱动接口返回操作结果。
根据本申请的一个方面,提供了一种片上系统,该片上系统包括嵌入式系统,该嵌入式系统包括多个驱动接口、以及每个驱动接口各自对应的一个驱动模块;其中,
驱动接口用于根据来自用户层的调用,调用对应的驱动模块;向用户层返回来自驱动模块的操作结果;
驱动模块用于根据驱动接口的调用,对外设执行相应的驱动操作,并向驱动接口返回操作结果。根据本申请的一个方面,提供了一种相机,该相机中包括一种片上系统,该片上系统包括嵌入式系统,该嵌入式系统包括多个驱动接口、以及每个驱动接口各自对应的一个驱动模块;其中,
驱动接口用于根据来自用户层的调用,调用对应的驱动模块;向用户层返回来自驱动模块的操作结果;
驱动模块用于根据驱动接口的调用,对外设执行相应的驱动操作,并向驱动接口返回操作结果。
在本申请实施例提供的嵌入式系统中,用户层与驱动层相分离、驱动层内部松耦合,能够提高嵌入式系统的可移植性。从而本申请实施例提供的嵌入式系统能够解决现有技术中嵌入式系统存在的耦合性高、可移植性差的问题。
本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在所写的说明书、 权利要求书、以及附图中所特别指出的结构来实现和获得。
下面通过附图和实施例,对本发明的技术方案做进一步的详细描述。
附图说明
附图用来提供对本发明的进一步理解,并且构成说明书的一部分,与本发明的实施例一起用于解释本发明,并不构成对本发明的限制。显而易见地,下面描述中的附图仅仅是本发明一些实施例,对于本领域普通技术人员而言,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。在附图中:
图1为本申请实施例提供的一种嵌入式系统的结构框图;
图2为本申请实施例提供的另一种嵌入式系统的结构框图;
图3为本申请实施例提供的嵌入式系统的驱动层的实现方法的处理流程图;
图4为本申请实施例提供的驱动层执行外设初始化处理的流程图;
图5为本申请实施例提供的驱动层执行用户注册处理的流程图;
图6为本申请实施例提供的驱动层执行数据发送处理的流程图;
图7为本申请实施例提供的驱动层执行数据接收处理的流程图;
图8为图7中步骤704的处理流程图;
图9为图7中步骤704的另一处理流程图;
图10为本申请实施例提供的嵌入式系统的驱动层的实现装置的结构框图;
图11为本申请实施例提供的嵌入式系统的驱动层的实现装置的另一结构框图。
具体实施方式
为了使本技术领域的人员更好地理解本发明中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
图1中示出了本申请实施例提供的一种嵌入式系统,该嵌入式系统1包括用户层11和驱动层12,驱动层12中包括多个驱动接口121和多个驱动模块122,其中,一个驱动接口121对应于一个驱动模块122。
在一些实施例中,外设可以是网卡、串口、I2C等设备。
在一些实施例中,驱动层12的配置可如图1所示,即驱动层12包括多个驱动接口121、以及每个驱动接口121各自对应的一个驱动模块122。通过在驱动层12中设置驱动接口 121和驱动模块122,可以对驱动层12的内部结构进行规划和分离,能够实现驱动层12内部接口和模块的松耦合状态。
在另一些实施例中,如图2所示,可以在驱动层12配置一个驱动接口单元123和至少一个驱动执行单元124,在驱动接口单元123中配置多个驱动接口121,在每个驱动执行单元124中配置至少一个驱动模块122。驱动接口单元123是面向用户层11的驱动接口层,驱动执行单元124是面向外设的驱动执行层。用户层11加载驱动接口单元123后,调用驱动接口单元123中的驱动接口121,驱动接口121进一步地调用驱动模块122。在具体的应用场景中,可以将一个驱动接口单元123配置为一个驱动接口文件,将一个驱动执行单元124配置为一个驱动执行文件。通过设置驱动接口单元123和驱动执行单元124,能够进一步对驱动层12的内部结构进行规划和分离,能够实现驱动层12内部接口和模块的松耦合状态。
图3中示出了本申请实施例提供的嵌入式系统的驱动层的实现方法的处理流程,也即图1中驱动层12的工作原理,包括:
步骤301、根据来自用户层的调用,驱动接口调用对应的驱动模块;
步骤302、驱动模块根据驱动接口的调用,对外设执行相应的驱动操作,并向驱动接口返回操作结果;
步骤303、驱动接口向用户层返回来自驱动模块的操作结果。
在本申请实施例提供的技术方案中,驱动接口为用户层提供与外设相关的操作的接口,驱动模块执行具体的与外设相关的操作,驱动接口将驱动模块返回的结果返回给用户层。用户层的运行和处理与驱动层的运行和处理相分离,用户层通过调用驱动层来实现与外设相关的操作,驱动层相对于用户层而言处于黑盒状态,也即用户层与驱动层之间的依赖性较低、为松耦合状态。驱动层内部为模块化设置,相对应的接口和模块只响应于用户层的调用来执行操作,接口之间以及模块之间不存在依赖关系,相对应的接口和模块只与操作相关,驱动层内部能够实现松耦合状态。
从而,在本申请实施例提供的嵌入式系统中,用户层与驱动层相分离、驱动层内部松耦合,能够提高嵌入式系统的可移植性。从而本申请实施例提供的嵌入式系统能够解决现有技术中嵌入式系统存在的耦合性高、可移植性差的问题。
在一些实施例中,用户层触发的操作可以分为外设操作和用户操作,外设操作执行针对外设的诸如初始化的操作,用户操作执行针对用户的诸如注册、数据收/发的操作。在应用场景中,根据具体外设是哪种设备,外设操作和用户操作还可以包括其它的操作,本申请这里不做具体限定。相对应地,驱动接口可以包括外设接口和用户接口,驱动模块包括外设模块和用户模块。本申请实施例在驱动层内部进行与操作相关的模块化设置,根据操 作类别来设置对应的驱动接口和驱动模块,能够进一步地对驱动层的内部结构进行规划和分离,实现驱动层内部接口和模块的松耦合状态。
响应于用户层触发的不同的操作调用,驱动接口和驱动模块执行不同的操作。
在一些实施例中,外设接口包括初始化接口、外设模块包括初始化模块,并且,在驱动层中保存有预设的驱动数据,驱动数据中包括为外设配置的地址参数和存储参数,地址参数中可以包括为外设配置的IP地址、MAC地址,存储参数中可以包括为外设配置的缓存地址、缓存大小、寄存器信息。在其他一些实施例中,驱动参数还可以保存在驱动执行单元中。在另一些实施例中,驱动参数中还可以包括其它的参数,并且驱动数据可以进一步被保存为一个结构体。本申请实施例中,在驱动层中保存预设的驱动数据,能够便于后续移植嵌入式系统时,仅针对该部分内容进行修改,而不需要对驱动接口和驱动模块进行修改。
在用户层对驱动层发起初始化操作调用时,图4中示出了驱动层的外设初始化处理流程,包括:
步骤401、初始化接口响应于来自用户层的初始化操作调用,调用初始化模块;
步骤402、初始化模块响应初始化接口的调用,对外设执行初始化操作,根据预设的驱动数据中的地址参数对外设进行地址配置、得到外设地址资源,根据预设的驱动数据中的存储参数为外设分配存储资源、得到外设存储资源;
其中,初始化模块对外设执行了初始化操作后,根据驱动数据中的地址参数为外设进行地址配置,例如为外设配置IP地址和MAC地址,根据存储参数为外设分配存储资源,例如为外设配置指定地址和大小的缓存和寄存器资源;
步骤403、初始化模块建立外设对应关系,该对应关系包括外设标识、外设地址资源数据和外设存储资源数据的对应关系,为建立的外设对应关系分配外设标识;
其中,外设标识可以是数字、字母或者文字的组合,外设标识唯一地指向该外设,以及该外设具有的地址资源和存储资源;
进一步地,初始化模块还保存建立的该对应关系;
步骤404、初始化模块向初始化接口返回外设标识;
步骤405、初始化接口向用户层返回来自初始化模块的外设标识。
通过上述处理,驱动层将外设标识返回给用户层,用户层并不知晓驱动层中对外设进行的操作和处理,用户层仅知晓该外设的标识。用户层在后续触发其它的操作时根据该外设标识来指定外设。在驱动层内部,驱动模块根据外设标识来定位外设以及外设的地址资源和存储资源。
在一些实施例中,用户接口包括注册接口,用户模块包括注册模块。在用户层对驱动 层发起用户注册调用时,图5中示出了驱动层的用户注册处理流程,包括:
步骤501、注册接口响应来自用户层的调用、获取用户层传递的外设标识和用户数据通道参数。
其中,外设标识即为在图4所示处理中,由驱动层返回给用户层的。在一些实施例中,用户数据通道参数包括外设端口号。在另一些实施例中,用户数据通道参数中还可以进一步包括可调用的解析层的协议解析模块的标识,在后续接收数据的过程中,数据接收模块将调用该协议解析模块。在另一些实施例中,用户数据通道参数还可以包括在外设的存储资源中为用户分配的存储资源参数,包括存储地址和存储大小。在其它的实施例中,根据应用场景的需要,用户数据通道参数还可以包括其它的参数,本申请这里不做具体限定。
步骤502、注册接口调用注册模块,并向注册模块传递外设标识和用户数据通道参数。
步骤503、注册模块响应于注册接口的调用、获取外设标识和用户数据通道参数。
步骤504、注册模块根据外设标识确定对应的外设和外设对应关系,根据确定的外设对应关系在外设的存储资源中为用户配置用户存储资源。
其中,注册模块根据外设标识定位对应的外设,并且在为该外设配置的存储资源中为用户配置用户的存储资源。
注册模块为用户分配存储资源时,在一些实施例中,在用户数据通道参数中包括为用户配置的存储资源参数时,注册模块可以根据该存储资源参数,在外设的存储资源中为用户配置存储指定地址和大小的存储资源。在另一实施例中,注册模块可以根据预定的分配规则,在外设的存储资源中为用户配置存储指定地址和大小的存储资源;其中,分配规则中包括对外设的存储资源进行分配的规则,例如,依次将外设存储资源中的指定比例或指定大小的存储资源分配给新注册的用户。
步骤505、注册模块根据用户数据通道参数,在确定的外设上为用户配置数据通道资源。
例如,注册模块将用户数据通道参数指定的外设端口号配置给用户。在另一些实施例中,在用户数据通道参数中还包括协议解析模块标识的情况下,注册模块还为用户配置该协议解析模块标识。
步骤506、注册模块建立用户对应关系,该对应关系包括外设标识、用户数据通道资源数据和用户存储资源数据的对应关系,为建立的用户对应关系分配用户标识。
进一步地,注册模块还保存建立的用户对应关系。
其中,建立的用户标识能够唯一地标识一个用户,通过外设标识能够定位到用户所注册的外设,并且数据通道资源是用户专用的并非复用、能够唯一对应用户,通过用户数据通道资源数据(例如外设端口号)能够定位到相应的用户。
在建立的用户对应关系中,用户描述符可链接如下信息:该用户注册的外设、该外设的地址资源(例如包括外设的IP地址和MAC地址)、该用户注册在该外设上的端口号、在该外设的存储资源中为该用户分配的存储资源。
步骤507、注册模块向注册接口返回用户标识;
步骤508、注册接口将来自注册模块的用户标识返回给用户层。
通过上述处理,驱动层将用户标识返回为用户层,用户层并不知晓用户注册的具体信息,以及驱动层进行的注册处理和操作。用户层在后续触发关于用户的操作时,根据该用户标识定位到对应的用户。在驱动层内部,驱动模块根据用户标识对应的外设标识定位到外设,根据用户标识中的用户数据通道资源数据(例如外设端口号)在外设上定位到相应的用户。
在一些实施例中,用户接口包括数据发送接口,用户模块包括数据发送模块。在用户层对驱动层发起数据发送调用时,图6中示出了驱动层的数据发送处理流程,包括:
步骤601、数据发送接口响应来自用户层的调用、获取用户层传递的用户标识。
其中,用户标识即为在图5所示处理中,由驱动层返回给用户层的,用户层根据用户标识指定用户。
步骤602、数据发送接口调用数据发送模块,并将用户标识传递给数据发送模块。
步骤603、数据发送模块响应数据发送接口的调用、获取数据发送模块传递的用户标识。
步骤604、数据发送模块根据用户标识确定用户的存储资源的地址,从该用户的存储地址中获取数据、通过用户的数据通道资源进行发送。
如上所述,在驱动层内部已经建立了用户对应关系,数据发送模块根据用户标识能够确定对应的用户对应关系,根据用户对应关系确定用户注册的外设以及用户在该外设上的存储资源的地址,并从该存储资源中获取用户要发送的数据,通过用户对应关系中指示的用户数据通道来发送该数据。
步骤605、数据发送模块向数据发送接口返回发送操作结果。
也即数据发送模块向数据发送接口反馈发送操作是否成功的信息。
步骤606、数据发送接口将来自数据发送模块的发送操作结果返回给用户层。
在上述处理过程中,用户层触发数据发送操作后,将用户标识传递给驱动层,并获取驱动层反馈的数据发送是否成功的信息。用户层并不参与或执行具体的数据发送过程,驱动层响应用户层的调用,根据用户标识将用户的数据发送出去。上述处理能够实现用户层和驱动层的分离,使得用户层和驱动层处于松耦合状态。
在一些实施例中,用户接口包括数据接收接口,用户模块包括数据接收模块。在用户 层对驱动层发起数据接收调用时,图7中示出了驱动层的数据接收处理流程,包括:
步骤701、数据接收接口响应于来自用户层的调用、获取用户层传递的用户标识。
其中,该标识即为在图5所示处理中,由驱动层返回给用户层的,用户层根据用户标识指定用户。
步骤702、数据接收接口调用数据接收模块,并将用户标识传递给数据接收模块。
步骤703、数据接收模块响应数据接收接口的调用、获取数据接收模块传递的用户标识。
步骤704、数据接收模块根据用户标识接收数据。
步骤705、数据接收模块根据用户标识确定用户的存储地址,将接收到的数据存储到确定的存储地址中。
如上所述,在驱动层内部已经建立了用户对应关系,数据接收模块根据用户标识能够确定对应的用户对应关系,根据用户对应关系确定用户注册的外设以及用户在该外设上的存储资源的地址,将接收到的数据缓存到用户在该外设上的存储地址中。
步骤706、数据接收模块向数据接收接口返回接收操作结果。
也即数据接收模块向数据接收接口反馈发送接收是否成功的信息。
步骤707、数据接收接口将来自数据接收模块的接收结果返回给用户层。
在上述处理过程中,用户层触发数据接收操作后,将用户标识传递给驱动层,并获取驱动层反馈的接收是否成功的信息。用户层并不参与或执行具体的数据接收过程,驱动层根据用户层的调用,根据用户标识接收发送给用户的数据。上述处理能够实现用户层和驱动层的分离。
在不同的实施例中,上述步骤704数据接收模块接收数据的操作可以通过不同的接收方式来实现。本申请实施例提供了如下的两种方式来实施数据接收。
接收方式一,数据接收模块通过查询的方式接收数据。图8中示出了本申请实施例提供的驱动层进行数据接收处理的流程,包括:
步骤704a、数据接收模块查询嵌入式系统是否接收到数据,在嵌入式系统接收到数据的情况下,根据协议解析模块的标识调用协议解析模块,获得协议解析模块解析数据返回的数据的目的地址数据,并且处理进行到步骤704b;在嵌入式系统没有接收到数据的情况下,处理结束。
其中,数据接收模块查询嵌入式系统是否接收到数据,可以通过查询嵌入式系统存储接收数据的寄存器的状态,来确定嵌入式系统是否接收到数据。
其中,如上所述在用户注册的过程中,在一些实施例中用户数据通道参数中包括了解析层的协议解析模块的标识,在数据接收模块主动查询嵌入式系统接收到数据后,可以调 用协议解析模块来获取数据的目的地址数据,通目的地址数据中包括IP地址、MAC地址和端口号信息,从而,数据接收模块可以对比协议解析模块解析得到的目的地址数据和用户对应关系中链接的用户注册的外设的IP地址、外设的MAC地址和用户注册的外设端口号,以确定该数据是否是发送给该用户的。
步骤704b、数据接收模块将目的地址信息与用户标识指示的用户数据通道资源进行对比,在对比确定一致的情况下,将嵌入式系统接收到的数据存储到用户标识指示的用户的存储地址中,在对比确定不一致的情况下,处理结束。
例如,协议解析模块解析得到的数据的目的地址中包括IP地址为a、MAC地址为b、端口号为c,数据接收模块根据用户标识确定的用户对应关系中指示的外设IP地址为a、MAC地址为b、端口号为c,数据接收模块进行比对后可以确定该数据是发送给用户标识所指的用户的,否则确定该数据不是发送给用户标识所指的用户的。
数据接收模块确定嵌入式系统接收到的数据是发送给该用户的情况下,根据用户标识指示的存储地址,将嵌入式系统接收到的数据存储到为用户分配的存储地址中。
通过接收方式一,数据接收模块能够查询并接收发送给用户的数据。
接收方式二,数据接收模块根据来自协议解析模块的通知接收数据。图9中示出了本申请实施例提供的驱动层进行数据接收处理的流程,包括:
步骤704x、数据接收模块获取解析层的协议解析模块传递的数据源地址信息和目的地址信息;
其中,协议解析模块会对嵌入式系统接收到的数据进行主动解析,获取数据的目的地址数据,并将获取到的数据的目的地址数据发送给数据接收模块;
步骤704y、数据接收模块将目的地址数据与用户标识指示的用户数据通道资源数据和外设地址资源数据进行对比,在对比确定一致的情况下,将嵌入式系统接收到的数据存储到用户标识指示的用户的存储地址中。
如上述接收方式一中所述,数据接收模块对比协议解析模块解析得到的目的地址数据和用户对应关系中保存的为用户对应关系链接的外设端口号,以确定该数据是否是发送给该用户的。在确定嵌入式系统接收到的数据是发送给该用户的情况下,根据用户标识指示的存储地址,将嵌入式系统接收到的数据存储到为用户分配的存储地址中。
通过接收方式二,数据接收模块能够根据协议解析模块的通知来接收发送给用户的数据。
以上对用户层触发的外设操作和用户操作进行了示例性说明,在其他的一些实施例中,根据具体外设设备的不同,外设操作和用户操作中还可以包括其它的操作,相应地,驱动层可以包括对应的接口和模块,以响应用户层的调用、实施具体的操作。
在本申请实施例提供的技术方案中,在系统设置方面,将驱动层和用户层分离设置,用户层和驱动层之间为调用关系,能够实现松耦合状态,在驱动层内部模块化地设置驱动接口和驱动模块,能够实现驱动层内部的松耦合状态。在处理逻辑方面,驱动接口和驱动模块只根据操作进行对应,不同操作对应的驱动接口和驱动模块之间,不存在依赖,对应的驱动接口和驱动模块执行相应的操作,能够实现操作处理之间的分离,降低不同的操作处理之间的依赖关系。从而本申请实施例提供的嵌入式系统能够实现较低的耦合性和较高的可移植性,能够解决现有技术中嵌入式系统的实现方式存在的耦合性高、可移植性差的问题。
并且,驱动层内部通过模块化配置驱动接口和驱动模块,在将嵌入式系统进行移植时,可只针对关键的预设信息进行修改,例如修改初始化操作涉及的驱动参数,不需要对驱动接口和驱动模块的配置关系、模块内部的处理逻辑和具体的处理过程进行修改。在具体的应用场景中,可以实现较小的代码修改量,嵌入式系统的复用程度高,可移植性高。
基于相同的发明构思,本申请实施例还提供了一种嵌入式系统驱动层的实现装置。
图10中示出了本申请实施例提供的嵌入式系统驱动层的实现装置,该装置包括多个驱动接口1001、以及每个驱动接口各自对应的一个驱动模块1002;其中,
驱动接口1001用于根据来自用户层的调用,调用对应的驱动模块1002;向用户层返回来自驱动模块1002的操作结果;
驱动模块1002用于根据驱动接口的调用,对外设执行相应的驱动操作,并向驱动接口1001返回操作结果。
图11中示出了本申请实施例提供的另一种嵌入式系统驱动层的实现装置,该装置包括一个驱动接口单元1101和至少一个驱动执行单元1102,一个驱动接口单元1101中包括多个驱动接口1001,一个驱动执行单元1102中包括多个驱动模块1002。
图11所示的装置相比图10所示的装置,配置了驱动接口单元1101和驱动执行单元1102。驱动接口单元1101可被用户层加载,并在得到加载后,驱动接口1001得到用户层的调用。
在一些实施例中,在图10或图11所示的装置中还保存有预设的驱动数据,驱动数据中包括为外设配置的地址参数和存储参数。在另一些实施例中,预设的驱动数据可以保存在图11所示的驱动执行单元1102中。
在一些实施例中,在图10或图11所示的装置中,驱动接口1001包括外设接口和用户接口(未在图中示出),驱动模块1002包括外设模块和用户模块(未在图中示出)。
在一些实施例中,外设接口包括初始化接口、外设模块包括初始化模块;初始化接口 用于根据来自用户层的调用,调用对应的初始化模块;向用户层返回来自初始化模块的外设标识;
初始化模块用于响应初始化接口的调用,对外设执行初始化操作,根据预设的驱动数据中的地址参数对外设进行地址配置、得到外设地址资源,根据预设的驱动数据中的存储参数为外设分配存储资源、得到外设存储资源;建立外设对应关系,该对应关系包括外设标识、外设地址资源数据和外设存储资源数据的对应关系,为建立的外设对应关系分配外设标识;向初始化接口返回外设标识;其中,地址参数包括IP地址和MAC地址,存储参数包括缓存地址、缓存大小和寄存器信息。
在一些实施例中,用户接口包括注册接口,用户模块包括注册模块;
注册接口用于响应来自用户层的调用、获取用户层传递的外设标识和用户数据通道参数;调用注册模块,并向注册模块传递外设标识和用户数据通道参数;将来自注册模块的用户标识返回给用户层;
注册模块用于响应于注册接口的调用、获取外设标识和用户数据通道参数;根据外设标识确定对应的外设和外设对应关系,根据确定的外设对应关系在外设的存储资源中为用户配置用户存储资源;根据用户数据通道参数,在确定的外设上为用户配置数据通道资源;建立用户对应关系,该对应关系包括外设标识、用户数据通道资源数据和用户存储资源数据的对应关系,为建立的用户对应关系分配用户标识;向注册接口返回用户标识;其中,用户数据通道参数中包括外设的和外设端口号。
在一些实施例中,用户接口包括数据发送接口,用户模块包括数据发送模块;
数据发送接口用于响应来自用户层的调用、获取用户层传递的用户标识;调用数据发送模块,并将用户标识传递给数据发送模块;将来自数据发送模块的发送操作结果返回给用户层;
数据发送模块用于响应数据发送接口的调用、获取数据发送模块传递的用户标识;根据用户标识确定用户的存储资源的地址,从该用户的存储地址中获取数据、通过用户的数据通道资源进行发送;向数据发送接口返回发送操作结果。
在一些实施例中,用户接口包括数据接收接口,用户模块包括数据接收模块;
数据接收接口用于响应于来自用户层的调用、获取用户层传递的用户标识;调用数据接收模块,并将用户标识传递给数据接收模块;将来自数据接收模块的接收结果返回给用户层;
数据接收模块用于响应数据接收接口的调用、获取数据接收模块传递的用户标识;根据用户标识接收数据;根据用户标识确定用户的存储地址,将接收到的数据存储到确定的存储地址中;向数据接收接口返回接收操作结果。
在本申请实施例提供的技术方案中,在系统设置方面,将驱动层和用户层分离设置,用户层和驱动层之间为调用关系,能够实现松耦合状态,在驱动层内部模块化地设置驱动接口和驱动模块,能够实现驱动层内部的松耦合状态。在处理逻辑方面,驱动接口和驱动模块只根据操作进行对应,不同操作对应的驱动接口和驱动模块之间,不存在依赖,对应的驱动接口和驱动模块执行相应的操作,能够实现操作处理之间的分离,降低不同的操作处理之间的依赖关系。从而本申请实施例提供的嵌入式系统能够实现较低的耦合性和较高的可移植性,能够解决现有技术中嵌入式系统的实现方式存在的耦合性高、可移植性差的问题。
基于相同的发明构思,本申请实施例还提供了一种非暂态易失性机器可读存储介质,其特征在于,该存储介质中存储至少一条机器可执行指令,机器执行至少一条机器可执行指令以执行如图3所示的嵌入式系统驱动层的实现方法。
基于相同的发明构思,本申请实施例还提供了一种嵌入式系统,该系统中包括如图10或图11所示的嵌入式系统驱动层的实现装置。
基于相同的发明构思,本申请实施例还提供了一种嵌入式系统,该系统中包括如上所述的非暂态易失性机器可读存储介质。
基于相同的发明构思,本申请实施例还提供了一种片上系统,该片上系统包括如上所述的任一种嵌入式系统,该嵌入式系统包括如图10或图11所示的嵌入式系统驱动层的实现装置。
基于相同的发明构思,本申请实施例还提供了一种相机,该相机包括如上所述的片上系统,该片上系统包括如上所述的任一种嵌入式系统,该嵌入式系统包括如图10或图11所示的嵌入式系统驱动层的实现装置。
以上结合具体实施例描述了本发明的基本原理,但是,需要指出的是,对本领域普通技术人员而言,能够理解本发明的方法和装置的全部或者任何步骤或者部件可以在任何计算装置(包括处理器、存储介质等)或者计算装置的网络中,以硬件固件、软件或者他们的组合加以实现,这是本领域普通技术人员在阅读了本发明的说明的情况下运用它们的基本编程技能就能实现的。
本领域普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的上述实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括上述实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和 范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (23)

  1. 一种嵌入式系统驱动层的实现方法,其特征在于,嵌入式系统的驱动层包括多个驱动接口、以及每个驱动接口各自对应的一个驱动模块,该方法包括:
    根据来自用户层的调用,驱动接口调用对应的驱动模块;
    驱动模块根据驱动接口的调用,对外设执行相应的驱动操作,并向驱动接口返回操作结果;
    驱动接口向用户层返回来自驱动模块的操作结果。
  2. 根据权利要求1所述的方法,其特征在于,驱动层包括一个驱动接口单元和至少一个驱动执行单元,一个驱动接口单元中包括多个驱动接口,一个驱动执行单元中包括多个驱动模块;
    所述方法还包括:驱动接口单元被用户层加载后,驱动接口单元中的驱动接口得到用户层的调用。
  3. 根据权利要求1所述的方法,其特征在于,驱动执行层中保存有预设的驱动数据,驱动数据中包括为外设配置的地址参数和存储参数。
  4. 根据权利要求3所述的方法,其特征在于,驱动接口包括外设接口和用户接口,驱动模块包括外设模块和用户模块。
  5. 根据权利要求4所述的方法,其特征在于,外设接口包括初始化接口、外设模块包括初始化模块;
    驱动接口调用对应的驱动模块,包括:初始化接口调用初始化模块;
    驱动模块对外设执行相应的驱动操作,并向驱动接口返回操作结果,包括:初始化模块响应初始化接口的调用,对外设执行初始化操作,根据预设的驱动数据中的地址参数对外设进行地址配置、得到外设地址资源,根据预设的驱动数据中的存储参数为外设分配存储资源、得到外设存储资源;建立外设对应关系,该对应关系包括外设标识、外设地址资源数据和外设存储资源数据的对应关系,为建立的外设对应关系分配外设标识;向初始化接口返回外设标识;其中,地址参数包括IP地址和MAC地址,存储参数包括缓存地址、缓存大小和寄存器信息;
    驱动接口向用户层返回来自驱动模块的操作结果,包括:初始化接口向用户层返回来自初始化模块的外设标识。
  6. 根据权利要求5所述的方法,其特征在于,用户接口包括注册接口,用户模块包括注册模块;
    根据来自用户层的调用,驱动接口调用驱动资源文件中对应的驱动模块,包括:注册接口响应来自用户层的调用、获取用户层传递的外设标识和用户数据通道参数;注册接口 调用注册模块,并向注册模块传递外设标识和用户数据通道参数;
    驱动模块对外设执行相应的驱动操作,并向驱动接口返回操作结果,包括:注册模块响应于注册接口的调用、获取外设标识和用户数据通道参数;根据外设标识确定对应的外设和外设对应关系,根据确定的外设对应关系在外设的存储资源中为用户配置用户存储资源;根据用户数据通道参数,在确定的外设上为用户配置数据通道资源;建立用户对应关系,该对应关系包括外设标识、用户数据通道资源数据和用户存储资源数据的对应关系,为建立的用户对应关系分配用户标识;向注册接口返回用户标识;其中,用户数据通道参数中包括外设的和外设端口号;
    驱动接口向用户层返回来自驱动模块的操作结果,包括:注册接口将来自注册模块的用户标识返回给用户层。
  7. 根据权利要求6所述的方法,其特征在于,用户接口包括数据发送接口,用户模块包括数据发送模块;
    根据来自用户层的调用,驱动接口调用驱动资源文件中对应的驱动模块,包括:数据发送接口响应来自用户层的调用、获取用户层传递的用户标识;数据发送接口调用数据发送模块,并将用户标识传递给数据发送模块;
    驱动模块对外设执行相应的驱动操作,并向驱动接口返回操作结果,包括:数据发送模块响应数据发送接口的调用、获取数据发送模块传递的用户标识;根据用户标识确定用户的存储资源的地址,从该用户的存储地址中获取数据、通过用户的数据通道资源进行发送;向数据发送接口返回发送操作结果;
    驱动接口向用户层返回来自驱动模块的操作结果,包括:数据发送接口将来自数据发送模块的发送操作结果返回给用户层。
  8. 根据权利要求6所述的方法,其特征在于,用户接口包括数据接收接口,用户模块包括数据接收模块;
    根据来自用户层的调用,驱动接口调用驱动资源文件中对应的驱动模块,包括:数据接收接口响应于来自用户层的调用、获取用户层传递的用户标识;数据接收接口调用数据接收模块,并将用户标识传递给数据接收模块;
    驱动模块对外设执行相应的驱动操作,并向驱动接口返回操作结果,包括:数据接收模块响应数据接收接口的调用、获取数据接收模块传递的用户标识;根据用户标识接收数据;根据用户标识确定用户的存储地址,将接收到的数据存储到确定的存储地址中;向数据接收接口返回接收操作结果;
    驱动接口向用户层返回来自驱动模块的操作结果,包括:数据接收接口将来自数据接收模块的接收结果返回给用户层。
  9. 根据权利要求8所述的方法,其特征在于,用户数据通道参数还包括调用的解析层的协议解析模块的标识;
    数据接收模块接收数据,包括:
    数据接收模块查询嵌入式系统是否接收到数据,在嵌入式系统接收到数据的情况下,根据协议解析模块的标识调用协议解析模块,获得协议解析模块解析数据返回的数据的目的地址数据;
    将目的地址数据与用户标识指示的用户数据通道资源数据和外设地址资源数据进行对比,在对比确定一致的情况下,将嵌入式系统接收到的数据存储到用户标识指示的用户的存储地址中。
  10. 根据权利要求8所述的方法,其特征在于,数据接收模块接收数据,包括:
    数据接收模块获取解析层的协议解析模块传递的数据目的地址数据;
    将目的地址数据与用户标识指示的用户数据通道资源数据和外设地址资源数据进行对比,在对比确定一致的情况下,将嵌入式系统接收到的数据存储到用户标识指示的用户的存储地址中。
  11. 一种嵌入式系统驱动层的实现装置,其特征在于,该装置包括多个驱动接口、以及每个驱动接口各自对应的一个驱动模块;其中,
    驱动接口用于根据来自用户层的调用,调用对应的驱动模块;向用户层返回来自驱动模块的操作结果;
    驱动模块用于根据驱动接口的调用,对外设执行相应的驱动操作,并向驱动接口返回操作结果。
  12. 根据权利要求11所述的装置,其特征在于,该装置包括一个驱动接口单元和至少一个驱动执行单元,一个驱动接口单元中包括多个驱动接口,一个驱动执行单元中包括多个驱动模块;
    驱动接口单元用于被用户层加载后,驱动接口得到用户层的调用。
  13. 根据权利要求11所述的装置,其特征在于,所述装置中保存有预设的驱动数据,驱动数据中包括为外设配置的地址参数和存储参数。
  14. 根据权利要求13所述的装置,其特征在于,驱动接口包括外设接口和用户接口,驱动模块包括外设模块和用户模块。
  15. 根据权利要求14所述的装置,其特征在于,外设接口包括初始化接口、外设模块包括初始化模块;
    初始化接口用于根据来自用户层的调用,调用对应的初始化模块;向用户层返回来自初始化模块的外设标识;
    初始化模块用于响应初始化接口的调用,对外设执行初始化操作,根据预设的驱动数据中的地址参数对外设进行地址配置、得到外设地址资源,根据预设的驱动数据中的存储参数为外设分配存储资源、得到外设存储资源;建立外设对应关系,该对应关系包括外设标识、外设地址资源数据和外设存储资源数据的对应关系,为建立的外设对应关系分配外设标识;向初始化接口返回外设标识;其中,地址参数包括IP地址和MAC地址,存储参数包括缓存地址、缓存大小和寄存器信息。
  16. 根据权利要求15所述的装置,其特征在于,用户接口包括注册接口,用户模块包括注册模块;
    注册接口用于响应来自用户层的调用、获取用户层传递的外设标识和用户数据通道参数;调用注册模块,并向注册模块传递外设标识和用户数据通道参数;将来自注册模块的用户标识返回给用户层;
    注册模块用于响应于注册接口的调用、获取外设标识和用户数据通道参数;根据外设标识确定对应的外设和外设对应关系,根据确定的外设对应关系在外设的存储资源中为用户配置用户存储资源;根据用户数据通道参数,在确定的外设上为用户配置数据通道资源;建立用户对应关系,该对应关系包括外设标识、用户数据通道资源数据和用户存储资源数据的对应关系,为建立的用户对应关系分配用户标识;向注册接口返回用户标识;其中,用户数据通道参数中包括外设的和外设端口号。
  17. 根据权利要求16所述的装置,其特征在于,用户接口包括数据发送接口,用户模块包括数据发送模块;
    数据发送接口用于响应来自用户层的调用、获取用户层传递的用户标识;调用数据发送模块,并将用户标识传递给数据发送模块;将来自数据发送模块的发送操作结果返回给用户层;
    数据发送模块用于响应数据发送接口的调用、获取数据发送模块传递的用户标识;根据用户标识确定用户的存储资源的地址,从该用户的存储地址中获取数据、通过用户的数据通道资源进行发送;向数据发送接口返回发送操作结果。
  18. 根据权利要求16所述的装置,其特征在于,用户接口包括数据接收接口,用户模块包括数据接收模块;
    数据接收接口用于响应于来自用户层的调用、获取用户层传递的用户标识;调用数据接收模块,并将用户标识传递给数据接收模块;将来自数据接收模块的接收结果返回给用户层;
    数据接收模块用于响应数据接收接口的调用、获取数据接收模块传递的用户标识;根据用户标识接收数据;根据用户标识确定用户的存储地址,将接收到的数据存储到确定的 存储地址中;向数据接收接口返回接收操作结果。
  19. 根据权利要求18所述的装置,其特征在于,用户数据通道参数还包括调用的解析层的协议解析模块的标识;
    数据接收模块接收数据,包括:数据接收模块查询嵌入式系统是否接收到数据,在嵌入式系统接收到数据的情况下,根据协议解析模块的标识调用协议解析模块,获得协议解析模块解析数据返回的数据的目的地址数据;
    将目的地址数据与用户标识指示的用户数据通道资源数据和外设地址资源数据进行对比,在对比确定一致的情况下,将嵌入式系统接收到的数据存储到用户标识指示的用户的存储地址中。
  20. 根据权利要求18所述的方法,其特征在于,数据接收模块接收数据,包括:
    数据接收模块获取解析层的协议解析模块传递的数据目的地址数据;
    将目的地址数据与用户标识指示的用户数据通道资源数据和外设地址资源数据进行对比,在对比确定一致的情况下,将嵌入式系统接收到的数据存储到用户标识指示的用户的存储地址中。
  21. 一种嵌入式系统,其特征在于,包括一种嵌入式系统驱动层实现装置,该装置包括多个驱动接口、以及每个驱动接口各自对应的一个驱动模块;其中,
    驱动接口用于根据来自用户层的调用,调用对应的驱动模块;向用户层返回来自驱动模块的操作结果;
    驱动模块用于根据驱动接口的调用,对外设执行相应的驱动操作,并向驱动接口返回操作结果。
  22. 一种片上系统,其特征在于,包括一种嵌入式系统,该嵌入式系统驱动层实现装置,该装置包括多个驱动接口、以及每个驱动接口各自对应的一个驱动模块;其中,
    驱动接口用于根据来自用户层的调用,调用对应的驱动模块;向用户层返回来自驱动模块的操作结果;
    驱动模块用于根据驱动接口的调用,对外设执行相应的驱动操作,并向驱动接口返回操作结果。
  23. 一种相机,其特征在于,包括一种片上系统,该片上系统包括一种嵌入式系统,该嵌入式系统驱动层实现装置,该装置包括多个驱动接口、以及每个驱动接口各自对应的一个驱动模块;其中,
    驱动接口用于根据来自用户层的调用,调用对应的驱动模块;向用户层返回来自驱动模块的操作结果;
    驱动模块用于根据驱动接口的调用,对外设执行相应的驱动操作,并向驱动接口返回 操作结果。
PCT/CN2019/077047 2018-12-29 2019-03-05 一种嵌入式系统驱动层的实现方法和装置 WO2020133691A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811639898.1A CN111381868B (zh) 2018-12-29 2018-12-29 一种嵌入式系统驱动层的实现方法和装置
CN201811639898.1 2018-12-29

Publications (1)

Publication Number Publication Date
WO2020133691A1 true WO2020133691A1 (zh) 2020-07-02

Family

ID=71125650

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077047 WO2020133691A1 (zh) 2018-12-29 2019-03-05 一种嵌入式系统驱动层的实现方法和装置

Country Status (2)

Country Link
CN (1) CN111381868B (zh)
WO (1) WO2020133691A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612523A (zh) * 2020-12-17 2021-04-06 威胜集团有限公司 一种嵌入式设备驱动系统及方法
CN114443115A (zh) * 2020-11-05 2022-05-06 沈阳中科博微科技股份有限公司 一种仪表构件化模型的构建方法及其可配置方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090222842A1 (en) * 2008-02-08 2009-09-03 Krishnakumar Narayanan System, method and apparatus for controlling multiple applications and services on a digital electronic device
CN102331935A (zh) * 2011-11-07 2012-01-25 广东天波信息技术股份有限公司 一种嵌入式跨系统软件开发平台
CN102830983A (zh) * 2011-06-14 2012-12-19 上海未来宽带技术及应用工程研究中心有限公司 一种可动态加载不同终端交换芯片驱动的方法
CN102968311A (zh) * 2012-12-13 2013-03-13 中国航空无线电电子研究所 机载嵌入式软件开发平台

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0581060A (ja) * 1991-09-24 1993-04-02 Tokyo Electric Co Ltd 駆動部制御装置の検査方法
CN201698602U (zh) * 2009-11-06 2011-01-05 宁波高新区阶梯科技有限公司 多媒体教学一体机
CN107329751B (zh) * 2017-06-28 2020-08-28 浪潮金融信息技术有限公司 驱动层的驱动方法及装置、计算机可读存储介质、终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090222842A1 (en) * 2008-02-08 2009-09-03 Krishnakumar Narayanan System, method and apparatus for controlling multiple applications and services on a digital electronic device
CN102830983A (zh) * 2011-06-14 2012-12-19 上海未来宽带技术及应用工程研究中心有限公司 一种可动态加载不同终端交换芯片驱动的方法
CN102331935A (zh) * 2011-11-07 2012-01-25 广东天波信息技术股份有限公司 一种嵌入式跨系统软件开发平台
CN102968311A (zh) * 2012-12-13 2013-03-13 中国航空无线电电子研究所 机载嵌入式软件开发平台

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114443115A (zh) * 2020-11-05 2022-05-06 沈阳中科博微科技股份有限公司 一种仪表构件化模型的构建方法及其可配置方法
CN112612523A (zh) * 2020-12-17 2021-04-06 威胜集团有限公司 一种嵌入式设备驱动系统及方法

Also Published As

Publication number Publication date
CN111381868A (zh) 2020-07-07
CN111381868B (zh) 2021-12-17

Similar Documents

Publication Publication Date Title
US10819538B2 (en) Method and apparatus for establishing link between virtualized network functions
US10305823B2 (en) Network interface card configuration method and resource management center
US9934057B2 (en) Shadow VNICs for the control and observability of IO virtual functions
US11960430B2 (en) Remote mapping method, apparatus and device for computing resources, and storage medium
EP3291499A1 (en) Method and apparatus for network service capacity expansion
EP3313023A1 (en) Life cycle management method and apparatus
WO2017181875A1 (zh) 虚拟化网络的部署方法和部署系统
US20080301683A1 (en) Performing an Allreduce Operation Using Shared Memory
US20160070598A1 (en) Transparent Non-Uniform Memory Access (NUMA) Awareness
US11221866B2 (en) Accelerator loading method, system, and apparatus
US10341264B2 (en) Technologies for scalable packet reception and transmission
US11416267B2 (en) Dynamic hardware accelerator selection and loading based on acceleration requirements
WO2018076882A1 (zh) 存储设备的操作方法及物理服务器
WO2020133691A1 (zh) 一种嵌入式系统驱动层的实现方法和装置
EP3629160B1 (en) Method and device for managing vnf instantiation
US10353857B2 (en) Parallel processing apparatus and method for controlling communication
KR20230069088A (ko) 컨테이너 클러스터 관리 방법 및 그 시스템
WO2020135517A1 (zh) 部署虚拟化网络功能的方法和装置
US20200021862A1 (en) Multimedia streaming and routing apparatus and operation method of the same
WO2022151386A1 (zh) 一种节点分批升级的方法、相关装置以及设备
US20220358055A1 (en) Method and apparatus for acquiring device information, storage medium and electronic device
CN111090427A (zh) 一种嵌入式系统中运行时构建usb复合设备的方法
US20240056391A1 (en) Communication method, apparatus, device, and system, and computer-readable storage medium
WO2018014356A1 (zh) 一种加载方法及装置
CN115333997A (zh) 通信方法、装置、设备、系统及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19906214

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.10.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19906214

Country of ref document: EP

Kind code of ref document: A1