Disclosure of Invention
The invention aims to provide an interface access method, an interface access system and a memory card, so as to improve the interface access efficiency.
In order to achieve the purpose, the invention provides the following technical scheme:
an interface access method, comprising:
after receiving an access request through a first type interface on a memory card, a processor on the memory card accesses a second type interface through an interface controller to realize the transmission of interactive information through the second type interface when determining that the second type interface needs to be accessed; wherein,
the interaction information comprises: control instructions, and/or, data;
the memory card directly performs data interaction with the second type interface;
the first type of interface and the second type of interface support different communication protocols.
In the above method, preferably, the accessing, by the processor, the second type of interface through the interface controller to realize the transmission of the control instruction through the second type of interface includes:
the processor sends a control instruction to a second interface controller through a first interface controller on the memory card, so that the second interface controller transmits the control instruction through the second type of interface;
the first interface controller is directly connected with the second interface controller through a bus, and the second interface controller is connected with the second type of interface.
In the method, preferably, the sending, by the processor, the control instruction to the second interface controller through the first interface controller on the memory card includes:
the processor sends a control instruction to a second interface controller on the memory card through a first interface controller on the memory card;
the first interface controller and the second interface controller are directly connected through an internal bus of the memory card, and the second interface controller is connected with the second type of interface on the memory card.
In the method, preferably, the sending, by the processor, the control instruction to the second interface controller through the first interface controller on the memory card includes:
the processor sends a control instruction to a second interface controller on the expansion card through a first interface controller on the storage card;
the first interface controller and the second interface controller are directly connected with the second interface controller on the expansion card through a bus of the first electronic device where the memory card is located, and the second interface controller is connected with the second type of interface on the expansion card.
In the above method, preferably, the accessing, by the processor, the second type of interface through the interface controller to realize the transmission of the control instruction through the second type of interface includes:
the processor sends a request for accessing the second type interface to a host central processing unit of the first electronic device where the memory card is located through the first type interface;
sending a control instruction to a second interface controller by the host central processing unit through a bus of the first electronic device so that the second interface controller transmits the control instruction through the second type of interface;
wherein the second interface controller is connected with the second type interface.
In the above method, preferably, the sending, by the host central processing unit, a control instruction to the second interface controller through the bus of the first electronic device includes:
sending a control instruction to a second interface controller on the memory card by the host central processing unit through a bus of the first electronic device;
wherein the second interface controller is connected with the second type interface on the memory card.
In the above method, preferably, the sending, by the host central processing unit, a control instruction to the second interface controller through the bus of the first electronic device includes:
sending a control instruction to a second interface controller on an expansion card by the host central processing unit through a bus of the first electronic device;
the second interface controller is connected with the second type interface on the expansion card.
In the above method, preferably, the accessing, by the processor, the second type interface through the interface controller to realize data transmission through the second type interface includes:
the processor sends a data transmission request to a host central processing unit of first electronic equipment where the memory card is located through the first type interface;
instructing, by the host central processing unit, a second interface controller to access the second class of interfaces based on a shared memory of the processor and the second interface controller;
and the data which needs to be transmitted when the processor accesses the second type interface is stored in the shared memory of the processor and the second interface controller, and the second interface controller is connected with the second type interface.
In the above method, preferably, the instructing, by the host cpu, a second interface controller to access the second type of interface based on the shared memory of the processor and the second interface controller includes:
and instructing a second interface controller on the expansion card to access the second type of interface based on the shared memory of the processor and the second interface controller by the host central processing unit.
In the above method, preferably, the instructing, by the host cpu, a second interface controller to access the second type of interface based on the shared memory of the processor and the second interface controller includes:
instructing, by the host central processing unit, a second interface controller on the memory card to access the second type of interface based on a shared memory of the processor and the second interface controller.
In the above method, preferably, the accessing, by the processor, the second type interface through the interface controller to realize data transmission through the second type interface includes:
the processor accesses a second interface controller through a first interface controller on the storage card, so that the second interface controller accesses the second type of interface based on a shared memory of the processor and the second interface controller;
and the data which needs to be transmitted when the processor accesses the second type interface is stored in the shared memory of the processor and the second interface controller.
In the above method, preferably, the accessing, by the processor, the second interface controller through the first interface controller on the memory card includes:
the processor accesses a second interface controller on the expansion card through a first interface controller on the storage card, so that the second interface controller on the expansion card accesses the second type of interface based on a shared memory of the processor and the second interface controller;
the first interface controller and the second interface controller are directly connected through a bus of the first electronic device where the memory card is located, and the second interface controller is connected with the second type of interface on the expansion card.
In the above method, preferably, the accessing, by the processor, the second interface controller through the first interface controller on the memory card includes:
the processor accesses a second interface controller on the memory card through a first interface controller on the memory card, so that the second interface controller on the memory card accesses the second type of interface based on a shared memory of the processor and the second interface controller;
the first interface controller and the second interface controller are directly connected through an internal bus of the memory card, and the second interface controller is connected with a second type of interface on the memory card.
In the above method, preferably, the accessing, by the processor, the second type interface through the interface controller to realize data transmission through the second type interface includes:
the processor directly performs data interaction with a second interface controller through a first interface controller on the memory card;
the data sent by the first interface controller to the second interface controller is read from a first memory of the processor; reading data sent to the first interface controller by the second interface controller from a second memory corresponding to the second type of interface;
the first memory and the second memory are independent memories.
In the method, preferably, the directly performing data interaction between the processor and the second interface controller through the first interface controller on the memory card includes:
the processor directly performs data interaction with a second interface controller on the memory card through a first interface controller on the memory card;
the second interface controller on the memory card is connected with the second type of interface on the memory card;
the first interface controller on the memory card is directly connected with the second interface controller on the memory card through an internal bus of the memory card;
the first memory and the second memory both belong to the memory card.
In the method, preferably, the directly performing data interaction between the processor and the second interface controller through the first interface controller on the memory card includes:
the processor directly performs data interaction with a second interface controller on the expansion card through a first interface controller on the storage card; the first memory on the memory card is connected with the processor;
the second interface controller on the expansion card is respectively connected with the second type of interface on the expansion card and a second memory on the expansion card;
and the first interface controller on the storage card is directly connected with the second interface controller on the expansion card through a bus of the first electronic device where the storage card is located.
Preferably, in the above method, the second type interface is an USB OTG interface, and the method further includes:
if the host of the first electronic device where the memory card is located is dormant, when the second type of interface is externally connected with a second electronic device, the second electronic device is a master device, and the first electronic device is a slave device, the second electronic device can supply power to a bus of the first electronic device, and the memory card is accessed through the second type of interface.
A memory card, comprising:
the system comprises a processor, a first interface, a third interface controller, a second interface and a second interface controller; wherein,
the processor is connected with the first type interface through the third interface controller;
the second interface controller is connected with the second type interface;
the processor is used for sending a request for accessing the second type interface to a host central processing unit of the first electronic equipment where the memory card is located through the first type interface when the second type interface is determined to be required to be accessed after receiving the access request through the first type interface; sending a control instruction to the second interface controller by the host central processing unit through a bus of the first electronic device so that the second interface controller accesses the second type of interface to realize transmission of interactive information through the second type of interface; the interaction information comprises: control instructions, and/or, data;
and the data which needs to be transmitted when the processor accesses the second type interface is stored in the shared memory of the processor and the second interface controller.
A memory card, comprising:
the system comprises a processor, a first type interface, a third interface controller, a first interface controller, a second interface controller and a second type interface; wherein,
the processor is connected with the first type interface through the third interface controller;
the first interface controller is connected with the processor;
the second interface controller is respectively connected with the first interface controller and the second type interface; the first interface controller is connected with the second interface controller through an internal bus of the memory card;
the processor is used for sending a control instruction to a second interface controller through the first interface controller when determining that the second interface needs to be accessed after receiving an access request through the first interface, and accessing the second interface through the second interface controller to realize the transmission of the interactive information through the second interface; the interaction information comprises: control instructions, and/or, data;
and the processor accesses the interactive information which needs to be transmitted by the second type of interface and transmits the interactive information through the first interface controller and the second interface controller.
An interface access system, comprising: a memory card and an expansion card; wherein,
the memory card includes: the processor, the third interface controller and the first type interface;
the expansion card includes: a second type interface and a second interface controller;
the processor is connected with the first type interface through the third interface controller;
the processor is used for sending a request for accessing the second type interface to a host central processing unit of the first electronic equipment where the memory card is located through the first type interface when the second type interface is determined to be required to be accessed after receiving the access request through the first type interface; sending a control instruction to the second interface controller by the host central processing unit through a bus of the first electronic device so that the second interface controller accesses the second type of interface to realize transmission of interactive information through the second type of interface; the interaction information comprises: control instructions, and/or, data;
and the data which needs to be transmitted when the processor accesses the second type interface is stored in the shared memory of the processor and the second interface controller.
An interface access system, comprising: a memory card and an expansion card; wherein,
the memory card includes: the first interface controller is connected with the first type of interface;
the expansion card includes: a second type interface and a second interface controller;
the processor is connected with the first type interface through the third interface controller;
the first interface controller is connected with the second interface controller through a bus of the first electronic equipment where the memory card is located;
the processor is used for sending a control instruction to a second interface controller through the first interface controller when determining that the second interface needs to be accessed after receiving an access request through the first interface, and accessing the second interface through the second interface controller to realize the transmission of the interactive information through the second interface; the interaction information comprises: control instructions, and/or data.
In the above system, preferably, the processor and the second interface controller share a memory;
the processor accesses the data which needs to be transmitted by the second type interface and stores the data in the shared memory of the processor and the second interface controller;
and the processor accesses the control instruction which needs to be transmitted by the second type of interface, sends the control instruction to the second interface controller through the first interface controller, and sends the control instruction to the second type of interface through the second interface controller.
In the above system, preferably, the processor accesses the interactive information to be transmitted by the second type of interface, and transmits the interactive information through the first interface controller and the second interface controller;
the data sent by the first interface controller to the second interface controller is read from a first memory of the processor; reading data sent to the first interface controller by the second interface controller from a second memory corresponding to the second type of interface;
the first memory and the second memory are independent memories.
According to the above scheme, other interfaces can be integrated on the memory card or the expansion card of the memory card, and when the memory card accesses other interfaces and needs to transmit data, the transmitted data does not need to pass through the memory of the host, so that when the memory card accesses other interfaces, the data does not need to be moved to the memory of the host any more, that is, the memory card directly performs data interaction with other interfaces, thereby improving the interface access efficiency.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
The invention provides a method for a memory card to access other interfaces of different types from a memory card interface. The memory card may be a PCIE (PCI-Express) memory card. The interface on a PCIE memory card is typically a PCIE interface. The other interfaces may be Universal Serial Bus (USB) interfaces or High Definition Multimedia Interface (HDMI) interfaces.
The interface access method provided by the embodiment of the invention can comprise the following steps:
after a processor (Micro Control Unit, MCU) on the memory card receives an access request through a first type interface on the memory card, when the processor determines that a second type interface needs to be accessed, the processor accesses the second type interface through an interface controller so as to realize the transmission of interactive information through the second type interface; wherein,
the interactive information comprises: control instructions, and/or, data; the control instruction may be a read instruction, a write instruction, a delete instruction, and so on.
The memory card directly performs data interaction with the second type interface;
the first type of interface and the second type of interface support different communication protocols.
In the embodiment of the present invention, at least one interface controller matching with the second type interface is required, and the second type interface is connected with one interface controller of the at least one interface controller matching with the second type interface. For example, if the second type interface is a USB interface, the interface controller matching the second type interface is a USB controller or a USB HUB controller. If the second type of interface is an HDMI interface, the interface controller matched with the second type of interface is an HDMI controller.
The second type of interface may be integrated directly on the memory card or on a card that is an expansion card of the memory card.
For convenience of description, the electronic device where the memory card is located is referred to as a first electronic device, and a Central Processing Unit (CPU) (hereinafter, the CPU is simply referred to as the CPU) of the first electronic device is connected to the memory card and other components through a bus.
The access request received by the processor on the memory card may be an access request sent by the host CPU, and the access request may be an access request requesting access to the memory card, or an access request requesting access to the second type of interface, or of course, an access request requesting access to both the memory card and the second type of interface.
When the access request is an access request requesting access to the memory card, it may be determined that access to the second type interface is required if the accessed data is not on the memory card but on a device to which the second type interface is connected. In the embodiment of the invention, the memory card directly performs data interaction with the second type interface, that is, when the processor on the memory card needs to transmit data through the second type interface, the data to be transmitted does not pass through the host CPU of the electronic device where the memory card is located.
The control instruction transmitted by the processor through the second type interface may pass through the host CPU of the electronic device where the memory card is located, or may not pass through the host CPU of the electronic device where the memory card is located.
According to the interface access method provided by the embodiment of the invention, when the memory card accesses other interfaces and needs to transmit data, the transmitted data does not need to pass through the memory of the host, so that the memory card does not need to move the data to the memory of the host when accessing other interfaces, namely, the memory card directly performs data interaction with other interfaces, thereby improving the interface access efficiency.
Even if the control instruction is transmitted by the host CPU, the bit quantity used by the control instruction is far smaller than the bit quantity occupied by the data, so that the interface access efficiency is greatly improved compared with the method for accessing the interface in the prior art.
Optionally, the processor (MCU) accesses the second type of interface through the interface controller, and one implementation manner for implementing transmission of the control instruction through the second type of interface may be:
the processor (MCU) sends a control instruction to the second interface controller through the first interface controller on the memory card, so that the second interface controller transmits the control instruction through the second type of interface; the first interface controller is directly connected with the second interface controller through a bus, and the second interface controller is connected with the second type of interface.
In the embodiment of the invention, the processor accesses the second type interface through two interface controllers matched with the second type interface. A first interface controller is integrated on the memory card. And the second interface controller may be integrated on the memory card or on an expansion card separate from the memory card. The expansion card and the memory card are mutually independent, which means that the expansion card and the memory card can be physically separated from each other.
Optionally, one implementation manner in which the processor (MCU) sends the control instruction to the second interface controller through the first interface controller on the memory card may be:
the processor (MCU) sends a control instruction to the second interface controller on the memory card through the first interface controller on the memory card. The first interface controller and the second interface controller are directly connected through an internal bus of the memory card.
In the embodiment of the present invention, the second interface controller is also integrated on the memory card, and correspondingly, the second type interface is also integrated on the memory card.
Optionally, another implementation manner in which the processor (MCU) sends the control instruction to the second interface controller through the first interface controller on the memory card may be:
and the processor (MCU) sends a control instruction to the second interface controller on the expansion card through the first interface controller on the storage card. The first interface controller and the second interface controller are directly connected with the second interface controller on the expansion card through a bus of the first electronic device where the storage card is located.
In the embodiment of the invention, the second interface controller is integrated on the expansion card which is independent from the storage card. Correspondingly, the second type interface is also integrated on the expansion card.
Optionally, the processor (MCU) accesses the second type of interface through the interface controller, and another implementation manner for implementing transmission of the control instruction through the second type of interface may be:
a processor (MCU) sends a request for accessing a second type interface to a host CPU of first electronic equipment where a memory card is positioned through the first type interface;
and sending a control command to the second interface controller by the host CPU through the bus of the first electronic device so that the second interface controller transmits the control command through the second type of interface.
In the embodiment of the invention, the control instruction is generated by the host CPU based on the request for accessing the second type interface. The processor (MCU) accesses the second type interface through an interface controller matched with the second type interface.
Optionally, one implementation manner of sending the control instruction to the second interface controller by the host CPU through the bus of the first electronic device may be:
sending a control instruction to a second interface controller on the memory card by a host CPU through a bus of the first electronic device;
in the embodiment of the invention, the second interface controller is integrated on the memory card, correspondingly, the second type of interface is also integrated on the memory card, and the second interface controller is connected with the second type of interface on the memory card.
Optionally, another implementation manner in which the host CPU sends the control instruction to the second interface controller through the bus of the first electronic device may be:
sending a control instruction to a second interface controller on the expansion card by a host CPU through a bus of the first electronic equipment;
in the embodiment of the invention, the second interface controller is integrated on the expansion card, correspondingly, the second type of interface is also integrated on the expansion card, and the second interface controller is connected with the second type of interface on the expansion card.
In the above embodiment, the first interface controller and the second interface controller are both interface controllers matched with the second type of interface.
The transmission method of the control command when the processor (MCU) on the memory card accesses the second type of interface is described above, and the transmission method of the data when the processor (MCU) on the memory card accesses the second type of interface is described below.
Optionally, the processor (MCU) accesses the second type of interface through the interface controller, and one implementation manner for implementing data transmission through the second type of interface may be:
a processor (MCU) sends a data transmission request to a host CPU of first electronic equipment where a memory card is located through a first type interface;
instructing, by the host CPU, the second interface controller to access the second type of interface based on a shared memory of the processor (MCU) and the second interface controller;
and the data which needs to be transmitted when the processor (MCU) accesses the second type interface is stored in a shared memory of the processor (MCU) and a second interface controller, and the second interface controller is connected with the second type interface.
For example, when the processor (MCU) needs to transmit data to the second type interface, the processor (MCU) stores the data in the shared memory of the processor (MCU) and the second interface controller, and sends a request to the host CPU to transmit the data to the second type interface, and the host CPU instructs the second interface controller to read the data from the shared memory and transmit the data to the second type interface. Similarly, when the processor (MCU) needs to read data from the second type interface, a request for reading data from the second type interface is sent to the host CPU, the host CPU instructs the second type interface to read data from the second type interface, the second interface controller reads data from the second type interface and stores the read data in the shared memory, the second interface controller sends a response to the host CPU, and the host CPU instructs the processor (MCU) to read data from the shared memory.
Optionally, an implementation manner of instructing, by the host CPU, the second interface controller to access the second type of interface based on a shared memory of the processor (MCU) and the second interface controller may be:
and instructing a second interface controller on the expansion card to access the second type interface based on the shared memory of the processor (MCU) and the second interface controller by the CPU of the host.
Optionally, another implementation manner of instructing, by the host CPU, the second interface controller to access the second type of interface based on a shared memory of the processor (MCU) and the second interface controller may be:
instructing, by the host CPU, a second interface controller on the memory card to access the second type of interface based on a shared memory of a processor (MCU) and the second interface controller.
In the embodiment of the invention, the second interface controller can be integrated on the memory card, and correspondingly, the second type of interface is also integrated on the memory card; the second interface controller may also be integrated on the expansion card, and correspondingly, the second type of interface is also integrated on the expansion card.
Optionally, the processor (MCU) accesses the second type of interface through the interface controller, and another implementation manner for implementing data transmission through the second type of interface may be:
the processor (MCU) accesses the second interface controller through the first interface controller on the memory card, so that the second interface controller accesses the second type interface based on the shared memory of the processor (MCU) and the second interface controller. And the data which needs to be transmitted when the processor (MCU) accesses the second type interface is stored in the shared memory of the processor (MCU) and the second interface controller.
In the embodiment of the invention, the control instruction and data which need to be transmitted when the processor (MCU) accesses the second type interface are transmitted through the first interface controller and the second interface controller.
For example, when a processor (MCU) needs to transmit data to the second type of interface, the data is stored in a shared memory of the processor (MCU) and the second interface controller, and then a first instruction is sent to the second interface controller through the first interface controller to instruct the second interface controller to read the data from the shared memory and send the data to the second type of interface; similarly, when the processor (MCU) needs to read data from the second type of interface, the first interface controller sends a second instruction to the second interface controller to instruct the second interface controller to read data from the second type of interface and store the data in the shared memory, the second interface controller sends a response to the first interface controller after storing the data read from the second type of interface in the shared memory, and the first interface controller reads data from the shared memory.
Optionally, one implementation way for the processor (MCU) to access the second interface controller through the first interface controller on the memory card may be:
and the processor (MCU) accesses the second interface controller on the expansion card through the first interface controller on the storage card, so that the second interface controller on the expansion card accesses the second type of interface based on the shared memory of the processor (MCU) and the second interface controller.
The first interface controller and the second interface controller are directly connected through a bus of the first electronic device where the memory card is located, and the second interface controller is connected with the second type of interface on the expansion card.
Optionally, another implementation manner in which the processor (MCU) accesses the second interface controller through the first interface controller on the memory card may be:
the processor (MCU) accesses the second interface controller on the memory card through the first interface controller on the memory card, so that the second interface controller on the memory card accesses the second type of interface based on the shared memory of the processor (MCU) and the second interface controller.
The first interface controller is directly connected with the second interface controller through an internal bus of the memory card, and the second interface controller is connected with a second type of interface on the memory card.
In the embodiment of the invention, the second interface controller can be integrated on the memory card, and correspondingly, the second type of interface is also integrated on the memory card; the second interface controller may also be integrated on the expansion card, and correspondingly, the second type of interface is also integrated on the expansion card.
Optionally, the processor (MCU) accesses the second type of interface through the interface controller, and another implementation manner for implementing data transmission through the second type of interface may be:
the processor (MCU) directly carries out data interaction with the second interface controller through the first interface controller on the memory card;
the data sent by the first interface controller to the second interface controller is read from a first memory of a processor (MCU); the data sent to the first interface controller by the second interface controller is read from a second memory corresponding to the second type of interface;
the first memory and the second memory are independent memories.
In the embodiment of the invention, the processor (MCU) and the second interface controller do not share the memory, but use mutually independent memories.
That is, when data needs to be transmitted to the second type of interface, the data is read from an exclusive memory of a processor (MCU), and then sent to the second type of interface through the first interface controller and the second interface controller; when data is required to be read from the second type interface, the second interface controller reads the data from the second type interface, stores the data into an exclusive memory of the second interface controller, reads the data from the exclusive memory of the second interface controller, and sends the data to a processor (MCU) through the second interface controller and the first interface controller.
For example, when a processor (MCU) needs to transmit data to the second type of interface, the processor (MCU) reads data from the first memory, sends the data to the second interface controller through the first interface controller, stores the data in the second memory by the second interface controller, and then reads the data from the second memory and transmits the data to the second type of interface; similarly, when the processor (MCU) needs to read data from the second type of interface, the processor (MCU) sends a control command to the second interface controller through the first interface controller to instruct the second interface to read data from the second type of interface, the second type of interface controller stores the data read from the second type of interface into the second memory, and then after reading the data from the second memory, the data is transmitted to the first interface controller through the second interface controller, and the first interface controller stores the received data into the first memory.
Optionally, an implementation manner that the processor (MCU) directly performs data interaction with the second interface controller through the first interface controller on the memory card may be:
the processor (MCU) directly carries out data interaction with the second interface controller on the storage card through the first interface controller on the storage card;
the second interface controller on the storage card is connected with the second type of interface on the storage card;
the first interface controller on the memory card is directly connected with the second interface controller on the memory card through the internal bus of the memory card;
the first memory and the second memory both belong to memory cards.
Optionally, another implementation manner in which the processor (MCU) directly performs data interaction with the second interface controller through the first interface controller on the memory card may be:
the processor directly performs data interaction with a second interface controller on the expansion card through a first interface controller on the storage card; the first memory on the memory card is connected with the processor;
the second interface controller on the expansion card is respectively connected with the second type interface on the expansion card and the second memory on the expansion card;
the first interface controller on the storage card is directly connected with the second interface controller on the expansion card through a bus of the first electronic device where the storage card is located.
In the embodiment of the invention, the second interface controller can be integrated on the memory card, and correspondingly, the second type of interface is also integrated on the memory card; the second interface controller may also be integrated on the expansion card, and correspondingly, the second type of interface is also integrated on the expansion card.
Optionally, the second type of interface may be an USB OTG interface, and the interface access method provided in the embodiment of the present invention may further include:
if the host of the first electronic device where the memory card is located is dormant, when the second type of interface is externally connected with the second electronic device, the second electronic device is a master device, and the first electronic device is a slave device, the second electronic device can supply power to a bus of the first electronic device, and the memory card is accessed through the second type of interface.
In the embodiment of the invention, when the host of the first electronic device in which the memory card is located is in a sleep state, the second type interface is externally connected with the second electronic device, the second electronic device is a master device, and the first electronic device is a slave device, the memory card can be used as an externally connected U disk of the second electronic device.
Corresponding to the method embodiment, the embodiment of the invention also provides a memory card. Referring to fig. 1, fig. 1 is a schematic structural diagram of a memory card according to an embodiment of the present invention, which may include:
a processor 11, a first interface type 12, a third interface controller 13, a second interface type 14 and a second interface controller 15; wherein,
the processor 11 is connected with the first type interface 12 through a third interface controller 13; the third interface controller 13 is an interface controller matching the first type of interface 12.
The second interface controller 15 is connected with the second type interface 14;
the first type of interface 12 supports a first communication protocol and the second type of interface 14 supports a second communication protocol.
The processor 11 is configured to, after receiving the access request through the first type interface 12, send a request for accessing the second type interface 14 to a host CPU of the first electronic device where the memory card is located through the first type interface 12 when determining that the second type interface 14 needs to be accessed; sending a control instruction to the second interface controller 15 by the host CPU through the bus of the first electronic device, so that the second interface controller 15 accesses the second type of interface 14, and implementing transmission of the interactive information through the second type of interface 14, where the interactive information includes: control instructions, and/or, data; the data that needs to be transmitted when the processor 11 accesses the second type interface is stored in the shared memory of the processor 11 and the second interface controller 15.
In this embodiment of the present invention, when the processor 11 needs to transmit data to the second type interface 14, the processor 11 stores the data in a shared memory between the processor 11 and the second interface controller 15, and sends a request for transmitting the data to the second type interface to the host CPU, and the host CPU instructs the second interface controller 15 to read the data from the shared memory and transmit the data to the second type interface 14. Similarly, when the processor 11 needs to read data from the second type interface 14, a request for reading data from the second type interface 14 is sent to the host CPU, the host CPU instructs the second interface controller 15 to read data from the second type interface 14, after the second interface controller 15 reads data from the second type interface 14, the read data is stored in the shared memory, the second interface controller 15 sends a response to the host CPU, and the host CPU instructs the processor 11 to read data from the shared memory.
In the embodiment of the present invention, the control command is generated by the CPU, and the data is transmitted through the shared memory of the processor 11 and the second interface controller 15.
The host CPU can directly access the second type of interface 14 based on the second communication protocol in addition to the first type of interface 12 based on the first communication protocol.
It should be noted that, when the second-type interface 14 is an HDMI interface, the memory card provided in the embodiment of the present invention may further include: and the audio/video decoder is connected with the processor 11 and is used for decoding the data needing to be transmitted through the HDMI interface.
Because the HDM interface is used for transmitting audio or video, the data needs to be decoded before being output through the HDMI interface, and the traditional interface access process needs a decoder of a host computer.
Another schematic structural diagram of the memory card provided in the embodiment of the present invention is shown in fig. 2, and may include:
a processor 21, a first type interface 22, a third interface controller 23, a first interface controller 24, a second interface controller 25 and a second type interface 26; wherein,
the processor 21 is connected with the first type interface 22 through a third interface controller 23;
the first interface controller 24 is connected with the processor 21;
the second interface controller 25 is respectively connected with the first interface controller 24 and the second type interface 26;
the first interface controller 24 and the second interface controller 25 are connected via an internal bus of the memory card;
the processor 21 is configured to, after receiving the access request through the first-type interface 22 and determining that the second-type interface 26 needs to be accessed, send a control instruction to the second interface controller 25 through the first interface controller 24, and enable the second interface controller 25 to access the second-type interface 26, so as to implement transmission of the interaction information through the second-type interface 26, where the interaction information includes: control instructions, and/or, data; the mutual information that the processor 21 needs to transmit for accessing the second type interface 26 is transmitted via the first interface controller 24 and the second interface controller 25.
In the embodiment of the present invention, the control command and the data may be transmitted through the first interface controller 24 and the second interface controller 25.
In the embodiment of the present invention, the processor 21 and the second interface controller 25 may or may not share the memory. The memory is not shown.
When the processor 21 and the second interface controller 25 share the memory, data may be transmitted not through the first interface controller 24 and the second interface controller 25 but through the shared memory.
It should be noted that, when the second-type interface 26 is an HDMI interface, the memory card provided in the embodiment of the present invention may further include: and the audio/video decoder is connected with the processor 21 and is used for decoding the data needing to be transmitted through the HDMI interface.
Because the HDM interface is used for transmitting audio or video, the data needs to be decoded before being output through the HDMI interface, and the traditional interface access process needs a decoder of a host computer.
Corresponding to the method embodiment, an embodiment of the present invention further provides an interface access system, and a schematic structural diagram of the interface access system provided in the embodiment of the present invention is shown in fig. 3, and may include:
a memory card 31 and an expansion card 32; wherein,
the memory card 31 includes: a processor 311, a third interface controller 312 and a first type interface 313;
the expansion card 32 includes: a second-type interface 321 and a second interface controller 322;
the processor 311 is connected with the first type interface 313 through the third interface controller 312;
the processor 311 is configured to, after receiving the access request through the first type interface 313 and determining that the second type interface 321 needs to be accessed, send a request for accessing the second type interface 321 to a host CPU of the first electronic device where the memory card 31 is located through the first type interface 313, and send a control instruction to the second type interface controller 322 through a bus of the first electronic device by the host CPU, so that the second type interface 321 is accessed by the second type interface controller 322, so as to implement transmission of the interaction information through the second type interface 321, where the interaction information includes: control instructions, and/or, data; the data that needs to be transferred when the processor 311 accesses the second type interface 321 is stored in the shared memory of the processor 311 and the second interface controller 322.
In the embodiment of the present invention, the control instruction that needs to be transmitted when the processor 311 accesses the second type interface 321 is generated by the host CPU, and the data that needs to be transmitted when the processor 311 accesses the second type interface 321 is transmitted through the shared memory.
It should be noted that, when the second-type interface 321 is an HDMI interface, the memory card 31 provided in the embodiment of the present invention may further include: and an audio/video decoder connected to the processor 311 for decoding data to be transmitted through the HDMI interface.
Because the HDM interface is used for transmitting audio or video, the data needs to be decoded before being output through the HDMI interface, and the traditional interface access process needs a decoder of a host computer.
Another schematic structural diagram of the interface access system provided in the embodiment of the present invention is shown in fig. 4, and may include:
a memory card 41 and an expansion card 42; wherein,
the memory card 41 includes: a processor 411, a third interface controller 412, a first type interface 413 and a first interface controller 414;
the expansion card 42 includes: a second type interface 421 and a second interface controller 422;
the processor 411 is connected to the first type interface 413 through the third interface controller 412;
the first interface controller 414 and the second interface controller 422 are connected via a bus of the first electronic device in which the memory card 41 is located;
the processor 411 is configured to, after receiving the access request through the first-type interface 413 and determining that access to the second-type interface 421 is needed, send a control instruction to the second interface controller 422 through the first interface controller 414, and enable the second interface controller 422 to access the second-type interface 421, so as to implement transmission of the interaction information through the second-type interface 421, where the interaction information includes: control instructions, and/or data.
Optionally, the processor 411 and the second interface controller 422 may share a memory, and the data that needs to be transmitted when the processor 411 accesses the second type interface 421 is stored in the shared memory of the processor 411 and the second interface controller 422;
the control command that needs to be transmitted when the processor 411 accesses the second type interface 421 is sent to the second interface controller 422 through the first interface controller 414, and the second interface controller 422 sends the control command to the second type interface 421. I.e. control commands are sent to the second type of interface 421 via the first interface controller 414 and the second interface controller 422.
Alternatively, the processor 411 and the second interface controller 422 may not share a memory, that is, the processor 411 and the second interface controller 422 have memories used independently. The processor accesses the interactive information which needs to be transmitted by the second type of interface and transmits the interactive information through the first interface controller and the second interface controller; wherein, the data sent from the first interface controller 414 to the second interface controller 422 is read from the first memory of the processor 411; the data sent by the second interface controller 422 to the first interface controller 414 is read from the second memory corresponding to the second type interface 421; the first memory and the second memory are independent of each other.
It should be noted that, when the second-type interface 421 is an HDMI interface, the memory card 41 provided in the embodiment of the present invention may further include: and an audio/video decoder connected to the processor 411 for decoding data to be transmitted through the HDMI interface.
Because the HDM interface is used for transmitting audio or video, the data needs to be decoded before being output through the HDMI interface, and the traditional interface access process needs a decoder of a host computer.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the memory card and the system described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.