﻿ Digital Circuits and Systems - Circuits i Sistemes Digitals (CSD) - EETAC - UPC
 Bachelor's Degree in Telecommunications Systems and in Network Engineering

## The concept of incomplete logic functions

Most of the circuits require their truth table to be completed, meaning that we like to set an output value '1' or '0' for every single input combination. But for some applications such is not the case. For some circuits, we don't need to specify completely the truth table, perhaps because some input combinations are physically impossible or because some inputs will never happen under normal conditions.

Let's consider a pair of example projects.

Tank level meter

1.- Specifications

 Fig.1. This device, a tank level meter build using digital optical sensors (1), (2) attached to  the tank wall also has a particular truth table because the sensors generates a '1' when covered in water.

 Fig.2. Truth table definition with 120 combinations where the code is not necessary because the error condition will be displayed instead. .

2.- Planning

We can choose easily between plan A (equations) and plan B (truth table). In order to obtain the equations will be necessary to write the truth table in minilog format. Or, if we like to translate the table to VHDL we must draw an schematic like this one in Fig. 3.

 Fig.3. Schematic to write the VHDL file using the plan B.

3.- Development

Plan A: This is the truth table in minilog format Tank_level_meter.tbl, so that for example the PoS equations can be obtained and translated to VHDL in this file Tank_level_meter.vhd.

Plan B: The Tank_level_meter.vhd. Example of an RTL view, and a technology view.

4.- Test

An example testbench file Tank_level_meter_tb.vhd

An example of timing diagram.

BCD (binary coded decimal) to 7-segment display decoder (BCD_7seg_decoder)

1.- Specifications

 Fig.4. When operating, this decoder only deals with inputs from 0 to 9 ("0000" to "1001"). The remaining 6 combinations are of no interest. Fig.5. Truth table definition.

2.- Planning

It is planned, developed and tested as the HEX_7seg_decoder. This is an example truth table written in Minilog format BCD_7seg_decoder.tbl