Field Programmable Gate Array Application for Decoding IRIG-B Time Code

Similar documents
Precise time Event Interrupts Alarm interrupts (time compare/strobe)

bc635pci-v2 PCI Time & Frequency Processor KEY FEATURES IRIG A, B, G, E, IEEE 1344, NASA 36, XR3 & 2137 Time Code Inputs and Outputs Simultaneous AM o

LUPO TimeStamp Module (Ver. 1.2) Hidetada Baba

Integration of the module is easily facilitated with the included SDKs/drivers for 32/64 bit Windows and Linux, and 64 bit Solaris.

8254 is a programmable interval timer. Which is widely used in clock driven digital circuits. with out timer there will not be proper synchronization

Topics. Interfacing chips

Tektronix DPO Demo 1 Board Instruction Manual

Data sheet CPU 115 (115-6BL02)

ARINC-429/575 Interface to VME - Sy429VME-RT32

I Introduction to Real-time Applications By Prawat Nagvajara

Registers Format. 4.1 I/O Port Address

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

General Purpose Programmable Peripheral Devices. Assistant Professor, EC Dept., Sankalchand Patel College of Engg.,Visnagar

Data sheet VIPA CPU 115DP (115-6BL22)

A variety of ECONseries modules provide economical yet flexible solutions. Waveform Generation

PCI GS or PCIe8 LX Time Distribution Board

Nikhil Gupta. FPGA Challenge Takneek 2012

DaqBoard/1000. Series 16-Bit, 200-kHz PCI Data Acquisition Boards

USB-4303 Specifications

Design and Implementation of CNC Operator Panel Control Functions Based on CPLD. Huaqun Zhan, Bin Xu

Using the FADC250 Module (V1C - 5/5/14)

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

The Trigger-Time-Event System for the W7-X Experiment

Applied mechanics and applied technology in fuel injection pump bench. Rotational speed measurement system design based on CPLD

PMC429-4/8/16/32 Hardware Manual

Data sheet CC 03, Commander Compact (603-1CC21)

DS1676 Total Elapsed Time Recorder, Erasable

CHAPTER 1 GENERAL INFORMATION

Laboratory Exercise 7

NEV Spec. Document Version R01838_07

FPGA Interfacing of HD44780 Based LCD Using Delayed Finite State Machine (FSM)

DS-MPE-GPIO. PCIe MiniCard Digital I/O Module with FPGA. Rev A.1 June 2015

PCI-3E. PCI Interface Card Page 1 of 7. Description. Features

ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL. Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS

Typical modules include interfaces to ARINC-429, ARINC-561, ARINC-629 and RS-422. Each module supports up to 8 Rx or 8Tx channels.

Register Map for the PCIM-DAS16JR/16

White Paper Using the MAX II altufm Megafunction I 2 C Interface

Lecture 7. Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits. Hardware Description Language)

commodore semiconductor group NMOS 950 Rittenhouse Rd., Norristown, PA Tel.: 215/ TWX: 510/ (MEMORY, I/O, TIMER ARRAY)

Input/Output Modes Chapter 8

MSI-P400 PC/104 QUADRATURE DECODER/COUNTER CARD. PC/104 Embedded Industrial Analog I/O Series. Microcomputer Systems, Inc.

300 MBPS CCSDS PROCESSING USING FPGA s

475 Electronics for physicists Introduction to FPGA programming

PCI bit Digital Input/ Output Card for PCI Bus. User s Manual

Description INPUT INTERFACING

FM24CL04 4Kb FRAM Serial Memory

PC-CARD-DAS16/12 Specifications

CHAPTER 11. Recorder Data Packet Format Standard

M68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1

PC-CARD-DAS16/16 Specifications

CompuScope product introduction

Model JI-820 Incremental Encoder Emulator. User Manual

Chapter Operation Pinout Operation 35

ECG (EKG) Primer Jingxi Zhang ABSTRACT

The IIC interface based on ATmega8 realizes the applications of PS/2 keyboard/mouse in the system

