SCPA079 June   2025 TPLD1201 , TPLD1201-Q1 , TPLD1202 , TPLD1202-Q1 , TPLD2001 , TPLD2001-Q1 , TPLD801 , TPLD801-Q1

 

  1.   1
  2.   2
  3.   Trademarks

Application Description

Multiplexing (also known as muxing) is a common logic application where a device known as a multiplexer selects between several digital or analog input signals and outputs the selected input on a single line. TPLD's customizable lookup tables (LUT) allow for easy implementation of digital muxing and demuxing of signals. In addition, some TPLD devices contain analog multiplexer modules, allowing TPLD to select between external analog signals such as sine and sawtooth waves. This document provides an overview of creating digital and analog muxes with TPLD.

2:1 Digital Multiplexer

A simple 2:1 digital multiplexer can be created by a single lookup table at shown in Figure 1. The lookup table is configured with the equation (A and !C) || (B and C), where A and B are the signals to be multiplexed and C is the select signal. For more details on configuring lookup tables, see Using Lookup-Tables in Programmable Logic.

 2:1 Digital Multiplexer Using
                    a Lookup Table Figure 1 2:1 Digital Multiplexer Using a Lookup Table

A simulation of the multiplexer is provided in Figure 2, where the top two waveforms are the frequencies being multiplexed, the green waveform is the multiplexer output, and the red waveform is the select input.

 2:1 Multiplexer
                    Simulation Figure 2 2:1 Multiplexer Simulation

Chaining Multiplexers

4:1 or even 8:1 multiplexers or larger can be created by chaining three or more of the 2:1 multiplexer configuration from Figure 1. Figure 3 shows a 4:1 multiplexer configuration.

 4:1 Multiplexer From Three 2:1
                    Multiplexers Figure 3 4:1 Multiplexer From Three 2:1 Multiplexers

Figure 4 shows simulation results for this configuration. The top four signals are the inputs of varying frequencies being multiplexed, the purple signal is the multiplexer circuit output, and the bottom two signals are the multiplex select inputs.

 4:1 Multiplexer
                    Simulation Figure 4 4:1 Multiplexer Simulation

2:1 Analog Multiplexer

Some TPLD have analog multiplexers which can select between two analog signals. This module is shown in Figure 5.

 2:1 Analog Multiplexer
                    Module Figure 5 2:1 Analog Multiplexer Module

Figure 6 shows a simulation where the module muxes between a sine wave and sawtooth wave.

 2:1 Analog Multiplexer
                    Simulation Figure 6 2:1 Analog Multiplexer Simulation

Conclusion

TPLD's lookup tables allow for easy configuration of 2:1, 4:1, and even 8:1 digital muxes that can be used to select between both external and internal digital signals. Some TPLD also have 2:1 analog muxes which allow for the devices to control the selection of analog signals.