

Following three switches ( sw) used to select seven segment display (ssd) data in IDLE state. Leftmost switch ( SW) is used to control hour format, 12h or 24h. Eight leftmost switches reserved for configurations. How many switches actually used depends on entered data. Other three states used to change/set time and date information.Įight rightmost switches are reserved to get data from user. In IDLE state is the default state where system works. Test board have four states IDLE, get date, get time and get alarm. Special cases and a few examples of orinary cases are tested. Hexadecimal modules in clockwork.v, clockcalendar.v, alarm.v and h24toh12.v are tested with testboard_main.v and Basys3.xdc. Testbench_decCal.v is used to simulate clockCalendarDec4 and clockCalendarDec2 clockcalendar.v Test Test 1 Hex modules (on 20 March 2021) Testbench_decClkwork.v is used to simulate clockWorkDec clockwork.v Testbench_h24h12.v is used to simulate h24Toh12Hex and h24Toh12Dec h24toh12.v

Testbench_alarm.v is used to simulate alarmHex alarm.v Testbench_basic.v is used to simulate clockWorkHex clockwork.v and clockCalendarHex clockcalendar.v YEARRES parameter determines the size of year register, default is 12 bits. However only diffrence between those modules is the size of the registers.Ĭombinational "add-on" module to convert 24 hour format to 12 hour format. And it is kept high until end_ring is set.įile alarm.v contains two modules alarmHex and alarmDec, one for hexadecimal other one for decimal modules. In clockCalendarDec4, year is kept in 4 digits with 14 bits and in clockCalendarDec2, year is kept in 2 digits with 8 bits. At both of the modules, most significant 6 bits represent day, following 5 bits represent month and remaining bits represent year. Most significant 5 bits represent day, following 4 bits represent month and remaining bits represent year. Year bits determined via parameter YEARRES. In hexadecimal module, clockCalendarHex, date is kept in 9 + year bits. Similar to clockWork module, resetting should be done via date overwrite signal, date_ow. It uses current hour to keep track of date. This module provides an "add-on" to provide date functionality. Most significant 6 bits represent hour, following 7 bits represent minute and 7 least significant bits represent seconds. In decimal module, clockWorkDec, time is kept in 20 bits. Most significant 5 bits represent hour, following 6 bits represent minute and 6 least significant bits represent seconds. In hexadecimal module, clockWorkHex, time is kept in 17 bits. This module does not provide a seperate reset signal, thus resetting should be done via time overwrite signal, time_ow. This module provides basic time functionality.

fourteen is represented as 0x0E in hexadecimal modules and as 0x14 in decimal modules. h24toh12.v: 24 hour to 12 hour converterĭecimal modules always keep values in a decimal representation.clockcalendar.v: Days, Months and Years.clockwork.v: Hours, Minutes and Seconds.System Descriptionįunctionalities are seperated into different files, follows as: This project is a digital clock with date function.
