Department of Electronics and Communication Skill Assessment-II
Department of Electronics and Communication Skill Assessment-II
Skill Assessment-II
Register Number
Department
Slot Name 4L4-2
Actual Submission Date
Marks Obtained
ABSTRACT
This project presents the design and implementation of a digital clock with an integrated
alarm system using Verilog Hardware Description Language (HDL). The design includes a
modular approach to implement a 24-hour timekeeping system, with second, minute, and
hour counters. The alarm functionality allows the user to set a specific time at which the
alarm activates.
The clock module uses a clock divider to derive a 1 Hz signal from a higher-frequency clock
input, ensuring accurate timekeeping. The counters are implemented using registers and
combinational logic for incrementing and resetting upon overflow. The alarm module
monitors the current time and triggers an output signal when the set time matches the
current time. Additional features, such as alarm enable/disable and reset functionality, are
included for flexibility.
Explanation:
1. Clock Counter:
a. Increments seconds, minutes, and hours sequentially.
b. Resets on a reset signal.
2. Alarm Setting:
a. The alarm hours and alarm minutes registers can be
set externally to configure the desired alarm time.
3. Alarm Comparator:
a. Compares the current time with the alarm setting.
b. Activates the alarm signal when a match is found.
4. Clock Tick Generation:
a. Generates clock ticks for seconds, minutes, and hours using a
generate-for loop.
b. These ticks are used to increment the appropriate counters.
if(tmp_hour>=20) begin
c_hour1 = 2;
end
else begin
if(tmp_hour >=10)
c_hour1 = 1;
else
c_hour1 = 0;
end
c_hour0 = tmp_hour - c_hour1*10;
c_min1 = mod_10(tmp_minute);
c_min0 = tmp_minute - c_min1*10;
c_sec1 = mod_10(tmp_second);
c_sec0 = tmp_second - c_sec1*10;
enD
assign H_out1 = c_hour1;
assign H_out0 = c_hour0;
assign M_out1 = c_min1;
assign M_out0 = c_min0;
assign S_out1 = c_sec1;
assign S_out0 = c_sec0;
always @(posedge clk_1s or posedge
reset) begin
if(reset)
Alarm <=0;
else begin
if({a_hour1,a_hour0,a_min1,a_min0,a_sec1,a_sec0}=={c_hour1,c_hour0,c_min1,c_min0,c_sec
1,c_sec0})
begin / if(AL_ON) Alarm <= 1;
end
if(STOP_al)
Alarm <=0;
end
end
OUTPUT
APPLICATION
1. Consumer Electronics
Digital Alarm Clocks: Used in personal clocks to set alarms for waking up or
reminders.
Smart Home Devices: Integrated into smart appliances like coffee makers or
thermostats to schedule tasks.
2. Industrial Automation
3. Embedded Systems
5. Educational Tools
Learning Modules: Useful for teaching digital design and Verilog HDL concepts in
academic settings.
Simulation Models: A practical example for students to explore time-based event
generation and hardware design.
6. Test and Measurement Equipment
Mission Control Systems: Used to generate alarms for scheduled actions during
missions.
Navigation Systems: Provides precise timekeeping and reminders in aviation and
maritime applications.
8. Communication Systems
9. Automotive Applications