yhjbest11 发表于 2010-10-11 12:19:27

VHDL菜鸟问题

architecture bahav of trans is
signal s1,s2,s3:std_logic_vector(7 downto 0);
begin
        process(s1,C,A,S)
        begin
        if S="00" then
                s1 <= C;
                else s1 <="ZZZZZZZZ";
                end if;
                A<=s1;
                end process;   
               
        process(s2,C,A,S)
        begin
        if S="01" then
                s2 <= A;
                else s2 <="ZZZZZZZZ";
                end if;
                C<=s2;
                end process;
               
        process(s3,C,B,S)
        begin
        if S="10" or S="11" then
                s3 <= B;
                else s3<="ZZZZZZZZ";
                end if;
                C<=s3;
                end process;
end bahav;
怎么理解其中的一个Process,

yhjbest11 发表于 2010-10-11 13:48:58

各位大虾。求解

自己林 发表于 2010-10-11 15:08:23

这三个进程可以理解为同步执行的吧。。。

wyxj 发表于 2010-10-18 22:52:07

当进程的敏感信号表内元素发生变化,进程执行!注意信号在进程执行完才给赋值!三进程同步!也就是说在第一个进程中
if S="00" then
                s1 <= C;                           当s1=00时给s1赋值c
                else s1 <="ZZZZZZZZ";   否则s1为高阻态(s1是一个8位的标准逻辑位矢量的数据)
                end if;                              if结束
                A<=s1;                              将中间信号的值给a
                end process;                     进程结束
自己看看!s1,s2,s3为中间传递信号

liyujie 发表于 2010-10-19 09:07:48

同意楼上说法
页: [1]
查看完整版本: VHDL菜鸟问题