Skip to content

Instantly share code, notes, and snippets.

@jrmmendes
Created September 21, 2018 15:50
Show Gist options
  • Save jrmmendes/ee6a2dacaea19ba5fc8b3d7f170dee8b to your computer and use it in GitHub Desktop.
Save jrmmendes/ee6a2dacaea19ba5fc8b3d7f170dee8b to your computer and use it in GitHub Desktop.
Multiplexer example in AHDL using IF/THEN/ELSE
TITLE "M2X1";
SUBDESIGN mux
(
a, b, sel: INPUT;
result: OUTPUT;
)
BEGIN
IF sel == 0 THEN
result = a;
ELSE
result = b;
END IF;
END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment