FIRMWARE DOWNLOAD AND ON-BOARD FLASH PROM PROGRAMMING

Similar documents
Drift Chamber Firmware Download Description

Maxim > Design Support > Technical Documents > Application Notes > Microcontrollers > APP 3339

SVF TCL Library User's Guide Revision November /14

SVF SERIAL VECTOR FORMAT SPECIFICATION JTAG BOUNDARY SCAN

BSCAN2 Multiple Scan Port Linker

Revision: 11/30/ E Main Suite D Pullman, WA (509) Voice and Fax

JTAG and I 2 C on ELMB

Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used

cpci-dart Base-Board & Daughter-Board

Interfacing a PS/2 Keyboard

475 Electronics for physicists Introduction to FPGA programming

Version 1.6 Page 2 of 25 SMT351 User Manual

Introduction. SDIO Bus

Block Diagram. mast_sel. mast_inst. mast_data. mast_val mast_rdy. clk. slv_sel. slv_inst. slv_data. slv_val slv_rdy. rfifo_depth_log2.

3-D Accelerator on Chip

P-ROC. Pinball Remote Operations Controller. Version 2.4 August 8, Copyright 2017, Multimorphic, Inc. 1/28

HCAL DCC Technical Reference E. Hazen - Revised March 27, 2007 Note: Latest version of this document should be available at:

SCANSTA112 Designers Reference

High speed USB interface for digital processor system

Renesas 78K/78K0R/RL78 Family In-Circuit Emulation

5I21 SERIAL ANYTHING I/O MANUAL

GT34C02. 2Kb SPD EEPROM

User Manual. IP BiSerial BA4. Bidirectional Serial Data Interface IP Module

EMBEDDED PROCESSOR SYSTEMS.

Microprocessor Architecture. mywbut.com 1

AGM CPLD AGM CPLD DATASHEET

Parallel Cable III Emulator for the XSV Board

AN100 v1.4. EtherCAT network synchronization. Distributed clocks

PCI GS or PCIe8 LX Time Distribution Board

SATA Storage Duplicator Instruction on KC705 Rev Sep-13

Chapter 5 Internal Memory

Section II. Software Settings

Outline. Field Programmable Gate Arrays. Programming Technologies Architectures. Programming Interfaces. Historical perspective

Pretty Good Protocol - Design Specification

Connecting Spansion SPI Serial Flash to Configure Altera FPGAs

Chapter 13 Programmable Logic Device Architectures

VHDL introduction Notes

ATM-DB Firmware Specification E. Hazen Updated January 4, 2007

AT45DB041E. 4-Mbit DataFlash (with Extra 128-Kbits), 1.65V Minimum SPI Serial Flash Memory. Features

Programming in the MAXQ environment

Generic Serial Flash Interface Intel FPGA IP Core User Guide

QPRO Family of XC1700E Configuration PROMs

sequence is not needed. (ROM space). Another application is to use the poll mode to expand the number of priority levels to more than 64.

SISTEMI EMBEDDED AA 2012/2013 JTAG CIRCUITRY JTAG DEBUG MODULE JTAG-UART PERIPHERAL

HIGH TEMPERATURE 8MB SPI SERIAL FLASH MEMORY MODULE

AT45DB321E. Features. 32-Mbit DataFlash (with Extra 1-Mbits), 2.3V Minimum SPI Serial Flash Memory

Tutorial StellarIP Interface To AXI Interface

FPGA Lecture for LUPO and GTO Vol , 31 August (revised 2013, 19 November) H. Baba

Homework 9: Software Design Considerations

4I39 RS-422 ANYTHING I/O MANUAL

Application Note for EVP

Smart.IO Host Interface Layer and Demo Programs

256 channel readout board for 10x10 GEM detector. User s manual

AT25PE40. 4-Mbit DataFlash-L Page Erase Serial Flash Memory ADVANCE DATASHEET. Features

