You are on page 1of 5

Project Description.

A basic alarm clock system is modelled to the block diagram


(Figure 1) and pin description functional tables (Table 1 and Table
2). A 10Hz clock input should be used to output real time in the
24-hour format of hour, minute and second. (HH:MM:SS). The
hour and minute can be set from input pins, as can the alarm time.
If the real time equals the alarm time, the "Alarm" output should
be activated.

 
 
 
 
 
 
 
 
 
Table 1: Inputs Pin Description and functional table
PIN Input / Output Description
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
reset Input
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.
A 10Hz input clock. This should be
clk Input used to generate each real-time
second.
A 2-bit input used to set the most
significant hour digit of the clock (if
H_in1 Input (2-bit) LD_time=1),or the most significant
hour digit of the alarm (if
LD_alarm=1). Valid values are 0 to 2.
A 4-bit input used to set the least
significant hour digit of the clock (if
H_in0 Input (4-bit) LD_time=1),or the least significant
hour digit of the alarm (if
LD_alarm=1). Valid values are 0 to 9.
A 4-bit input used to set the most
significant minute digit of the clock (if
M_in1 Input (4-bit) LD_time=1),or the most significant
minute digit of the alarm (if
LD_alarm=1). Valid values are 0 to 5.
A 4-bit input used to set the least
M_in0 Input (4-bit) 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.
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
LD_time Input 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).
If LD_alarm=1, the alarm time should
be set to the values on the inputs
LD_alarm Input H_in1, H_in0, M_in1, and M_in0.If
LD_alarm=0, the clock should act
normally.
If the Alarm (output) is high, then
STOP_al Input STOP_al=1 will bring the output back
low.
If high, the alarm is ON (and Alarm
will go high if the alarm time equals
AL_ON Input
the real time). If low the the alarm
function is OFF.
 
 
 
 
 
 
 
 
 
 
 
 
 
Table 2: Output Pin Description and functional table
PIN Input / Output Description
This will go high if the alarm time
equals the current time, and AL_ON
Alarm Output is high. This will remain high, until
STOP_al goes high, which will bring
Alarm back low.
The most significant digit of the hour.
H_out1 Output (2-bit)
Valid values are 0 to 2.
The least significant digit of the hour.
H_out0 Output (4-bit)
Valid values are 0 to 9.
The most significant digit of the
M_out1 Output (4-bit)
minute. Valid values are 0 to 5.
The least significant digit of the
M_out0 Output (4-bit)
minute. Valid values are 0 to 9.
The most significant digit of the
S_out1 Output (4-bit)
second. Valid values are 0 to 5.
The least significant digit of the
S_out0 Output (4-bit)
second. Valid values are 0 to 9.
 
 
 
 
 
 
 
 
 
 
 
 
Design the Verilog Behavioural Code for the above system.
module aclock (..............);
.
.
.
.
.
.
endmodule

Complete the following test stimulus to test the full functionality of


the circuit.
module test;
.
.
.
.
aclock i1 (................);
.
.
.
.
endmodule

Simulate and Synthesise the design.


 

You might also like