0% found this document useful (0 votes)
48 views2 pages

Aclock ( Reset, : Input

This document describes a clock module with inputs to set the time, alarm, and control signals and outputs displaying the current time. The module contains inputs to set the hour, minute, and second displays for the clock and alarm. It can load the set time or alarm time and increment the seconds every 10 clock cycles. There is also an alarm output that will activate if the alarm time matches the current time and the alarm is turned on.

Uploaded by

ishu ishu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views2 pages

Aclock ( Reset, : Input

This document describes a clock module with inputs to set the time, alarm, and control signals and outputs displaying the current time. The module contains inputs to set the hour, minute, and second displays for the clock and alarm. It can load the set time or alarm time and increment the seconds every 10 clock cycles. There is also an alarm output that will activate if the alarm time matches the current time and the alarm is turned on.

Uploaded by

ishu ishu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

module​ aclock (

​input​ reset, ​/* Active high reset pulse, to set the time to the input hour
and minute (as defined by the H_in1, H_in0, M_in1, and M_in0 inputs)
and the second to 00. It should also set the alarm value to 0.00.00, and
to set the Alarm (output) low.For normal operation, this input pin should
be 0*/
​input​ clk, ​/* A 10Hz input clock. This should be used to generate each
real-time second*/
​input​ [​1​:​0​] H_in1, ​/*A 2-bit input used to set the most significant hour
digit of the clock (if LD_time=1),or the most significant hour digit of the
alarm (if LD_alarm=1). Valid values are 0 to 2. */
​input​ [​3​:​0​] H_in0, ​/* A 4-bit input used to set the least significant hour
digit of the clock (if LD_time=1),or the least significant hour digit of the
alarm (if LD_alarm=1). Valid values are 0 to 9.*/
​input​ [​3​:​0​] M_in1, ​/*A 4-bit input used to set the most significant minute
digit of the clock (if LD_time=1),or the most significant minute digit of the
alarm (if LD_alarm=1). Valid values are 0 to 5.*/
​input​ [​3​:​0​] M_in0, ​/*A 4-bit input used to set the least significant minute
digit of the clock (if LD_time=1),or the least significant minute digit of the
alarm (if LD_alarm=1). Valid values are 0 to 9. */
​input​ LD_time, ​/* If LD_time=1, the time should be set to the values on
the inputs H_in1, H_in0, M_in1, and M_in0. The second time should be
set to 0.If LD_time=0, the clock should act normally (i.e. second should
be incremented every 10 clock cycles).*/
​input​ LD_alarm, ​/* If LD_alarm=1, the alarm time should be set to the
values on the inputs H_in1, H_in0, M_in1, and M_in0.If LD_alarm=0, the
clock should act normally.*/
​input​ STOP_al, ​/* If the Alarm (output) is high, then STOP_al=1 will
bring the output back low. */
​input​ ​AL_ON​, ​/* If high, the alarm is ON (and Alarm will go high if the
alarm time equals the real time). If low the the alarm function is OFF. */
​output​ ​reg​ Alarm, ​/* This will go high if the alarm time equals the
current time, and AL_ON is high. This will remain high, until STOP_al
goes high, which will bring Alarm back low.*/
​output​ [​1​:​0​] H_out1,
/* The most significant digit of the hour. Valid values are 0 to 2. */
​output​ [​3​:​0​] H_out0,
/* The least significant digit of the hour. Valid values are 0 to 9. */
​output​ [​3​:​0​] M_out1,
/* The most significant digit of the minute. Valid values are 0 to 5.*/
​output​ [​3​:​0​] M_out0, ​/* The least significant digit of the minute. Valid
values are 0 to 9. */
​output​ [​3​:​0​] S_out1, ​/* The most significant digit of the minute. Valid
values are 0 to 5. */
​output​ [​3​:​0​] S_out0 ​/* The least significant digit of the minute. Valid
values are 0 to 9. */
);

You might also like