G
googler
Guest
I have a doubt that I need to get clear. Firstly, I don't have a lot of
experience in RTL design. I wrote a piece of Verilog code, from which I
am going to show just one line.
always @(clk or posedge rst)
This is followed by some other code which is not really related to the
question. Here are the questions:
1. My assumption is that the always block will be entered whenever
there is an event on clk (be it a positive edge or a negative edge) or
on a positive edge of rst. So according to my understanding, the above
line is equivalent to
always @(posedge clk or negedge clk or posedge rst)
Is that correct? Somebody (who is actually an RTL design engineer) told
me that the first 'always' statement [that is always @(clk or posedge
rst)] is entered when clk has value 1 or on positive edge of reset. Who
is correct here?
2. Is it possible to synthesize a design that has an always statement
like "always @(posedge clk or negedge clk or posedge rst)"? Basically
in such a design I want to update the flip flops on both edges of clk.
Again, I think this is synthesizable and the other person thinks it's
not. Please advise.
experience in RTL design. I wrote a piece of Verilog code, from which I
am going to show just one line.
always @(clk or posedge rst)
This is followed by some other code which is not really related to the
question. Here are the questions:
1. My assumption is that the always block will be entered whenever
there is an event on clk (be it a positive edge or a negative edge) or
on a positive edge of rst. So according to my understanding, the above
line is equivalent to
always @(posedge clk or negedge clk or posedge rst)
Is that correct? Somebody (who is actually an RTL design engineer) told
me that the first 'always' statement [that is always @(clk or posedge
rst)] is entered when clk has value 1 or on positive edge of reset. Who
is correct here?
2. Is it possible to synthesize a design that has an always statement
like "always @(posedge clk or negedge clk or posedge rst)"? Basically
in such a design I want to update the flip flops on both edges of clk.
Again, I think this is synthesizable and the other person thinks it's
not. Please advise.