50 likes | 218 Views
Lab 4. 2’s Complement 4-Bit Saturator Lecture 6.7b. X = 011101 Y = 0111 X = 110101 Y = 1000. NASA Tech Briefs November 2001. A. Y0 Y1 Y2 Y3. X0 X1 X2. B. X3 X4 X5. c0. X = 111111 Y = 1111 X = 000101 Y = 0101. c1. Sat4bit.abl. DECLARATIONS
E N D
Lab 4 2’s Complement 4-Bit Saturator Lecture 6.7b
X = 011101 Y = 0111 X = 110101 Y = 1000 NASA Tech Briefs November 2001 A Y0 Y1 Y2 Y3 X0 X1 X2 B X3 X4 X5 c0 X = 111111 Y = 1111 X = 000101 Y = 0101 c1
Sat4bit.abl DECLARATIONS hex7seg INTERFACE ([D3..D0] -> [a,b,c,d,e,f,g]); d7R FUNCTIONAL_BLOCK hex7seg; " Input Pins " X5..X0 PIN 6,5,4,3,2,1; " S6, Switches 3,4; S7, Switches 1-4 X = [X5..X0]; " Output Pins " Y3..Y0 PIN 40,41,43,44 ISTYPE 'com'; " LEDs 13-16 Y = [Y3..Y0]; a,b,c,d,e,f,g PIN 15,18,23,21,19,14,17 ISTYPE 'com'; UnitsSegs = [a,b,c,d,e,f,g]; " Definitions " A = ; B = ; c0 = ; c1 = ; s = ;
TEST_VECTORS (X -> Y) -32 -> ; -24 -> ; -16 -> ; -9 -> ; -8 -> ; -7 -> ; -6 -> ; -5 -> ; -4 -> ; -3 -> ; -2 -> ; -1 -> ; 0 -> ; 1 -> ; 2 -> ; 3 -> ; 4 -> ; 5 -> ; 6 -> ; 7 -> ; 8 -> ; 15 -> ; 23 -> ; 31 -> ; Complete test vectors and add to .abl file