leap year checking with vhdl

ase

Joined
Dec 12, 2008
Messages
3
Reaction score
0
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top