Feb 1, 2008 #1 V vijay82 Member level 2 Joined Jan 13, 2007 Messages 52 Helped 6 Reputation 12 Reaction score 7 Trophy points 1,288 Activity points 1,724 verilog case statement Is is proper coding convention to use a case statement inside an always @posedge clk block? . Something like always @(posedge clk or negedge rst_n) if (rst_n == 1'b0) <reset logic> else case < case variable > <some logic> . . . endcase It works all right, but I haven't seen any professional examples so far. Thanks for any answers.
verilog case statement Is is proper coding convention to use a case statement inside an always @posedge clk block? . Something like always @(posedge clk or negedge rst_n) if (rst_n == 1'b0) <reset logic> else case < case variable > <some logic> . . . endcase It works all right, but I haven't seen any professional examples so far. Thanks for any answers.
Feb 1, 2008 #2 FvM Super Moderator Staff member Joined Jan 22, 2008 Messages 52,392 Helped 14,748 Reputation 29,778 Reaction score 14,091 Trophy points 1,393 Location Bochum, Germany Activity points 297,965 verilog case syntax Hello, yes, you can directly assign new states to case variable, then it's called a Mealy state machine. I prefer it for it's compactness. Regards, Frank
verilog case syntax Hello, yes, you can directly assign new states to case variable, then it's called a Mealy state machine. I prefer it for it's compactness. Regards, Frank