Control system for USB slave device data transmission and reception RAM
Through the shared mode USB-RAM structure and dynamic configuration control system, the problem of low USB-RAM space utilization is solved, and the satisfaction of different types of transmission requirements and efficient utilization of resources is achieved.
Patent Information
- Application Number
- CN202411884316.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-01
AI Technical Summary
In the existing USB-RAM design, some RAM space is almost not used due to the different endpoints being transmitted at the same time, resulting in increased chip area and power consumption.
The USB-RAM structure adopts a shared mode, including USB-RX-FIFO, USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO, dynamically configures the RAM size and starting address through the control system to meet different types of transmission needs.
It achieves the satisfaction of different types of transmission requirements, improves the utilization rate of USB-RAM, reduces chip area and power consumption, and reduces production costs.
Smart Images

Figure CN119739669A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of USB 2.0 communication modules, in particular to a control system for receiving and transmitting RAM data from a USB slave device. Background Art
[0002] When designing the USB-RAM used for data transmission and reception, Universal Serial Bus (USB) as a communication bus often needs to consider many factors, one of the most important factors is the depth of USB-RAM. For non-storage USB chips, the size of USB-RAM is not only related to the size design of the entire chip, but also has a great impact on the power consumption of the entire chip. Therefore, adopting a reasonable USB-RAM design structure is extremely important to improve the area utilization of a single chip and reduce the chip production cost and use cost.
[0003] According to the USB 2.0 protocol description, a USB device can be configured with multiple endpoints, and each endpoint can be configured with different functions, that is, each endpoint needs to have a corresponding EP-RAM. In addition, according to the USB 2.0 protocol description, USB has four different types of data transmission, including control transmission, bulk transmission, interrupt transmission and synchronous transmission. Among them, control transmission and bulk transmission are non-periodic transmissions and need to use the corresponding non-periodic FIFO, while interrupt transmission and synchronous transmission are periodic transmissions and need to use the corresponding periodic FIFO. When a USB device is designed with multiple endpoints with different functions, the structural design of USB-RAM is extremely important. For non-storage USB devices, USB-RAM must not only meet the needs of different endpoints for different types of data transmission, but also try to improve the utilization rate of USB-RAM.
[0004] When designing USB-RAM, common USB 2.0 devices use a separate RAM for each endpoint. Considering the amount of data to be transmitted (according to the USB 2.0 protocol, the maximum amount of data to be transmitted simultaneously is 1K-Byte), the size is usually designed to be slightly larger than 1K-Byte. Although this design meets the needs of four different types of data transmission, in the actual data transmission process, not all endpoints transmit at the same time, that is, some RAM space is almost never used, and these RAM spaces that are rarely or almost never used will not only occupy a certain chip area, but also generate certain power consumption.
[0005] Therefore, the existing demand is not met, and we propose a control system for USB slave device data transceiver RAM. Summary of the invention
[0006] The purpose of the present invention is to provide a control system for a USB slave device data receiving and sending RAM. Through a shared mode USB-RAM structure, different types of transmission requirements can be realized, and the maximum space required for each type of transmission can be met, ensuring that the transmission data can be correctly sent and received and that the communication is normal. The control system of the shared mode USB-RAM can also be used to realize data transmission at multiple endpoints of the same USB slave device, thereby satisfying that a USB device can have multiple endpoints with different functions, solving the problems raised in the above-mentioned background technology.
[0007] To achieve the above object, the present invention provides the following technical solution: a control system for receiving and sending data from a USB slave device to a RAM, comprising a RAM structure and a control system, wherein the RAM structure is used for receiving and sending data from a USB slave device, and the control system is used for a user to set the RAM structure, wherein: The RAM structure includes USB-RX-FIFO, USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO, USB-RX-FIFO is used to receive data, USB-NON-PRIC-TX-FIFO is used to send non-periodic data, and USB-PRIC-TX-FIFO is used to send periodic data; The control system includes parsing and classifying received USB-HOST data request packets and data packets and supports user acquisition, and also supports user configuration of RAM size.
[0008] Furthermore, all endpoints of the USB slave device use USB-RX-FIFO to receive data, including receiving control transfer data packets, bulk transfer data packets, interrupt transfer data packets, synchronous transfer data packets and data requests, where the data request is the USB enumeration process and transfer request packet.
[0009] Furthermore, the user decides the settings of USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO according to whether the USB device supports bulk transfer, interrupt transfer and isochronous transfer functions, wherein all USB slave device endpoints supporting bulk transfer use USB-NON-PRIC-TX-FIFO, and all USB slave device endpoints supporting interrupt transfer and isochronous transfer use USB-PRIC-TX-FIFO.
[0010] Furthermore, the control system uses endpoint 0 as a control endpoint based on the USB 2.0 protocol, and the control system uses endpoint 0 for all control transmissions.
[0011] Furthermore, the control system classifies and analyzes the received enumeration information packets and data transmission request packets, and the user obtains the specific operation initiated by the current USB-HOST through the classification and analysis.
[0012] Further, the user sets the RAM structure through the control system, including setting the size of the USB-RX-FIFO, USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO according to the transmission requirements; It also includes setting a certain endpoint in the USB slave device to use or not use USB-NON-PRIC-TX-FIFO or USB-PRIC-TX-FIFO to send periodic data or non-periodic data.
[0013] Furthermore, the user resets the size of USB-RX-FIFO and USB-PRIC-TX-FIFO by obtaining the USB-HOST operation request, wherein when the USB slave device supports synchronous transmission, the user appropriately reduces the size of USB-RX-FIFO and appropriately increases the size of USB-PRIC-TX-FIFO.
[0014] Furthermore, the settings of USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO also include the settings of the starting addresses of USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO. The user chooses to control the default settings of the system, or sets them according to user needs.
[0015] Furthermore, when the USB slave device performs a synchronous data transmission and reception, the user first sets the size of the USB-RX-FIFO through the control system. After the reception is completed, the user resets the size of the USB-RX-FIFO and the starting address and size of the USB-PRIC-TX-FIFO through the control system.
[0016] Furthermore, the control system uses the starting address of the USB-RAM as the starting address of the receiving USB-RX-FIFO, and stores all transmission requests or data received from the USB slave device to the USB-HOST end in the USB-RX-FIFO. The control system configures the size of the USB-RX-FIFO according to actual needs by the user, and automatically calculates and sets the starting address of the non-periodic sending USB-NON-PRIC-TX-FIFO according to the configuration value.
[0017] Compared with the prior art, the present invention has the following beneficial effects: The RAM structure of the present invention includes a USB-RX-FIFO for receiving data, a USB-NON-PRIC-TX-FIFO for supporting the sending of non-periodic data, and a USB-PRIC-TX-FIFO for sending periodic data, so as to adapt to two different types of transmission requirements, namely, non-periodic transmission and periodic transmission. Different types of transmission requirements are realized through the shared mode USB-RAM structure, and the maximum space required for each type of transmission is also met, ensuring that the transmission data can be correctly sent and received and the communication is normal. At the same time, through the control system of the shared mode USB-RAM, the user can configure the size and starting address of different types of FIFOs in the USB-RAM as needed, which can not only ensure that the space is sufficient for the current data transmission, but also improve the low utilization rate of the USB-RAM space, and can also realize that multiple endpoints of the same USB slave device can perform data transmission, satisfying that a USB device can have multiple endpoints with different functions. Based on the above design, the size of the USB-RAM can be reduced, the area occupied by the chip can be reduced, and the chip power consumption and chip production cost can also be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a structural diagram of the USB-RAM of the present invention; Figure 1 -a is a USB-RAM executable structure diagram of the present invention; Figure 1 -b and Figure 1 -c is a schematic diagram of a configurable USB-RAM with different structures according to the present invention; Figure 2 A comparison diagram of the USB-RAM structure of the present invention and a common USB-RAM structure; Figure 2 -a is a schematic diagram of a common USB-RAM structure; Figure 2 -b is a schematic diagram of the USB-RAM structure of the present invention; Figure 3 It is a control system and operation diagram of the present invention. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] In order to solve the technical problem that in the actual data transmission process of the prior art, not all endpoints transmit at the same time, that is, some RAM space is almost never used, and these little or almost unused RAM spaces will not only occupy a certain chip area, but also generate a certain amount of power consumption, please refer to Figure 1-Figure 3 , this embodiment provides the following technical solutions: A control system for receiving and sending data from a USB slave device to a RAM, including a RAM structure and a control system. The RAM structure is used for receiving and sending data from a USB slave device, and the control system is used for a user to set the RAM structure, wherein: The RAM structure includes USB-RX-FIFO, USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO; USB-RX-FIFO is used to receive data. It can receive and extract data from USB slave devices at a very fast speed, ensuring the efficiency and accuracy of the receiving process; USB-NON-PRIC-TX-FIFO is used to send non-periodic data. It can effectively organize and package the non-periodic data to be sent, and then send it through the USB bus. The main features of USB-NON-PRIC-TX-FIFO are high efficiency and low latency, which can ensure that when sending non-periodic data, the data transmission speed and stability can be effectively guaranteed; USB-PRIC-TX-FIFO is used to send periodic data. It can pre-process and package the periodic data to be sent, and then send it through the USB bus at the appropriate time. The main feature of USB-PRIC-TX-FIFO is the precise control and efficient use of periodic data, which can ensure that the accuracy and real-time performance of the data can be effectively guaranteed when sending periodic data. The control system includes parsing and classifying received USB-HOST data request packets and data packets and supports user acquisition, and also supports user configuration of RAM size so as to adjust the RAM size according to actual needs, so that users can make corresponding adjustments according to their own needs during use, thereby improving the flexibility and operability of the system.
[0021] The technical effect of the above content is: the RAM structure includes a USB-RX-FIFO for receiving data, a USB-NON-PRIC-TX-FIFO for supporting the sending of non-periodic data, and a USB-PRIC-TX-FIFO for sending periodic data. By providing a shared mode USB-RAM structure, it can adapt to two different types of transmission requirements, non-periodic transmission and periodic transmission, so as to realize different types of transmission requirements and meet the maximum space required for each type of transmission at a time, ensuring that the transmission data can be correctly sent and received and the communication is normal. The control system includes parsing and classifying the received USB-HOST data request packet and data packet and supports user acquisition, and also supports the user to configure the RAM size. By providing a shared mode USB-RAM control system, multiple endpoints of the same USB slave device can all perform data transmission, meeting the requirement that a USB device can have multiple endpoints with different functions. Moreover, by configuring the size and starting address of different types of FIFOs in the USB-RAM on demand through the control system, it can not only ensure that the space is sufficient for the current data transmission, but also solve the problem of low USB-RAM space utilization. Based on the above design, the size of the USB-RAM is reduced and the area occupied by the chip is reduced, which has important economic significance for reducing chip power consumption and reducing chip production costs.
[0022] The control system uses endpoint 0 as the control endpoint based on the USB 2.0 protocol. The control system uses endpoint 0 for all control transmissions, and all endpoints of the USB slave device use USB-RX-FIFO to receive data, including receiving control transmission data packets, bulk transmission data packets, interrupt transmission data packets, synchronous transmission data packets and data requests, wherein the data request is the USB enumeration process and the transmission request packet.
[0023] The technical effect of the above content is: the control system based on the USB 2.0 protocol uses endpoint 0 as the control endpoint and performs all control transmissions through endpoint 0, utilizing the advantages of the USB 2.0 protocol so that the control system can achieve efficient data transmission and precise control instruction sending. At the same time, by performing all control transmissions on endpoint 0, the stability and reliability of the control system are also guaranteed. The control system uses USB-RX-FIFO to receive data and process various types of data transmission, making data transmission more efficient, secure and flexible.
[0024] The user decides the settings of USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO according to whether the USB device supports bulk transfer, interrupt transfer and isochronous transfer functions. Among them, all USB slave device endpoints that support bulk transfer use USB-NON-PRIC-TX-FIFO, and all USB slave device endpoints that support interrupt transfer and isochronous transfer use USB-PRIC-TX-FIFO.
[0025] The technical effect of the above content is: according to whether the USB device supports bulk transfer, interrupt transfer and synchronous transfer functions, the control system will automatically set the corresponding interface type. If the USB device supports bulk transfer, then all USB slave device endpoints that do not support bulk transfer will use the USB-NON-PRIC-TX-FIFO interface, while the USB slave device endpoints that support bulk transfer will use the USB-PRIC-TX-FIFO interface. If the USB device supports interrupt transfer and synchronous transfer, then all USB slave device endpoints that do not support these two transmission methods will use the USB-NON-PRIC-TX-FIFO interface, while the USB slave device endpoints that support these two transmission methods will use the USB-PRIC-TX-FIFO interface. Through such interface settings, the control system can flexibly adjust the interface type of each endpoint according to the actual needs of the user to ensure that the requirements of the USB device are met, which can not only ensure compatibility, but also improve the efficiency of the system and reduce the trouble of the user, thereby ensuring that the communication between the USB device and the control system achieves the best effect.
[0026] The control system classifies and analyzes the received enumeration information packets and data transmission request packets, and the user obtains the specific operation initiated by the current USB-HOST through classification and analysis.
[0027] The user resets the size of USB-RX-FIFO and USB-PRIC-TX-FIFO by obtaining the USB-HOST operation request. When the USB slave device supports synchronous transmission, the user appropriately reduces the size of USB-RX-FIFO and appropriately increases the size of USB-PRIC-TX-FIFO.
[0028] The technical effect of the above content is: after obtaining these operation requests, the user can adjust the size of USB-RX-FIFO and USB-PRIC-TX-FIFO according to these requests to adapt to different transmission tasks. The specific steps are as follows: When the USB slave device supports synchronous transmission, since synchronous transmission usually involves the transmission of a large amount of data, a larger buffer is required to store this data. At this time, the user should appropriately increase the size of the USB-RX-FIFO to accommodate more data. At the same time, in order to ensure the smooth progress of synchronous transmission, the size of the USB-PRIC-TX-FIFO should also be appropriately increased to provide sufficient sending buffer space; When the USB slave device only supports data transfer request packets, since data transfer usually involves a smaller amount of data, the size of the USB-RX-FIFO can be appropriately reduced, which can reduce costs and reduce system latency. At the same time, users can also appropriately reduce the size of the USB-PRIC-TX-FIFO to reduce power consumption and improve performance.
[0029] Based on the above operations, by adjusting the size of USB-RX-FIFO and USB-PRIC-TX-FIFO, users can flexibly adapt to different USB device transmission requirements and achieve more efficient system operation.
[0030] The user sets the RAM structure through the control system, including setting the size of USB-RX-FIFO, USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO according to the transmission requirements; It also includes setting a certain endpoint in the USB slave device to use or not use USB-NON-PRIC-TX-FIFO or USB-PRIC-TX-FIFO to send periodic data or non-periodic data.
[0031] The technical effect of the above content is: in this setting process, users can flexibly set buffers of different sizes and different endpoints according to their specific needs to adapt to various possible data transmission needs. At the same time, users can also choose not to use specific buffers for certain endpoints to save resources and improve overall operating efficiency. This flexible design concept can greatly meet the usage scenarios and needs of different users.
[0032] The settings of USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO also include the settings of the starting addresses of USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO. The user chooses to control the default settings of the system or set them according to user needs to achieve the best system operation effect.
[0033] The technical effect of the above content is: the setting of USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO also includes the setting of their starting addresses. Users can select their default settings through the control system, or they can make personalized settings according to their specific needs to achieve the best system operation effect. The use and settings of these two FIFOs can help the control system better manage data transmission and improve the efficiency and stability of data transmission. For their starting address settings, they also need to be reasonably set according to the actual needs of the user and the operation of the system. Reasonable starting address settings can effectively reduce conflicts and conflict checks during data transmission, thereby improving the efficiency and stability of data transmission.
[0034] When the USB slave device performs a synchronous data transmission and reception, the user first sets the size of the USB-RX-FIFO through the control system. After the reception is completed, the user resets the size of the USB-RX-FIFO and the starting address and size of the USB-PRIC-TX-FIFO through the control system.
[0035] The control system uses the starting address of USB-RAM as the starting address of receiving USB-RX-FIFO, and stores all transmission requests or data received from the USB slave device to the USB-HOST in the USB-RX-FIFO. The control system configures the size of USB-RX-FIFO according to actual needs by the user, and automatically calculates and sets the starting address of non-periodic sending USB-NON-PRIC-TX-FIFO according to the configuration value.
[0036] The technical effect of the above content is: when the USB slave device needs to perform a synchronous data transmission and reception, the user first sets the size of the USB-RX-FIFO through the control system. After the reception is completed, the user resets the size of the USB-RX-FIFO, as well as the starting address and size of the USB-PRIC-TX-FIFO through the control system. The control system will use the starting address of the USB-RAM as the starting address of the USB-RX-FIFO, and store all transmission requests or data sent by the USB slave device to the USB-HOST in the USB-RX-FIFO. The control system will read the data according to the size of the USB-RX-FIFO configured by the user according to actual needs. Once the reading is completed, the control system will automatically calculate and set the starting address of the non-periodic USB-NON-PRIC-TX-FIFO, and start writing data to the USB-NON-PRIC-TX-FIFO. The advantage of this method is that it not only meets the user's real-time adjustment needs for the USB-RX-FIFO size, but also ensures the effective management of data. At the same time, it is also convenient for the user to control the entire synchronous data transmission and reception process, thereby improving work efficiency.
[0037] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings.
[0038] Embodiment 1: When the USB slave device has only two endpoints: like Figure 2 -b, the structure of the shared mode USB-RAM in the present invention includes USB-RX-FIFO, USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO.
[0039] like Figure 3 As shown, step 1: the user makes a preliminary setting of the current USB-RAM through the control system, that is, sets the size of the USB-RX-FIFO so that the USB slave device is used to receive the enumeration data packet from the USB-HOST end when the USB slave device is connected to the USB-HOST for enumeration communication, wherein the data packet includes obtaining the USB slave device information (endpoint number, endpoint configuration) and setting the USB slave device (address, function reset); Step 2: The control system classifies the received enumeration data packet information according to the division rules and makes it available to the user. The user can reconfigure the USB-RX-FIFO and set the starting address and size of the USB-NON-PRIC-TX-FIFO according to the enumeration information (or use the starting address and default size automatically calculated by the system); In the above step 2, the user determines the setting content of the USB-HOST for the USB slave device according to the enumeration information, and then resets the USB-RX-FIFO to receive more data transmission, such as synchronous transmission; In the above step 2, USB-RX-FIFO can also be used to receive periodic and non-periodic OUT data packets (according to the USB2.0 protocol, all data transmission directions are based on USB-HOST, for example, OUT type means USB-HOST sends data packets); Since the current embodiment assumes that the USB slave device has only two endpoints, according to the USB 2.0 protocol, endpoint 0 can only be used for control transmission, that is, endpoint 1 is used for the other three types of transmission (interrupt transmission / bulk transmission / synchronous transmission); With USB-RAM in shared mode, USB-RX-FIFO can receive all OUT packets, that is, USB-NON-PRIC-TX-FIFO or USB-PRIC-TX-FIFO pointed to by endpoint 1 should be used for interrupt IN transmission, bulk IN transmission or synchronous IN transmission; Step 3: For non-periodic and periodic IN-type data packet transmission, users can use the USB-NON-PRIC-TX-FIFO or USB-PRIC-TX-FIFO set in step 2 to perform non-periodic or periodic data packet transmission; Among them, the user can set the size of USB-NON-PRIC-TX-FIFO to the maximum amount of data that can be transmitted at one time by a non-periodic data packet (interrupt data packet / bulk synchronization packet).
[0040] Embodiment 2: When the USB slave device has more than two endpoints: like Figure 3 As shown, the USB slave device supports multiple endpoints and supports synchronous transmission of data packets.
[0041] Step 1: Same as step 1 in the above embodiment 1; Among them, endpoints 1 / 2 / 3...n all point to USB-RX-FIFO when receiving data packets (including interrupt transmission / bulk transmission / synchronous transmission); Since the USB slave device supports synchronous transmission, the user can set the USB-RX-FIFO to the size of a synchronous data packet received once; Step 2: Set endpoints 1 / 2 / 3…n to point to USB-NON-PRIC-TX-FIFO when sending non-periodic data packets through the control system. Furthermore, users can set the size of USB-NON-PRIC-TX-FIFO to the maximum amount of data that can be transmitted at one time by non-periodic data packets (interrupt data packets / bulk synchronization packets); Step 3: Set endpoints 1 / 2 / 3…n to point to USB-PRIC-TX-FIFO when sending periodic data packets through the control system; Among them, the control system will classify and store each received data packet or data request packet according to certain rules. When the user obtains that the data request packet of the current USB-HOST is a request synchronization data packet, the user can re-set the USB-RX-FIFO, USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO so that the USB-PRIC-TX-FIFO is sufficient to send a synchronization data packet; When the USB slave device completes sending the synchronous data packet, the user can choose to set the USB-RX-FIFO, USB-NON-PRIC-TX-FIFO, and USB-PRIC-TX-FIFO to receive the next synchronous data packet; Repeat the operations of steps 2 and 3 above, and use the control system sent by the present invention and the shared mode USB-RAM to realize unlimited sending and receiving of synchronous data packets by the USB slave device.
[0042] Working principle: Through the shared mode USB-RAM structure, different types of transmission requirements are realized, and the maximum space required for each type of single transmission is met, ensuring that the transmitted data can be correctly sent and received and the communication is normal. At the same time, through the control system of the shared mode USB-RAM, multiple endpoints of the same USB slave device can all perform data transmission, satisfying that a USB device can have multiple endpoints with different functions. Based on the above design, the size of USB-RAM is reduced, the area occupied by the chip is reduced, and the chip power consumption and chip production cost are also reduced.
[0043] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0044] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations can be made to the embodiments without departing from the principles and spirit of the invention.
Claims
1. A control system for USB slave device data transceiver RAM, including a RAM structure and a control system, characterized in that: The RAM structure is used for sending and receiving data from the USB device, and the control system is used by the user to set the RAM structure, wherein: The RAM structure includes USB-RX-FIFO, USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO, USB-RX-FIFO is used to receive data, USB-NON-PRIC-TX-FIFO is used to send non-periodic data, and USB-PRIC-TX-FIFO is used to send periodic data; The control system includes parsing and classifying received USB-HOST data request packets and data packets and supports user acquisition, and also supports user configuration of RAM size.
2. The control system for USB slave device data transceiver RAM according to claim 1, characterized in that: All endpoints of the USB slave device use USB-RX-FIFO to receive data, including receiving control transfer packets, bulk transfer packets, interrupt transfer packets, synchronous transfer packets and data requests, among which the data request is the USB enumeration process and transfer request packet.
3. The control system for USB slave device data transceiver RAM according to claim 1, characterized in that: The user sets USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO according to whether the USB device supports bulk transfer, interrupt transfer and isochronous transfer functions. Among them, all USB slave device endpoints that support bulk transfer use USB-NON-PRIC-TX-FIFO, and all USB slave device endpoints that support interrupt transfer and isochronous transfer use USB-PRIC-TX-FIFO.
4. The control system for USB slave device data transceiver RAM according to claim 1, characterized in that: The control system, based on the USB 2.0 protocol, uses endpoint 0 as the control endpoint, and the control system uses endpoint 0 for all control transmissions.
5. The control system for USB slave device data transceiver RAM according to claim 1, characterized in that: The control system classifies and analyzes the received enumeration information packets and data transmission request packets, and the user obtains the operation initiated by the current USB-HOST through the classification and analysis.
6. The control system for USB slave device data transceiver RAM according to claim 1, characterized in that: The user sets the RAM structure through the control system, including setting the size of USB-RX-FIFO, USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO according to the transmission requirements; It also includes setting a certain endpoint in the USB slave device to use or not use USB-NON-PRIC-TX-FIFO or USB-PRIC-TX-FIFO to send periodic data or non-periodic data.
7. The control system for USB slave device data transceiver RAM according to claim 1, characterized in that: The user resets the size of USB-RX-FIFO and USB-PRIC-TX-FIFO by obtaining the USB-HOST operation request. When the USB slave device supports synchronous transmission, the user reduces the size of USB-RX-FIFO and increases the size of USB-PRIC-TX-FIFO.
8. The control system for USB slave device data transceiver RAM according to claim 6, characterized in that: The settings of USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO also include the settings of the starting addresses of USB-NON-PRIC-TX-FIFO and USB-PRIC-TX-FIFO. The user chooses to control the default settings of the system or set them according to user needs.
9. The control system for USB slave device data transceiver RAM according to claim 7, characterized in that: When the USB slave device performs a synchronous data transmission and reception, the user first sets the size of the USB-RX-FIFO through the control system. After the reception is completed, the user resets the size of the USB-RX-FIFO and the starting address and size of the USB-PRIC-TX-FIFO through the control system.
10. The control system for USB slave device data transceiver RAM according to claim 1, characterized in that: The control system uses the starting address of the USB-RAM as the starting address of the receiving USB-RX-FIFO, and stores all transmission requests or data received from the USB slave device and sent by the USB-HOST end in the USB-RX-FIFO. The control system allows the user to configure the size of the USB-RX-FIFO according to actual needs, and automatically calculates and sets the starting address of the non-periodic sending USB-NON-PRIC-TX-FIFO according to the configuration value.