Hi Tristan,

> clearly (and as you have already predicted), most of the time is spent in
> next compute.  I have an idea to improve that.

the stats look pretty extreme - not sure it is really that extreme in
practice, valgrind profiling shows more time spent running processes.

Anyway, there are a couple of wired-or busses that use the following
resolution function:

  function or_reduce(arg : std_ulogic_vector) return std_ulogic is
    variable a : std_ulogic_vector(arg'length-1 downto 0);
    variable h : integer;
  begin
    if arg'length < 1 then
      return '0';
    end if;
    a := to_UX01(arg);
    if a'length = 1 then
      return a(a'left);
    elsif arg'length = 2 then
      return a(a'left) or a(a'right);
    else
      h := (a'length+1)/2+a'right;
      return or_reduce(a(a'left downto h)) or or_reduce(a(h-1 downto a'right));
    end if;
  end or_reduce;

Not sure where the runtime of this function shows up - in next compute?

Happy new year!

Tom



_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to