// // Title : Calendar module // Design : Homework 4 Calendar (Problem 1) // Author : Gaetano Borriello // Company : CSE 370 // //------------------------------------------------------------------------------------------------- // // File : cal.v // // Description : This module computes the index of the specified in the year given the month, day // of the month, and whether the year is a leap year. It also raises an error flag // if there is a problem with the input values. //------------------------------------------------------------------------------------------------- `timescale 1ns / 1ns module cal (MONTH, DAY, LEAP_YEAR, DAY_OF_YEAR, ERROR); input [3:0] MONTH; // Data input for month of the year input [4:0] DAY; // Data input for day of the month input LEAP_YEAR; // Data input for leap year flag output [9:0] DAY_OF_YEAR; // Results from calendar subsystem output ERROR; // Error flag from calendar subsystem reg [9:0] DAY_OF_YEAR; // Data input reg ERROR; // Data input ...auxiliary signal declarations go here... always @(MONTH or DAY or LEAP_YEAR) begin ...computation code goes here... end ...any assign statements go here... endmodule