Evolution of Implementation Technologies. ECE 4211/5211 Rapid Prototyping with FPGAs. Gate Array Technology (IBM s) Programmable Logic

MachXO3 Soft Error Detection (SED)/ Correction (SEC) Usage Guide

PRELIMINARY DATASHEET

13. Configuring Stratix & Stratix GX Devices

DEBUGGING SERIAL COMMUNICATIONS WITH OTHER DEVICES

Boundary Scan Implementation

AT45DQ321. Features. 32-Mbit DataFlash (with Extra 1-Mbits), 2.3V Minimum SPI Serial Flash Memory with Dual-I/O and Quad-I/O Support

ROCCC 2.0 Pico Port Generation - Revision 0.7.4

VERIS H8035 and H8036

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences. EECS 150 Spring 2000

8-Bit Microcontroller with Flash. Application Note. Controlling FPGA Configuration with a Flash-Based Microcontroller

Design and Implementation of High Performance DDR3 SDRAM controller

Emulating an asynchronous serial interface (ASC0) via software routines

Revision: 09/21/ East Main Pullman, WA (509) Voice and Fax

Interfacing a Hyper Terminal to the Flight 86 Kit

Computer Organization. 8th Edition. Chapter 5 Internal Memory

Keysight Technologies Understanding x1149 Integrity Test. Application Note

JTAG TAP CONTROLLER PROGRAMMING USING FPGA BOARD

AT45DB021E. 2-Mbit DataFlash (with Extra 64-Kbits), 1.65V Minimum SPI Serial Flash Memory PRELIMINARY DATASHEET. Features

Each I2C master has 8-deep transmit and receive FIFOs for efficient data handling. SPI to Dual I2C Masters. Registers

QPro XQ17V16 Military 16Mbit QML Configuration PROM

RFIC TX/RX Configuration

Introduction. Overview

8086 Interrupts and Interrupt Responses:

MEMORY AND PROGRAMMABLE LOGIC

Explanation of PIC 16F84A processor data sheet Part 1: overview of the basics

Study of 1.5m data paths along CALICE slabs

AN-1025 APPLICATION NOTE

TTC/TTS Tester (TTT) Module User Manual

and Storage Device Features Description 0 Platform Flash XL High-Density Configuration

GT24C02. 2-Wire. 2Kb Serial EEPROM (Smart Card application)

DE2 Board & Quartus II Software

PIC-I/O Multifunction I/O Controller

NIOS CPU Based Embedded Computer System on Programmable Chip

PCI-HPDI32A-COS User Manual

Embedded systems. Exercise session 3. Microcontroller Programming Lab Preparation

Pigeon Point BMR-H8S-EMMC Reference Design Board Management Reference Design for µtca Modules

11. SEU Mitigation in Stratix IV Devices

Programming the isppac-powr1220at8 in a JTAG Chain Using the ATDI Pin

SECTION 11 JTAG PORT

Lab 1: Introduction to Verilog HDL and the Xilinx ISE

+Denotes a lead(pb)-free/rohs-compliant package.

Excalibur Solutions Using the Expansion Bus Interface. Introduction. EBI Characteristics

User s Manual. EIB 741 EIB 742 External Interface Box for Connecting HEIDENHAIN Encoders

VORAGO VA108x0 I 2 C programming application note

Spartan-3E FPGA Design Guide for prototyping and production environment

Transcription:

FIRMWARE DOWNLOAD AND ON-BOARD FLASH PROM PROGRAMMING Overview: The proposed system is to make possible, the reprogramming of the configuration PROM on the FEA On-board, so that it is not required to manually replace the configuration PROM every time there is a design revision and there is the comfort of standby prom to test the design revisions. The system works as follows: VHDL CODE with new design revisions XILINX Design Manager Configuration Data Stream for the new firmware As a SVF file C++ PROGRAM Converts SVF file to custom format to program the JTAG interface of the FLASH PROM MAIN PROM Holds a tested correct version of firmware, to fallback in case of errors FLASHPROM Has a JTAG interface over which the FPGA programs it FPGA Buffer space for the chunks of configuration data stream from the DCH ROM used to program the flash prom STATE MACHINE Takes in data from the buffer space and programs the JTAG interface of the flash prom C Link DCH ROM Breaks the configuration bit stream (o/p of C++ file) into chunks and send down C Link

