UPC EETAC Bachelor's Degree in Telecommunications Systems and in Network Engineering EEL

 

Circuits based on logic gates

P1

Circuit_K design


1. Analysis specifications

Deduce the truth table of the Circuit_K represented in Fig. 1 using the four analysis methods stated in lecture L1.3. Each method represents a project.

Circuit_K sketch

Fig. 1. Example Circuit_K to analyse.

 

2. Planning how to analyse the circuit

This is the list of analysis projects:

Analysis methods

Fig. 2. General analysis concept map. Details on how to proceed can be indicated in the corresponding planning section for each method. 

Place the projects in different folders and name them accordingly. Normally we use our C: hard disk drive, for instance:

C:\CSD\P1\Circuit_K\algebra\Circuit_K.jpg, circuit_K.pdf, etc. (pictures, scanned sheets of paper, ...) 

C:\CSD\P1\Circuit_K\Proteus\Circuit_K.pdsprj (the circuit captured in Proteus to  be simulated)

C:\CSD\P1\Circuit_K\VHDL\Circuit_K.vhd, Circuit_K_tb.vhd  (VHDL files for running the EDA tools)ç

C:\CSD\P1\Circuit_K\Wolfram\Circuit_K.txt  (logic equations compatible with WolframAlpha engine)

Furthermore, something very important: do not start a project or a simulation from scratch but copying and adapting a similar exercise or file from this web. For instance Circuit_W from lecture L1.3 or from the highlighted project Circuit_C. Our web contains many examples and exercises that can be used as templates to copy and adapt.

 

3. Developing the solution

Developing means executing a given plan to achieve a solution using specific CAD/EDA tools.  


Method I.- Analytical method using Boole's algebra.

When solving a circuit in paper, this is the starting point: draw Circuit_K from Fig. 1 and analyse it to deduce its equivalent equation as it was done in Fig. 4. Proceed using Boolean algebra following the plan until you obtain a simplified expression like SoP or PoS.

Discuss results with your group mates, and continue adding missing variables until your products are transformed into minterms, or your sums into maxterms.

There are some notes and rec. on the analysis of Circuit_K using method I.

 


Method II.- Circuit simulator: Draw/capture  the circuit schematic in Proteus and run a simulation.

Try all the possible input combinations to complete the truth table. Use, copy and adapt files from Lab 1.1. This is an example circuit captured: Circuit_K.pdsprj.

              Circuit

Fig. 3. This is the solution of the truth table for a given input stimulus vector. You can repeat 2^4 = 16 times to measure and an write down the complete truth table (but print only a few combinations).

 


Method III.- VHDL project

Write a VHDL file like this Circuit_K.vhd consisting of entity and architecture based on the circuit's algebraic equation shown in Fig. 4.

Start a VHDL synthesis project using an EDA tool for a given target chip, such MAX II EPM2210F324C3 CPLD from Intel.

               RTL and tech

Fig. 6. RTL and technology results

Once examined the RTL and technology views, continue starting a VHDL simulation project using a testbench to obtain the circuit's truth table. This is an example testbench Circuit_K_tb.vhd file written translating all truth table combinations into the skeleton generated from Quartus Prime. 

              Testbench

Fig. 7. VHDL testbench fixture for measuring how the circuit works using a timing diagram when applying several input stimulus.

In this analysis project, simulation all truth table combinations will allow us complete the circuit's truth table. 

               Simulation of the Circuit_K

Fig. 8. Example of a simulation using VHDL tools of the Circuit_K.  Testing all the combinations means obtaining the truth table of the circuit as it was done using the method I in  Proteus.

 

These are some notes on the project reporting.


Method IV.- Numerical engine WolframAlpha.

Deducing the circuit's equation analysing the circuit.

             circuit and equation 

Fig. 4. Circuit and equation.

Circuit equation

Write the circuit equation in a text file step by step, for instance, Circuit_K_equation.txt. Copy and paste it in WolframAlpha and run the engine to obtain the circuit's truth table. pay attention to the variable order before annotating minterns or maxterms.

               results

Fig. 5. WolframAlpha results from the circuit's equation in Fig. 4.

These are some notes on the project reporting using WolframAlpha tool.

 

4. Testing results

In this analysis problem, the way to check the truth table deduced from one method is by comparison with the truth table obtained by other methods. Compare and discuss as well solutions with your team mates.

 

5. Analysisi reports

As usual follow the indication in the CSD rubric to generate your analysis reports. Use printed and handwritten materials as well as commented pictures from computer tools results when necessary.