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

Analysis and design tutorials Analysis and design assignments Prototypes Exam 1 Exam 2 Questions and assessment

CSD EXA2: final exam examples and solution ideas


       

2425Q2

2425Q1

2324Q2

2324Q1

2223Q2

2223Q1

2122Q2

2122Q1

2021Q2

2021Q1

1920Q2

1920Q1

1819Q2

1819Q1

1718Q2

1718Q1


2425Q2

Problem 1.

Example of analytical solution where we have to generate all the signals of interest in several steps, indicating with dots the sampled values of the FF control inputs. When K0 = '1' the circuit generates a periodic sequence of four numbers: 2, 5, 6, 1, 2, ...

Analytical solution

Check your analytical solution with the waveforms captured from the logic analyser instrument. This is an example Proteus simulation solution.

Simulation waveforms

We can design a synchronous canonical FSM that when enabled (K0 = '1') generates the sequence 2, 5, 6, 1, 2, ..., and when disabled (K0 = '0') does nothing, keeping the last value.

Problem 2

One way to solve this circuit is fixing the Counter_mod16 to count always up, as shown in the schematic. The flexibility of this component allows other solutions for the programmable post-scaler frequency divider. It is a good idea to capture the circuit in VHDL or Proteus to verify that the system works as expected. Expanding and truncating counters is explained in L7.3 lecture

EXA2_P2_Post_scaler_divider

Problem 3

This light control is similar and simpler that the LAB6. Light switches ON and OFF clicking the push-button only one time. Therefore, only four states are required to memorise the PB clicking (Idle, Click_detected_1, Light_ON, Click_detected_2). Four D_FF will be required to encode this FSM when using one-hot code.

Problem 4

The typical FSM solved in C language, similar to many other examples such this Johnson sequencer. The diagram below sketches an example solution.

Sketch P4

Two external interrupts, for instance PB = INT0, CLK = INT1. Six port pins as inputs, for instance PORTD(5..0) and six pins as outputs, for instance PORTC(7..2). The picture also shows one way to shift and rotate 6-bit in a char (uint8_t) variable to be implemented in output_logic() state shift_right. A good idea for experimentation is to complete the project and use the CSD_PICstick board to verify how it works.

Problem 5

This serial transmitter is proposed in P10 as the highlighted project design phase #1. 

 


2425Q1

Problem 1

Analysis method I is based on paper work. This is another asynchronous circuit like the P5 highlighted project. After drawing the circuit and annotating the signals of interest, we can infer the timing diagram below generated in three consecutive steps because every flip-flop can work independently: (1) analyse Chip0, (2) analyse Chip1, be aware that W1_L is CLK2 to drive the next Chip2; and (3) complete the logic T2 to deduce Chip2 outputs. Write the levels of interest W(2..0) using another colour and list the numbers.

Scheamtic

Timing diagram

Analysis method II on Proteus simulation allows you to verify your handwritten sequence W(2..0). This is a printing of the waveforms from the logic analyser instrument adding text, blanking the grid and trimming colours.

 Printing logic analyser waveforms

Additionally, you also can use the method III to (1) capture the circuit in VHDL; (2) synthesise the circuit; and (3) run a testbench.

For calculating the maximum speed of operation fMAX we may consider the internal design of the flip-flops as any other standard FSM, as proposed in our tutorials (JK_FF, T_FF and D_FF). This circuit is asynchronous, and thus CLK signals are chained, duplicating the propagation delay, as in this sketch:

Propagation time

 

Problem 2

Expanding and truncating counters is explained in L7.3 lecture and other tutorials like P7 and LAB7. In this problem a good idea is to imagine two steps:

(1) Expanding two components Counter_mod16 to generate a Counter_mod256., in this way you have room to accommodate your 21 states (5 bits required).

(2) Truncate the number of states and restrict them to 21; let them be between 11 and 23 using LD control signals to jump from 0 --> 31 and also from 23 --> 11.

Stratetegy for counting

For instance, chaining two Counter_mod16 we can expand the number of states to 256: 1, 0, 255, 254, ..., 1, 0, 255, 254, ...

Expansion

And now, using parallel load (LD) we truncate to a particular number of states. We can use the Chip2 and Chip1 TC16 to detect the number 0 and load 31. We need extra logic to detect the terminal count 23 and to load the number 11. The schematic below is complete and ready for VHDL translation or for capturing it in Proteus.

Full design ready for VHDL translation

In order to test your circuit, it is a good idea to use (1) Proteus to simulate your design using classic CMOS or LS-TTL chips, or (2) VHDL synthesis tools for FPGA and ModelSim. You can even prototype your counter application in a training board.

 

Problem 3 - Problem 4 - Problem 5

The designs are related to circuits: D2.9 - D3.9, water tank controller; D2.3 - D3.3 LED rotator;  D2.2 - D3.2 stepper motor controller. Use your reports and feedback from your PLA to write similar answers following our systematic methodologies.

 


2324Q2

pdf and solution ideas. P1 in Proteus (method II).

 


2324Q1

pdf and solution ideas. P1 analysis (method I). P1 in Proteus (method II) to check the analytical result and edited printed output waves.

 


2223Q2

pdf and solution ideas. Question 10 async circuit in Proteus.

 


2223Q1

pdf and solution ideas. Prob1 in Proteus to check the analytical result.

 


2122Q2

pdf and solution ideas.

 


2122Q1

pdf and example solutions. Prob1 in Proteus. P1 in VHDL.

 


2021Q2

pdf and example solutions. Prob1 in Proteus.

 


2021Q1

pdf and example solutions (Prob1 - Proteus, Prob2, and Prob3 - Proteus).

 


1920Q2

pdf and example solutions.

 


1920Q1

pdf and example solutions.

 


1819Q2

pdf and example solutions (Prob1-Prob2) (Prob3, this is a tutorial solution on specifications and planning, like class notes. This is an example project in Proteus for the serial transmitter (Circuit, waves. This Prob3 is a kind of introduction for projects such N.15 where the USART peripheral is used for serial RS232 transmissions). 

 


1819Q1

pdf and example solutions (Prob1) (Prob2).

 


1718Q2

pdf and a draft solution example (Prob1, Prob2, Prob3).

 


1718Q1

pdf and a draft solution example.