bc635pci-v2 PCI Time and Frequency Processor

DS 1682 Total Elapsed Time Recorder with Alarm

USB 1608G Series USB Multifunction Devices

FM24C02A 2-Wire Serial EEPROM

FM24C Kb FRAM Serial Memory Features

New! New! New! New! New!

CompuScope Ultra-fast waveform digitizer card for PCI bus. APPLICATIONS. We offer the widest range of

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

Exercise 4-1. DSP Peripherals EXERCISE OBJECTIVES

16-Megabit 2.3V or 2.7V Minimum SPI Serial Flash Memory

AN OPEN ARCHITECTURE FOR MULTIPLEXING AND PROCESSING TELEMETRY DATA

1 General Driver Board Description

Developing Measurement and Control Applications with the LabVIEW FPGA Pioneer System

Preliminary Data MOS IC. Type Ordering Code Package SDA Q67100-H5092 P-DIP-8-1

Design of a Programmable Bus for Microprocessor-Based Systems

CompuScope bit, 100 MHz digital input card for the PCI bus. Features. We offer the widest range

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

UNIT - II PERIPHERAL INTERFACING WITH 8085

4. Configuring Cyclone II Devices

Advanced NI-DAQmx Programming Techniques with LabVIEW

NS32FX211 Microprocessor Compatible Real Time Clock

Product Information Sheet PX Channel, 14-Bit Waveform Digitizer

A 3-SPEED STEPPER MOTOR

PCI-1751U. 48-bit Digital Input/Output Card with Universal PCI Bus. User Manual


END-TERM EXAMINATION

PERIPHERAL INTERFACING Rev. 1.0

Features. High-precision Analog input board (Low Profile size) for PCI Express AI-1616L-LPE AI-1616L-LPE 1. Ver.1.01

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Lab Assignment 3 Altera Richards Controller and Logic Analyzer Laboratory Rev.

A variety of ECONseries modules provide economical yet flexible solutions

CompuScope 1602 product introduction

EE4390 Microprocessors. Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System

ECE 271 Microcomputer Architecture and Applications University of Maine

Overview: Functional Description:

Your Network. Optimized.

Product Information Sheet PDA14 2 Channel, 14-Bit Waveform Digitizer APPLICATIONS FEATURES OVERVIEW

Functional block diagram AD53x1 (Analog Devices)

FM24C02B/04B/08B/16B 2-Wire Serial EEPROM

I/O Systems (3): Clocks and Timers. CSE 2431: Introduction to Operating Systems

Fiberlizer-Module Top View (As Assembled On Card)

PSIM Tutorial. How to Use SPI in F2833x Target. February Powersim Inc.

24C08/24C16. Two-Wire Serial EEPROM. Preliminary datasheet 8K (1024 X 8)/16K (2048 X 8) General Description. Pin Configuration

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

Hands-on Lab 2: LabVIEW NI-DAQ Basics 2

Design of a Gigabit Distributed Data Multiplexer and Recorder System

Transcription:

Field Programmable Gate Array Application for Decoding IRIG-B Time Code Item Type text; Proceedings Authors Brown, Jarrod P. Publisher International Foundation for Telemetering Journal International Telemetering Conference Proceedings Rights Copyright held by the author; distribution rights International Foundation for Telemetering Download date 29/06/2018 04:51:37 Link to Item http://hdl.handle.net/10150/579691

