[SOLVED] comma in 'always' statements (Verilog HDL)

Status
Not open for further replies.

PGPPG

Newbie
Joined
Apr 23, 2020
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
48
Hello,

Is it allowed to use comma(',') in 'always' statement?

I accidently used comma(',') instead of 'or' in 'always' statement when desining a clock generator in verilog HDL.

like this: always @(negedge RST, posedge CLK) begin ~ end

I'd like to ask whether using comma works differently from using 'or', and if it is different, how it is different.

Actually I didn't notice any unexpected operation during verificaiton of its operation.

Thank you.
PG
 

I'd like to ask whether using comma works differently from using 'or'
Same. However synthesized results might be different.

‘,’ is recommended, since inside ‘()’ is Sensitivity List.
 
Last edited:

Thank you very much for your reply.

Waiting my question to be uploaded, I found a reference for your comment in IEEE standard of system Verilog 2017.


- IEEE Standard for SystemVerilog-Univied Hardware Design, Specification, and Verification Language, p.218, 2017

Thank you so much.
PG
 

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