5/6/2012 11:32 AM | |
Joined: 12/1/2009 Last visit: 9/5/2024 Posts: 672 Rating: (147) |
Dear lucky_209, you need to program a so called "FIFO" First In &First Out functionality. I don't have any example here but I am sure that you will find it by using the search. Regards. |
Give us your feedback and show us your respect! |
|
5/6/2012 11:41 AM | |
Posts: 8946 Rating: (999) |
A small sample for FIFO can be downloaded from my hompage. But beware, german language! |
5/6/2012 1:19 PM | |
Posts: 20 Rating: (0) |
I have to find the that among the seven request bit which bit is set first which means which request has the top priority |
5/6/2012 1:30 PM | |
Joined: 1/28/2009 Last visit: 9/10/2024 Posts: 6849 Rating: (1365) |
[quote user="lucky_209"]I have to find the that among the seven request bit which bit is set first which means which request has the top priority Hello lucky_209, this was previously discussed here: First out logicBest regards, Hamid Hosseini |
This contribution was helpful to1 thankful Users |
5/6/2012 1:43 PM | |
Joined: 12/1/2009 Last visit: 9/5/2024 Posts: 672 Rating: (147) |
Dear lucky_209 , if I understand you correctly you have seven individual request bits, right? For each bit you can store a value i.e. 1 to 7 in the FIFO. In example: Bit 1 = W#16#1 into FIFO Bit2 = W#16#2 into FIFO Bit3 = W#16#3 into FIFO Bit4 = W#16#4 into FIFO Bit5 = W#16#5 into FIFO Bit6 = W#16#6 into FIFO Bit7 = W#16#7 into FIFO The FIFO alwaystells you which one is thefirst/actualsequence no. But first you need to understand how a FIFO works. Regards. |
Give us your feedback and show us your respect! |
|
5/6/2012 2:59 PM | |
Posts: 20 Rating: (0) |
Dear hdhosseini Its good but its only for the first bit but i want to make a priority list for 7 request bits so that i can start the sequence accordingly.
|
5/6/2012 3:15 PM | |
Joined: 12/20/2008 Last visit: 8/12/2024 Posts: 556 Rating: (236) |
Dear lucky_209, If you could elaborate more on your sequence, would be nice to have a better understaning of your problem. Though, what so far you have mentioned, appears to be a FIFO sequence. For your understanding, I am mentioning the other way I would do it: Suppose if you have seven bits m1 m2 m3 m4 m5 m6 m7 You may have a data register, D0 suppose all of these m1 to m7 bits are on, in the beginning you may initilize the D0 to 0. if D0= 0, case x, m1 =1, then D0=1 m1 =2, then D0=2 m1 =3, then D0=3 m1 =4, then D0=4 m1 =5, then D0=5 m1 =6, then D0=6 m1 =7, then D0=7 |
This contribution was helpful to1 thankful Users |
5/6/2012 3:23 PM | |
Joined: 1/28/2009 Last visit: 9/10/2024 Posts: 6849 Rating: (1365) |
Hello lucky_209, It is important to know how these priority bits generated (By operator or in program).If you are sure that always one bit activated, "LN" may help to find the bit position iteratively in a loop.We need abit more explanations. Best regards, Hamid Hosseini |
Follow us on