FIELD PROGRAMMABLE GATE ARRAY APPLICATION FOR DECODING IRIG-B TIME CODE Jarrod P. Brown 96th Range Control Squadron 96th Test Wing Eglin AFB, FL ABSTRACT A field programmable gate array (FPGA) is used to decode Inter-Range Instrumentation Group (IRIG) time code for a PC-based Time-Space-Position Information (TSPI) acquisition. The FPGA architecture can latch time via an external event trigger or a programmable periodic internal event. By syncing time with an external IRIG Group Type B (IRIG-B) signal and using an 8 megahertz (MHz) internal clock, captured time has 125 nanosecond (ns) precision. A Range Instrumentation Control System (RICS) application utilizing the FPGA design to capture IRIG time is presented and test results show matching time accuracy when compared to commercial IRIG time capture hardware components. KEY WORDS Field Programmable Gate Array, IRIG-B, Time-Space-Position Information, Decode, Range time application INTRODUCTION Range instrumentation like the AN/FPS-16 radars at Eglin AFB, FL, capture Time-Space- Position Information (TSPI) to collect time-stamped azimuth, elevation, and range data for mission analysis. A Range Instrumentation and Control System (RICS) used by the 96th Test Wing collects TSPI and distributes it across a wide area network in real-time. In order to accurately depict the position of moving targets and to maintain consistent time across all applications on the network, a precise time-stamp must be captured. Most range instrumentation sites use Global Positioning System (GPS) receivers to obtain time and output the time in Inter-Range Instrumentation Group Type B (IRIG-B) format. The data collection subcomponent of RICS referred to as the Data Interface Adapter (DIA) captures pedestal azimuth and elevation from range instrumentation and also captures time from a GPS receiver. 1

Currently, the DIA requires a Time and Frequency Processor PCI card to interface time produced by a GPS receiver to the DIA software. The card latches IRIG-B time from the GPS receiver in a register that can be accessed by the DIA software via the PCI bus. Other PCI cards required in the DIA are a PCI network card, PCI synchro card, and Acromag PCI carrier card. The carrier card interfaces with embedded Industrial I/O Pack (IP) modules to capture digital inputs, generate analog outputs, and execute custom logic instantiated on a field programmable gate array (FPGA). Two custom PCI cards were previously replaced with custom logic instantiated on the Acromag FPGA IP module. Additional logic can be added to the FPGA to decode IRIG-B time code and store the time in local registers accessible by the DIA software, allowing the Time and Frequency Processor PCI card to be replaced as well. The benefits of such a design include reducing the PCI slot requirement of the DIA by replacing the Time and Frequency Processor PCI card, simplifying the hardware required to build the DIA, and providing flexibility to customize functionality of the IRIG time code application. IRIG-B TIME CODE FORMAT SPECIFICATION The IRIG time code standards are developed and maintained by the Range Commanders Council (RCC) standards body of the Telecommunications and Timing Group denoted as IRIG Standard 200-04 [1]. The standard defines a family of six serial time code formats, each using different bit rates. IRIG-B has a pulse rate of 100 pulses-per-second over a one-second time frame. Therefore each of the 100 encoded symbols of the frame has a 10 millisecond (ms) index count interval. All IRIG time code formats use pulse-width coding. A pulse width of 50% the index count interval, or 5 ms, is decoded as a 1 symbol. A pulse width of 20% the index count interval, or 2 ms, is decoded as a 0 symbol. And a pulse width of 80% the index count interval, or, 8 ms, is decoded as a P symbol typically referred to as the position reference symbol. Figure 1 shows the pulse widths of the three symbol types. Figure 1. Pulse widths of IRIG-B symbols [2] An IRIG-B frame consists of 10 words. The P symbol is used to separate words. Each word has 10 symbols where the last symbol is always P and the middle symbol is always 0. The remaining 8 symbols in each word translate to a two-digit integer value. Figure 2 shows the IRIG-B time frame message format. The first word contains seconds, the second word contains minutes, the third word contains hours, and the fourth and fifth words contain the three-digit value, days. The ninth and tenth words contain straight binary seconds-of-day. For more information on the message format, reference IRIG Standard 200-04 [1]. 2

