15b - Eric Andrysiak EET 159 HW 15B 2 lpm_constant0 0 inst1...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Eric Andrysiak EET 159 HW 15B 2 lpm_constant0 0 inst1 3 ones[6..4] lpm_add_sub0 INPUT VCC ones[3..0] ones[3..0] ones[6..0] dataa[6..0] A A+B datab[6..0] B inst result[6..0] OUTPUT binary [6..0] Ahdl1 tens[3..0] INPUT VCC tens[3..0] tens_A[6..0] inst5 SUBDESIGN Ahdl1 ( tens[3..0] tens_A[6..0] ) :INPUT; :OUTPUT; BEGIN CASE tens IS WHEN 0 WHEN 1 WHEN 2 WHEN 3 WHEN 4 WHEN 5 WHEN 6 WHEN 7 WHEN 8 => tens_A = 0; => tens_A = 10; => tens_A = 20; => tens_A = 30; => tens_A = 40; => tens_A = 50; => tens_A = 60; => tens_A = 70; => tens_A = 80; Eric Andrysiak EET 159 HW 15B WHEN 9 END CASE; END; => tens_A = 90; 3 lpm_add_sub0 dataa[5..0] binary [5..0] INPUT VCC datab[5..0] inst A A+B B result[5..0] BCD[5..0] BCD[6..0] BCD[6..4] BCD[3..0] OUTPUT OUTPUT cout adjust binary [5..0] out[5..0] BCD6 BCD_FIRST[2..0] BCD_SECOND[3..0] inst1 SUBDESIGN adjust ( binary[5..0] out[5..0] ) :INPUT; :OUTPUT; Eric Andrysiak EET 159 HW 15B BEGIN if (binary>=0 & binary<=9) then out = 0; end if; if (binary>=10 & binary<=19) then out = 6; end if; if (binary>=20 & binary<=29) then out = 12; end if; if (binary>=30 & binary<=39) then out = 18; end if; if (binary>=40 & binary<=49) then out = 24; end if; Eric Andrysiak EET 159 HW 15B if (binary>=50 & binary<=59) then out = 30; end if; if (binary>=60 & binary<=63) then out = 36; end if; END; ...
View Full Document

Page1 / 4

15b - Eric Andrysiak EET 159 HW 15B 2 lpm_constant0 0 inst1...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online