Download XST User Guide
Transcript
R Decoders Decoders A decoder is a multiplexer whose inputs are all constant with distinct one-hot (or one-cold) coded values. Please refer to “Multiplexers” in this chapter for more details. This section shows two examples of 1-of-8 decoders using One-Hot and One-Cold coded values. Log File The XST log file reports the type and size of recognized decoders during the Macro Recognition step. Synthesizing Unit <dec>. Related source file is decoders_1.vhd. Found 1-of-8 decoder for signal <res>. Summary: inferred 1 Decoder(s). Unit <dec> synthesized. ============================== HDL Synthesis Report Macro Statistics # Decoders 1-of-8 decoder ============================== ... : 1 : 1 The following table shows pin definitions for a 1-of-8 decoder. IO pins Description s[2:0] Selector res Data Output Related Constraints A related constraint is DECODER_EXTRACT. VHDL (One-Hot) Following is the VHDL code for a 1-of-8 decoder. library ieee; use ieee.std_logic_1164.all; entity dec is port ( sel: in std_logic_vector (2 downto 0); res: out std_logic_vector (7 downto 0) ); end dec; XST User Guide www.xilinx.com 1-800-255-7778 91