Figure 2. IRIG-B time frame message format [1] IRIG-B time code format can be transmitted as an un-modulated direct current level switch (DCLS) signal or it can be amplitude-modulated with a carrier signal. The typical carrier signal used to modulate IRIG-B is a sinusoid wave carrier signal with a frequency of 1 khz and mark-to-space ratio of 10:3. The modulated signal is better for transmitting over long distances; however, additional hardware is required to demodulate the signal before decoding [1]. FPGA DESIGN FOR DECODING IRIG-B The IRIG-B time code signal can be decoded in real-time using logic on an FPGA device. A custom logic component is described using Very High Speed Integrated Circuit (VHSIC) Hardware Description Language (VHDL) to decode the pulse width time code into symbols [3] and latch the symbols at the end of each frame. The frame is then translated into seconds, minutes, hours, and days of the year as described in the IRIG-B format specification. In addition to the time encoded in the IRIG-B message, sub-second measurements are calculated using the internal clock on the FPGA IP module. Figure 3 shows the block symbol of the time decoding component. The inputs to the component are listed on the left half of the symbol, and the outputs are listed on the right half of the symbol. The IRIG decode component can be instantiated in any FPGA design entity by creating a component port map and connecting signals to the inputs and outputs. 3

Figure 3. IRIG decode component block symbol The IRIG time decoding and latch logic are formed by one process statement. The flow diagram of the sequential logic in the process statement is shown in Figure 4. Custom data types are defined in a VHDL package to enable object oriented abstraction of IRIG symbol and frame data. A custom data type called irig_symbol is defined as 0, 1, and P, matching the three symbols in an IRIG message. Another data type called irig_frame is defined as an array of one hundred irig_symbol bits. The process statement sequential logic is started every time a rising edge is detected on the clock signal. The first statement implemented is an increment in the clock cycle counter used to calculate the sub-seconds value of time. The number of clock cycles counted is converted to nanoseconds based on the frequency of the internal clock. Resolution of 100 ns can be obtained with a 10 MHz clock. If the IRIG-B input signal is high during the clock cycle, another counter called the pulse interval counter is incremented. This clock counter is used to determine how long the IRIG-B signal is held high. If the IRIG-B signal captured on the previous clock cycle is low and the current IRIG-B signal is high, then a rising edge is detected and the previous symbol can be decoded into irig_symbols using the pulse interval counter. When the pulse interval counter is approximately 2 ms then the symbol is decoded as 0. If the signal is high for approximately 5 ms then the symbol is decoded as 1 and if the counter is approximately 8 ms then the symbol is decoded as P [3]. Another counter is used to count the number of symbol pulses to keep track of the symbol index. The index counter is incremented when the rising edge of the IRIG-B input signal is detected [4]. On the rising edge of a new symbol, the previous symbol is stored in the symbol array frame, irig_frame, by the current index. The start of a new IRIG frame is determined when two P symbols are decoded consecutively and the index is one hundred [4]. When a new frame is detected, the irig_frame is latched and stored in local memory registers, the index is reset to zero, and the process is repeated for the next frame. Therefore the current time is always available to the user. Due to the timestamp 4

location at the beginning of the IRIG-B message frame, decoded time lags actual time by one second [4]. As a result, one second is added to the decoded time to compensate for the time lag. This can be accomplished in software after time is decoded and read from memory using the mktime function in the <ctime> C++ library. Rising Edge of Clock Increment sub-second counter IRIG signal high? Increment pulse interval counter IRIG rising edge? Decode pulse interval counter as 0, 1', or P Store symbol in frame array Increment frame index Reset counters Index >= 100? Latch frame Reset frame index Event enabled? Internal source? Increment internal source counter External trigger? Latch event frame Latch event sub-seconds Reset internal source counter Generate interrupt Counter >= period? End process statement Figure 4. Decode and latch process statement flow diagram Finally, the process statement checks an input flag to see if event interrupts are enabled. If the event source is internal a separate clock cycle counter is incremented. The counter is compared to an internal event period input register to trigger an event. If the event source is external an external trigger input is monitored. An event is triggered on the rising edge of the external latch signal. When an event is triggered the irig_frame and current sub- 5

