What are the different State machine Styles ? Which is better ? Why and when do we use one ove the other? Explain Disadv. and Adv.?
What is the difference between the following lines of code ?
- reg1<= #10 reg2 ;
- reg3 = # 10 reg 4 ;
- reg Var1;
- initial begin
- Var1<= "-"
- end
- module quest_for_out();
- integer i;
- reg clk;
- initial begin
- clk = 0;
- #4 $finish;
- end
- always #1 clk = !clk;
- always @ (posedge clk)
- begin : FOR_OUT
- for (i=0; i < 8; i = i + 1) begin
- if (i == 5) begin
- disable FOR_OUT;
- end
- $display ( "Current i : %g" ,i);
- end
- end
- endmodule
What is the output of the below code?
- module quest_for_in();
- integer i;
- reg clk;
- initial begin
- clk = 0;
- #4 $finish;
- end
- always #1 clk = !clk;
- always @ (posedge clk)
- begin
- for (i=0; i < 8; i = i + 1) begin : FOR_IN
- if (i == 5) begin
- disable FOR_IN;
- end
- $display ( "Current i : %g" ,i);
- end
- end
- endmodule
Your comments will be moderated before it can appear here. Win prizes for being an engaged reader.