AHDL


Case


decoder.tdf, , 2 4 . 2- .

 

SUBDESIGN decoder

(

code[1..0] : INPUT;

out[3..0] : OUTPUT;

)

BEGIN

CASE code[] IS

WHEN 0 => out[] = B"0001";

WHEN 1 => out[] = B"0010";

WHEN 2 => out[] = B"0100";

WHEN 3 => out[] = B"1000";

END CASE;

END;

 

0, 1, 2 3. Case => . , code[] 1, out1 B"0010". , WHEN