UesTC 设计中 Template for Process statement Using the"SENSITIVITY LIST General format for a Process statemtent name Process() begin PROCESS (Sensitivity list) begin end process sequential statement #1 sequential statement #2 Sensitivity list sequential statement#N END PROCESS name Sequential Statement g The sequential statement execute one by one and follow the order ie finish the fl then 2 then #3 name is optional
设计中心 Template for Process Statement Using the “SENSITIVITY LIST SENSITIVITY LIST” name : PROCESS (sensitivity_list) begin sequential statement #1 sequential statement #2 ....... sequential statement # N END PROCESS name; General format for a Process Statemtent Process ( ) begin .. end process Sensitivity List Sequential Statement The sequential statement execute one by one and follow the order, ie. finish the #1 then #2 then #3 name is optional
esTc 设计中 Example will be more clear Entity testl is port(a, b, sell, sel2: in bit; i-sel2 result: out bit) end testl: architecture test1 body of test1 begin process(sell, sel2, a, b) be egin if(sell='1)then result <=a 1 elsif (sel2='1)then result <= hs else Result change if sell, sel2, a or b change the value result<=“0; end if; Wait: I can do the same join with Concurrent Statement end process end testl body;
设计中心 Example will be more clear 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; Result change if sel1, sel2, a or b change the value Wait : I can do the same join with Concurrent Statement
esTc 设计中 Concurrent Statement Process statement Entity testl is Entity testl is port(a, b, sell, sel2 in bit; port (a, b, sell, sel2: in bit; result out bit) result: out bit; end test: end testl: architecture testl_ body of testl is architecture testl body of testl is begin egl i≈ a when sell=eke process(sell, sel2, a, b) b when sel]='I' else d begin if(sell="1)then end testl boc result <=a; elsif (sel2='1)then result<=b else result<=“03; Same function but different end if way to do the coding end process, end testl body;
设计中心 Entity 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