RatedR
Junior Member level 1
Can someone help me in designing a programmable priority encoder using verilog . A programmable priority encoder is a device where in addition to the the normal i/p and o/p's of a simple priority encoder there is one more input to decide which bit should have highest priority. Eg. for 4 : 2 programmable priority encoder..there would be 2 select input to decide the priority say [1:0]S.
If S=00; I0 has highest priority..and the priority order will be I0>I3>I2>I1
If S=01; I1 has highest priority..and the priority order will be I1>I0>I3>I2
If S=10; I2 has highest priority..and the priority order will be I2>I1>I0>I3
If S=11; I3 has highest priority..and the priority order will be I3>I2>I1>I0
..The solution is desired to be generic like the logic should remain same for 8:3 and 16:4 priority encoders as well...
Any suggestions would be very helpful...Please help ASAP!!
If S=00; I0 has highest priority..and the priority order will be I0>I3>I2>I1
If S=01; I1 has highest priority..and the priority order will be I1>I0>I3>I2
If S=10; I2 has highest priority..and the priority order will be I2>I1>I0>I3
If S=11; I3 has highest priority..and the priority order will be I3>I2>I1>I0
..The solution is desired to be generic like the logic should remain same for 8:3 and 16:4 priority encoders as well...
Any suggestions would be very helpful...Please help ASAP!!