cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Voyager
Voyager
5,466 Views
Registered: ‎04-10-2012

does "initial" synthesize to a value?

Jump to solution

I am using ISE 14.2 and am programming in verilog.  I have the following two lines in some code:

reg initializing;
initial initializing = 1;

 Does that synthesize the same way it simulates?  Meaning, upon powerup, does the register initializing have the value 1? It seems like it does, but I wasn't sure if I was getting luck and fooling myself.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Guide
Guide
6,834 Views
Registered: ‎01-23-2009

Re: does "initial" synthesize to a value?

Jump to solution

Yes. The initial value of the register is extracted (by FPGA synthesis tools ONLY - not ASIC tools) and is used as the INIT value for the flip-flop (assuming that the reg "initializing" ultimately becomes a flip-flop).

 

A better (more concise) way of doing it is

 

reg initializing = 1;

 

Avrum

View solution in original post

0 Kudos
5 Replies
Highlighted
Guide
Guide
6,835 Views
Registered: ‎01-23-2009

Re: does "initial" synthesize to a value?

Jump to solution

Yes. The initial value of the register is extracted (by FPGA synthesis tools ONLY - not ASIC tools) and is used as the INIT value for the flip-flop (assuming that the reg "initializing" ultimately becomes a flip-flop).

 

A better (more concise) way of doing it is

 

reg initializing = 1;

 

Avrum

View solution in original post

0 Kudos
Highlighted
Voyager
Voyager
5,439 Views
Registered: ‎04-10-2012

Re: does "initial" synthesize to a value?

Jump to solution

Thanks,  that does look clearer.

0 Kudos
Highlighted
Scholar
Scholar
5,419 Views
Registered: ‎09-16-2009

Re: does "initial" synthesize to a value?

Jump to solution

 

Just keep in mind that the INIT value is loaded at FPGA configuration.  It will not be loaded at functional reset (if your design contains one). 

 

Seems obvious  - and it is - but sometimes can lead to perplexing behaviour if this distinction isn't kept in mind.

 

--Mark

 

 

 

0 Kudos
Highlighted
Voyager
Voyager
5,405 Views
Registered: ‎04-10-2012

Re: does "initial" synthesize to a value?

Jump to solution

Yes, I did realize that, but it is a good point to make!

0 Kudos
Highlighted
Anonymous
Not applicable
5,153 Views

Re: does "initial" synthesize to a value?

Jump to solution

I also have the same question before ,and all our team member use "initial" to initialize the register.

0 Kudos