Multiplex Serial Interfaces With HOTLink

Similar documents
SMPTE-259M/DVB-ASI Scrambler/Controller

TAXI -compatible HOTLink Transceiver

Laboratory 4. Figure 1: Serdes Transceiver

TAXI -compatible HOTLink Transceiver


Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits

ECEN454 Digital Integrated Circuit Design. Sequential Circuits. Sequencing. Output depends on current inputs

8b10b Macro. v2.0. This data sheet defines the functionality of Version 1.0 of the 8b10b macro.

Dual Link DVI Receiver Implementation

Single Channel LVDS Tx

Enable input provides synchronized operation with other components

A MISSILE INSTRUMENTATION ENCODER

Implementing Audio IP in SDI II on Arria V Development Board

VLSI Chip Design Project TSEK06

NS8050U MICROWIRE PLUSTM Interface

Chapter 2. Digital Circuits

Clocking Spring /18/05

Texas Instruments TNETE2201 Ethernet Transceiver Circuit Analysis

DEDICATED TO EMBEDDED SOLUTIONS

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

2.6 Reset Design Strategy

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

Exercise 1-2. Digital Trunk Interface EXERCISE OBJECTIVE

Digital Phase Adjustment Scheme 0 6/3/98, Chaney. A Digital Phase Adjustment Circuit for ATM and ATM- like Data Formats. by Thomas J.

Although the examples given in this application note are based on the ZX-24, the principles can be equally well applied to the other ZX processors.

ECE 545 Digital System Design with VHDL Lecture 2. Digital Logic Refresher Part B Sequential Logic Building Blocks

Dual Link DVI Receiver Implementation

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part B Sequential Logic Building Blocks

Sequential Logic Basics

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Registers

MULTIDYNE INNOVATIONS IN TELEVISION TESTING & DISTRIBUTION DIGITAL VIDEO, AUDIO & DATA FIBER OPTIC MULTIPLEXER TRANSPORT SYSTEM

GALILEO Timing Receiver

Lecture 11: Sequential Circuit Design


ECE 545 Digital System Design with VHDL Lecture 1B. Digital Logic Refresher Part B Sequential Logic Building Blocks

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS

Figure 1 shows a simple implementation of a clock switch, using an AND-OR type multiplexer logic.

Chapter 4. Logic Design

IT T35 Digital system desigm y - ii /s - iii

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

Chapter 9 MSI Logic Circuits

Decade Counters Mod-5 counter: Decade Counter:

Asynchronous inputs. 9 - Metastability and Clock Recovery. A simple synchronizer. Only one synchronizer per input

Synchronization Issues During Encoder / Decoder Tests

Scan. This is a sample of the first 15 pages of the Scan chapter.

FPGA Design. Part I - Hardware Components. Thomas Lenzi

Serial Digital Interface II Reference Design for Stratix V Devices

BUSES IN COMPUTER ARCHITECTURE

CHAPTER 6 ASYNCHRONOUS QUASI DELAY INSENSITIVE TEMPLATES (QDI) BASED VITERBI DECODER

Experiment 8 Introduction to Latches and Flip-Flops and registers

SMPTE 292M EG-1 Color Bar Generation, RP 198 Pathological Generation, Grey Pattern Generation IP Core - AN4088

Review of Sequential Logic Circuits

The ASI demonstration uses the Altera ASI MegaCore function and the Cyclone video demonstration board.

SingMai Electronics SM06. Advanced Composite Video Interface: HD-SDI to acvi converter module. User Manual. Revision 0.

Digital Transmission System Signaling Protocol EVLA Memorandum No. 33 Version 3

FOM-1090 FOM-1090 FOM FOM-1090 w/ DB-25 Female FOM-1091 w/ DB-25 Male

B. The specified product shall be manufactured by a firm whose quality system is in compliance with the I.S./ISO 9001/EN 29001, QUALITY SYSTEM.

Operating Manual Ver.1.1

White Paper Lower Costs in Broadcasting Applications With Integration Using FPGAs

