Digital System Design: Implementation of Sequential Circuits
Digital System Design: Implementation of Sequential Circuits
OBJECTIVES
INTRODUCTION
This lab will introduce a new category of digital circuitry: the sequential circuit. The output
of a sequential circuit is a function both of the present input conditions and the previous
conditions of the inputs and/or outputs. The output depends on the sequence in which the
inputs are applied. These are similar devices, each being used to store a single bit of
information indefinitely. The difference between a latch and a flipflop is the condition under
which the stored bit is allowed to change.
RAM/ROM
Task
Create a project in Xilinx ISE .Add this file to the project .Add all of the modules given below
to this project. For each of the module create a test bench .Now simulate this file using ISE
Simulator. Next synthesize this file using XST. Then answer Questions given at the end of
module.
Input clk;
Input en;
Input we;
Input [4:0] a;
Page | 35
Digital System Design LAB 7
reg [4:0] read_a;
if (en)
begin
if (we)
read_a <= a;
end
end
assign do = ram[read_a];
endmodule
Figure 1Test Bench Results for single port RAM with Enable.
Page | 36
Digital System Design LAB 7
input clk;
input we;
input [4:0] a;
if (we)
end
endmodule
Page | 37
Digital System Design LAB 7
Draw results from Test bench for above module?
Figure 2Test Bench Results for dual-port RAM with asynchronous read..
input clk;
input we;
input [4:0] a;
Page | 38
Digital System Design LAB 7
if (we)
read_a <= a;
end
endmodule
Figure 3Test Bench Results for dual port RAM with synchronous read.
Page | 39
Digital System Design LAB 7
ROM
module rominfr (clk, en, addr, data);
input clk;
input en;
if (en)
case(addr)
endcase
Page | 40
Digital System Design LAB 7
end
endmodule
Page | 41
Observations/Comments/Explanation of Results