Thanks for the reply - I see why the example you gave is wrong. I guess I have a new question - the signals in the always@(*) block are declared as reg, and wires are assigned , for example;
input wire input_value;
reg example1_new;
reg example1_current;
reg example2_new;
reg example2_current;
wire example3;
always@(posedge clk) begin
example1_current <= example1_new;
example2_current <= example2_new;
end
assign example3 = input_value;
always@(*) begin
example1_new <= 0;
example2_new <= 0;
if (example3) begin
example1_new <= 1;
example2_new <= 1;
end
end
So are example1_new and example2_new combinatorial logic? It seems like no, since they are reg, but I am still confused by assigning it in a always@(*) block. It's like we are registering values and doing the combinatorial logic at the same time, since the last non-blocking statement is used (example1_new will be 1 if input_value is 1).
Thanks again!