Course:ACOE361 – Digital Systems DesignDate:28/01/10 Time: 2 1/2 hours
Instructions to candidates: Attemptfour out of five questions, and indicate which ones you intend to answer. Use the separate answer sheets. All questions carry equal marks.No notes or printed material is allowed.
Question 1:
Write the structural VHDL code creating the circuit of Figure 1. Specify the
- Top-level Entity(5 marks)
- Architecture (component declaration)(5 marks)
- Architecture (signal declaration)(5 marks)
- Architecture (component instantiation)(10 marks)
assuming all components have been precompiled.
Figure 1
1
Question 2:
The circuit implementing the state machine of Figure 2 has a single input (X) and a single output (Y) and should be self-correcting.
(a)Give the state transition table(10 marks)
(b)Describe in VHDL the circuit that implements the following state diagram (Figure 2). Specify the
- Entity(5 marks)
- Architecture (type and signal declarations)(2 marks)
- Architecture (state memory)(3 marks)
- Architecture (next state, output logic)(5 marks)
Figure 2
Question 3:
a)Describe the circuit shown below (Figure 3) in VHDL. Specify both entity and architecture (15 marks)
b)Write an appropriate VHDL testbench for logic simulation.(10 marks)
Figure 3
Question 4:
(a)Draw the circuit that will be produced by synthesizing the following VHDL code fragment: (10 marks)
signal a, b, c: std_logic;
signal out_r: std_logic;
begin
process(clk, rst_n)
begin
if rst_n = ‘0’ then
out_r <= ‘0’;
elsif rising_edge(clk) then
if c = ‘0’ then
out_r <= a AND b;
else
out_r <= a OR b;
end if;
end if;
end process;
end;
(b)Find the errors in the following VHDL code fragment. Indicate if it is a syntax error or a synthesis error and its effect on simulation/synthesis (15 marks)
Architecture rtl of q4 is
signal a: std_logic_vector(3 downto 0);
signal b, d: std_logic;
signal c: std_logic_vector(5 downto 0);
begin
a <= ‘0100’;
b <= “0”;
process(d)
begin
if d = ‘1’ then
c <= “11”&a;
end if;
end process;
c <= ”00”&a + b;
end;
Question 5:
(a)Answer the following questions:(15 marks)
1. The VHDL assignment a <= b**c; where, a, b and c are appropriate input and output signals can be:
1
- Simulated and synthesized
- Simulated but not synthesized
- Synthesized but not simulated
- Neither simulated nor synthesized
1
2. The proper sequence of steps in a digital system design flow is
1
- Synthesis, HDL description, simulation
- HDL description, simulation, synthesis
- Simulation, synthesis, HDL description
- HDL description, synthesis, simulation
1
3. What probably happened, when a signal appears to have a value of ‘U’ in simulation?
1
- The signal was never assigned a value
- The signal was assigned multiple values
- The signal is missing from a process sensitivity list
- The signal is mistakenly placed in a process sensitivity list
1
4. The sensitivity list of a process describing a 2-to-4 decoder should include:
1
- one signal
- two signals
- three signals
- four signals
1
5. An FPGA basic logic element is composed of:
1
- Decoders, multipliers, and dividers
- Compilers, assemblers, and debuggers
- ALUs, control logic, and memory
- LUTs, F/Fs and multiplexers
1
(b) Describe a rising edge triggered T flip-flop in VHDL(10 marks)
1