vhdl code to find max value of stream of unsigned 8 bit values

OP #5688632
Describtion about the subject.
The unsigned values should be presented on an input vector(comnected to 
slife switches S1-S8) and as soon as the read_in( connected to button 
TA2) is pressed the value has read and checked if itis the maximum or 
not. The maximum value should be given to LEDs( IN1-IN8) of the 
out_max(connected to the button TA1) is pressed.
Guest #5688659
1
if rising_edge(clk) then
2
 if reset = '1' then
3
  max_value <= (others => '0');
4
 else
5
  if cur_val > max_value then
6
   max_value <= cur_value;
7
  end if;
8
 end if;
9
end if;
Moderator (Company: Titel) #5688808
Jeevan R. wrote:
> Describtion about the subject.
This obviously is some kind of homework. Your teacher wants you to do 
something and learn by doing that. We should not override this 
intention. So let's try it this way: you start with something and we 
help you on particular questions.
But one one simply will do your homework for you...

Reply

A question of your own? This thread is over 7 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.