digital clock help needed!! pleasehelp

Status
Not open for further replies.

phobos1

Full Member level 2
Joined
Jan 18, 2010
Messages
135
Helped
15
Reputation
30
Reaction score
15
Trophy points
1,298
Location
Salem, Tamil Nadu, India
Activity points
2,112
digital clock help

module digital_clock (t,clk,rst_s,rst_m,rst_h);
input t,clk,rst_s,rst_m,rst_h;
wire [5:0]a,b,c;
wire h,s,m;
always@(negedge clk)
begin
tff tff1(a[0],t,clk,rst_s);
tff tff2(a[1],t,a[0],rst_s);
tff tff3(a[2],t,a[1],rst_s);
tff tff4(a[3],t,a[2],rst_s);
tff tff5(a[4],t,a[3],rst_s);
tff tff6(a[5],t,a[4],rst_s);
assign s <=~(a[0]&a[1]&a[2]&a[4]&a[5]);
assign rst_s <= s;
end
always@(negedge clk,negedge s)
begin
tff tff7(b[0],t,s,rst_s);
tff tff8(b[1],t,a[0],rst_m);
tff tff9(b[2],t,b[1],rst_m);
tff tff10(b[3],t,b[2],rst_m);
tff tff11(b[4],t,b[3],rst_m);
tff tff12(b[5],t,b[4],rst_m);
assign m <=~(b[0]&b[1]&b[2]&b[4]&b[5]);
assign rst_m <= m;
end
always@(negedge clk,negedge s,negedge m)
begin
tff tff13(c[0],t,m,rst_s);
tff tff14(c[1],t,c[0],rst_h);
tff tff15(c[2],t,c[1],rst_h);
tff tff16(c[3],t,c[2],rst_h);
tff tff17(c[4],t,c[3],rst_h);
assign h <= ~(c[0]&c[2]&c[4]&c[3]);
assign rst_h <= h;
end
endmodule

i am getting many errors .......
 

Re: digital clock help

i have made a digital clock but it was more complicated than your one.... it has stop watch functionality as well as hour and min change inps ..... i can upload the project with a ppt presentation if you really need!!! but remember its quit complex

regard

Ali Umair
 

    phobos1

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…