clocked for loop with conditional if...

Joined
Sep 10, 2009
Messages
1
Reaction score
0
I think this gets synthesized into a priority encoder, muxing the appropriate prioritised input to output (assume input is an array of some type, with the type being the same as output) and req is a an array of request signals. req(0) has the highest priority and req(2) the lowest. I think this saves a rather large amount of if..elsif's as an alternative to encode priority? >> Anyone else agree?...Im just puzzling it to myself.

......
elsif (clk'event and (clk = '1')) then

for priority in 0 to 2 loop

if (req(priority) ='1') then
output <= input(priority);
end if;

end loop;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,816
Latest member
nipsseyhussle

Latest Threads

Top