正在加载图片...
Concurrent statement Process statement Entity testl is Entity testI is port(a, b, sell, sel2: in bit port(a, b, sell, sel2 in bit; result:out bit) result: out bit); end testl end testl architecture testl_body of testl is architecture testl body of testl is begil egl result < a when sell= 1'else process(sell, sel2, a, b) b when sel2=l else begin 0’ if(sell="1,)then end testl body result <= a: elsif (sel2='1)then nIt <= bs result<=“0 Same function but different end if way to do the coding end proces end testl bodyEntity test1 is port (a, b, sel1, sel2 : in bit; result : out bit); end test1; architecture test1_body of test1 is begin result <= a when sel1 = ‘1’ else b when sel2 = ‘1’ else ‘0’; end test1_body; Entity test1 is port (a, b, sel1, sel2 : in bit; result : out bit); end test1; architecture test1_body of test1 is begin process (sel1, sel2,a, b) begin if (sel1 = ‘1’) then result <= a; elsif (sel2 = ‘1’) then result <= b; else result <= ‘0’; end if; end process; end test1_body; Same function but different way to do the coding Concurrent Statement Process Statement
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有