seconds are latched and stored in local memory registers and a time event output triggers an external interrupt. Type-conversion functions are defined in the custom VHDL package to pull time information from an irig_frame format and route time data directly into separate registers. The functions convert the IRIG symbol array frame into seconds, minutes, hours, days, or seconds of the year in integer or standard logic vector format. The package also includes a function used to validate the IRIG frame for correct format. This function can be used to provide signal-lock status information to the user. FPGA PCI INTERFACE LOGIC The FPGA must interface with DIA software via the PCI bus connections and digital inputs and outputs (DIO) connections. The structure layout of the FPGA design and interface hardware is shown in Figure 5. The PCI interface logic of the FPGA design routes signals between the PCI carrier card and components in the FPGA architecture. The logic is written in VHDL and provided by Acromag. Both the IRIG decode component and PCI interface logic are required to input IRIG time code, decode time, and store accurate time in memory accessible by DIA software. The FPGA is connected to several IP bus signals such as system clock, data bus, address bus, and interrupt requests. The signals are used to provide PCI bus interface to clock divider, interrupt request, memory logic, and custom logic. The IRIG-B DCLS time code signal and external event trigger are input to the FPGA using DIO pins. PCI Carrier Card 8 MHz Clock Interrupt Bus Data/Address Bus Clock Divider Interrupt Request Memory Register Interface Logic IRIG Decode/Latch Logic FPGA IRIG-B DCLS External Event Digital Input/Output 50-Pin Connector Figure 5. Diagram of FPGA structural layout 6

A programmable clock generator integrated circuit (IC) is available on the Acromag FPGA IP module. Clock divider logic on the FPGA interfaces with the IC, system clock, and internal memory to program the clock to any desired frequency value between 250 KHz and 100 MHz. The clock divider VHDL logic to program the IC is also provided by Acromag. The interrupt request portion of the PCI interface logic routes an interrupt request signal from the decode and latch component to the PCI carrier board which then passes the interrupt request onto the host. DIA software contains an interrupt service routine (ISR) which is called when an interrupt request is received on the PCI bus. The PCI bus can also communicate with FPGA internal memory via the data bus, address bus, and select lines. By using DIA software to read or write to the IP module s address on the carrier card, data can be transferred between the PCI bus and the FPGA. VHDL is used to describe custom memory architecture within the interface logic with read and write functionality. Signals from internal registers containing time information such as days, minutes, seconds, nanoseconds, as well as status bits are routed to the memory interface logic and are accessible by the PCI carrier card. SYSTEM DESCRIPTION The DIA computer is physically connected to a radar system and is the main data acquisition device. The computer is comprised of an obsolete rack-mount ATX motherboard with six PCI slots and several custom and commercial data PCI cards for input and output [5]. By replacing the PCI-based Time and Frequency Processor with an FPGA solution, the PCI slot requirement can be reduced to three allowing the motherboard to be replaced with a modern motherboard. The multithreaded DIA software is implemented in C/C++ and runs under a real-time operating system, VxWorks by WindRiver Systems [5]. One of the PCI cards the DIA uses is an Acromag PCI bus carrier card. This card interfaces industry-standard IP modules to a PCI bus on a PC-based computer system. The custom IRIG-B decoding FPGA design is programmed on an Acromag IP-EP200 Series IP module with Altera Cyclone II FPGA which is placed onto the Acromag PCI carrier card. Inputs to the Acromag FPGA IP module via a 50-pin connector include a 10 pulses-per-second data collection trigger and an IRIG-B DCLS time code signal. VxWorks software running on the DIA PC uses C++ libraries to access memory registers on the FPGA and handle interrupts. Figure 6 shows the primary data flow through the DIA. Data collection is initiated via an interrupt from the FPGA module. The FPGA module can either generate internal interrupt events itself at a periodic rate or interrupts can be triggered by an external event from the GPS receiver unit. When an event occurs, event time is latched in local memory on the FPGA. The detection of an FPGA time interrupt causes the GPS ISR to place a message on the data collection message queue to inform the data collection thread that data is ready. The data collection thread reads the latched IRIG time from the FPGA as well as 7

