1 / 6

Shifters

Shifters. Lecture L7.4 Section 7.4. 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];

marly
Download Presentation

Shifters

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. Shifters Lecture L7.4 Section 7.4

  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

  3. EQUATIONS when (S == 0) then Y = noshift; when (S == 1) then Y = shr; when (S == 2) then Y = shl; when (S == 3) then Y = ror; when (S == 4) then Y = rol; when (S == 5) then Y = asr; when (S == 6) then Y = ror2; when (S == 7) then Y = noshift;

  4. @radix 16; test_vectors ([D,S] -> Y) [0B,0] -> 0B; [0B,1] -> 5; [0B,2] -> 6; [0B,3] -> 0D; [0B,4] -> 7; [0B,5] -> 0D; [0B,6] -> 0E; [0B,7] -> 0B; END

More Related