Defining a state machine signal type

type state_types is (not_initalized, state_foo, state_bar);
signal state: state_types;

Example of use

signal some_signal: std_logic;
with state select
    some_signal <=
        '0' when not_initalized,
        '1' when state_foo,
        '1' when state_bar,
        '0' when others;

Published

Category

snippets

Tags