Forum Discussion

tyassin's avatar
tyassin
Icon for New Contributor rankNew Contributor
4 days ago
Solved

How to set initial register values after powerup

Hello, A topic that has been written about a few times. But how to make sure a specific register value is set, after the FPGA has powered up? I have learned that setting an initial value have no ...
  • FvM's avatar
    4 days ago

    Hi,

    internal register POR state is generally inferred from initialization statements. While std_logic entities have a default initial value of 'U' in simulation, the default initial value of synthesized signals and variables is '0'. It can be overridden by an explicite initial value in declaration.

    Besides initial value, POR can be also set by a reset statement. If reset value is different from initial value you get a synthesis warning that initial value is ignored.

    Regards Frank

    P.S. 

    Automatic POR and external reset signal don't necessarily cause consistent design state because they are asynchronous to design clock. They can cause unexpected initial counter or even illegal FSM states. Synchronous reset release avoids this problem and should be coded in HDL if no respective IP is available. It must be used with explicite reset statement for respective signals.