parity_ops

extras/parity_ops.vhdl

Dependencies

None

Description

Functions for calculating and checking parity.

Types

parity_ops.parity_kind

Identify the type of parity

Subprograms

parity_ops.parity (Ptype : parity_kind; Val : std_ulogic_vector) → std_ulogic
Compute parity.
Parameters:
  • Ptype (parity_kind) – Type of parity; odd or even
  • Val (std_ulogic_vector) – Value to generate parity for
Returns:

Parity bit for Val.

parity_ops.check_parity (Ptype : parity_kind; Val : std_ulogic_vector; Parity_bit : std_ulogic) → boolean
Check parity for an error.
Parameters:
  • Ptype (parity_kind) – Type of parity; odd or even
  • Val (std_ulogic_vector) – Value to test parity for
  • Parity_bit (std_ulogic) – Parity bit to check
Returns:

true if Parity_bit is correct.