System Level Description: The VHDL code for the new firmware is first compiled on a Xilinx Design Manager which gives a SVF (Serial Vector Format) File, which is an Assembly Language Equivalent of the actual Binary File used to program the PROM. The SVF is a standardized format to interact with a JTAG interface and contains a list a commands to work the TAP controller (state machine) inside the JTAG interface controller. The exact way Xilinx Programs a FLASH prom using parallel jtag cables is proprietary. Hence the procedure adopted here is to read the SVF file generated by Xilinx and convert the file to a convenient protocol, which can then be used to control the Jtag interface controller. For this purpose a C++ file has been written to read in the SVF file and convert it to a binary file of the desired protocol When it is desired to program the Flash Prom, the DCH ROM sends down a command down the C-Link, which triggers the prom-program state machine in the FPGA. The DCH ROM then send a chunk of the configuration bit stream such that the chunk has an integer number of SVF commands, to the FPGA. The reason to break the configuration stream is that, the FPGA does not have enough memory to store the whole data stream. The prom-program state machine in the FPGA on receipt of this data stream, generates the appropriate signals to send down the 4 control pins on the JTAG and it does so at a reduced frequency of 7.5Mhz to program the PROM The DCH ROM all this while keeps polling a status register through the D-Link, to check if the state machine has finished the programming, and if it has finished it sends down the next chunk of configuration data stream. The prom-program state machine maps every command to a set of control signals on the 4 pins of the JTAG to cause one of the 16 allowed state transitions on the JTAG. The status register also maintains a list of errors, which track the errors of transmission down the C-link, and errors on write and read back of the same memory location Between two chunks the of data stream, the clock to the JTAG is held low. There is no loss of functionality in doing so, as the JTAG is only sensitive to the rising edge of the clock and nothing else.

Technical Details Following are the list of commands in the protocol. SDR: Equivalent to the SDR command of SVF format without any check on the out coming bits on the TDO line Format: (0100 xxxx) (xxxxxxxx ) (xxxxxxxx xxxxxxxx ) - In the first part the first 4 bits signify the type of command, the next 4 bits specify The end stable state for that command. - The 2 nd part specifies the size of payload following it. It can be max of 32 bits - The 3 rd part is the actual payload of size given by the 2 nd part SDRMASK: Equivalent to the SDR command of SVF format with check on the out coming bits on the TDO line with a given mask Format: (0110 xxxx) (xxxxxxxx ) (xxxxxxxx.) (xxxxxxxx ) (xxxxxxxx..) - In the first part the first 4 bits signify the type of command, the next 4 bits specify The end stable state for that command. - The 2 nd part specifies the size of payload following it. It can be max of 32 bits - The 3 rd part is the actual payload of size given by the 2 nd part - The 4 th part is the check bits of tdo line of size given by 2 nd part - The 5 th part is the mask bits to signify which bits to check on tdo of size given by 2 nd part SDRMASK1: Equivalent to the SDR command of SVF format with check on the out coming bits on the TDO line assuming a mask of all 1 s.this command is used to optimize the fact that 99% of the time the mask is all 1 s Format: (0010 xxxx) (xxxxxxxx ) (xxxxxxxx.) (xxxxxxxx ) - In the first part the first 4 bits signify the type of command, the next 4 bits specify The end stable state for that command. - The 2 nd part specifies the size of payload following it. It can be max of 32 bits - The 3 rd part is the actual payload of size given by the 2 nd part - The 4 th part is the check bits of tdo line of size given by 2 nd part

