GOWIN GW1N-9 User Manual

Usb 2.0 device controller ip
Table of Contents

Advertisement

Quick Links

Gowin USB 2.0 Device Controller IP
User Guide
IPUG927-1.6E, 03/28/2025

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the GW1N-9 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for GOWIN GW1N-9

  • Page 1 Gowin USB 2.0 Device Controller IP User Guide IPUG927-1.6E, 03/28/2025...
  • Page 2 Copyright © 2025 Guangdong Gowin Semiconductor Corporation. All Rights Reserved. is a trademark of Guangdong Gowin Semiconductor Corporation and is registered in China, the U.S. Patent and Trademark Office, and other countries. All other words and logos identified as trademarks or service marks are the property of their respective holders.
  • Page 3 Revision History Date Version Description 03/05/2021 1.0E Initial version published.  PID configuration interface in synchronized mode added. 01/04/2022 1.1E  Interface for interface configuration added.  Data width of descriptors extended. 03/01/2022 1.2E  HID function added. 03/24/2022 1.3E The description of resource utilization added.
  • Page 4: Table Of Contents

    Contents Contents Contents ....................... i List of Figures ....................iii List of Tables ...................... iv 1 About This Guide .................... 1 1.1 Purpose ..........................1 1.2 Related Documents ......................1 1.3 Terminology and Abbreviations ................... 2 1.4 Support and Feedback ....................... 2 2 Function Overview ..................
  • Page 5 Contents 6 Reference Design ..................26 6.1 USB Reference Design ....................26 6.2 USB CDC Driver Installation ..................... 27 6.3 Data Transfer Test ......................29 IPUG927-1.6E...
  • Page 6: List Of Figures

    List of Figures List of Figures Figure 3-1 USB Device Controller Block Diagram ................5 Figure 3-2 USB Device Controller Data Transmitting Timing Diagram ..........7 Figure 3-3 USB Device Controller Data Receive Timing Diagram ............ 8 Figure 3-4 USB Device Controller Descriptor Read Timing Diagram ..........10 Figure 3-5 USB Device Controller Control Data Receive Timing Diagram ........
  • Page 7 List of Tables List of Tables Table 1-1 Terminology and Abbreviations ..................2 Table 2-1 Gowin USB 2.0 Device Controller IP Overview ..............3 Table 2-2 Resource Utilization (І) ....................... 4 Table 2-3 Resource Utilization (Ⅱ) ....................4 Table 3-1 Device Controller TX User Interface .................. 6 Table 3-2 Device Controller RX User Interface ..................
  • Page 8: About This Guide

    About This Guide 1.1 Purpose The purpose of Gowin USB 2.0 Device Controller IP User Guide is to help you learn the features and usage of Gowin USB 2.0 Device Controller IP by providing the descriptions of functional description, signal description and interface configuration, etc.
  • Page 9: Terminology And Abbreviations

    General Serial Bus UTMI USB 2.0 Transceiver Macrocell Interface 1.4 Support and Feedback Gowin Semiconductor provides customers with comprehensive technical support. If you have any questions, comments, or suggestions, please feel free to contact us directly by the following ways. Website: www.gowinsemi.com...
  • Page 10: Function Overview

    Based on USB 2.0 Protocol, Gowin USB 2.0 Device Controller IP supports three modes, including High Speed (HS), Full Speed(FS) and Low Speed(LS). It also supports Control Transaction, Bulk Transaction, Isochronous Transaction, Interrupt Transaction, and UTMI.
  • Page 11: Features

    Gowin USB 2.0 Device Controller IP can be implemented by Verilog. Its resource utilization may vary when the design is employed in different devices, or at different densities, speeds, or grades. Taking Gowin GW1N-9 and GW5A-25 series of FPGA products as an instance, the resource utilization is as shown in Table 2-2 and Table 2-3.
  • Page 12: Functional Description

    3 Functional Description 3.1 USB Device Controller Functional Description 3.1 USB Device Controller USB Device Controller is located between User Design and PHY. USB Controller connects user design with PHY in series, receives commands from USB and realizes the data transaction between user design and USB. The functional block diagram of USB device controller is as follow.
  • Page 13: Usb Device Controller Tx User Interface

    3 Functional Description 3.2 USB Device Controller TX User Interface 3.2 USB Device Controller TX User Interface Table 3-1 Device Controller TX User Interface Name Bit Width Description Transmitting Work Signal txact_o Output High, indicates that the device is in data transmit state.
  • Page 14: Usb Device Controller Rx User Interface

    3 Functional Description 3.3 USB Device Controller RX User Interface number of bytes available for transmission from the current endpoint (not exceeding the maximum packet size).  If sending a zero-length data packet: Set txcork_i to 0 and set txdat_len_i to 0, and the device will return a zero-length packet to the host.
  • Page 15: Usb Device Descriptor Interface

    3 Functional Description 3.4 USB Device Descriptor Interface Name Bit Width Description Receiving Data rxdat_o Output 8 IP will output the data received from the USB interface Receive Valid Data Signal rxval_o Output 1 High, indicates that RXDAT is valid. Receive Ready Signal rxrdy_i Input...
  • Page 16 3 Functional Description 3.4 USB Device Descriptor Interface Name Bit Width Description desc_type_o USB Device Descriptor Type desc_dev_addr_i Device Descriptor Start Address desc_dev_len_i Device Descriptor Byte Length desc_qual_addr_i Device Qualifier Start Address desc_qual_len_i Device Qualifier Byte Length Device Full Speed Configuration Start desc_fscfg_addr_i Address Device Full Speed Configuration Byte...
  • Page 17: Figure 3-4 Usb Device Controller Descriptor Read Timing Diagram

    3 Functional Description 3.4 USB Device Descriptor Interface  Device qualifier  Device full-speed configuration descriptor  Device high-speed configuration descriptor  Device other-speed configuration descriptor  Device HID descriptor  Device BOS descriptor  Device string descriptor  Device vendor string ...
  • Page 18: Usb Device Control Interface

    3 Functional Description 3.5 USB Device Control Interface 3.5 USB Device Control Interface 3.5.1 Control Data Interface Table 3-4 Control Interface Name Bit Width Description Active Data Indicator Signal setup_o Output High, indicates that USB configuration data is in active state. Valid Data Indicator Signal rxval_o Output...
  • Page 19: Control Data Rx Interface

    3 Functional Description 3.5 USB Device Control Interface 3.5.2 Control Data RX Interface Table 3-5 Configuration Data RX Interface Name Bit Width Description Receiving Work Signal rxact_o Output High, indicates that the device is in data receive state. Valid Data Indicator Signal rxval_o Output High, indicates thatUSB configuration data is...
  • Page 20: Control Data Tx Interface

    3 Functional Description 3.5 USB Device Control Interface 3.5.3 Control Data TX Interface Table 3-6 Configuration Data TX Interface Name Bit Width Description Transmitting Work Signal txact_o Output High, indicates that the device is in data transmit state. Transmitting Data txdat_i Input IP transmits this data through the USB...
  • Page 21: Interface For Interface Configuration

    3 Functional Description 3.5 USB Device Control Interface Figure 3-7 USB Device Controller Control Endpoint Data Transmit Timing Diagram 3.5.4 Interface for Interface Configuration Table 3-7 Inferface for Interface Configuration Name Bit Width Description inf_alter_i Input USB interface configuration data input inf_alter_o Output USB interface configuration data output...
  • Page 22: Signal Description

    4 Signal Description 4.1 Signal Description Signal Description 4.1 Signal Description The descriptions of Gowin USB 2.0 Device Controller IP signals are as shown in Table 4-1. Table 4-1 Signal Description Signal Name Data Width Description Note Input the clock signal transmitting by...
  • Page 23 4 Signal Description 4.1 Signal Description Signal Name Data Width Description Note USB interface. Transmit data valid indication signal. A high level indicates that the user input data is valid (only valid during txval_i control endpoint data transmission; it should be set to 0 when transmitting other data).
  • Page 24 4 Signal Description 4.1 Signal Description Signal Name Data Width Description Note Endpoint Selection Indicator Signal endpt_o It indicates the communication endpoint that USB selects. sof_o USB Frame Synchronization Signal USB interface configuration data inf_alter_i output USB interface configuration data inf_alter_o input inf_sel_o...
  • Page 25 4 Signal Description 4.1 Signal Description Signal Name Data Width Description Note Receive Enable Signal utmi_rxvalid_i Valid PHY_DATAIN Indicator Signal Receive Error Signal utmi_rxerror_i High indicates that an error occurs on receive. Line Status of Receiver 2’b00:SE0 2’b01:"J" utmi_linestate_i 2’b10:"K" 2’b11:SE1 descrom_rdata_i USB Device Descriptor Data...
  • Page 26: Parameter Configuration

    ULPI bi-directional port ULPI stop signal; data TX and RX ulpi_stp_o interrupt flag, active-high. 4.2 Parameter Configuration The parameter configuration of Gowin USB 2.0 Device Controller IP is shown in Table 4-2. Table 4-2 Configuration Options Options Description Interface USB controller interface selection, including UTMI and ULPI;...
  • Page 27 4 Signal Description 4.2 Parameter Configuration Options Description Endpoint 1 Input Transfer Type Endpoint transfer types: Bulk Transaction, Isochronous Transaction, and Interrupt Transaction. Low Speed mode only supports Interrupt Transaction. Endpoint 1 Output Transfer Endpoint transfer types: Bulk Transaction, Type Isochronous Transaction, and Interrupt Transaction.
  • Page 28 4 Signal Description 4.2 Parameter Configuration Options Description Transaction. Low Speed mode only supports Interrupt Transaction. Endpoint 6 Input Transfer Type Endpoint transfer types: Bulk Transaction, Isochronous Transaction, and Interrupt Transaction. Low Speed mode only supports Interrupt Transaction. Endpoint 6 Output Transfer Endpoint transfer types: Bulk Transaction, Type Isochronous Transaction, and Interrupt...
  • Page 29 4 Signal Description 4.2 Parameter Configuration Options Description Endpoint 10 Output Transfer Endpoint transfer types: Bulk Transaction, Type Isochronous Transaction, and Interrupt Transaction. Low Speed mode only supports Interrupt Transaction. Endpoint 11 Input Transfer Type Endpoint transfer types: Bulk Transaction, Isochronous Transaction, and Interrupt Transaction.
  • Page 30 4 Signal Description 4.2 Parameter Configuration Options Description Transaction. Low Speed mode only supports Interrupt Transaction. Endpoint 15 Output Transfer Endpoint transfer types: Bulk Transaction, Type Isochronous Transaction, and Interrupt Transaction. Low Speed mode only supports Interrupt Transaction. IPUG927-1.6E 23(29)
  • Page 31: Interface Configuration

    5 Interface Configuration Interface Configuration You can start the IP Core Generator via Tools on the menu bar, invoke and configure USB 2.0 Device Controller. 1. Open IP Core Generator After creating the project, you can click the "Tools" tab in the upper left, select and open the IP Core Generator via the drop-down list, as shown in Figure 5-1.
  • Page 32: Figure 5-2 Usb 2.0 Device Controller Ip Core

    5 Interface Configuration Figure 5-2 USB 2.0 Device Controller IP Core 3. USB 2.0 Device Controller IP Core Configuration Interface The USB 2.0 Device Controller IP core configuration interface is shown in Figure 5-3. The interface diagram is on the left. The options are on the right.
  • Page 33: Reference Design

    Descriptor In this design instance, USB is converted into parallel UTMI signal through Gowin USB 1.1 SoftPHY IP module, and USB data packet parsing is completed through USB 2.0 Device Controller, UART Device Descriptor module contains USB device descriptor information internally, UART Config IPUG927-1.6E...
  • Page 34: Usb Cdc Driver Installation

    6 Reference Design 6.2 USB CDC Driver Installation Register module receives configuration commands from USB Host to configure UART module parameters, TX/RX FIFO provides data buffer and loopback function. 6.2 USB CDC Driver Installation You can install the CDC driver on the device through the zadig software as follows.
  • Page 35: Figure 6-4 Zadig Winusb Driver Installation

    6 Reference Design 6.2 USB CDC Driver Installation click Install Driver. Wait a few moments to complete the installation of the driver for this device interface. Figure 6-4 Zadig WinUSB Driver Installation After installing WinUSB driver, then install CDC driver and click "Replace Driver".
  • Page 36: Data Transfer Test

    6 Reference Design 6.3 Data Transfer Test 6.3 Data Transfer Test Open the serial debugging assistant software and select the serial port USB2Serial, as shown in the figure below. Figure 6-6 Select Serial Device in Serial Debugging Assistant Connect serial port TXD to RXD for serial data loopback test. Figure 6-7 Serial Data Loopback Test IPUG927-1.6E 29(29)

This manual is also suitable for:

Gw5a-25

Table of Contents