Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

find the max value between a given inputs

hi all

i need a vhdl code to find the max value from integer input where i have a four input ??

thanks a lot

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    first start off with behavioral coding which is mostly like c using > symbol...

    once u done with that move on to dataflow
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    i have a 4 inputs every input has only one value such as

    a => 100

    b => 200

    c => 300

    d => 400

    i want to find max value between a,b,c,d should be d <= 400

    how i can make it in vhdl code??

    how about compare between 2 inputs first and then the other 2 inputs and the results will e compare

    is it a logic idea can e executed
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    you are on right track...

    now design a circuit which compares two inputs and gives out the largest one

    there were many ways to design this. One way can be design comparator and Mux circuits and choose the selection pin of mux based on logic