AbinayaSivam
Member level 1
Hi,
I want to read the out value with the condition when the Trigger signal (Trig_SG) is high. I have tried with below code but i didnt got proper output. Please suggest me.
I want to read the out value with the condition when the Trigger signal (Trig_SG) is high. I have tried with below code but i didnt got proper output. Please suggest me.
Code:
module Trigger_RTC
(
input clk_50,
//output Trig_SG,
output reg Final_out
);
reg out;
reg Trig_SG=1'b0;
always@(posedge clk_50)
begin
Trig_SG<=1'b1;
if(Trig_SG==1'b1)
begin
out<=out+1;
Final_out<=out;
end
else
Final_out<=0;
end
endmodule