Similarly the corresponding commands for the SIR command in SVF are SIR: Equivalent to the SDR command of SVF format without any check on the out coming bits on the TDO line Format: (0011 xxxx) (xxxxxxxx ) (xxxxxxxx xxxxxxxx ) SIRMASK: Equivalent to the SDR command of SVF format with check on the out coming bits on the TDO line with a given mask Format: (0101 xxxx) (xxxxxxxx ) (xxxxxxxx.) (xxxxxxxx ) (xxxxxxxx..) SIRMASK1: Equivalent to the SDR command of SVF format with check on the out coming bits on the TDO line assuming a mask of all 1 s.this command is used to optimize the fact that 99% of the time the mask is all 1 s Format: (0001 xxxx) (xxxxxxxx ) (xxxxxxxx.) (xxxxxxxx ) STATE: Equivalent to the STATE cmd in the SVF but has only one stable state as payload.any other complex STATE cmd can be broken into the above simple STATE cmd. Format: (1111) (one of 4 valid stable states rep. In 4 bits) RUNTEST: Equivalent to the RUNTEST cmd but specifies only in terms of TCK Format: (1011) (one of 4 valid stable states rep. In 4 bits) (payload of max of 32 bits) OPTIMIZATIONS: To optimize the fact that for the payload size, less than 32 bits are enough, the minimum number of bits required as calculated by the C++ program are passed as parameters by the data stream to the prom-program state machine in FPGA ENDDR, ENDIR Cmd in SVF format are integrated along with the end states of the SDR/SIR Cmd TIR, TDR, HIR, HDR Cmds of the SVF format are not supported since we do not program proms, which are connected in chains. It is always a single PROM The payload is sent as payload size-1 to use mostly 8 bits. The most common payload 256 can be represented in 8 bits if sent down as 255

OTHER TIDBITS OF INFORMATION ABOUT THE SYSTEM Error signal flagged to the status register -- Bit 0 says type of error -- Bit 1 says whether if there is an error or not 1 - if received tdo not same as expected tdo 0 - if received fifo data does not match any known svf command due to transmission mistake or some other mistake which permanently makes the state machine lose track of fifo. This does not mean that the state machine lost track at the instant error happened. It s only true that somehow it locked an error now. There will also be abnormal execution when the fifo gets empty before the complete payload is over. This cannot be trivially observed. After an error the state machine automatically resets itself so there is no need for any external reset to program it again. The jtag machine cannot go to the reset state between two chunks, which will cause the programming to fail. Hence it is not advised for an external master to take control of the pin between chunks during programming. The Xilinx design manager generates the svf file assuming a 1Mhz frequency hence the runtest duration has to be multiplied for 7.5Mhz at which the system is running. This is handled by the C++ program, which converts the svf file. The last line in the svf file send a 1 bit sdr which might be to verify prom, which is not a necessary command and has been omitted since the c++ file assumes a minimum 8-bit payload. After the verify stage a couple of svf commands are executed which are critical to the jtag, completing the programming operation and transferring pin control and hence is essential even though it might look redundant. When the c++ file produces an output file from the svf file most of the times a carriage return is inserted midway in the file, which causes a failure. A cursory glance through the file is good enough to locate this. Since there is a pull up on the jtag output pins, the jtag pins could not be trivially put in high impedance state, which causes a spurious clock edge. This should be kept in mind when modifying the code.

The maximum rated speed for the programming system is limited by the speed of the jtag pin speed which is currently 10Mhz. There is a lot of right to left data transmission and byte swapping which should be properly accounted for when debugging which is all clearly documented in the c++ file. The present system does not exactly mimic the way Xilinx programs the chip over the jtag cable. Hence a clock by clock analysis with the Xilinx programming will fail A number of assumptions regarding the payload size, svf file format have been made in the C++ file (documented in the c++ file), hence it is not a completely generic system but has been designed to be easily portable.