Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17049 Discussions

find the max value between a given inputs

Altera_Forum
Honored Contributor II
1,611 Views

hi all 

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

thanks a lot
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
857 Views

what code have you done so far?

0 Kudos
Altera_Forum
Honored Contributor II
857 Views

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

once u done with that move on to dataflow
0 Kudos
Altera_Forum
Honored Contributor II
857 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
857 Views

Draw out the logic circuit, and then write the VHDL.

0 Kudos
Altera_Forum
Honored Contributor II
857 Views

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
0 Kudos
Reply