Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions