Chargement…
Chargement…
Group the time value in a record, then place the shared type, constants and functions in a package.
Behaviour
time_of_day_pkg.vhd declares t_time_of_day with hours, minutes, seconds;f_is_valid accepts only 00:00:00 to 23:59:59;f_next_second increments by one second and wraps after 23:59:59;i_reset='1' forces 00:00:00;i_load='1' loads i_time only if the time is valid;i_enable='1' increments by one second;i_clki_reseti_enablei_loadi_timet_time_of_dayo_timet_time_of_dayo_midday12:00:00