1 / 9

Shifter

Shifter. Lecture L7.4 Group HW #4 Section 10.3. MODULE shift TITLE 'shifter' DECLARATIONS " INPUT PINS " D3..D0 PIN 11,7,6,5; D = [D3..D0]; s2..s0 PIN 3,2,1; S = [s2..s0]; " OUTPUT PINS " Y3..Y0 PIN 40,41,43,44 ISTYPE 'com'; Y = [Y3..Y0]; noshift = [D3,D2,D1,D0];

loyal
Download Presentation

Shifter

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. Shifter Lecture L7.4 Group HW #4 Section 10.3

  2. MODULE shift TITLE 'shifter' DECLARATIONS " INPUT PINS " D3..D0 PIN 11,7,6,5; D = [D3..D0]; s2..s0 PIN 3,2,1; S = [s2..s0]; " OUTPUT PINS " Y3..Y0 PIN 40,41,43,44 ISTYPE 'com'; Y = [Y3..Y0]; noshift = [D3,D2,D1,D0]; shr = [0 ,D3,D2,D1]; shl = [D2,D1,D0,0 ]; ror = [D0,D3,D2,D1]; rol = [D2,D1,D0,D3]; asr = [D3,D3,D2,D1]; ror2 = [D1,D0,D3,D2]; EQUATIONS " Add when…else equations here "

  3. Mux Using Behavioral ABEL Z = !s2 & !s1 & !s0 & C0 # !s2 & !s1 & s0 & C1 # !s2 & s1 & !s0 & C2 # !s2 & s1 & s0 & C3 # s2 & !s1 & !s0 & C4 # s2 & !s1 & s0 & C5 # s2 & s1 & !s0 & C6 # s2 & s1 & s0 & C7

  4. MODULE mux81 TITLE '8 to 1 Multiplexer' DECLARATIONS " INPUT PINS " C7..C0 PIN 11,7,6,5,4,3,2,1; C = [C7..C0]; s2..s0 PIN 70,71,72; S = [s2..s0]; " OUTPUT PINS " Z PIN 35 ISTYPE 'com'; EQUATIONS when (S == 0) then Z = C0; when (S == 1) then Z = C1; when (S == 2) then Z = C2; when (S == 3) then Z = C3; when (S == 4) then Z = C4; when (S == 5) then Z = C5; when (S == 6) then Z = C6; when (S == 7) then Z = C7; @radix 16; test_vectors ([C,S] -> Z) [6,0] -> 0; [7,1] -> 1; [9,2] -> 0; [15,3] -> 0; [36,4] -> 1; [47,5] -> 0; [29,6] -> 0; [0A5,7] -> 1; END mux81.abl

  5. MODULE mux81 TITLE '8 to 1 Multiplexer' DECLARATIONS " INPUT PINS " C7..C0 PIN 11,7,6,5,4,3,2,1; C = [C7..C0]; s2..s0 PIN 70,71,72; S = [s2..s0]; " OUTPUT PINS " Z PIN 35 ISTYPE 'com';

  6. EQUATIONS when (S == 0) then Z = C0; when (S == 1) then Z = C1; when (S == 2) then Z = C2; when (S == 3) then Z = C3; when (S == 4) then Z = C4; when (S == 5) then Z = C5; when (S == 6) then Z = C6; when (S == 7) then Z = C7;

  7. D = [D3..D0]; S = [s2..s0]; Y = [Y3..Y0]; @radix 16; test_vectors ([D,S] -> Y) [0B,0] -> ___; [0B,1] -> ___; [0B,2] -> ___; [0B,3] -> ___; [0B,4] -> ___; [0B,5] -> ___; [0B,6] -> ___; [0B,7] -> ___; END

More Related