logo
down
shadow

Non resolved signal has multiple sources VHDL


Non resolved signal has multiple sources VHDL

By : Gregory Nimmo
Date : November 16 2020, 06:23 AM
To fix this issue Your error message: non resolved signal NS has multiple sources contains also the source lines, which causes the multiple driver issue. See the full Xilinx XST synthesis report.
More over, your code has multiple copy-paste errors:
code :


Share : facebook icon twitter icon
VHDL Assigning Multiple Values to One Signal

VHDL Assigning Multiple Values to One Signal


By : user3054359
Date : March 29 2020, 07:55 AM
To fix this issue "if - elsif" is a priority structure. The first alternative to resolve to TRUE, is executed. All others are skipped.
VHDL Signal Output[3] in unit filter(4) is connected to following multiple drivers:

VHDL Signal Output[3] in unit filter(4) is connected to following multiple drivers:


By : Manu S
Date : March 29 2020, 07:55 AM
it fixes the issue There's an issue of inferred latches on Output. This is caused by the conditions present in the concurrent signal assignment, and are reported in synthesis. We want to avoid latches.
So with an Minimal, Complete and Verifiable Example we can modify the example to provide a combinatorial OR for all the flag1 drivers in all the processes produced by the nested for generate statements (14.5.5 Other concurrent statements Elaboration of all concurrent signal assignment statements and concurrent assertion statements consists of the construction of the equivalent process statement followed by the elaboration of the equivalent process statement.).
code :
library ieee;
use ieee.std_logic_1164.all;

entity ex_case is
    port ( output: out std_ulogic_vector(3 downto 0) );
end entity ex_case;
architecture foo of ex_case is
    signal flag1: std_ulogic := '0';
    constant n: natural := 4;
    function reduce_or (input: std_logic_vector) return std_logic is
        variable retval: std_logic;
    begin  -- MAY BE replace by "or" -2008, or by different reduction function
        retval := '0';
        for i in input'range loop
            retval := retval or input(i);
        end loop;
        return retval;
    end function;
    function firstflag (iflag: std_logic_vector) return integer is
    begin
        for i in iflag'range loop
            if To_bit(iflag(i)) = '1' then
                return i;
            end if;
        end loop;
        return iflag'LEFT; -- This will park on iflag' when no flag is set
    end function;
    signal iflag: std_logic_vector(0 to n - 1);
    subtype iflag_subtype is std_logic_vector(iflag'range);
begin

loop1: 
    for j in 0 to n - 1 generate 
        type output_array is array (0 to n - 1) of std_logic;
        signal ioutput: output_array;
        signal jselect: natural range 0 to n - 1;
    begin
        -- flag1 <= '0'; -- REMOVED  -- reset the flag, same as output_ready
loop2: 
        for i in 0 to n - 1 generate 
            signal iflag: std_logic_vector (0 to n - 1);
        begin
            ioutput(j) <= '1' when  i >= j and iflag(j) = '0' else 
                          '0';
            iflag(i) <=  '1' when  i >= j else 
                         '0'; -- output when valid data is available
            iflag(j) <= reduce_or(iflag);
        end generate loop2;
        output(j) <= ioutput(firstflag(iflag)); -- A Multiplexer
    end generate loop1;  

    flag1 <= '1' when iflag /= iflag_subtype'(others => '0') else
             '0'; 
end architecture foo;
VHDL: compare a signal against multiple values

VHDL: compare a signal against multiple values


By : Fernando Antunes
Date : March 29 2020, 07:55 AM
this one helps. A loop over an array of reference values is probably easier to maintain:
code :
subtype ref_value is std_ulogic_vector(7 downto 0);
type ref_value_array is array (natural range <>) of ref_value;
constant ref_values: ref_value_array(0 to 2) := (x"00", x"01",...);
...
next_state <= error;
for i in ref_values'range loop
  if cmd = ref_values(i) then
    next_state <= no_error;
    break;
  end if;
end loop;
Declare a signal of the same type as another signal (VHDL)

Declare a signal of the same type as another signal (VHDL)


By : Emma Yin
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further Is it possible to declare a signal of the same type as another signal in VHDL? , The subtype attribute is probably what you are looking for:
code :
entity foo is
end entity foo;

architecture bar of foo is
  signal address_q : integer range 0 to 31;
begin
  process
    variable v: address_q'subtype;
  begin
    report to_string(v'subtype'left);
    report to_string(v'subtype'right);
    wait;
  end process;
end architecture bar;
foo.vhd:10:5:@0ms:(report note): 0
foo.vhd:11:5:@0ms:(report note): 31
VHDL wait on multiple signal

VHDL wait on multiple signal


By : Jessmin Ann Feria
Date : March 29 2020, 07:55 AM
I wish did fix the issue.
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org