【问题标题】:statement is not synthesizable since it does not hold its value under NOT(clock-edge) condition语句不可综合,因为它在 NOT(clock-edge) 条件下不保持其值
【发布时间】:2019-01-07 14:33:37
【问题描述】:

语句不可合成,因为它在 NOT(clock-edge) 条件下不保持其值

尝试在 u_txack 边沿重置 =>0 信号 u_txreq 并在 CLK 边沿设置 =>1

process (CLK, u_reset_n, u_txack)
begin
  if (u_reset_n='0')then
    u_txreq<='0';
  elsif rising_edge(CLK) then 
    u_txreq<='1';
  elsif rising_edge(u_txack) then
    u_txreq<='0';   
  end if;
end process;

【问题讨论】:

    标签: vhdl clock sequential synthesis


    【解决方案1】:

    要使 HDL 代码可合成,目标库中必须存在一些硬件来实现所请求的功能。

    目前不存在同时支持的硬件:
    1/ 在低电平有效信号上异步复位。 (if (u_reset_n='0'))
    2/ 在上升沿触发 (elsif rising_edge(CLK))
    3/ 在第二个独立上升沿触发。 (elsif rising_edge(u_txack))。

    您必须重新编写代码以仅使用一个上升或下降时钟沿。

    【讨论】:

    • 亲爱的,你能看一下附图并建议如何制作代码。通常需要在 Q 复位后的 n 个时钟内将 D 信号恢复为“1”
    • 1/ 如果你有异步输入,你必须先同步,然后你可以使用信号。我建议你阅读同步。 2/ “建议如何编写代码” 意味着我必须为你编写代码,而我在回答问题时不会这样做。你的规格也不够精确。
    【解决方案2】:

    看看我的信号同步 async u_txack with sync CLK:

    if rising_edge(CLK) then 
                count<=count+B"00000001";                               
                n1_txack <= u_txack;
                if( n1_txack='0' AND u_txack='1')
                    then
                    u_txreq<='0';               
                    count<=B"00000000";
                end if;             
                if (count=B"00000010") then
                    u_txreq<='1'; 
                end if;                 
        end if;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多