You are currently viewing VHDL Data Types: std_logic_vector, unsigned, signed, and numeric_std

VHDL Data Types: std_logic_vector, unsigned, signed, and numeric_std

  • Post author:
  • Post published:
  • Post category:VHDL

Strong typing is one of VHDL’s biggest strengths for synthesis safety. A plain std_logic_vector represents an unordered array of electrical bits with no inherent sign or mathematical value until explicitly interpreted through ieee.numeric_std as unsigned or signed.

Interactive IEEE numeric_std 8-Bit Interpretation Explorer
VHDL Data Types

Click any bit below to see how the exact same 8-bit std_logic_vector holds simultaneously different numeric values when cast to unsigned versus two’s complement signed.


SCALAR VERSUS COMPOSITE HARDWARE TYPES

  • Scalar types include std_logic (9 valued IEEE 1164 simulation states), boolean, integer, and enumerated FSM states.
  • Composite arrays bundle vectors such as std_logic_vector, unsigned, and signed for buses and counters.
  • Records group heterogeneous signals like AXI valid/ready channels into clean single port bundles.

SAFE NUMERIC_STD CONVERSION RULES

Avoid deprecated Synopsys std_logic_arith libraries in modern RTL. Always rely on ieee.numeric_std: cast between std_logic_vector, unsigned, and signed of identical length with direct type conversions, and change vector widths safely with resize() to ensure correct sign extension on signed operands.