- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everybody!
What is the initial value when I do not give the initial value for a register.For example,the following code : ////////////////////////////////////////////////////////////// module Reset_Delay(iCLK,oRESET); input iCLK; output reg oRESET; reg [19:0] Cont; always@(posedge iCLK) begin if(Cont!=20'hFFFFF) begin Cont <= Cont+1; oRESET <= 1'b0; end else oRESET <= 1'b1; end endmodule /////////////////////////////////////////////// What is the initial value of "Cont" when the device power up.Is this relative with the category of device or ,can be set in QuartusII? Thank you for your help!!!Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The initial value is zero, but I prefer to set it in the code for clarity. In some situation, Quartus may invert the value of signal, but you'll get a warning about it.
P.S.: Some additional thoughts related to POR behaviour can be found in this threads: http://www.alteraforum.com/forum/showthread.php?t=6621 http://www.alteraforum.com/forum/showthread.php?t=18591
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page