Need help with VHDL

Discussion in 'Programmer's Corner' started by sdfdf, Jun 18, 2009.

  1. sdfdf

    Thread Starter New Member

    Jun 18, 2009
    1
    0
    Hi. I need some help with VHDL.

    Is there a function I can use to find the maximum value of an array of numbers?
    If there is one could somebody give an example of how to use it?

    Thanks.
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  3. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    864
    40
    I don't think there is a special function to do it.
     
  4. tuborggg

    Active Member

    Jan 3, 2009
    37
    0
    Yes beenthere, but it can use a comparator...
    sdfdf - write such a function (3-4 lines max, just decide on it's input and output integer/std_logic_vector/array...)
    and use it:
    max_reg <= max_func(input_a, input_b);
    Have fun
     
Loading...