I still have hard time doing the assignment, Please I need help.
Here s the problem:
I have to design a circuit that takes as input YEAR (Y15…Y0), and generates the leap-year flag (L). The rule for a leap year is: a year is leap if it is divisible by 4 and greater than 1582, unless it is divisible by 100 and not by 400. I must implement my work in VHDL. I am NOT ALLOWED TO USE THE BUILT-IN VHDL ARITHMETIC OPERATORS (+, -, <, >, …). I can however use the built-in modulo operator. I should design my own blocks to implement the above leap-year conditions (divisible by 4, 100, 400), and to check whether the input is greater than 1582. I should take into account that the year is represented in BCD and not as a regular binary number. At the end ,Imust include a testbench for the code.
Here s the problem:
I have to design a circuit that takes as input YEAR (Y15…Y0), and generates the leap-year flag (L). The rule for a leap year is: a year is leap if it is divisible by 4 and greater than 1582, unless it is divisible by 100 and not by 400. I must implement my work in VHDL. I am NOT ALLOWED TO USE THE BUILT-IN VHDL ARITHMETIC OPERATORS (+, -, <, >, …). I can however use the built-in modulo operator. I should design my own blocks to implement the above leap-year conditions (divisible by 4, 100, 400), and to check whether the input is greater than 1582. I should take into account that the year is represented in BCD and not as a regular binary number. At the end ,Imust include a testbench for the code.