Constant input to an entity

Status
Not open for further replies.

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Visit site
Activity points
18,302
Suppose we have a VHDL component called "some_component" with an input port called "some_input" that drives a large block of combinatorial logic.
What will happen to "some_component" if we drive "some_input" with a constant value when we instantiate it?

1."some_component" will still be synthesized fully.
2.The output of "some_component" will also become a constant.
 

The "constant logic" will be optimized away at some optimization stage.
This is not always true in the ASIC world when a large design is divided into subchips. A constant input to a subchip will not be optimized.
I think that similar things also can happen in the FPGA world if a region is "locked" to save time on synthesis, place and route.
 
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
So,

If it isn't "locked" with an appropriate attribute it'll simply optimize away - always ?
 

If a constant input results in a constant output, AND the synthesizer is able to detect this , THEN yes it will optimize it away AFAIK. If you want to prevent this you'll have to use constraints like "KEEP" and "SAVE".
 
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…