I've been wondering how much optimization the average tool performs, and
how much I should manually try to optimize. For example, if I have two
signals with the same assignment:
sig1 <= (someSig & "000") + someOtherSig;
sig2 <= (someSig & "000") + someOtherSig;
are the tools smart enough to know it's the same assignment and merge
them? Or should I create a variable and use that?
A second example, would the below create the same logic, or is one
preferable to the other? If so why?
if sig1 = '0' then
sig2 <= "0000";
sig2 <= "1111";
sig2 <= sig1 & sig1 & sig1 & sig1;