1 / 9

CS 140 Lecture 16 System Designs

CS 140 Lecture 16 System Designs. Professor CK Cheng CSE Dept. UC San Diego. System Designs. Intro Components Implementation. Implementation: Example. Given a hardware program, implement data path and control subsystems. { Input X<0:7>, Y<0:7> type bit-vector, start type boolean;

Download Presentation

CS 140 Lecture 16 System Designs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 140 Lecture 16System Designs Professor CK Cheng CSE Dept. UC San Diego

  2. System Designs • Intro • Components • Implementation

  3. Implementation: Example Given a hardware program, implement data path and control subsystems { Input X<0:7>, Y<0:7> type bit-vector, start type boolean; Local-Object A<0:7>, B<0:7> type bit-vector; Output Z<0:7> type bit-vector, done type boolean; Wait: If start’ goto Wait; S1: A <= X || B <= Y|| done <= 0; S2: If B >= 0 goto S4; S3: B <= -B; S4: If A >= B goto S6; S5: A <= A + 1 || B <= B-1 || goto S4; S6: Z <= 4 * A || done <= 1 || goto Wait; }

  4. 8 X Data Subsystem 8 Z 8 (A > B) Y B7 C1-7 Control Subsystem done start 4 Ceiling[ (X + |Y| )/ 2] if X< |Y| 4X otherwise Z =

  5. control C1 C2 C3 C4 C5 C6 C7 operation A  Load (X) B  Load (Y) B  CS (B) Comp (A, B) A  INC (A) B  DEC (B) Z  Load (A) Z  SHL (Z) A  X B  Y B  -B A >= B A  A + 1 B  B – 1 Z  4A

  6. CS DEC B Y Z Comp C2 C3 C5 C1 C4 C6 C7 X A Control Unit C1 C2 C3 INC C4 B<7> C5 C6 start C7 done

  7. Designing the control unit S0: S1: S2: S3: S4: S5: S6: S7: S8: If start’, goto S0, else goto S1 A  X || B  Y || done  0 || goto S2 If B’<7> goto S4, else goto S3 B  CS (B), goto S4 If k goto S6, else goto S5 A  INC (A), B  DEC (B), goto S4 Z  A goto S7 Z  SHL (z), goto S8 Z  SHL (z), done 1, goto S0

  8. State Machine S0 start’ start S1 S8 S2 S7 B’<7> B<7> S6 S3 k k’ S4 S5

  9. S8 S0 start’ start S7 S1 S6 S2 B7’ B7 S5 k S3 k’ S4

More Related