Based on the operator symbol, the synthesis knows about the desired functionality.
Depending on the target technology and the corresponding library elements either a sort of submodule which performs the necessary operations is created out of standard cells, or a macro cell that has already been optimized by the manufacturer is instantiated in the netlist.
If alternative implementations exist, e.g. ripple-carry or carry-look-ahead, the decision will be made according to the given speed and area constraints. Sometimes, the user may influence the synthesis process via tool options or special VHDL comments that are evaluated by the software.
... if(INPUT > 17) then OUT1 <= A; elsif (INPUT < 17); OUT1 <= B; else OUT1 <= C; end if ; ... | ... case INPUT is when 0 to 16 => OUT2 <= B; when 17 =>; OUT2 <= C; when others => OUT2 <= A; end case ; ... |
| |
While algorithms can take care of some huge VHDL constructs, other model aspects can not be changed during synthesis.
The use of IF constructs, for example, implies different levels of priority, i.e. they infer a hierarchical structure of multiplexers.
In CASE statements, however, the different choice options do not overlap and a parallel structure with a single switching stage is the result.
entiy TRISTATE is port (DATA1, DATA2: in std_ulogic; EN1, EN2 : in std_ulogic; DATA_BUS :out std_logic; end TRISTATE;
architecture RTL1 of TRISTATE is begin process (DATA1, EN1) begin if EN1 = ‘1’ then DATA_BUS <= DATA1; else DATA_BUS <=’z’; end if; end process; process ( DATA2, EN2) begin if EN2 = ‘1’ then DATA_BUS <= DATA2; else DATA_BUS <= ‘z’; end if; end process; end RTL; | architecture RTL2 of TRISTATE is begin DATA_BUS <= DATA1 when EN1=’1’ else ’z’; Data_BUS <= DATA2 when EN2=’1’ else ’z’; end RTL2; |
In order to implement a proper internal bus system it must be guaranteed that only one driver is active while all others are set to high impedance, i.e. driving ’Z’.
Otherwise, if one bus member drives a logic ’1’ and another drives a logic ’0’, the current might, depending on the actual technology, increase beyond acceptable levels and probably result in a permanent damage of the device.
Bus with tristate drivers
Waveform
This overlap of active drivers may be caused by different propagation delays, that means the deactivation of one driver takes more time than the activation of another one.
As a consequence two drivers are active. Even if the delays are balanced so that everything works properly, a change to another technology will likely induce problems with the delays.
An alternative design structure avoids the problems associated with tristate signals: