Aug 23, 2013 #1 N nervecell_23 Member level 1 Joined Apr 26, 2013 Messages 38 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,286 Activity points 1,565 Hi guys, I want to set a signal HIGH for only one clock cycle at the rising edge of another signal, can I use the following code? Code: always@((posedge clk)&&(posedge SIGNAL)) begin ....... end Thanks!
Hi guys, I want to set a signal HIGH for only one clock cycle at the rising edge of another signal, can I use the following code? Code: always@((posedge clk)&&(posedge SIGNAL)) begin ....... end Thanks!
Aug 24, 2013 #2 P pedroromanvr Member level 1 Joined Oct 13, 2012 Messages 37 Helped 6 Reputation 12 Reaction score 6 Trophy points 1,288 Activity points 1,455 Can you explain it more? Do you want to set a signal using two clocks?
Aug 25, 2013 #3 V vardan Member level 1 Joined Feb 4, 2003 Messages 34 Helped 2 Reputation 4 Reaction score 0 Trophy points 1,286 Activity points 261 Assume you need an edge detecting circuit. Code: assign out = Q1 & (!Q2); always @(posedge clk or negedge rst) if (!rst) begin Q1 <= 1'b0; Q2 <= 1'b0; end else begin Q1 <= In; Q2 <= Q1; end
Assume you need an edge detecting circuit. Code: assign out = Q1 & (!Q2); always @(posedge clk or negedge rst) if (!rst) begin Q1 <= 1'b0; Q2 <= 1'b0; end else begin Q1 <= In; Q2 <= Q1; end
Aug 26, 2013 #4 M manu.srg Newbie level 3 Joined Feb 20, 2010 Messages 3 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Location bangalore Activity points 1,293 I think you can. But how you are going to limit it for one clock cycle?