Professional Documents
Culture Documents
Implementation of Registers
1. Introduction
In this experiment, you will get introduced to the concept of registers and some of their types. In addition,
you will learn to design, implement and test parallel load and shift registers using QUARTUS II Software.
2. Objectives
By the end of this lab experiment, students will:
• Learn the concept of registers.
• Learn to design and implement parallel load and shift registers using Quartus II.
• Practice testing their designs by simulation and downloading on the Cyclone IV E FPGA on Altera
DE2-115 board.
3. Registers
A set of n flip-flops that can store n bits of binary information is referred to as a register.
• In addition to flip-flops, which hold the binary information, a register may have
combinational gates, which determine how the information is transferred into register.
• Various types of registers such as Parallel-load, Universal-shift register etc. are available.
2. Analyze and Synthesize this circuit and Create the symbol (Regr4).
3. Perform Functional Simulation and Test the following functional table. Do not group all the
inputs.
Parallel data
Clear Clock Q3 Q2 Q1 Q0
I3 I2 I1 I0
1 1011 ↑
0 X X
1 1001 ↑
4. Comment the output Waveform: Mark at changes in the output at the positive edges of the clock.
Identify asynchronous operation (Change in the output without any clock).
• To implement a shift register, it is necessary to use edge-triggered flip-flops since the level-
sensitive gated latches are not suitable because a change in the value of the serial input would
propagate through more than one latch during the time when the clock is equal to 1.
Figure 2 shows a four-bit shift register that is used to shift its contents one bit position to the right. The
data bits are loaded into the shift register in a serial fashion using the serial input (SRin). The
contents of each flip-flop are transferred to the next flip-flop at each positive edge of the clock.
Table 2 shows what happens when the signal values applied to the serial input are 1, 0, 0, 1, 1during five
consecutive clock cycles.
• For every shift to the left b y one bit position, with a 0 inserted as the new least significant
bit, the binary number stored in the register is multiplied by 2. Similarly, for every shift to
the right by one bit position, with a 0 inserted as the new most significant bit, the binary
number stored in the register is divided by 2.
Table 2: Sample Sequence of a 4-Bit Register
Inputs Outputs
0 X X 0 0 0 0
1 ↑ 1 1 0 0 0
1 ↑ 0 0 1 0 0
1 ↑ 0 0 0 1 0
1 ↑ 1 1 0 0 1
1 ↑ 1 1 1 0 0
Based on Figure 1 and Figure 2, the design of a register that allows parallel–load with shift right
capabilities basically needs to select data input to each flip-flop. The D input should get data either
from its parallel-load input or from the output of a previous stage, and a 2-to-1 Mux can select the
appropriate input. The first two stages of a 4-bit register with parallel–load and shift right
capabilities is shown in Figure 3 and the subsequent stages will be identical to the second stage.
Capabilities
Complete the design in Figure 3 (on paper) for the missing bits (bit 1 and bit 0).
Student Name: Date:
Student ID:
Lab Exercise # 8
Problem Statement:
Using Quartus II Software, design a 4-bit Register with parallel–load and shift right capabilities. The
operation is selected based on the OP bits as shown below:
OP Register Operation
0 Shift Right
1 Parallel-load
Procedure:
1. Implement the circuit designed in Figure 3 as schematic capture.
2. Create a new Block Diagram/Schematic File → Save As → lab8.bdf
3. Double-Click on the empty screen to enter a new symbol → select the following symbols:
15. Fit, Analyze and download the design into Cyclone IV E FPGA on Altera DE2-115 Board.
16. Compile your design AGAIN.
17. Program and configure the FPGA to test the implemented design physically using switches and
LEDs.
18. Test your downloaded design for the following cases (complete the table based on your results):
Input Output
Clear OP SRin I3 I2 I1 I0 PB Q3 Q2 Q1 Q0
0 X X X X 0 0 0 0
1 1 X 1011 ↑ 1 0 1 1
1 0 1 X ↑ 1 1 0 1
1 0 1 X ↑
1 0 0 X ↑
1 1 X 0110 ↑
1 0 0 X ↑
1 0 1 X ↑
Ask your engineer to check your results, write his/her comments and sign below:
………………………………………………………………………………………………………………………...…………………………...……….
……………………………………………………………………………………………………………………...………………………...…………….
…………………………………………………………………………………………………………………...…………………………………………
Engineer Signature
……..……………..
Attachments:
Please attach with the lab exercise sheet printouts of the files indicated below. Don't forget to
write your Name and ID Number as comments in every file before printing.