Counters and Registers Flashcards
What are the two types of counters?
Synchronous and asynchronous
How does a basic register operate?
- Typically made up of D-type flip flops
- Data on each input is stored in the flip-flop on the rising edge of the clock
- Data can be read from the output of Q
- Each flip flop will have a clock input and clear
- A simple register reloads data after each clock pulse
Why do we generally not use gates to control the clock?
We must fully synchronise the systems so that clock signals arrive at the same time at all flip-flops.
Therefore, we do not use gates to control the clock as there are delays associated with gates.
What is the purpose of a parallel load/enable?
The load/enable signal allows us to select content to be saved in the register.
If Load = 1, data is loaded. If Load = 0, the register content does not change.
What is the purpose of a basic shift register?
A basic shift register is capable of shifting its binary information in one direction, this shift occurs at every clock edge for a basic register.
What is a universal shift register?
A shift register that is capable of shifting information in both directions, it also implements parallel load/enable.
Describe the ports of a 4-bit universal shift register in VHDL.
- I: in std_logic_vector (3 downto 0)
- A: out std_logic_vector (3 downto 0)
- S: in std_logic_vector (1 downto 0)
- SIL, SIR, clear, clk, reset: in std_logic
I = 4 bit parallel inputs
A = 4 bit parallel outputs
S = 2-bit select input
SIL = Shift Input Left
SIR = Shift Input Right
Describe the process statement for a 4-bit universal shift register in VHDL, where:
- No change
- Shift Right
- Shift Left
- Parallel Load
The process statement depend on the clock and clear.
The process statement evaluates the value of SELECT, S:
When:
- S = “11” = 3. Parallel Load = so register value is equal to input
- S = “10” = 2. Shift Left = 3 least significant values of register + external input SIL
- S = “01” = 1. Shift Right = SIR + 3 most significant values of register
What are the two types of counters?
- Ripple (asynchronous)
- Synchronous with clock
How is a ripple counter implemented?
Using flip-flops in which the higher order flip-flop is connected to the input of the next higher order flip-flop.