set reset 0 0 s r q q q q 1 9 17 15 sr latch q r d latch
play

= Set Reset 0 0 S R Q Q Q Q 1 9/17/15 SR latch Q R D - PowerPoint PPT Presentation

9/17/15 Processor: Data Path Components Latch: CC-BY Rberteig@flickr Latches, Flip-flops, and Registers 2 1 Instruction ALU Registers Fetch and Memory Decode Sequential logic:


  1. 9/17/15 Processor: ¡Data ¡Path ¡Components Latch: ¡CC-­‑BY ¡Rberteig@flickr Latches, ¡Flip-­‑flops, ¡and ¡Registers 2 1 Instruction ¡ ALU Registers Fetch and ¡ Memory Decode Sequential ¡logic: ¡ fundamental ¡elements ¡to ¡store ¡values Output ¡depends ¡on ¡inputs ¡ and ¡stored ¡values . (vs. ¡combinational ¡logic: ¡output ¡depends ¡only ¡on ¡inputs) Bistable latches SR ¡latch S R Q Q' Q ¡(stable) Q' (stable) 0 0 0 0 ? ? 0 0 0 1 0 1 Suppose ¡we ¡somehow ¡get ¡a ¡1 ¡ ¡(or ¡a ¡0?) ¡on ¡here. 0 0 1 0 1 0 Q Q 0 0 1 1 ? ? 1 0 ? ? 1 0 0 1 ? ? 0 1 = Set Reset 0 0 S R Q Q Q Q 1

  2. 9/17/15 SR ¡latch Q R D ¡latch R D Q Q Data ¡bit S R Q R Q Q C S Q Clock Q S S if ¡ C ¡= ¡0 , ¡then ¡SR ¡latch ¡stores ¡current ¡value ¡of ¡Q. S R if ¡ C ¡= ¡1 , ¡then ¡D ¡flows ¡to ¡Q: Q Q if ¡ D ¡= ¡0 , ¡then ¡ R ¡= ¡1 ¡ and ¡S ¡= ¡0, ¡ Q ¡= ¡0 if ¡ D ¡= ¡1 , ¡then ¡R ¡= ¡0 ¡and ¡ S ¡= ¡1 , ¡ Q ¡= ¡1 Clocks Synchronous ¡systems Clock : ¡free-­‑running ¡signal Inputs ¡to ¡state ¡elements ¡must ¡be ¡ valid on ¡active ¡clock ¡edge. with ¡fixed ¡ cycle time ¡= ¡ clock ¡period = ¡T. ¡ ¡ Clock ¡frequency = ¡1 ¡/ ¡clock ¡period Falling ¡edge State State element Combinational ¡logic element 1 2 Rising ¡ edge Clock ¡period A ¡clock ¡controls ¡when ¡to ¡update a ¡sequential ¡logic ¡element's ¡state. 2

  3. 9/17/15 Reading ¡and ¡writing ¡in ¡the ¡same ¡cycle D ¡flip-­‑flop ¡ with ¡falling-­‑edge ¡ trigger master slave E D Q D m Q m D s Q s D ¡latch D ¡latch Q C m Q m C s Q s D Q D Flip-­‑Flop C Clock C Q Can ¡write ¡ Q next while ¡simultaneously ¡ reading ¡state ¡ Q now Can ¡write ¡ Q next while ¡simultaneously ¡ reading ¡state ¡ Q now Can ¡still ¡read ¡ Q now Q next becomes ¡ Q now Can ¡still ¡read ¡ Q now Q next becomes ¡ Q now slave ¡stores ¡E as ¡Q slave ¡stores ¡E as ¡Q Clock Clock master ¡stores ¡D as ¡E master ¡stores ¡D as ¡E Time Time A ¡1-­‑nybble* ¡register D ¡Flip-­‑Flop ¡= ¡one ¡bit ¡of ¡storage (a ¡4-­‑bit ¡hardware ¡ “local ¡variable”) D Q 0 D Flip-­‑Flop C Q D Q 1 D Q 1 D Flip-­‑Flop D Flip-­‑Flop C Q C Q 0 D Q D Flip-­‑Flop C Q 1 D Q D Flip-­‑Flop Write C Q Clock *Half ¡ a ¡byte! 3

  4. 9/17/15 Register ¡file Read register number 1 Register 0 Read ¡ports Register 1 M Read ¡register (data ¡out) . . . u r Read data 1 selector ¡1 x Read ¡register Read ¡data ¡1 Register n – 2 w r selector ¡2 Read ¡ports Register n – 1 Why ¡2? Read ¡data ¡2 Write ¡register ¡ w Read register r selector number 2 Write ¡data w Write? Write ¡port M 0 ¡= ¡read u Read data 2 r ¡= ¡log 2 number ¡of ¡registers 1 ¡= ¡write x w ¡= ¡bits ¡in ¡word Array ¡of ¡registers, ¡ with ¡register ¡ selectors, ¡write/read ¡ control, input ¡port ¡for ¡writing ¡ data, ¡output ¡ports ¡for ¡reading ¡ data. Write ¡port (data ¡in) write ¡control clock Write C 0 Register 0 1 D n -to-2 n . register ¡ number . Register number . decoder C Register 1 n – 2 D n – 1 . . . C Register n – 2 D C Register n – 1 incoming ¡data Register data D 4

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend