Basic Registers and Counters, VGA Timing - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Basic Registers and Counters, VGA Timing

Description:

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL. Basic Registers and Counters, VGA Timing ... Verilog. Verilog styles (structural, dataflow, behavioral) Be able ... – PowerPoint PPT presentation

Number of Views:95
Avg rating:3.0/5.0
Slides: 23
Provided by: anselmo9
Category:

less

Transcript and Presenter's Notes

Title: Basic Registers and Counters, VGA Timing


1
Basic Registers and Counters, VGA Timing
  • Anselmo Lastra

2
First
  • Lets talk about lab
  • Best to use single clock for all FFs
  • Make signals synchronous
  • Note there are two uses for always
  • To generate FFs
  • Combinational only
  • Latter does not turn regs into FFs
  • Look at the synthesizer log

3
Topics
  • Office Hours
  • After class
  • Email me for time tomorrow
  • Test details
  • Basic registers and counters
  • Enough for VGA lab
  • CRT timing

4
Test Covers
  • Test will be open book, notes, and calculator
  • No computer (no ModelSim, etc)
  • Chapter 1
  • Binary and hexadecimal numbers
  • Binary addition, etc.
  • Parity

5
Chapter 2
  • Boolean algebra
  • Schematic diagrams
  • Basic Simplification
  • Karnaugh maps, up to 3 variables
  • Making circuits from maps
  • Gate types

6
Chapter 3
  • Basic circuit design
  • Hierarchies
  • Gate delays
  • We deferred most of chapter

7
Chapter 4
  • Know what encoder, decoder, and mux are
  • How to design them
  • Logic
  • Verilog
  • Verilog styles (structural, dataflow, behavioral)
  • Be able to write combinational Verilog programs

8
Chapter 5
  • Adders
  • Complements
  • Signed arithmetic
  • How to express positive and negative numbers

9
Definitions
  • Register a set of flip-flops
  • May include extensive logic to control state
    transition
  • register also refers to fast memory for storing
    data in a computer
  • Counter
  • Register that goes through sequence of states as
    it is clocked
  • Saw simple counter last week

10
Simple Register
  • Store D
  • On posedge of Clock
  • Clear signal normally high
  • Power-up reset
  • Symbol

11
Clocking
  • Typically dont want to load every clock
  • Can gate the clock
  • But skew problem

12
Alternative
  • If load H, then D is gated through
  • Otherwise, Q is fed back
  • Keep same value
  • No clock gating
  • Did this because D FF doesnt have no change
    behavior

13
Counters
  • Counter is a register has state
  • Also goes through sequence of states counts
    on clock or other pulses
  • Binary counter
  • Counts through binary sequence
  • n bit counter counts from 0 to 2n

14
Ripple Counter
  • Simple
  • So Q will alternate H and L
  • Why called ripple counter?

15
Synchronous Counters
  • Ripple counter is easy
  • Asynchronous nature may cause problems
  • Synchronous counter very common

16
Synchronous Counter
  • Does have sequence of gates
  • What does it remind you of?

17
Parallel Design
  • Can gang these to make long serial-parallel
    counter

18
Verilog Counter
  • module count_4_r_v (CLK, RESET, EN, Q, CO)
  • input CLK, RESET, EN
  • output 30 Q
  • output CO
  • reg 30 Q
  • assign CO (count 4'b1111 EN 1b1) ? 1
    0
  • always_at_(posedge CLK or posedge RESET)
  • begin
  • if (RESET)
  • Q lt 4'b0000
  • else if (EN)
  • Q lt Q 4'b0001
  • end
  • endmodule

19
Lets Look at Video Timing
  • Different set of slides

20
What do you Need for VGA?
  • Brainstorm
  • Need Counter(s)?
  • Is there any kind of state?
  • Will you need a state machine?

21
Today
  • Expanded FFs to make registers
  • Counters
  • Ripple (cheap)
  • Synchronous

22
Next Time
  • Test next
  • Next week Cover registers/counters in more
    detail
Write a Comment
User Comments (0)
About PowerShow.com