CPS311 Lecture: Sequential Circuits

Lecture 10: Sequential Circuits

Single-channel HOTLink II Transceiver

Ultra ATA Implementation Guide

CPE/EE 427, CPE 527 VLSI Design I Sequential Circuits. Sequencing

DP8212 DP8212M 8-Bit Input Output Port

Implementing SMPTE SDI Interfaces with Artix-7 FPGA GTP Transceivers Author: John Snow

EE 447/547 VLSI Design. Lecture 9: Sequential Circuits. VLSI Design EE 447/547 Sequential circuits 1

SMPTE 259M EG-1 Color Bar Generation, RP 178 Pathological Generation, Grey Pattern Generation IP Core AN4087

Digital Logic & Computer Design CS Professor Dan Moldovan Spring Chapter 3 :: Sequential Logic Design

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

MUHAMMAD NAEEM LATIF MCS 3 RD SEMESTER KHANEWAL

SingMai Electronics SM06. Advanced Composite Video Interface: DVI/HD-SDI to acvi converter module. User Manual. Revision th December 2016

Sequential Circuit Design: Part 1

Generation and Measurement of Burst Digital Audio Signals with Audio Analyzer UPD

Counter dan Register

Vignana Bharathi Institute of Technology UNIT 4 DLD

DisplayPort 1.4 Link Layer Compliance

New GRABLINK Frame Grabbers

CHAPTER1: Digital Logic Circuits

C65SPACE-HSSL Gbps multi-rate, multi-lane, SerDes macro IP. Description. Features

Sequential Circuit Design: Part 1

11. Sequential Elements

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,


EE178 Lecture Module 4. Eric Crabill SJSU / Xilinx Fall 2005

Technical Article MS-2714

Prosumer Video Cable Equalizer

Digital Logic Design ENEE x. Lecture 19

A New Hardware Implementation of Manchester Line Decoder

RF4432 wireless transceiver module

Fox-Bus (FxB) Protocol Timing (Version 4) 9/1/2011

University of Arizona January 18, 2000 Joel Steinberg Rev. 1.6

EEE2135 Digital Logic Design Chapter 6. Latches/Flip-Flops and Registers/Counters 서강대학교 전자공학과

CS 254 DIGITAL LOGIC DESIGN. Universal Asynchronous Receiver/Transmitter

INSTRUCTION MANUAL FOR MODEL IOC534 LOW LATENCY FIBER OPTIC TRANSMIT / RECEIVE MODULE

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

2. Logic Elements and Logic Array Blocks in the Cyclone III Device Family

Asynchronous IC Interconnect Network Design and Implementation Using a Standard ASIC Flow

CMS Conference Report

SignalTap Plus System Analyzer

Transcription:

