EmbDev.net

Forum: FPGA, VHDL & Verilog vhdl code to find max value of stream of unsigned 8 bit values


von Jeevan R. (jynal)


Rate this post
useful
not useful
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.

von piss of cake (Guest)


Rate this post
useful
not useful
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;

von Lothar M. (Company: Titel) (lkmiller) (Moderator)


Rate this post
useful
not useful
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...

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.