Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

help with 16 mux in adhl

SUBDESIGN dual_mux16

(

en, s[1..0] :INPUT

a[1..0], b[1..0], c[1..0], d[1..0] :INPUT

y[1..0] :OUTPUT

)

BEGIN

IF !en THEN ----active-low enable

CASE s[] IS --- select input

WHEN 0 => y[] = a[];

WHEN 1 => y[] = b[];

WHEN 2 => y[] = c[];

WHEN 3 => y[] = d[];

END CASE;

ELSE y[] =0; --diabled

END IF;

END;

1 Reply