Introduction Serial interfaces have been used for digital communications almost as long as digital logic has been in existence. By far the largest majority of these serial interfaces operate at what are today considered to be relatively slow speeds. This would include computer interfaces like RS-C/V. and RS-/V., and telecommunications interfaces like ISN and T1/E1 digital telephone lines. Whenever more than one of these types of interfaces must be connected between two points, it usually requires a separate electrical or optical cable for each serial link. Many installations require large numbers of serial interfaces to be connected between various peripherals and computer systems. At times these interfaces must be routed across distances or environments that are not normally supported by the native interface. To save on cable and installation cost, and the physical space required for multiple cables, multiplexers were developed that allow more than one serial interface to communicate across a common cable. These multiplexers exist in a wide range of functionality and complexity. This application note describes the architecture of standard types of serial multiplexers, describes a new architecture for a high-performance, low-cost multiplexer, and shows a complete design based on this architecture. Statistical Multiplexers A popular type of multiplexer for use with RS-C serial communications is known as a statistical multiplexer. It operates by accepting bytes of data from multiple slow-speed serial sources, and combining them into a single, faster serial-rate interface. The word statistical is important here. In this type of multiplexer, the high-speed serial interface does not have sufficient bandwidth to allow all input ports to operate at full-speed with sustained data transfers. It instead operates on the statistical probability that few of the slow-speed ports will need to transfer information at the same instant in time. When the available bandwidth of the high-speed link is consumed, the remaining slow-speed ports are forced to wait until some bandwidth becomes available. This type of multiplexer is generally sufficient for text-based keyboard entry and displays, but not for telemetry or machine control applications. These applications require an interface that can provide a deterministic response with a guaranteed bandwidth. Time ivision Multiplexers Time division multiplexing operates by assigning a fixed portion of the total bandwidth of the high-speed link to each of the slower-speed serial interfaces. The bandwidth allocation is usually made to allow each of the slower-speed interfaces to operate at their maximum rate. The multiplexing is often performed at a byte level, with various link-level protocols running to allow the merged data streams to be correctly separated at the destination end of the link. Multiplexers of this type are generally limited by the maximum bandwidth available on the high-speed serial link. Because of this limited bandwidth, multiple forms of re-synchronization and compression are often added to maximize the usage of the available bandwidth. Unfortunately these also add significant cost and complexity to the total system. Serial Interface Multiplexer With the development of low-cost, high data-rate serial interface ICs, a simpler method is now available to create a multiplexed serial interface. This method requires no interpretation of any of the data present at the input or output serial interfaces, and is both self synchronizing and initializing. This type of multiplexer operates by sampling serial or static input signals at a very high rate, with these samples then routed across a high-speed serial link to a remote register where they are then output as a continuous sequence of bits. A multiplexer of this type, supporting eight bidirectional serial streams, can be made using a pair of CY7C71 CPLs and two CY7B9/CY7B9 HOTLink transmitter/receiver pairs. Figure 1 shows a block diagram of a multiplexer based on this architecture. Because of the sampled nature of this type of design, each serial input can operate at a different rate. These streams can run as slow as C, and (if operated synchronous to the byte-rate reference clock) as fast as 0 Mbits/second! The level translation block in Figure 1 is used to convert the serial input signal to the TTL domain of the CPL. Most serial interfaces use logic levels other than standard TTL or CMOS. Common signaling for serial interfaces use current-loop, RS-C, RS-9, and RS- signal levels. To allow these signals to be sampled prior to serialization, they must be converted to the TTL domain. Serial Sampling Flip-Flops Following conversion, the signals are sampled at a rate much faster than the native bit-rate of the incoming data. The byte-rate clock used to load data into the HOTLink transmitter is also used as the sampling clock. This allows the incoming data to be sampled at between 16 and 0 Megasamples per second. Since the data is asynchronous to the first sampling register, the output of each sampling register is then routed through a second flip-flop to remove any metastability effects from the sampled data. This serial input-to-hotlink transmitter data path is shown in Figure. The logic in Figure is actually duplicated eight times, once for each serial input stream. When selecting a sampling clock rate, keep in mind how the data will be used at the remote end of the link. For most asynchronous data streams, the data recovery operation is performed by a UART (Universal Asynchronous Receiver/Transmitter). These UARTs also use oversampling to recover the Cypress Semiconductor Corporation 901 North First Street San Jose CA 91 0-9-600 March 11, 1999

