You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entitydecoderisgeneric (
SELBITS : positive:=2
);
port (
en : instd_logic;
sel : instd_logic_vector(SELBITS-1downto0);
hot : outstd_logic_vector(2**SELBITS-1downto0)
);
enddecoder;
architectureBHVofdecoderisbeginprocess(en, sel)
begin
hot <= (others=>'0');
if(en ='1') then
hot(to_integer(unsigned(sel))) <='1';
endif;
endprocess;
endBHV;
Language: VHDL
Example file:
(taken from vhdl-examples
)
The text was updated successfully, but these errors were encountered: