Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| nexys:nexysvideo:refmanual [2015/05/06 21:29] – [9 Basic I/O] Joshua Woldstad | nexys:nexysvideo:refmanual [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== **UNDER CONSTRUCTION** ====== | + | Wrong Namespace, don't edit this! |
| - | + | ||
| - | This wiki page is currently under construction, everything on this page is liable to change. | + | |
| - | Placeholders are also included on this page. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | ====== Overview ====== | + | |
| - | + | ||
| - | {{ : | + | |
| - | + | ||
| - | The Nexys Video board is a complete, ready-to-use digital circuit development platform based on the latest Artix-7™ Field Programmable Gate Array (FPGA) from Xilinx. With its high-capacity FPGA (Xilinx part number XC7A200T-1SBG484C) – the largest Artix-7 die at the time of writing, generous external memories, high-speed digital video ports, and 24-bit audio codec, make the Nexys Video is perfectly suited for audio and video processing appllications. Several built-in peripherals, | + | |
| - | + | ||
| - | + | ||
| - | The Artix-7 FPGA is optimized for high performance logic, and offers more capacity, higher performance, | + | |
| - | + | ||
| - | * 33,650 logic slices, each with four 6-input LUTs and 8 flip-flops | + | |
| - | * Close to 13 Mbits of fast block RAM (3x more than the Nexys 4 DDR) | + | |
| - | * Ten clock management tiles, each with phase-locked loop (PLL) | + | |
| - | * 740 DSP Slices | + | |
| - | * Internal clock speeds exceeding 450MHz | + | |
| - | * On-chip analog-to-digital converter (XADC) | + | |
| - | + | ||
| - | The Nexys Video also offers an improved collection of ports and peripherals, | + | |
| - | * 8 user switches | + | |
| - | * 8 user LEDs | + | |
| - | * 128x32 monochrome OLED display | + | |
| - | * USB-UART Bridge | + | |
| - | * 160-pin FMC LPC connector | + | |
| - | * Micro SD card connector | + | |
| - | * HDMI Sink and HDMI Source | + | |
| - | * DisplayPort Source | + | |
| - | * Audio codec w/ four 3.5mm jacks | + | |
| - | * 6 user push buttons | + | |
| - | * User EEPROM | + | |
| - | * 10/100/1000 Ethernet PHY | + | |
| - | * 512MiB 800Mt/s DDR3 | + | |
| - | * Serial Flash | + | |
| - | * Four Pmod ports | + | |
| - | * Pmod for XADC signals | + | |
| - | * Digilent Adept USB port for programming and data | + | |
| - | * USB HID Host for mice, keyboards and USB MSD Host | + | |
| - | + | ||
| - | + | ||
| - | In addition to being compatible with Xilinx’s ISE toolset, The Nexys Video also works with Xilinx’s the new high-performance Vivado | + | |
| - | + | ||
| - | + | ||
| - | {{ : | + | |
| - | + | ||
| - | | **Callout** | + | |
| - | |** 1** | Power select jumper and battery header | + | |
| - | | **2** | Adept USB (JTAG and UART) | **14** | + | |
| - | | **3** | External configuration jumper (SD / USB) | **15** | + | |
| - | | **4** | Pmod connector(s) | + | |
| - | |** 5** | Microphone | + | |
| - | | **6** | Power supply test point(s) | + | |
| - | | **7** | LEDs (16) | **19** | + | |
| - | | **8** | Slide switches | + | |
| - | | **9** | Eight digit 7-seg display | + | |
| - | | **10** | + | |
| - | | **11** | + | |
| - | | **12** | + | |
| - | + | ||
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | ====== Power Supplies ====== | + | |
| - | + | ||
| - | The Nexys Video board can receive power from an external power supply through the center-positive barrel jack (J21) or the two-pin battery header (J22). The external supply voltage must be 12 V ±5 %. The Nexys Video cannot be powered from the USB bus. | + | |
| - | + | ||
| - | All Nexys Video power supplies can be turned on and off by a single logic-level power switch (SW8). Enables of power supplies not connected directly to the power switch are disabled indirectly. A power-good LED (LD16), driven by the “power good” output of the on-board regulators, indicates that the supplies are turned on and operating normally. An overview of the Nexys Video power circuit is shown in Figure 1. | + | |
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | + | ||
| - | //Figure 1. Nexys Video power circuit// | + | |
| - | + | ||
| - | + | ||
| - | An external power supply can be used by plugging it into the power jack (J21). | + | |
| - | + | ||
| - | + | ||
| - | Instead of a wall supply an external battery pack can be used by connecting the battery’s positive terminal to the positive pin of J22 and the negative terminal to the negative pin. Incorrect polarity might cause permanent damage to the board. To power the Nexys Video and any peripheral other than an FMC mezzanine card using the 12P0V supply, the battery voltage must be in the 6-15 V range. Since the external power supply pin is wired directly to the 12P0V pin of the FMC connector, in FMC applications the battery voltage must be 12VDC ±5 %, the same as the wall supply specification. In any case, 15 V is an absolute maximum. | + | |
| - | + | ||
| - | + | ||
| - | Voltage regulator circuits from Analog Devices create the different voltages required by the FPGA and on-board peripherals from the main power input. Some regulators use the outputs of another regulator as input, depending on design considerations. In some cases this chaining helps in creating the proper power-on sequence for circuits. In other cases the chaining of power supply enables achieves the same purpose. | + | |
| - | + | ||
| - | + | ||
| - | Table 1 provides information on maximum and typical currents for each power rail. The typical currents strongly depend on FPGA configuration and the values provided are typical of medium size/speed designs. | + | |
| - | + | ||
| - | | **Supply** | + | |
| - | | 3.3 V | FPGA I/O, USB, FMC, Clocks, Pmod, Ethernet, SD slot, Flash, DisplayPort | + | |
| - | | 1.0 V | FPGA Core | IC26: ADP5052 | + | |
| - | | 1.8 V | FPGA Auxiliary | + | |
| - | | 1.5 V | DDR3 and FPGA I/O | IC26: ADP5052 | + | |
| - | | 2.5 V | FPGA I/O and Ethernet | + | |
| - | | VADJ (1.2-3.3 V) | User I/O, FMC and FPGA I/O | IC28: ADP2384 | + | |
| - | | 3.3 V | Audio analog supply | + | |
| - | | 5.0 V | USB Host, HDMI | IC30: ADP2370 | + | |
| - | | MGT 1.0 V | Gigabit Transceivers VCC | IC31: ADP123 | + | |
| - | | MGT 1.2 V | Gigabit Transceivers VTT | IC33: ADP123 | + | |
| - | | XADC 1.8 V | XADC supply | + | |
| - | //Table 1. Voltage rail power ratings// | + | |
| - | + | ||
| - | + | ||
| - | The VADJ power rail requires special attention. It is a programmable voltage rail that powers the FMC mezzanine connector, user push-buttons, | + | |
| - | + | ||
| - | An FPGA design can dynamically change the VADJ voltage to suit a certain FMC mezzanine card or application. Care must be taken to disable the regulator first by bringing “VADJ_EN” low, setting “SET_VADJ(1: | + | |
| - | + | ||
| - | + | ||
| - | | **SET_VADJ(1: | + | |
| - | | 00 (default) | + | |
| - | | 01 | 1.8 V | | + | |
| - | | 10 | 2.5 V | | + | |
| - | | 11 | 3.3 V | | + | |
| - | + | ||
| - | //Table 2. VADJ programmable voltages// | + | |
| - | + | ||
| - | + | ||
| - | ====== FPGA Configuration ====== | + | |
| - | + | ||
| - | After power-on, the Artix-7 FPGA must be configured (or programmed) before it can perform any functions. You can configure the FPGA in one of four ways: | + | |
| - | + | ||
| - | - A PC can use the Digilent USB-JTAG circuitry (port 12, labeled “PROG”) to program the FPGA any time the power is on. | + | |
| - | - A file stored in the nonvolatile serial (SPI) flash device can be transferred to the FPGA. | + | |
| - | - A programming file can be transferred to the FPGA from a micro SD card. | + | |
| - | - A programming file can be transferred from a USB mass-storage device (ex. pen drive) attached to the USB HID port. | + | |
| - | + | ||
| - | Figure 2 shows the different options available for configuring the FPGA. An on-board “mode” jumper (JP4) and a media selection jumper (JP3) select between the programming modes. | + | |
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | Figure 2. Nexys Video Configuration Options | + | |
| - | + | ||
| - | The FPGA configuration data is stored in files called bitstreams that have the .bit file extension. The ISE or Vivado software from Xilinx can create bitstreams from VHDL, Verilog, or schematic-based source files (in the ISE toolset, EDK is used for MicroBlaze™ embedded processor-based designs). | + | |
| - | + | ||
| - | Bitstreams are stored in volatile SRAM-based memory cells within the FPGA. This data defines the FPGA’s logic functions and circuit connections, | + | |
| - | + | ||
| - | An Artix-7 200T bitstream is typically 77,845,216 bits and can take a long time to transfer depending on the programming mode. The time it takes to program the Nexys Video can be decreased by compressing the bitstream before programming, | + | |
| - | + | ||
| - | Mode-specific speed-ups are also available. JTAG clock frequency can be set to the maximum supported by the programming cable in iMPACT/ | + | |
| - | + | ||
| - | After being successfully programmed, the FPGA will cause the " | + | |
| - | + | ||
| - | The following sections provide greater detail about programming the Nexys Video using the different methods available. | + | |
| - | + | ||
| - | ===== 2.1 JTAG Programming ===== | + | |
| - | + | ||
| - | The Xilinx tools typically communicate with FPGAs using the Test Access Port and Boundary-Scan Architecture, | + | |
| - | + | ||
| - | Programming the Nexys Video with an uncompressed bitstream using the on-board USB_JTAG circuitry usually takes around four seconds with a 30MHz JTAG clock. | + | |
| - | + | ||
| - | JTAG programming can be done using the hardware server in Vivado or the iMPACT tool included with ISE and the labtools version of Vivado. | + | |
| - | + | ||
| - | The demonstration project available at digilentinc.com gives an in depth tutorials on how to program your board. | + | |
| - | + | ||
| - | ===== 2.2 Quad-SPI Programming ===== | + | |
| - | + | ||
| - | For the FPGA to be able to configure itself from the SPI Flash, it first needs to be programmed with the bitstream. This is called indirect programming and is a two-step process controlled by Hardware Manager (Vivado) or iMPACT (ISE). First, the FPGA is programmed with a design that can program flash devices, and then data is transferred to the flash device via the FPGA circuit (this complexity is hidden from the user by the Xilinx tools). After the flash device has been programmed, it can automatically configure the FPGA at a subsequent power-on or reset event as determined by the mode jumper setting. Programming files stored in the flash device will remain until they are overwritten, | + | |
| - | + | ||
| - | Programming the flash can take as long as four to five minutes, which is mostly due to the lengthy erase process inherent to the memory technology. Once written however, FPGA configuration can be very fast, less than a second. Bitstream compression, | + | |
| - | + | ||
| - | Indirect programming of the flash can be done using the iMPACT tool included with ISE or Hardware Manager of Vivado. The correct part to be set in the tools is s25fl256xxxxxx0 from the manufacturer Spansion. | + | |
| - | + | ||
| - | + | ||
| - | ===== 2.3 USB Host and Micro SD Programming ===== | + | |
| - | + | ||
| - | You can program the FPGA from a pen drive attached to the USB-HID port (J15) or a microSD card inserted into J3 by doing the following: | + | |
| - | - Format the storage device (pen drive or microSD card) with a FAT32 file system. | + | |
| - | - Place a single .bit configuration file in the root directory of the storage device. | + | |
| - | - Attach the storage device to the Nexys Video. | + | |
| - | - Set the JP4 Programming Mode jumper on the Nexys Video to “USB/ | + | |
| - | - Select the desired storage device using JP3. | + | |
| - | - Push the PROG button or power-cycle the Nexys Video. | + | |
| - | + | ||
| - | The FPGA will automatically configure with the .bit file on the selected storage device. Any .bit files that are not built for the proper Artix-7 device will be rejected by the FPGA. | + | |
| - | + | ||
| - | The Auxiliary Function Status or “BUSY” LED (LD14) gives visual feedback on the state of the configuration process when the FPGA is not yet programmed: | + | |
| - | + | ||
| - | * When steadily lit the auxiliary microcontroller is either booting up or currently reading the configuration medium (microSD or pen drive) and downloading a bitstream to the FPGA. | + | |
| - | * A slow pulse means the microcontroller is waiting for a configuration medium to be plugged in. | + | |
| - | * In case of an error during configuration the LED will blink rapidly. It could be that the device plugged in is not getting recognized, it is not properly formatted or the bitstream is not compatible with the FPGA. | + | |
| - | + | ||
| - | When the FPGA is has been successfully configured, the behavior of the LED is application-specific. For example, if a USB keyboard is plugged in, a rapid short blink will signal the receipt of an HID input report from the keyboard. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ====== Memory ====== | + | |
| - | + | ||
| - | The Nexys Video board contains two external memories: a 512MiByte volatile DDR3 memory and a 32MiByte non-volatile serial Flash device. The DDR3 uses a 16-bit wide memory component soldered on the board with industry-standard interface. The serial Flash is on a dedicated quad-mode (x4) SPI bus. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | ====== DDR3 ====== | + | |
| - | + | ||
| - | The Nexys Video includes one Micron MT41K256M16HA-187E DDR3 memory component creating a single rank, 16-bit wide interface. It is routed to a 1.5V-powered HR (High Range) FPGA bank with 50 ohm controlled single-ended trace impedance. 50 ohm internal terminations in the FPGA are used to match the trace characteristics. Similarly, on the memory side on-die terminations (ODT) are used for impedance matching. | + | |
| - | + | ||
| - | For proper operation of the memory a memory controller and physical layer (PHY) interface needs to be included in the FPGA design. The Xilinx 7-series memory interface solutions core generated by the MIG (Memory Interface Generator) Wizard hides away the complexities of a DDR3 interface. Depending on the tool used (ISE, EDK or Vivado) the MIG Wizard can generate a native FIFO-style or an AXI4 interface to connect to user logic. This workflow allows the customization of several DDR3 parameters optimized for the particular application. Table 2 below lists the MIG Wizard settings optimized for the Nexys Video. | + | |
| - | + | ||
| - | | **Setting** | + | |
| - | | Memory type | DDR3 SDRAM | | + | |
| - | | Max. clock period | + | |
| - | | Clock ratio | 4:1 | | + | |
| - | | Memory type | Components | + | |
| - | | Memory part | MT41K256M16HA-125 | + | |
| - | | Memory voltage | + | |
| - | | Data width | 16 | | + | |
| - | | Data mask | Enabled | + | |
| - | | Input clock period | + | |
| - | | Output driver impedance | + | |
| - | | Chip Select pin | Disabled | + | |
| - | | Rtt (nominal) – On-die termination | + | |
| - | | Internal Vref | Enabled | + | |
| - | | Internal termination impedance | + | |
| - | Table 3 DDR3 Settings for the Nexys Video | + | |
| - | + | ||
| - | + | ||
| - | The MIG Wizard will require the fixed pin-out of the memory signals to be entered and validated before generating the IP core. For your convenience an importable UCF/ | + | |
| - | + | ||
| - | For more details on the Xilinx memory interface solutions refer to the 7 Series FPGAs Memory Interface Solutions User Guide (ug586)¹. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | ====== Quad-SPI Flash ====== | + | |
| - | + | ||
| - | Non-volatile storage is provided by a Spansion S25FL256S flash memory. FPGA configuration files can be written to it, and mode settings are available to cause the FPGA to automatically read a configuration from this device at power on. An Artix-7 200T configuration file requires just over 9 MiB (mebibyte) of memory, leaving about 70% of the flash device available for user data. Or, if the FPGA is getting configured from another source, the whole memory can be used for custom data. | + | |
| - | + | ||
| - | The contents of the memory can be manipulated by issuing certain commands on the SPI bus. The implementation of this protocol is outside the scope of this document. All signals in the SPI bus except SCK are general-purpose user I/O pins after FPGA configuration. SCK is an exception because it remains a dedicated pin even after configuration. Access to this pin is provided through a special FPGA primitive called STARTUPE2. | + | |
| - | + | ||
| - | **NOTE: Refer to the manufacturer’s data sheets² and Xilinx user guides³ for more information.** | + | |
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | Figure 3. Nexys Video SPI Flash pin-out | + | |
| - | + | ||
| - | + | ||
| - | | + | |
| - | | + | |
| - | | + | |
| - | + | ||
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | ====== 4 Ethernet PHY====== | + | |
| - | + | ||
| - | The Nexys Video board includes a Realtek RTL8211E-VL PHY paired with an RJ-45 Ethernet jack with integrated magnetics to implement a 10/100/1000 Ethernet port for network connection. The PHY interfaces with the FPGA via RGMII for data and MDIO for management. Bank 13 powered at 2.5V is populated with these signals. The auxiliary interrupt (INT_B), power management (PME_B) signals are also wired to bank 13. The reset signal (RST_B) is the only one wired to a different bank (34), powered at 3.3V. The connection diagram can be seen on Figure 4. | + | |
| - | + | ||
| - | At power-on reset, the PHY is set to the following defaults using the configuration pins in parenthesis: | + | |
| - | + | ||
| - | * Auto-negotiation enabled, advertising all 10/100/1000 modes (AN[1:0]) | + | |
| - | * PHY address=00001 (PHY_AD[2: | + | |
| - | * No delay for TXD and RXD relative to TXC and RXC for data latching (RXDLY, TXDLY) | + | |
| - | + | ||
| - | If an Ethernet cable is plugged in, establishing link is attempted straight after power-up, even if the FPGA is not programmed. | + | |
| - | + | ||
| - | Three status indicator LEDs are on-board near the RJ-45 connector that indicate traffic (LD10) and valid link state (LD9). The table below shows the default behavior. | + | |
| - | + | ||
| - | | **Function** | + | |
| - | | **ACT** | + | |
| - | | **LINK** | + | |
| - | | ::: | ::: | On | Link up | | + | |
| - | | **USER** | + | |
| - | | ::: | ::: | On | Link up, no traffic | + | |
| - | | ::: | ::: | Off | Link down | | + | |
| - | + | ||
| - | Table 4. Ethernet status LEDs | + | |
| - | + | ||
| - | The on-board PHY implements Layer 1 in the Ethernet stack, interfacing between the physical copper medium and the media access control (MAC). The MAC must be implemented in the FPGA and mapped to the PHY’s RGMII interface. Vivado-based design can use the Xilinx AXI Ethernet Subsystem IP core to implement the MAC and wire it to the processor and the memory subsystem. At the time of writing the IP core needed to be licensed separately. | + | |
| - | + | ||
| - | On an Ethernet network each node needs a unique MAC address. To this end a Microchip 24AA025E48 EEPROM is provided on the Nexys Video. On one hand it is a read-writeable EEPROM that can be accessed via I²C. On the other hand it features a read-only memory section that comes pre-programmed with a unique identifier. This unique identifier can be read and used as a MAC address, avoiding a possible address conflict on the network. The device address of the EEPROM is 1010000b. The out-of-box Ethernet demo uses the unique MAC to allow connecting several Nexys Video boards to the same network. | + | |
| - | + | ||
| - | A downloadable demonstration project can be found on the Nexys Video product page at [[http:// | + | |
| - | + | ||
| - | {{ : | + | |
| - | + | ||
| - | Figure 4. Pin connections between the Artix-7 and the Ethernet PHY | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ====== 5 Oscillators/ | + | |
| - | + | ||
| - | The Nexys Video board includes a single 100MHz crystal oscillator connected to pin R4 (R4 is a MRCC input on bank 34). The input clock can drive MMCMs or PLLs to generate clocks of various frequencies and with known phase relationships that may be needed throughout a design. Some rules restrict which MMCMs and PLLs may be driven by the 100MHz input clock. For a full description of these rules and of the capabilities of the Artix-7 clocking resources, refer to the “7 Series FPGAs Clocking Resources User Guide” (ug472¹) available from Xilinx. | + | |
| - | Xilinx offers the Clocking Wizard IP core to help users generate the different clocks required for a specific design. This wizard will properly instantiate the needed MMCMs and PLLs based on the desired frequencies and phase relationships specified by the user. The wizard will then output an easy to use wrapper component around these clocking resources that can be inserted into the user’s design. The clocking wizard can be accessed from within the Vivado Block Design or Core Generator tools. | + | |
| - | + | ||
| - | ¹[[http:// | + | |
| - | + | ||
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | ====== 6 USB UART Bridge (Serial Port) ====== | + | |
| - | + | ||
| - | The Nexys Video includes an FTDI FT232R USB-UART bridge (attached to connector J13) that lets you use PC applications to communicate with the board using standard Windows COM port commands. Free USB-COM port drivers, available from Windows Update or www.ftdichip.com under the " | + | |
| - | + | ||
| - | Two on-board status LEDs provide visual feedback on traffic flowing through the port: the transmit LED (LD13) and the receive LED (LD12). **Signal names that imply direction are from the point-of-view of the DTE (Data Terminal Equipment), in this case the PC.** | + | |
| - | + | ||
| - | The connections between the FT232R and the Artix-7 are shown in Figure 5. | + | |
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | Figure 5. Nexys Video FT232R connections | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ====== 7 PC – FPGA Data Transfer (DPTI / DSPI) ====== | + | |
| - | + | ||
| - | The Nexys Video provides two interface types that can be used to transfer user data between a PC and an FPGA design. Both of the interfaces have a software component, a Digilent Adept API and a physical interface between the FPGA and the USB controller. Calling API functions on the PC will either present or request data on the FPGA pins according to the chosen protocol. The functionality is implemented using the on-board dual-port FT2232 USB controller. One port is used exclusively for JTAG, while the other either DPTI or DSPI. Since the interfaces share pins, DPTI and DSPI cannot be used simultaneously. | + | |
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | Figure 6. USB-FPGA interfaces provided by the USB PROG port | + | |
| - | + | ||
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | ===== Parallel Transfer Interface (DPTI) ===== | + | |
| - | + | ||
| - | DPTI is an 8-bit wide parallel FIFO-style data interface. It offers higher bandwidth than DSPI. In FTDI-terminology, | + | |
| - | + | ||
| - | | **Signal** | + | |
| - | | D[7: | + | |
| - | | RXF# | Input | When low, data is available for reading from the FIFO. | | + | |
| - | | TXE# | Input | When low, data can be written to the FIFO. | | + | |
| - | | RD# | Output | + | |
| - | | WR# | Output | + | |
| - | | SIWU# | Input | Send immediate or Wake-up function. In normal mode a low pulse triggers sending a data packet with the data currently in the FIFO, even if below the normal packet size. In suspend mode a low pulse can wake up the Host PC. | | + | |
| - | | OE# | Output | + | |
| - | | CLKO | Input | 60 MHz clock used in synchronous mode. Data is launched and can be captured on the rising edge. | | + | |
| - | + | ||
| - | Table 5. DPTI signal description | + | |
| - | + | ||
| - | + | ||
| - | For more information, | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ===== Serial Peripheral Interface (DSPI) ===== | + | |
| - | + | ||
| - | An industry-standard SPI interface can also be used for transferring data. It uses only four signals for serial full-duplex communication. The USB controller acts as a SPI master, with the FPGA taking the slave role. The USB controller initiates a transaction after API function calls and transfers data in both directions simultaneously. | + | |
| - | + | ||
| - | | **Signal** | + | |
| - | | SCK | Input | Data bus. | | + | |
| - | | MOSI | Output | + | |
| - | | MISO | Input | When low, data can be written to the FIFO. | | + | |
| - | | SS | Input | A low-pulse triggers data to be read out from the FIFO. | | + | |
| - | + | ||
| - | Table 6. DSPI signal description | + | |
| - | + | ||
| - | + | ||
| - | For more information, | + | |
| - | + | ||
| - | + | ||
| - | ¹[[http:// | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ====== 8 USB HID Host ====== | + | |
| - | + | ||
| - | The Auxiliary Function microcontroller (Microchip PIC24FJ128) provides the Nexys Video with USB HID host capability. After power-up, the microcontroller is in configuration mode, either downloading a bitstream to the FPGA, or waiting on it to be programmed from other sources. Once the FPGA is programmed, the microcontroller switches to application mode, which is USB HID Host in this case. Firmware in the microcontroller can drive a mouse or a keyboard attached to the type A USB connector at J15 labeled "USB Host.” Hub support is not currently available, so only a single mouse or a single keyboard can be used. The PIC24 drives several signals into the FPGA – two are used to implement a standard PS/2 interface for communication with a mouse or keyboard, and the others are connected to the FPGA’s two-wire serial programming port, so the FPGA can be programmed from a file stored on a USB pen drive or microSD card. | + | |
| - | + | ||
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | Figure 7. Nexys Video PIC24 Connections | + | |
| - | + | ||
| - | + | ||
| - | ===== HID Controller ===== | + | |
| - | + | ||
| - | The Auxiliary Function microcontroller hides the USB HID protocol from the FPGA and emulates an old-style PS/2 bus. The microcontroller behaves just like a PS/2 keyboard or mouse would. This means new designs can re-use existing PS/2 IP cores. Mice and keyboards that use the PS/2 protocol use a two-wire serial bus (clock and data) to communicate with a host. On the Nexys Video, the microcontroller emulates a PS/2 device, while the FPGA plays the role of the host. Both the mouse and the keyboard use 11-bit words that include a start bit, data byte (LSB first), odd parity, and stop bit, but the data packets are organized differently, | + | |
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | Figure 8. PS/2 Device-to-Host Timing Diagram | + | |
| - | + | ||
| - | The clock and data signals are only driven when data transfers occur; otherwise they are held in the idle state at logic ‘1.’ This requires that when the PS/2 signals are used in a design, internal pull-ups must be enabled in the FPGA on the data and clock pins. The clock signal is normally driven by the device, but may be held low by the host in special cases. The timings define signal requirements for mouse-to-host communications and bi-directional keyboard communications. A PS/2 interface circuit can be implemented in the FPGA to create a keyboard or mouse interface. | + | |
| - | + | ||
| - | When a keyboard or mouse is connected to the Nexys Video, a “self-test passed” command (0xAA) is sent to the host. After this, commands may be issued to the device. Since both the keyboard and the mouse use the same PS/2 port, one can tell the type of device connected using the device ID. This ID can be read by issuing a Read ID command (0xF2). Also, a mouse sends its ID (0x00) right after the “self-test passed” command, which distinguishes it from a keyboard. | + | |
| - | + | ||
| - | ===== Keyboard ===== | + | |
| - | + | ||
| - | PS/2 uses open-collector drivers so the keyboard, or an attached host device, can drive the two-wire bus (if the host device will not send data to the keyboard, then the host can use input-only ports). | + | |
| - | + | ||
| - | PS/2-style keyboards use scan codes to communicate key press data. Each key is assigned a code that is sent whenever the key is pressed. If the key is held down, the scan code will be sent repeatedly about once every 100ms. When a key is released, an F0 key-up code is sent, followed by the scan code of the released key. If a key can be shifted to produce a new character (like a capital letter), then a shift character is sent in addition to the scan code, and the host must determine which ASCII character to use. Some keys, called extended keys, send an E0 ahead of the scan code (and they may send more than one scan code). When an extended key is released, an E0 F0 key-up code is sent, followed by the scan code. Scan codes for most keys are shown in Figure 9. | + | |
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | Figure 9. Keyboard scan codes | + | |
| - | + | ||
| - | + | ||
| - | A host device can also send data to the keyboard. Table 7 shows a list of some common commands a host might send. | + | |
| - | + | ||
| - | + | ||
| - | | Command | + | |
| - | | ED | Set Num Lock, Caps Lock, and Scroll Lock LEDs. Keyboard returns FA after receiving ED, then host sends a byte to set LED status: bit 0 sets Scroll Lock, bit 1 sets Num Lock, and bit 2 sets Caps lock. Bits 3 to 7 are ignored. | + | |
| - | | EE | Echo (test). Keyboard returns EE after receiving EE | | + | |
| - | | F3 | Set scan code repeat rate. Keyboard returns F3 on receiving FA, then host sends second byte to set the repeat rate. | | + | |
| - | | FE | Resend. FE directs keyboard to re-send most recent scan code. | | + | |
| - | | FF | Reset. Resets the keyboard. | + | |
| - | Table 7. Keyboard commands | + | |
| - | + | ||
| - | + | ||
| - | The keyboard can send data to the host only when both the data and clock lines are high (or idle). Because the host is the bus master, the keyboard must check to see whether the host is sending data before driving the bus. To facilitate this, the clock line is used as a “clear to send” signal. If the host drives the clock line low, the keyboard must not send any data until the clock is released. The keyboard sends data to the host in 11-bit words that contain a ‘0’ start bit, followed by 8-bits of scan code (LSB first), followed by an odd parity bit and terminated with a ‘1’ stop bit. The keyboard generates 11 clock transitions (at 20 to 30KHz) when the data is sent, and data is valid on the falling edge of the clock. | + | |
| - | + | ||
| - | ===== Mouse ===== | + | |
| - | + | ||
| - | Once entered in stream mode and data reporting enabled the mouse outputs a clock and data signal when it is moved: otherwise, these signals remain at logic ‘1.’ Each time the mouse is moved, three 11-bit words are sent from the mouse to the host device, as shown in Figure 10. Each of the 11-bit words contains a ‘0’ start bit, followed by 8 bits of data (LSB first), followed by an odd parity bit, and terminated with a ‘1’ stop bit. Thus, each data transmission contains 33 bits, where bits 0, 11, and 22 are ‘0’ start bits, and bits 11, 21, and 33 are ‘1’ stop bits. The three 8-bit data fields contain movement data as shown in the figure above. Data is valid at the falling edge of the clock, and the clock period is 20 to 30KHz. | + | |
| - | + | ||
| - | + | ||
| - | The mouse assumes a relative coordinate system wherein moving the mouse to the right generates a positive number in the X field, and moving to the left generates a negative number. Likewise, moving the mouse up generates a positive number in the Y field, and moving down represents a negative number (the XS and YS bits in the status byte are the sign bits – a ‘1’ indicates a negative number). The magnitude of the X and Y numbers represent the rate of mouse movement – the larger the number, the faster the mouse is moving (the XV and YV bits in the status byte are movement overflow indicators – a ‘1’ means overflow has occurred). If the mouse moves continuously, | + | |
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | The microcontroller also supports Microsoft Intellimouse-type extensions for reporting back a third axis representing the mouse wheel, as shown in Table 8. | + | |
| - | + | ||
| - | + | ||
| - | | Command | + | |
| - | | EA | Set stream mode. The mouse responds with " | + | |
| - | | F4 | Enable data reporting. The mouse responds with " | + | |
| - | | F5 | Disable data reporting. The mouse responds with " | + | |
| - | | F3 | Set mouse sample rate. The mouse responds with " | + | |
| - | | FE | Resend. FE directs mouse to re-send last packet. | + | |
| - | | FF | Reset. The mouse responds with " | + | |
| - | Table 8. Microsoft Intellimouse type extensions, commands and actions | + | |
| - | + | ||
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | ====== 9 Basic I/O ====== | + | |
| - | + | ||
| - | The Nexys Video board includes eight slide switches, five push buttons, and eight individual LEDs. The pushbuttons and slide switches are connected to the FPGA via series resistors to prevent damage from inadvertent short circuits (a short circuit could occur if an FPGA pin assigned to a pushbutton or slide switch was inadvertently defined as an output). The five pushbuttons arranged in a plus-sign configuration are " | + | |
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | //Figure 11. General purpose I/O connections | + | |
| - | // | + | |
| - | + | ||
| - | The eight individual high-efficiency LEDs are anode-connected to the FPGA via 100-ohm resistors, so they will turn on when a logic high voltage is applied to their respective I/O pin. Additional LEDs that are not user-accessible indicate power-on, FPGA programming status, and USB and Ethernet port status. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ====== Pmod Connectors ====== | + | |
| - | + | ||
| - | The Pmod connectors are arranged in a 2x6 right-angle, | + | |
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | //Figure 12. PMOD Connectors- Front view as loaded on PCB// | + | |
| - | + | ||
| - | The Nexys Video features four Pmod connectors of different “styles” with subtle differences between them. Table 9 summarizes these differences. | + | |
| - | + | ||
| - | + | ||
| - | | Pmod conector | + | |
| - | | JXADC | VADJ | Dual | Differential; | + | |
| - | | JA | 3.3 V | Digital-only | + | |
| - | | JB, JC | 3.3 V | Digital-only | + | |
| - | //Table 9. Pmod differences// | + | |
| - | + | ||
| - | JXADC is a dual digital/ | + | |
| - | + | ||
| - | For slow digital signals, below 10 MHz, all Pmod connectors are equivalent, if VADJ is set to 3.3 V (see the Power Supplies section). For higher frequencies, | + | |
| - | + | ||
| - | | PMOD Pinouts | + | |
| - | | JA1: B13 | JB1: G14 | JC1: K2 | + | |
| - | | JA2: F14 | JB2: P15 | JC2: E7 | JXADC2: A15 | | + | |
| - | | JA3: D17 | JB3: V11 | JC3: J3 | JXADC3: B16 | | + | |
| - | | JA4: E17 | JB4: V15 | JC4: J4 | JXADC4: B18 | | + | |
| - | | JA7: G13 | JB7: K16 | JC7: K1 | JXADC7: A14 | | + | |
| - | | JA8: C17 | JB8: R16 | JC8: E6 | JXADC8: A16 | | + | |
| - | | JA9: D18 | JB9: T9 | JC9: J2 | JXADC9: B17 | | + | |
| - | | JA10: E18 | JB10: U11 | JC10: G6 | JXADC10: A18 | | + | |
| - | //Table 10. Nexys Video Pmod Pin Assignments | + | |
| - | // | + | |
| - | + | ||
| - | + | ||
| - | Digilent produces a large collection of Pmod accessory boards that can attach to the Pmod expansion connectors to add ready-made functions like A/D’s, D/A’s, motor drivers, sensors, and other functions. See [[http:// | + | |
| - | + | ||
| - | ===== 10.1 Dual Analog/ | + | |
| - | + | ||
| - | The on-board Pmod expansion connector labeled “JXADC” is wired to the auxiliary analog input pins of the FPGA. Depending on the configuration, | + | |
| - | + | ||
| - | The Dual Analog/ | + | |
| - | + | ||
| - | NOTE: The coupled routing and the anti-alias filters might limit the data speeds when used for digital signals. | + | |
| - | + | ||
| - | The XADC core within the Artix-7 is a dual channel 12-bit analog-to-digital converter capable of operating at 1 MSPS. Either channel can be driven by any of the auxiliary analog input pairs connected to the JXADC header. The XADC core is controlled and accessed from a user design via the Dynamic Reconfiguration Port (DRP). The DRP also provides access to voltage monitors that are present on each of the FPGA’s power rails, and a temperature sensor that is internal to the FPGA. For more information on using the XADC core, refer to the Xilinx document titled “7 Series FPGAs and Zynq-7000 All Programmable SoC XADC Dual 12-Bit 1 MSPS Analog-to-Digital Converter User Guide” (ug480¹). | + | |
| - | + | ||
| - | ¹[[http:// | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | ====== 11 Low Pin Count FMC Connector ====== | + | |
| - | + | ||
| - | The Nexys Video includes an FPGA Mezzanine Card (FMC) Standard-conforming carrier card connector that enables connecting mezzanine modules compliant with the same standard. | + | |
| - | + | ||
| - | The actual connector used is a Samtec ASP-134603-01, | + | |
| - | + | ||
| - | The pin-out of the FMC connector can be found in the UCF/XDC constraints file available on [[http:// | + | |
| - | The gigabit transceiver lane includes a receive pair, a transmit pair, and a reference clock input to the FPGA, all going to MGT bank 216. The transceiver lane is wired to lane 3 (GTPE2_CHANNEL_X0Y7). The reference clock is wired to REFCLK1 of the same bank (GTPE2_COMMON_X0Y1). It is important to keep in mind, that bank 216 being the only one available in this FPGA package, it is shared between the DisplayPort source and FMC ports. Depending on the exact application, | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ====== MicroSD Slot ====== | + | |
| - | + | ||
| - | The Nexys Video provides a microSD slot for both FPGA configuration and user access. The on-board Auxiliary Function microcontroller shares the SD card bus with the FPGA. Before the FPGA is configured the microcontroller must have access to the SD card via a SPI interface. Once a bit file is downloaded to the FPGA (from any source), the microcontroller powers off the SD slot and relinquishes control of the bus. The FPGA design will find the SD card in an unpowered state. | + | |
| - | + | ||
| - | All of the SD pins on the FPGA are wired to support full SD speeds in native interface mode, as shown in Figure 12. The SPI interface is also available, if needed. Once control over the SD bus is passed from the microcontroller to the FPGA, the SD_RESET signal needs to be actively driven low by the FPGA to power the microSD card slot. For information on implementing an SD card controller, refer to the SD card specification available at [[http:// | + | |
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | Figure 13. Artix-7 microSD card connector interface (PIC24 connections not shown) | + | |
| - | + | ||
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ====== 13 HDMI ====== | + | |
| - | + | ||
| - | The Nexys Video board contains two buffered HDMI ports: one source port J8 (output), and one sink port J9 (input). Both ports use HDMI type-A receptacles and include HDMI buffers AD8195 and TMDS141. The buffers work by terminating, | + | |
| - | + | ||
| - | Both HDMI and DVI systems use the same TMDS signaling standard, directly supported by Artix-7 user I/O infrastructure. Also, HDMI sources are backward compatible with DVI sinks and vice versa. Thus, simple passive adaptors (available at most electronics stores) can be used to drive a DVI monitor or accept a DVI input. The HDMI receptacle only includes digital signals, so only DVI-D mode is possible. | + | |
| - | + | ||
| - | The 19-pin HDMI connectors include three differential data channels, one differential clock channel five GND connections, | + | |
| - | + | ||
| - | | Pin/ | + | |
| - | | | Description | + | |
| - | | D[2: | + | |
| - | | CLK+/ | + | |
| - | | CEC | Consumer Electronics Control bidirectional | + | |
| - | | SCL, SDA | DDC bidirectional | + | |
| - | | HPD | Hot-plug detect input | + | |
| - | | 5V0 | Powered from 5V rail | | Powers auxiliary signals | + | |
| - | | TXEN | | + | |
| - | //Figure 14. HDMI pin description and assignment | + | |
| - | // | + | |
| - | + | ||
| - | ===== TMDS Signals ===== | + | |
| - | + | ||
| - | HDMI/DVI is a high-speed digital video stream interface using transition-minimized differential signaling (TMDS). To make proper use of either of the HDMI ports a standard-compliant transmitter or receiver needs to be implemented in the FPGA. The implementation details are outside the scope of this manual. Check out [[http:// | + | |
| - | + | ||
| - | ===== Auxiliary signals ===== | + | |
| - | + | ||
| - | A pull-down resistor on the TXEN signal makes sure the sink buffer’s transmitter facing the FPGA is disabled by default. An FPGA design using the sink port needs to actively drive this pin high for the buffer to pass data through. | + | |
| - | + | ||
| - | Whenever a sink is ready and wishes to announce its presence, it connects the HPD pin to the 5V0 supply pin. The source | + | |
| - | + | ||
| - | The Display Data Channel, or DDC, is a collection of protocols the enable communication between the display (sink) and graphics adapter (source). The DDC2B variant is based on I2C, the bus master being the source and the bus slave the sink. When a source detects high level on the HPD pin, it queries the sink over the DDC bus for video capabilities. It determines whether the sink is DVI or HDMI-capable and what resolutions are supported. Only afterwards will video transmission begin. Refer to VESA E-DDC specifications for more information. | + | |
| - | + | ||
| - | The Consumer Electronics Control, or CEC, is an optional protocol that allows control messages to be passed around on an HDMI chain between different products. A common use case is a TV passing control messages originating from a universal remote to a DVR or satellite receiver. It is a one-wire protocol at 3.3V level connected to an FPGA user I/O pin. The wire can be controlled in an open-drain fashion allowing for multiple devices sharing a common CEC wire. Refer to the CEC addendum of HDMI 1.3 or later specifications for more information. | + | |
| - | + | ||
| - | + | ||
| - | ====== 14 DisplayPort Output ====== | + | |
| - | + | ||
| - | DisplayPort is a relatively new industry standard for digital display technology. Its advantages over existing technologies are: higher bandwidth for greater resolutions and color depths, bi-directional auxiliary channel, variable interface width, and flexible power topologies among others. | + | |
| - | + | ||
| - | DisplayPort defines a high-speed main link carrying audio and video data, an auxiliary channel, and a hot-plug detect signal. The main link is a uni-directional, | + | |
| - | + | ||
| - | The auxiliary channel is a bidirectional channel for link management and device control. It is AC-coupled, just like the main link lanes, but uses a different encoding and the lower data rate of 1Mbps. Upon hot-plug detection a Source will attempt to configure the link through link training. Handshaking link parameters happens via the auxiliary channel. | + | |
| - | + | ||
| - | Nexys Video includes a Mini DisplayPort (mDP) connector wired in the Source role. The maximum lane count supported is two. The two lanes of the main link are wired to the only gigabit transceiver bank: MGT bank 216. Lane 0 is mapped to GTPE2_CHANNEL_X0Y4, | + | |
| - | + | ||
| - | On-board there is a 135 MHz reference oscillator mapped to GTPE2_COMMON_X0Y1/ | + | |
| - | + | ||
| - | The auxiliary channel is a bidirectional LVDS bus. Depending on the Xilinx tool/IP version, instantiating a differential I/O buffer with LVDS signaling standard might not be possible. The work-around is to have two pairs of pins wired and shorted together as seen in Figure 14. One pair should be implemented as input-only and the other as output-only. | + | |
| - | + | ||
| - | If the tool/IP allows bidirectional LVDS buffers, only one of the pairs needs to be used (it does not matter which), while the other declared as input and not used. | + | |
| - | + | ||
| - | Depending on the exact application, | + | |
| - | + | ||
| - | The hot-plug detect (HPD) signal connects to a general user I/O pin and should be configured as an input. | + | |
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | Figure 15. DisplayPort wiring diagram | + | |
| - | + | ||
| - | The full implementation details of the DisplayPort standard is outside the scope of this document. Refer to the full specifications published by VESA for more details. | + | |
| - | + | ||
| - | ===== OLED ===== | + | |
| - | + | ||
| - | A Univision Technology Inc. UG-2832HSWEG04 is loaded on the Nexys Video. It is a white monochrome, 128 x 32, 0.91” organic LED display matrix bundled with a Solomon Systech SSD1306 display controller. The display data interface towards the FPGA is a 4-wire serial peripheral interface (SPI). The 4 wires in controller-terminology are CS#, D/C#, SDIN, and SCLK, but CS# is hard-wired to ground. This adds to the reset and two power control signals for proper start-up sequencing. The signals are summarized in Table 11. | + | |
| - | + | ||
| - | | Signal | + | |
| - | | RES# | Reset | Active-low | + | |
| - | | CS# | Chip select (always active) | + | |
| - | | D/C# | Data (high)/ | + | |
| - | | SCLK | Serial Clock | Active-high | + | |
| - | | SDIN | Serial Data | Active-high | + | |
| - | | VBAT# | Power enable for internal power supply | + | |
| + | Go to [[nexys-video: | ||

