Question: How would I implement the following code with proper LEDs, switches, and 7-segment displays on an FGPA board? library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity

How would I implement the following code with proper LEDs, switches, and 7-segment displays on an FGPA board? library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity Days_In_Month is port ( I_MONTH : in unsigned(3 downto 0); I_LEAP_YEAR : in std_logic; O_DAYS_IN_MONTH : out unsigned(4 downto 0) ); end entity Days_In_Month; architecture Days_In_Month_combinatorial of Days_In_Month is signal month_30d : std_logic; signal month_28d : std_logic; signal month_31d : std_logic; signal month_29d : std_logic; begin month_30d <= '1' when I_MONTH = 9 or I_MONTH = 4 or I_MONTH = 6 or I_MONTH = 11 else '0'; month_28d <= '1' when I_MONTH = 2 and I_LEAP_YEAR = '0' else '0'; month_29d <= '1' when I_MONTH = 2 and I_LEAP_YEAR = '1' else '0'; month_31d <= '1' when month_30d = '0' and month_28d = '0' and month_29d = '0' else '0'; O_DAYS_IN_MONTH <= to_unsigned(30,O_DAYS_IN_MONTH'length) when month_30d = '1' else to_unsigned(28,O_DAYS_IN_MONTH'length) when month_28d = '1' else to_unsigned(29,O_DAYS_IN_MONTH'length) when month_29d = '1' else to_unsigned(31,O_DAYS_IN_MONTH'length) when month_31d = '1' else to_unsigned(0,O_DAYS_IN_MONTH'length); end architecture Days_In_Month_combinatorial; 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!