4-Bit Universal Shift Register

13

description

4-Bit Universal Shift Register. Behavioral Vs. Structural Description. Behavioral Description Behavior model of a shift register Describe the operation of the register without a preconceived structure. Random number generator Binary values of msb_in , lsb_in , i_par - PowerPoint PPT Presentation

Transcript of 4-Bit Universal Shift Register

Page 1: 4-Bit Universal Shift Register
Page 2: 4-Bit Universal Shift Register

4-Bit Universal Shift Register

Page 3: 4-Bit Universal Shift Register

Behavioral Vs. Structural Description

• Behavioral Description– Behavior model of a shift register• Describe the operation of the register

without a preconceived structure.

– Random number generator• Binary values of msb_in, lsb_in, i_par

• Structural Description–Models the circuits in terms of a

collection of components such as gates, flip-flops…

Page 4: 4-Bit Universal Shift Register

Behavioral Model of Shift Regsiter

Page 5: 4-Bit Universal Shift Register

Test Bench

1. Generate random numberWith matlab2. Read random numberat the neg edge of the clock

Page 6: 4-Bit Universal Shift Register

[s1,s0=[1,1], Load

i_par=0111a_par=0111

Page 7: 4-Bit Universal Shift Register

[s1,s0]=[0,0], No Change

i_par=0111a_par=0011

Page 8: 4-Bit Universal Shift Register

[s1,s0]=[1,0], Shift Left

Page 9: 4-Bit Universal Shift Register

[s1,s0]=[0,1], Shift Right

Page 10: 4-Bit Universal Shift Register

4-Bit Universal Shift Register

clr

clk

select

Q

i0i1

i2i3

Page 11: 4-Bit Universal Shift Register

Waveform

Load No Change Shift Right Shift Left

Page 12: 4-Bit Universal Shift Register

4-bit Universal Shift Register

Page 13: 4-Bit Universal Shift Register

Verilog Code of Each Stage