ATA INPUT INPUTS INPUT- TO-TTL CONVERTERS SAMPLING S TRANSMITTER RECEIVER FRAMING CONTROL S TTL-TO CONVERTERS TTL-TO CONVERTERS S HIGH-SPEE LINKS FRAMING CONTROL RECEIVER TRANSMITTER data. This oversampling is usually done at a rate 16 times the bit-rate of the data being received. To limit any edge displacement effects caused by the sampling flip-flops in the multiplexer, the serial streams should SAMPLING S INPUT- TO-TTL CONVERTERS INPUTS Figure 1. Serial Multiplexer Block iagram LEVEL CONVERTER BYTE-RATE CLOCK SAMPLING FLIP-FLOPS IN CPL Figure. Single-Bit Transmit Path TX INPUT also be sampled at a minimum of 16 times the fastest bit-rate being sent. Even when sampled at this fast rate, this multiplexer design allows each link to support data rates up to. Mbits/second. High-Speed Serial Links As each sample clock occurs, a group of eight samples (one from each serial stream) is presented to the CY7B9 HOTLink transmitter. The transmitter is configured in EN- COE mode, with ENA normally active (LOW). This allows the HOTLink transmitter to accept a byte of data on each rising clock edge, encode the data using its integrated B/10B encoder, and sequence out a stream of bits at ten times the sample clock rate. These bits are then sent across a fiber-optic, coaxial, or twisted pair cable to a remote CY7B9 HOTLink receiver. The details of how to couple and communicate with HOTLink using various types of media are covered in the Cypress HOTLink User s Guide. The HOTLink receiver is configured with the same byte-rate reference clock as the transmitter. Its internal PLL (Phase Locked Loop) based data-separator allows it to extract a bit-rate clock from the serial data stream, and use this clock to recover the bits sent across the serial interface. Framing Control To decode characters from the serial data stream the HOTLink receiver needs to know where the characters begin and end. In asynchronous serial interfaces, the start of a character is usually indicated by the first transition detected by the receiver. This transition marks the first bit of the character and is often known as a start-bit. HOTLink operates with a synchronous serial interface where bits are always being transmitted. Rather than using a start-bit to determine the first bit of each character, a 10-bit counter is used to count off the bits in each character. As the serial bits are received they are clocked into a shift register. When the 10-bit counter rolls over, the bits in the shift register are captured as a 10-bit character. This 10-bit character is then decoded into the original byte that was transmitted using the integrated B/10B decoder in the HOTLink receiver. To properly decode the data, the HOTLink receiver must also be correctly framed to the incoming serial data stream. Framing is the alignment of the internal 10-bit counter with the data on the serial interface. Until the receiver is correctly framed, it has no way of knowing the starting point of a character in the data stream, and many received groups of ten bits will decode into illegal characters. To frame to the data stream it is necessary for framing to be enabled (RF set HIGH) and for one or more K. characters to be received. The K. (or SYNC) character is a special group of ten bits that cannot occur within or across any other group of ten bits. Since this pattern is unique, the receiver can use it to determine the beginning and ending points of a character. When a SYNC character is received (and framing is enabled), the 10-bit counter in the receiver is reset so that all following characters are counted off from the correct location in the bit stream. For use in links of this type, the HOTLink receiver contains a multi-byte framer to prevent framing on received characters that have been modified (by noise or other external effects) to look like a SYNC character. When the multi-byte framer is

