Chapter 7 – Registers and Register Transfers
Transcript
Chapter 7 – Registers and Register Transfers
Logic and Computer Design Fundamentals Chapter 7 – Registers and Register Transfers Part 1 – Registers, Microoperations and Implementations Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Overview Part 1 - Registers, Microoperations and Implementations • • • • Registers and load enable Register transfer operations Microoperations - arithmetic, logic, and shift Microoperations on a single register Multiplexer-based transfers Shift registers Part 2 - Counters, Register Cells, Buses, & Serial Operations Part 3 – Control of Register Transfers Chapter 7 - Part 1 2 Registri e Contatori Registri– collezione di elementi che immagazinano informazione • In generale un registro è formato da un insieme di flip-flop e di porte logiche che implementano opportune transizioni di stato Contatori è un registro il cui stato evolve secondo una sequenza predeterminata in seguito all’applicazione di impulsi di clock. Chapter 7 - Part 1 3 Example: 2-bit Register A1 How many states are there? Y1 In1 D Q How many input combinations? C Output combinations? A0 Y0 D Q What is the output function? In0 C What is the next state function? CP Current Next State Output Moore or Mealy? State A1(t+1) A0(t+1) (=A1 A0) State Table: For In1 In0 = A1 A0 0 0 0 1 1 0 1 1 00 00 00 00 00 01 01 01 01 01 10 10 10 10 10 11 11 11 11 11 Y1 0 0 1 1 Y0 0 1 0 1 What are the quantities above for an n-bit register? Chapter 7 - Part 1 4 Registro a 4 Bit Il segnale di clear ( in logica negativa) porta a zero l’intero registro Chapter 7 - Part 1 5 Memorizzazione nei Registri Un registro memorizza informazione per consecutivi impulsi di clock • Un flip-flop D carica nuove informazioni ad ogni ciclo di clock Si usa un segnale per bloccare il clock del registro Si adopera un segnale di feedback dalle uscite verso l’ingresso Si utilizzano FF SR o JK che per un ingresso pari a (0,0) mantegono lo stato precedente Per memorizzazione ( “store” o “load”) dell’informazione è controllata da un segnale • Load = 1: Carica i valori dagli input • Load = 0: Mantiene i valori immagazzinati Chapter 7 - Part 1 6 Registri con Clock Gating Un inconveniente del clock gating è che il segnale di clock può non arrivare a tutti i dispositivi contemporaneamente ( Clock Skew) Chapter 7 - Part 1 7 Registri a caricamento parallelo Hardware è più complesso rispetto al clock gating ma non risente dei problemi di temporizzazione Chapter 7 - Part 1 8 Registi a Scorrimento I registri a scorrimento (shift register) possono traslare i bit memorizzati in una o in entrambe le direzioni La configurazione logica consiste in una catena di flipflop in cascata in cui l’uscita di un flip-flop è connessa all’ingresso di un flip-flop successivo. Tutti i flip-flop sono sincronizzati con lo stesso segnale di clock Chapter 7 - Part 1 9 Shift Registers I registri di scorrimento traslano i dati memorizzati nel registo verso la cifra più significativa o la cifra meno significativa Nel caso più semplice, il registro a scorrimento è un insieme di flip-flop connessi in sequenza: Data input, In, è chiamata a serial input Data output, Out, è spesso chiamata serial output. Chapter 7 - Part 1 10 Shift Registers (cont.d) In B A DQ DQ C DQ DQ Out Clock CP CP T0 T1 T2 T3 T4 T5 In 0 1 1 0 1 1 T6 1 A ? 0 1 1 B ? ? 0 1 C ? ? ? 0 Out ? ? ? ? 0 1 1 1 0 1 1 1 0 0 1 1 Chapter 7 - Part 1 11 Trasferimento Seriale Shift Clock Chapter 7 - Part 1 12 Registro a scorrimento a caricamento parallelo Chapter 7 - Part 1 13 Registro a scorrimento bidirezionale Chapter 7 - Part 1 14 Contatore binario a cascata con FF JK Chapter 7 - Part 1 15 Contatore binario a 4 bit Chapter 7 - Part 1 16 VHDL description FF D Chapter 7 - Part 1 17 Terms of Use All (or portions) of this material © 2008 by Pearson Education, Inc. Permission is given to incorporate this material or adaptations thereof into classroom presentations and handouts to instructors in courses adopting the latest edition of Logic and Computer Design Fundamentals as the course textbook. These materials or adaptations thereof are not to be sold or otherwise offered for consideration. This Terms of Use slide or page is to be included within the original materials or any adaptations thereof. Chapter 7 - Part 1 18