1 / 15

LAB8 Multiplier

LAB8 Multiplier. 乘法器. Multiplier. A ( 被乘數 ) <8 bit>. B ( 乘數 ) <8bit>. Multiplier ( 乘法器 ). start <1 bit>. reset <1 bit>. clock <1 bit>. done <1 bit>. P ( 乘積 ) <16 bit>. 二進位乘法. Multiplication. 十進位乘法. A. 1. 0. 1. 1. A. B. B. x. 1. 1. 0. 1. 1. 0. 1. 1.

shiloh
Download Presentation

LAB8 Multiplier

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. LAB8 Multiplier 乘法器

  2. Multiplier A(被乘數) <8 bit> B(乘數) <8bit> Multiplier (乘法器) start <1 bit> reset <1 bit> clock <1 bit> done <1 bit> P(乘積) <16 bit>

  3. 二進位乘法 Multiplication • 十進位乘法 A 1 0 1 1 A B B x 1 1 0 1 1 0 1 1 0 0 0 0 0 1 0 1 1 0 0 P + 1 0 1 1 0 0 0 1 0 0 0 1 1 1 1 P

  4. Pseudo code P=0;done=0; While(B!=0){ if(B[0]) P = P+A; left_shift A; right_shift B; } done=1;

  5. A A B B Example • Step 1. • Step 2. P P Done=0 Done=0

  6. A A B B Example • Step 3. • Step 4. P P Done=0 Done=0

  7. A A B B Example • Step 5. • Step 6. P P Done=0 Done=1

  8. RTL

  9. RTL

  10. ASM chart Reset S1 P←0 Load A Load B 0 0 1 s s 1 S2 S3 Shift left A, Shift right B Done 1 P←P+A B = 0 ? 0 0 B[0] 1

  11. Datapath DataB DataA 0 n n n LA LB L L Shift-left register Shift-right register EA E E EB B A Clock n 2n + z Sum B[0] 0 2n 2n Psel 0 1 2n DataP EP E Register 2n P

  12. Reset S1 Psel=0, EP 0 s 1 0 1 s S2 S3 Psel = 1, EA, EB Done 1 z EP 0 0 B[0] 1 Control Unit LA, LB

  13. RTL for multiplier s reset clk A B n n LA Control Unit Datapath EA LB EB Psel EP z B[0] 2 2n 2n n done CurrentState P Left A Right B

  14. Simulation

  15. ABP done reset / start

More Related