Altera_Forum
Honored Contributor
16 years agoa problems about using posedge
always @ (posedge clk or negedge alarm_in)
begin if(cnt_s == set_s && cnt_m == set_m && cnt_h == set_h) alarm_outr <= 1'b1; else if(alarm_in == 1'b0) begin alarm_outr <= 1'b0; end e Error (10200): Verilog HDL Conditional Statement error at timeinterrupt.v(43): cannot match operand(s) in the condition to the corresponding edges in the enclosing event control of the always construct but if i change" posedge clk or negedge alarm_in" into "clk or alarm_in" it will be ok but it will warrning ,Warning (10235): Verilog HDL Always Construct warning at timeinterrupt.v(103): variable "cnt_h" is read inside the Always Construct but isn't in the Always Construct's Event Control how to handle this problem?