- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can i identify the no. of transition (0->1 or 1->0) in a sequence and the number of non transitions in that sequence(1->1 or 0->0).....
for example..... consider a 8 bit sequence 01101001 no. of transitions 5 no. of non transitions 2 anyone know to solve this in vhdl.....pls help meLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
what have you got so far and where are you stuck?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One way to do it would be to XOR each bit with its neighbor on the right, append some zeros on the left to each result (in the example case 2 zeros would be sufficient since you are never going to have more than 7) then add them all up. This will give you the number of transitions. Subtract this from the total# bit -1 and you have the number of non-transitions. If it isn't very many bits and it is the same number of bits every time then this should work.
How many bits are we talking about here?
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page