enabled, the receiver requires a minimum of two SYNC characters within a five-byte span to allow it to frame to the data stream. Framing Controller The information sent across the high-speed link is normally all data characters. Once a link has been properly framed, there is no need to send additional synchronization characters unless some external event causes a receiver to lose framing. A well-designed link running in a normal environment should be able to maintain synchronization over a period of months or even years. However, external events will eventually occur: cables are unplugged, power is lost. When events like these happen (including first power on) the HOTLink receiver no longer knows where each 10-bit character starts or ends. The only way to correct this is for the HOTLink transmitter to send SYNC characters instead of data characters, allowing the receiver to frame to the data stream. By making use of the automatic SYNC generation and detection capabilities built into the HOTLink transmitter and receiver, it is possible to build a small state machine to monitor the high-speed links, and automatically generate framing characters when needed. A state diagram of such a framing controller is shown in Figure, with its operation detailed in Figure and the following text. The VHL source code for this machine is listed in process PROC1 in Appendix B. NOTE: The signal, data, and state relationships shown in Figure are relative in nature. The time relationships between a signal and its resulting action may take more clocks than shown, but will never take fewer. This state machine operates along two different paths. One path is entered if a character error is detected (indicating that RY=0 AN RVS=0 STATE-0 (WAIT) ENA=0 STATE- ENA=0 RY=1 OR RVS=1 RY=0 AN RVS=0 RY=1 AN RVS=0 RVS=0 STATE-1 ENA=1 RVS=1 STATE- ENA=1 Figure. Framing Controller State iagram RVS=1 RY=X the local receiver may be out of lock), while the other path is entered if a burst of SYNC characters is detected (indicating that the remote receiver needs to be reframed). All character errors are indicated by a HIGH state on the HOTLink receiver RVS signal. However, SYNC characters are detected in one of two different modes. If a single SYNC character is detected (one that has a data character on either side of it), that SYNC character is presented to the HOTLink receiver outputs and RY pulses LOW (the same as with any other character). However, if multiple contiguous SYNC characters are received (with no data or non-sync characters GENERATE SYNC RVS ETECTE TX-A A-ATA RX-B FRAME CONTROL-A FRAME CONTROL-B RY ETECTE RX-B RVS RX-A B-ATA TX-B GENERATE SYNC RX-B RY TX-B ENA B-ATA B_STATE ATA ATA ATA ATA SYNC SYNC ATA ATA ATA ATA S-0 S-0 S-0 S-1 S- S-0 S-0 S-0 S-0 S-0 RX-A RVS RX-A RY TX-A ENA A-ATA A-STATE ATA ATA ATA ATA ATA ATA ATA SYNC ATA SYNC S-0 S-0 S-0 S-0 S-0 S-0 S-1 S- S- S-0 Figure. Framing Controller Operation

between them) then the RY signal will go HIGH and stay HIGH for all but the last SYNC character received. Operation The frame-control state machine at both ends of each link normally waits in State-0, looking for either the RVS or RY pins on the attached HOTLink receiver to be HIGH at the rising edge of the recovered clock (CKR). If RVS is HIGH, the receiver has detected a character that violated one (or more) of the encoding rules for B/10B characters. This generally means that either the character was corrupted during transmission, or that the receiver is no longer correctly framed to the data stream. When detected by the receiver at the B end of the A-to-B link shown in Figure, the status of RVS being active is latched into Frame Controller-B, and the Frame Controller-B state machine moves to State-1. If RY were HIGH when in State-0, the state machine would also advance to State-1. RY being HIGH indicates that two (or more) directly adjacent SYNC characters were detected by the local HOTLink receiver. In Figure, the receiver at the A end of the B-to-A link is shown driving RY HIGH for one byte time. This causes the Frame Controller-A state machine to also move to State-1. In State-1, the ENA input to the local HOTLink transmitter is driven HIGH. This forces the local transmitter to generate a SYNC character that can then be used by the remote receiver for framing. If State-1 was entered because RVS was HIGH, the state machine advances directly to State-. If RVS was LOW, then the machine enters State-. In Figure, Frame Controller-B moves directly to State-, while Frame Controller-A moves to State-. State- is a filler state. No actual decisions are made in this state, but it does control the generation of SYNC characters, and enters State- on the next clock. Since ENA is set LOW in State-, the local HOTLink transmitter encodes and sends whatever character is presented to its input register, instead of sending another SYNC character. This data character, sent immediately following a SYNC character, allows the remote receiver to start a reframe operation, but will not generate a RY HIGH indication at the remote receiver. This keeps the remote framing control state machine in the State-0 or wait state. State- is the normal ending state for both the RY and RVS induced paths through the framing control state machine. In State-, ENA is again driven HIGH, forcing generation of a second SYNC character. If the state machine was initially triggered by RY, a pair of SYNC codes are generated, but with a single byte of data sent between them. When these SYNC codes are detected by the remote receiver, it will (if necessary) adjust its framing to the correct character boundaries. Since a data character was sent between the two SYNC characters, the remote receiver will not generate a RY HIGH condition. If the machine was triggered by RVS, a pair of directly adjacent SYNC codes are generated. When these codes are detected by the remote receiver, it will (if necessary) adjust its framing to the correct character boundaries. Since the SYNC codes are directly adjacent, they will also force a RY HIGH indication at the remote HOTLink receiver, triggering the remote framing control state machine. If RVS remains active in State-, the machine remains in the same state and continues to generate a continuous stream of SYNC codes. When RVS is finally removed, the machine returns to State-0. Analysis of the functionality of this state machine shows that it has no dead-lock conditions. This allows bidirectional links to be built with this machine in a peer-to-peer fashion, rather than requiring one end to be declared a master and the other a slave. Clocks The output of the reframe control state machine controls the HOTLink transmitter, and therefore must be synchronous to the transmitter CKW clock. Unfortunately, the two status inputs that control the state machine s operation (RY and RVS) are synchronous to the HOTLink receiver CKR clock. To insure that these two signals (which may only be valid at a single rising edge of CKR) are not missed by the reframe control state machine, they are first captured using the CKR clock. Once captured, they are routed through metastable prevention flip-flops to convert them to the CKW clock domain. This is the same CKW clock used for the sampling registers, the HOTLink transmitter byte clock, and the REFCLK for the HOTLink receiver. The CKR clock, generated by the HOTLink receiver, is based on the clock extracted from the received high-speed serial data stream. This clock, while close to CKW in frequency, is totally asynchronous to CKW. This CKR clock is used to capture the byte-wide recovered data that the HOTLink receiver outputs on every rising edge of the CKR clock. Serial Output Register The data decoded by the HOTLink receiver should not be directly fed to the output level converters. The HOTLink receiver output register will at times contain various command characters (in addition to the normal data characters) when errors are detected or when SYNC codes are being received. To prevent these non-data characters from propagating to the low-speed serial interface outputs, the data is fed from the HOTLink receiver into an output register. This register is configured such that it keeps the its last data value if a command character is present in the HOTLink receiver output latch. Since illegal characters are also decoded as command characters, it is only necessary to use the SC/ pin from the HOTLink receiver as a controlling signal. The HOTLink receiver-to-serial output data path is shown in Figure. The logic in Figure is actually duplicated eight times, once for each serial output stream. RECOVERE BYTE CLOCK RX SC/ EN ATA IN CPL LEVEL CONVERTER Figure. Single-Bit Receive Path ATA

