B
Brian Guralnick
Guest
I'm looking for an easy method to do the following in verilog:
I need the logic to do the following,
If the priority is 0, select the first active interrupt starting from in 0
to thru 7. next priority = the first active interrupt # + 1.
if the priority is 1, select the first active interrupt starting from in 1
to thru 7, then last 0. next priority = the first active interrupt # + 1.
if the priority is 2, select the first active interrupt starting from in 2
to thru 7, then 0 thru 1. next priority = the first active interrupt # + 1.
if the priority is 3, select the first active interrupt starting from in 3
to thru 7, then 0 thru 2. next priority = the first active interrupt # + 1.
ect...
If there are no interrupts, priority will hold it's value.
Now, I can easily make an if / else if table, but that looks messy. Is
there a better shortcut method to do it in verilog?
_____________
Brian G.
I need the logic to do the following,
If the priority is 0, select the first active interrupt starting from in 0
to thru 7. next priority = the first active interrupt # + 1.
if the priority is 1, select the first active interrupt starting from in 1
to thru 7, then last 0. next priority = the first active interrupt # + 1.
if the priority is 2, select the first active interrupt starting from in 2
to thru 7, then 0 thru 1. next priority = the first active interrupt # + 1.
if the priority is 3, select the first active interrupt starting from in 3
to thru 7, then 0 thru 2. next priority = the first active interrupt # + 1.
ect...
If there are no interrupts, priority will hold it's value.
Now, I can easily make an if / else if table, but that looks messy. Is
there a better shortcut method to do it in verilog?
_____________
Brian G.