leap year checking with vhdl

Discussion in 'VHDL' started by ase, Dec 14, 2008.

  1. ase

    ase

    Joined:
    Dec 12, 2008
    Messages:
    3
    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.
    ase, Dec 14, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hai Nguyen

    Date Validation Expression and Leap Year

    Hai Nguyen, Feb 26, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,311
    Hans Kesting
    Feb 27, 2004
  2. Wen
    Replies:
    4
    Views:
    461
    Simon Saunders
    Dec 12, 2003
  3. Protoman
    Replies:
    14
    Views:
    540
    int2str@gmail.com
    Sep 19, 2005
  4. rn216_ccc@comcast.net

    Doing a leap year project

    rn216_ccc@comcast.net, Mar 29, 2007, in forum: C++
    Replies:
    8
    Views:
    491
    Howard
    Mar 30, 2007
  5. mazwolfe@gmail.com

    A better algorithm to calculate a leap year?

    mazwolfe@gmail.com, Nov 5, 2007, in forum: C Programming
    Replies:
    39
    Views:
    1,608
    Charlie Gordon
    Nov 12, 2007
Loading...

Share This Page