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

von Jeevan R. (jynal)

Rate this post
0 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
0 useful
not useful
if rising_edge(clk) then
 if reset = '1' then
  max_value <= (others => '0');
  if cur_val > max_value then
   max_value <= cur_value;
  end if;
 end if;
end if;

von Lothar M. (lkmiller) (Moderator)

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


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.