space-position data from the radar and builds a data packet for transmission on the RICS network and local data recording. GPS Unit Data Trigger (10pps) IRIG-B DCLS Time Code Interrupt and Time FPGA Azimuth Elevation Range Event Time Acromag Carrier IP440 AUX Data GPS ISR Data-Ready Msg Data Col MsgQ Data Col Thread Data Packet Data Packet Network Card Record Thread Data Rec MsgQ Range Data File Figure 6. DIA data flow [5] TEST RESULTS The FPGA application for decoding IRIG-B time code was tested with RICS. The test setup took advantage of using both the custom FPGA design and the existing Time and Frequency Processor concurrently. The devices were triggered simultaneously to capture time using a 10 pulses-per-second signal from the GPS receiver unit. The parallel test setup allowed both devices to latch and decode the current IRIG-B time code on the rising edge of the external event signal. The time was recorded for 22 seconds, and saved in a log file. Each data point should be exactly 100 ms apart. The time difference between each device and an ideal reference time data set is plotted in Figure 7. The largest discrepancy over the time internal is 21 µs using the bc635 card and only 0.125 µs using the FPGA. The existing time capture method used on the DIA for RICS is a Symmetricom bc635 PCI Time and Frequency Processor. The bc635 time card decodes a modulated IRIG-B signal from the GPS receiver unit and stores the time in local memory accessible by DIA software. The bc635 card has 100 ns precision and has the ability to latch event time on an external event or a programmable internal timer. The internal periodic event capability was also tested with RICS. The custom periodic timer on the FPGA was set to 10 Hz using DIA software. The FPGA device triggered events every 100 ms. The event was output on an external pin and used to trigger a software interrupt on the DIA to record 8

time. The event trigger output was verified using an oscilloscope. The correct spacing of the internal periodic timestamps was verified in the log file. Figure 7. Test results CONCLUSIONS Test results show the accuracy of the time decoded using the FPGA is comparable to commercial hardware such as the bc635 PCI Time and Frequency Processor. The FPGA range application reduces the hardware required to collect TSPI data at radar sites; resulting in a simpler, more efficient, and cost effective data collection system. For applications already utilizing FPGAs for other requirements, the IRIG time decoding logic component can easily be added to the application with no additional hardware required. The FPGA solution also provides flexibility to add features and customize functionality which may not be available in commercial hardware. The FPGA design captures IRIG-B DCLS time code with resolution down to 125 ns. Future work could increase the clock rate using the Acromag clock divider already on the chip to attempt finer resolution time-stamps. Additional features such as GPS flywheeling when an IRIG signal is dropped or IRIG-A support could also be added to the design. 9

REFERENCES 1. Range Commanders Council Telecommunications and Timing Group, IRIG Standard, 200-04, Secretariat, U.S. Army White Sands Missle Range, New Mexico, Sept., 2004. 2. Hong-Jiao Ma, Yong-Hui Hu, Fu-Ping Wu, Hai-Bo Yuan, and Jian-Xun Li, Design and implementation of IRIG-B Code Time System using CPLD technique based on PCI bus, Proceedings of 2008 IEEE Int. Frequency Control Symp., Honolulu, Hawaii, May, 2008, pp. 464-467. 3. Qingquing Fu, Zhiqiang Gao, and Aiping Wu, The decoded design of IRIG-B, Proceedings of 2011 Int. Conf. Electronics, Communications and Control, Ningbo, China, Sept., 2011, pp. 2898-2901. 4. Guoping Zhou, Shaojun Qu, and Yan Xu, The decoding device design of IRIG-B format time code, Proceedings of 2012 Int. Conf. Consumer Electronics, Communications and Networks, Yichang, China, April, 2012, pp. 3575-3578. 5. Mike Paulick, Tim Thomas, An object-oriented PC-based system for TSPI collection and distribution, Int. Telemetering Conf., Las Vegas, Nevada, October, 2001. 10