程序一: 
library ieee; 
use ieee.std_logic_1164.all; 
entity text1 is  
    port(a0,a1,b:in std_logic; 
                  sel:in std_logic; 
              result:out std_logic); 
end text1; 
 
architecture art of text1 is  
   signal temp:std_logic; 
begin  
   process(a0,a1,b,sel) 
        begin 
             if(sel='0')then  
                    temp<=a0; 
             else  
                    temp<=a1; 
             end if; 
             result<=temp and b;  --在process里面 
     end process; 
end art; 
程序二: 
library ieee; 
use ieee.std_logic_1164.all; 
entity text2 is  
   port(a0,a1,b:in std_logic; 
                 sel:in std_logic; 
              result:out std_logic); 
end text2; 
architecture art of text2 is  
   signal temp:std_logic; 
begin  
    process(a0,a1,sel) 
       begin  
             if(sel='0')then 
               temp<=a0; 
             else  
               temp<=a1; 
              end if; 
      end process; 
      result<=temp and b;    --在process外面 
end art; 
     这两个程序在时序上我认为是有区别的。但是为什么两个程序的时序仿真图是一样的呢? 并且生成的RTL也是一样的,哪位高手能帮我解释一下,谢谢了! |