Serial Interface Multiplexer esign The schematic of one end of such a multiplexer is shown in Appendix A, with the complete VHL source code for the CY7C71 CPL listed in Appendix B. This multiplexer allows eight RS- interfaces to be combined into a single high-speed serial stream. Because of the sampling-based architecture, each RS- interface can operate as synchronous or asynchronous, and each can also operate at totally independent data rates. The complete design for one end of the multiplexer can be built from a single clock oscillator and five ICs: two MAX0 RS- level converters, one CY7C71 CPL, a CY7B9 HOTLink transmitter, and a CY7B9 HOTLink receiver. With the components, the entire multiplexer operates from a single +VC supply and dissipates less than W. Standard RJ-11-type connectors are used for the RS- connections. While not an official standard connector for RS- interfaces, it has found common industry usage for serial interfaces due to its low cost and high packing density. The Cypress CY7C71 Flash programmable CPL is a perfect fit for this application. The multiplexer design makes use of every available pin on the part. Supporting dual clocks and macrocells, the designs for the sampling registers, output register, reframe control state machine, and metastable conversion functions, all fit with fully automatic pin placement using the Cypress Warp VHL compiler, all without any special compiler directives. The Cypress CY7B9/9 HOTLinks are only shown interfacing to the CY7C71 CPL. Both parts are configured in ENCOE mode to allow use of their integrated B/10B encoder/decoders. The HOTLink receiver is also configured with RF hardwired HIGH to force the receiver s framer into multi-byte framing operation. The design and implementation of various high-speed serial interfaces are not shown here. etailed information on how to interface to various types of copper or optical media may be found in the Cypress HOTLink User s Guide. The maximum serial rate supported by this design is limited by the MAX0 RS--to-TTL converters. These parts provide the level conversion from RS--to-TLL and TTL-to-RS- signal levels. Since the maximum data rate supported by these level converters is 10 kbits/second, the oscillator used to clock the sampling registers and the HOTLink parts can be run as slow as 16 MHz. Even at this slow clock rate, each RS- interface is sampled at over 100 times its maximum bit rate. Because of the high sampling rate, this design could easily be expanded to 16,, or even 6 serial lines with only a slight modification to the control circuitry. This would involve replication of the level translators for all added ports as well as the sampling and output registers. In addition to the level translators, a pair of small counters (-bit for 6 serial lines) would be added to each end of the high-speed link. These counters would control the sequencing of each of the sampling registers to the HOTLink transmitter, and similar sequencing of the captured data to the output registers. For this sequencing to work correctly, these counters must both be initialized to the same count. This initialization can be handled by the presence of a received SYNC character, such that the counter at the transmit end of each link is reset whenever ENA is driven HIGH (forcing transmission of a SYNC character), and the counter at the receive end of each link is reset when any SYNC character is detected. Conclusion Multiplexing multiple signals onto a high-speed serial link often allows connections between pieces of equipment to be made in a more economical fashion than routing the individual signals as a parallel bus. The RS- serial multiplexer design in this application note can be easily modified to support other serial or parallel interfaces (or a mixture of these). This can allow an interface to be extended from what would normally be a few meters, to multiple kilometers, with minimal amounts of hardware and cost.

