Verilog 到 VHDL 的转换

问题描述 投票:0回答:0

我在 Verilog 中有以下代码,我正在尝试将其转换为 VHDL。

Verilog代码:

always@(posedge iGO or negedge iRST)
begin
    if(!iRST)
        go_en   <=  0;
    else
    begin
        if(iGO)
            go_en   <=  1;
    end
end

VHDL转换:

50. process (iGO, iRST)
51. begin
52.  if falling_edge(iRST) then
53.   if (iRST = '0') then
54.     go_en <= '0';
55.   elsif rising_edge(iGO) then
56.     go_en <= '1';
57.   end if;
58.  end if;
59. end process;

我收到以下错误。

错误 (10820):adc_control.vhd(52) 处的网表错误:无法推断 go_en 的寄存器,因为其行为取决于多个不同时钟的边沿 信息 (10041):“go_en”在 adc_control.vhd(50) 的推断锁存器 错误 (10822):adc_control.vhd(52) 处的 HDL 错误:无法在该时钟边沿实现寄存器分配 错误 (10822):adc_control.vhd(55) 处的 HDL 错误:无法在该时钟边沿实现寄存器分配

如何修复这些错误?

verilog vhdl
© www.soinside.com 2019 - 2024. All rights reserved.