Application Of A Module Declaration

2283 Words10 Pages
// ECE2072 Assignment 2014. // Written by Lindsay Kleeman, Monash University. // Complete the sections marked /***STUDENT TO COMPLETE***/ // Naming convention used: // Module names begin with capital and each word begins with capital. // Ports of a module declaration begin with i for input and o for output followed by Capital. // number bits labelled at end by xbit // standard port names are all CAPITALISED // Internal signals start with lowercase and base of name first followed by // D1 for delayed by one clock period (ie previous version), // _new for next and // number bits at end if not 1. Use _ as separator within name. module assign2014(CLOCK_50, KEY, SW, HEX0, HEX1, HEX2, HEX3, HEX4, HEX5, HEX6, HEX7,…show more content…
// A time delay called the release time elapses before the start light is turned on again // and the whole process repeats. The release time is optionally displayed on oHEX7 to oHEX4 if iDisplayReleaseTime=1 // The release time is either random when iSelID=0 or based on the student ID sequence when iSelID=1. // The normal ID sequence skips a digit when iSkip=1. //********************************************************************************************************** module ReactionTimer(iClk, iAsyncReset, iAsychStop, iDisplayReleaseTime, iSkip, iSelID, oHEX0, oHEX1, oHEX2, oHEX3, oHEX4, oHEX5, oHEX6, oHEX7, oLED_GO); input iClk, iAsyncReset, iAsychStop, iDisplayReleaseTime, iSkip, iSelID; output [6:0] oHEX0, oHEX1, oHEX2, oHEX3, oHEX4, oHEX5, oHEX6, oHEX7; output [7:0] oLED_GO; //*********** Internal signals ..... defined and implemented below ... wire reset; // synchronised version of reset input from KEY[0] wire stop; // synchronised version of stop input from KEY[3] wire stopD1; //1 clock period delayed stop wire start; //goes high when start light turns on and defined below. wire CEmsec; //Clock Enable that is 1 for a single clock cycle every millisecond // driven by ReactionTimerDisplay instance wire [13:0] release_time_new14bit; //time in msec to count down to next start wire [13:0] release_time_random14bit; //next random release time
Open Document