用VHDL语言if语句写8选1的数据选择器结构体程序

2024-12-02 06:46:53
推荐回答(1个)
回答1:

process(sel)
begin
if sel=1 then
out_sel<=sel1;
elsif sel=2 then
out_sel<=sel2;
elsif sel=3 then
out_sel<=sel3;
elsif sel=4 then
out_sel<=sel4;
elsif sel=5 then
out_sel<=sel5;

elsif sel=6 then
out_sel<=sel6;

elsif sel=7 then
out_sel<=sel7;
else sel=8 then
out_sel<=sel8;

end if;

希望能帮到你!