Appendix A. Eight-Port RS- Serial Multiplexer Schematic RS- INPUT CONNECTORS MAX 0 MAX 0 +V +V OSC ROUT0 ROUT1 ROUT ROUT ROUT ROUT ROUT6 ROUT7 CY7C71 SC_ RIN0 RIN1 RIN RIN RIN RIN RIN6 RIN7 RVS RY RXCLK TIN0 TIN1 TIN TIN TIN TIN TIN6 TIN7 TOUT0 TOUT1 TOUT TOUT TOUT TOUT TOUT6 TOUT7 ENA TXCLK +V 70 Ω SC/ 0 1 6 7 RVS RY A/B RF SO BISTEN MOE CKR CY7B9 REFCLK INA+ INA- INB+ INB- SC/ 0 1 6 7 SVS ENA ENN BISTEN CY7B9 OUTA+ OUTA- OUTB+ OUTB- OUTC+ OUTC- CKW MOE FOTO +V HIGH-SPEE INPUT 1.7k Ω HIGH-SPEE 6

Appendix B. HOTLink Serial Multiplexer CPL Source Code -- SER_MUX.VH -- Serial interface multiplexer. This design uses a synchronous PL to -- both perform as a metastable prevention circuit for loading asynchronous -- slow-speed serial data into a HOTLink transmitter, and for controlling -- automatic framing functions when framing is lost at a receiver. -- Mode of automatic recovery is -- 1. if errors are detected (RVS indication) enter error recovery --. in error recovery, if you detected errors send a pair of -- adjacent k. s for every error you detect --. if you are not in an error detect state (state1) and receive, -- k.s, send a pair for every burst you detect, but with a byte -- between each k. ENTITY ser_mux_top IS PORT ( txclk: IN BIT; -- HOTLink transmitter byte clock rxclk: IN BIT; -- HOTLink receiver recovered clock tin: IN BIT_VECTOR(0 TO 7); -- asynchronous serial data bits in tout: OUT BIT_VECTOR(0 TO 7); -- synchronous serial data bits out rin: IN BIT_VECTOR(0 TO 7); -- synchronous serial data bits in rout: BUFFER BIT_VECTOR(0 TO 7); -- synchronous serial data bits out SC_: IN BIT; -- HOTLink RX SC/ pin RY: IN BIT; -- HOTLink RX /RY signal RVS: IN BIT; -- HOTLink RX RVS signal ENA: OUT BIT -- HOTLink TX ENA signal ); ATTRIBUTE part_name OF ser_mux_top:entity IS C71 ; EN ser_mux_top; USE work.cypress.all; ARCHITECTURE serial_mux_top OF ser_mux_top IS -- declare internal signals SIGNAL txi: BIT_VECTOR(0 TO 7);-- first metastable pipeline register SIGNAL RVS_rx1: BIT; -- captured RVS signal SIGNAL RVS_tx1: BIT; -- RVS in txclk domain SIGNAL RVS_tx: BIT; -- RVS after second metastable latch SIGNAL RY_rx1: BIT; -- captured RY signal SIGNAL RY_tx1: BIT; -- RY in txclk domain SIGNAL RY_tx: BIT; -- RY after second metastable latch -- declare state machine TYPE sync_state IS ( state0, state1, -- no errors, waiting for RVS or RY -- output /ENA (LOW) -- RVS or RY found, output ENA (HIGH) 7

Appendix B. HOTLink Serial Multiplexer CPL Source Code (continued) state, state ); -- RY active, output /ENA (LOW) -- output ENA (HIGH) -- declare state machine encoding, state variable, and initial state SIGNAL s_state : sync_state := state0; BEGIN -- Pipeline all eight data bits to the HOTLink TX meta1: PROCESS BEGIN WAIT UNTIL txclk = 1 ; tout <= txi; txi <= tin; EN PROCESS meta1; -- Filter out command codes from receive data rxfilt1: PROCESS BEGIN WAIT UNTIL rxclk = 1 ; IF (SC_ = 0 ) THEN rout <= rin; rout <= rout; EN IF; EN PROCESS rxfilt1; -- latch and synchronize RVS signal rxfilt: PROCESS BEGIN WAIT UNTIL rxclk = 1 ; IF (RVS = 1 ) THEN RVS_rx1 <= 1 ; ELSIF (RVS_tx = 1 ) THEN RVS_rx1 <= 0 ; RVS_rx1 <= RVS_rx1; EN IF; EN PROCESS rxfilt; -- latch and synchronize RY signal rxfilt: PROCESS BEGIN IF (RY = 1 ) THEN RY_rx1 <= 1 ; ELSIF (RY_tx = 1 ) THEN RY_rx1 <= 0 ; RY_rx1 <= RY_rx1; EN IF; EN PROCESS rxfilt;

