2014-06-27 83 views
0

我不能找到我做錯了,我會很高興,如果有人可以幫助我在此...錯誤(10822):無法實現寄存器這個時鐘邊沿分配

entity fsmF is 
    port(S, R : in std_logic; 
     Q : out std_logic); 
end; 

architecture FSM_beh of fsmF is 
begin 
    process(S, R) 
    begin 
    if S = '0' then 
     Q <= '0'; 
    else 
     if (R'event and R = '1' and S = '1') then -- <= ERROR 
     Q <= '0'; 
     else 
     Q <= '1'; 
     end if; 
    end if; 
    end process; 
end FSM_beh; 

回答

0

if部分根據R'event and R = '1'rising_edge(R))和S = '1'的上升沿指定Q,這是OK。

問題是,當沒有 R的上升沿且S爲'1'時,else部分分配給Qelse部分需要一個電路,該電路可以更新過程敏感度列表中的信號事件,然後檢查 除上升沿之外的其他事件,以便在這些事件中分配到Q

因此,保持上升沿檢測爲分開的條件下,及其它條件 下面,如:

if (R'event and R = '1') then -- <= ERROR 
    ... 
end if;