Verilog - Definition of Constants

Definition of Constants

The definition of constants in Verilog supports the addition of a width parameter. The basic syntax is:

<Width in bits>'<base letter><number>

Examples:

  • 12'h123 - Hexadecimal 123 (using 12 bits)
  • 20'd44 - Decimal 44 (using 20 bits - 0 extension is automatic)
  • 4'b1010 - Binary 1010 (using 4 bits)
  • 6'o77 - Octal 77 (using 6 bits)

Read more about this topic:  Verilog

Famous quotes containing the words definition of and/or definition:

    I’m beginning to think that the proper definition of “Man” is “an animal that writes letters.”
    Lewis Carroll [Charles Lutwidge Dodgson] (1832–1898)

    I’m beginning to think that the proper definition of “Man” is “an animal that writes letters.”
    Lewis Carroll [Charles Lutwidge Dodgson] (1832–1898)