Docsity

Digital Electronics Assignment, Assignments of Digital Electronics

Partial preview of the text

Download Digital Electronics Assignment and more Assignments Digital Electronics in PDF only on Docsity!

Q0 (2 Marks) !!Almost Free!!

(estimated time: 2 minutes)

Q0a (1 Mark) Best part

What is the best part of the course?

Q0b (1 Mark) Most improve

What one thing could be done to most improve the course for the remainder of the term?

Q1 (21 Marks) VHDL Semantics

(estimated time: 15 minutes)

For each pair of VHDL programs in Q1a and Q1b, answer whether the signal z has the same behaviour in both programs.

NOTES:

  1. The code shown is the body of the architecture.
  2. All signals are of type std logic.
  3. The inputs are a, b, and clk.
  4. “Same simulation cycle behaviour” means that the two programs have the same number of simulation cycles and that at the end of each simulation cycle, z has the same value in both programs.
  5. Similarly, “same simulation round behaviour” means that the two programs have the same number of simulation rounds and that at the end of each simulation round, z has the same value in both programs.
  6. If the programs do not have the same behaviour:
    • Describe (with text or waveforms) the behaviour of the inputs that will cause the different behaviour.
    • Describe (with text or waveforms) how the behaviour of z is different in the two programs.
  7. If the programs do have the same behaviour: justify your answer with text or waveforms.

Q1a (10 Marks)

Program 1 c <= not a; z <= b and c;

Program 2 process (a,b) begin z <= b and not a; end process;

Yes No z has the same simulation cycle behaviour

Yes No z has the same simulation round behaviour

Q1b (10 Marks)

The lines of code that are different in the two programs are denoted with underline.

Program 1 process begin clk <= ’0’; wait for 5 ns; clk <= ’1’; wait for 5 ns; end process;

process begin wait until rising_edge(clk); z <= a; end process;

Program 2 process begin clk <= ’0’; wait for 5 ns; clk <= ’1’; wait for 5 ns; end process; process begin wait for 5 ns; z <= a; end process;

Yes No z has the same simulation cycle behaviour

Yes No z has the same simulation round behaviour

Total number of cells used:

Q3 (27 Marks) FSM

(estimated time: 18 minutes)

Design the hardware for the state-machine shown below.

NOTES:

  1. The design shall use the normal building blocks: arithmetic datapath components, multiplexers, Boolean gates, and regis- ters.
  2. The output and registers shall have the same behaviour, clock-cycle by clock-cycle, as the state machine.
  3. Clearly label all inputs, registers, and outputs.
  4. For each control signal (mux-select or chip-enable):
    • Label the signal in the schematic
    • In the space below the schematic, write an expression for the circuitry to drive the signal
    • Do not draw the circuitry to drive the signal
  5. Marks will be earned for functional correctness, elegance of the design, and neatness of the drawing.

S

S

i_v=’0’ i_v=’1’

m = p + r

b=’0’ b=’1’ p’ = m × 4

z = p

b=’0’^ b=’1’

S

default: o_v = ’0’

o_v = ’1’

p’ = a r’ = 0

r’ = m × 2

Q3a (4 Marks) State Encoding

Based on the ECE-327 guidelines, show your encoding for each state,

Q3b (9 Marks) Next-State Circuitry

Draw a schematic for the next-state circuitry.

Write an expression for each control signal (mux-select or chip-enable) in the next-state circuitry.

Q3c (14 Marks) Datapath Circuitry

Draw a schematic for the datapath circuitry.

Write an expression for each control signal (mux-select or chip-enable) in the datapath circuitry.

Analysis:

Latency: Clock period:

Number of muls: Number of adds: Number of regs: Number of input ports: Number of output ports:

This page is for scratch work for any question.