警告“没有负载”,但我不明白为什么

时间:2012-04-21 21:51:08

标签: vhdl fpga lattice-diamond

我从Lattice Diamond获得了任何uart(目前为11)

的每个实例的警告
WARNING - ngdbuild: logical net 'UartGenerator_0_Uart_i/Uart/rxCounter_cry_14' has no load
WARNING - ngdbuild: logical net 'UartGenerator_0_Uart_i/Uart/rxCounter_cry_0_COUT1_9_14' has no load
WARNING - ngdbuild: logical net 'UartGenerator_0_Uart_i/Uart/rxCounter_cry_12' has no load
WARNING - ngdbuild: logical net 'UartGenerator_0_Uart_i/Uart/rxCounter_cry_10' has no load
WARNING - ngdbuild: logical net 'UartGenerator_0_Uart_i/Uart/rxCounter_cry_8' has no load
WARNING - ngdbuild: logical net 'UartGenerator_0_Uart_i/Uart/rxCounter_cry_6' has no load
WARNING - ngdbuild: logical net 'UartGenerator_0_Uart_i/Uart/rxCounter_cry_4' has no load
WARNING - ngdbuild: logical net 'UartGenerator_0_Uart_i/Uart/rxCounter_cry_2' has no load
WARNING - ngdbuild: logical net 'UartGenerator_0_Uart_i/Uart/rxCounter_cry_0' has no load

VHDL代码

entity UART is 
    generic (
        dividerCounterBits: integer := 16
    );
    port (
        Clk         : in  std_logic;                        -- Clock signal
        Reset       : in  std_logic;                        -- Reset input
        ClockDivider: in  std_logic_vector(15 downto 0);

        ParityMode  : in std_logic_vector(1 downto 0);      -- b00=No, b01=Even, b10=Odd, b11=UserBit
    [...]


architecture Behaviour of UART is
    constant oversampleExponent : integer := 4;

    subtype TxCounterType is integer range 0 to (2**(dividerCounterBits+oversampleExponent))-1;
    subtype RxCounterType is integer range 0 to (2**dividerCounterBits)-1;
    signal rxCounter: RxCounterType;
    signal txCounter: TxCounterType;
    signal rxClockEn: std_logic; -- clock enable signal for receiver
    signal txClockEn: std_logic; -- clock enable signal for transmitter
begin
    rxClockdivider:process (Clk, Reset)
    begin
        if Reset='1' then
        rxCounter <= 0;
        rxClockEn <= '0';
    elsif Rising_Edge(Clk) then
        -- RX counter (oversampled)
        if rxCounter = 0 then
            rxClockEn <= '1';
            rxCounter <= to_integer(unsigned(ClockDivider));
        else
            rxClockEn <= '0';
            rxCounter <= rxCounter - 1;
        end if;
    end if;
    end process;

    txClockDivider: process (Clk, Reset)
    [...]

    rx: entity work.RxUnit
    generic map (oversampleFactor=>2**oversampleExponent)
    port map (Clk=>Clk, Reset=>Reset, ClockEnable=>rxClockEn, ParityMode=>ParityMode,
            ReadA=>ReadA, DataO=>DataO, RxD=>RxD, RxAv=>RxAv, ParityBit=>ParityBit,
            debugout=>debugout
             );

end Behaviour;

这是一个单一的Uart,创建它们(目前有11个uarts)我使用这个

-- UARTs

    UartGenerator: For i IN 0 to uarts-1 generate
    begin
        Uart_i : entity work.UartBusInterface 
            port map (Clk=>r_qclk, Reset=>r_reset, 
                cs=>uartChipSelect(i), nWriteStrobe=>wr_strobe, nReadStrobe=>rd_strobe,
                address=>AdrBus(1 downto 0), Databus=>DataBus,
                TxD=>TxD_PAD_O(i), RxD=>RxD_PAD_I(i),
                txInterrupt=>TxIRQ(i), rxInterrupt=>RxIRQ(i), debugout=>rxdebug(i));

        uartChipSelect(i) <= '1' when to_integer(unsigned(adrbus(5 downto 2)))=i+4 and r_cs0='0' else '0';
    end generate;

我可以将它与uart工作同步,但为什么我会收到警告?

恕我直言,rxCounter应该使用每个可能的值,但是为什么每个第二位都会产生警告&#34;没有负载&#34;

我在某处读到这意味着这些网络未被使用并将被移除。
但要从0到2 ^ n-1计数,我需要不少于n位。

3 个答案:

答案 0 :(得分:2)

此警告表示没有人“聆听”这些网。

可以在合成中删除信号。警告不是错误!你只需要知道它们。

我们无法评估您的部分代码发生了什么。

  • 是否有名为rxCounter_cry
  • 的信号
  • ClockDivider的数据类型是什么?
  • dividerCounterBits的价值是什么?
  • 其他过程会发生什么?如果不相关,请尝试在没有该过程的情况下运行您的综合。如果 相关,我们需要看到它。

答案 1 :(得分:2)

格子ngdbuild对于它正在做的工作特别垃圾,我通过我的makefile中的grep输出ngdbuild输出来删除这些消息:

ngdbuild ... | grep -v "ngdbuild: logical net '.*' has no load"

除此之外还有超过2500种,消除它们有助于专注于实际问题。

第二个最糟糕的工具链垃圾邮件发送者edif2ngd抱怨Verilog参数没有明确处理。这是一条双行消息(超过300条),所以我将其删除:

edif2ngd ... | sed '/Unsupported property/{N;d;}'

答案 2 :(得分:1)

请注意,有时它会使用加法器来实现。最高位不使用该加法器的进位输出,最低位不使用符号输入。所以你得到一个警告:

警告 - 综合:逻辑网&#39; clock_chain / dcmachine / count_171_add_4_1 / S0&#39;没有负担 警告 - 综合:逻辑网&#39; clock_chain / dcmachine / count_171_add_4_19 / CO&#39;没有负担

没问题,第19位是最高的,所以它不会随身携带,第1位是最低的,因此它不会从任何地方获得符号位。但是,如果你在最高和最低之间的任何位上得到这个警告,通常意味着某些东西是错误的,但不是错误,所以它会构建一些&#34;工作&#34;当你测试它,但不是在错误的情况下。如果您使用错误情况进行模拟,通常会显示不良结果。

相关问题