Appendix B. HOTLink Serial Multiplexer CPL Source Code (continued) -- add synchronization flops rx_tx_filt: PROCESS BEGIN WAIT UNTIL txclk = 1 ; RY_tx <= RY_tx1; RY_tx1 <= RY_rx1; RVS_tx <= RVS_tx1; RVS_tx1 <= RVS_rx1; EN PROCESS rx_tx_filt; -- monitor receive path for violation errors proc1: PROCESS BEGIN WAIT UNTIL (txclk= 1 ); CASE s_state IS WHEN state0 => IF ((RVS_tx = 1 ) OR (RY_tx = 1 )) THEN s_state <= state1; s_state <= state0; EN IF; WHEN state1 => -- RVS or RY detected IF (RVS_tx = 1 ) THEN s_state <= state; s_state <= state; EN IF; WHEN state => -- RY detected s_state <= state; WHEN state => IF (RVS_tx = 1 ) THEN s_state <= state; -- keep ENA HIGH ELSIF (RY_tx = 1 ) THEN s_state <= state; s_state <= state0; EN IF; WHEN others => s_state <= state0; EN CASE; EN PROCESS proc1; -- assign outputs -- force k. codes when errors have been detected ENA <= 1 WHEN (s_state = state1 OR s_state = state) 0 ; EN serial_mux_top; HOTLink is a trademark and Warp is a registered trademark of Cypress Semiconductor Corporation. Cypress Semiconductor Corporation, 1999. The information contained herein is subject to change without notice. Cypress Semiconductor Corporation assumes no responsibility for the use of any circuitry other than circuitry embodied in a Cypress Semiconductor product. Nor does it convey or imply any license under patent or other rights. Cypress Semiconductor does not authorize its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress Semiconductor products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress Semiconductor against all charges.