simple verilog doubt by verilog beginner

Status
Not open for further replies.

srinpraveen

Member level 2
Joined
Dec 2, 2009
Messages
48
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,731
I have a logic that happens at every rising clock edge. I want to do a simple action. I will tell you the situation.

signal a should be 0 as long as signal b is 1. How do i implement this in verilog code other than the conventional if else happening at always @(posedge clk or negedge rst_n) to check this ??

Is there some verilog construct (I mean synthesizable verilog construct) like signal a=0 until signal b=1 ??
 

I'm not sure I understood, but a NOT gate could be for you!
 

Well, I will think I have not worded my question properly. I will think of a way to re-word my question. I will be back to this thread in a couple of days.
 

a <= not b, where a and b are youre 2 signlas it's jus an assigment(the sintax i used is in vhdl however it is simple to find the verilog analogy) Hope this helped...
 

Yes it did. Thanks buddy. (just a bit new to verilog buddy...so making some silly mistakes in the thought process:grin
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…