xtcx
Advanced Member level 1
- Joined
- Dec 22, 2007
- Messages
- 493
- Helped
- 65
- Reputation
- 130
- Reaction score
- 58
- Trophy points
- 1,308
- Location
- Bangalore, India
- Activity points
- 5,003
Hi, I'm working, well worked on HDLC bit level design and was able to validate it. Now working with HDLC Byte level and am able to validate it properly as well. Now the problem here is that input now on comes as 64-bit Qword format from FIFO instead of byte. In HDLC, the 7E (octet) is the start\end of frame. Based on this position of 7E, I need to slice the input 64-bit data as per the byte position. Here the complexity is that I need to read 64-bit qword every clock and the worst thing is that the 7E position will change it's position to any byte lane (from 1 to 8) in the next frame. When the byte lane changes in the next frame my byte encoder changes and I'm missing some bytes in slicing process.
For eg, assume these train of Qwords containing two frame data
Slice it like this, Now I need to reslice (for every time I detect 7E, slice value is not constant) as this way
IT should be packed to this way
x- don't care
I tried logic like byte encoder which finds the lane of 7E and uses that value to slice the Qwords accordingly by putting into curr\prev format. However doing so, I'm missing some bytes whenever the 7E position changes to another, even if I try to slice that residual bytes sometimes the position of 7E gives no residual bytes. Couldn't predict a working logic or maybe a different approach. Post this I need to apply byte de-stuffing which removes dome unwanted characters and once again will reshape the 64-bit word.
Hope some of you can throw some light. Don't expect code in VHDL/VERILOG but all I need is a logic or suggestion. Delaying input by 1 clock for each frame is allowed and does not affect global timing.
Thanks.
For eg, assume these train of Qwords containing two frame data
Code:
007E03FF01020304-05060708090A0B0C-0D0E0F10117E03FF-0102030405060708-.......
Slice it like this, Now I need to reslice (for every time I detect 7E, slice value is not constant) as this way
Code:
007E[B][COLOR="#FF0000"]03FF01020304-05060708090A0B0C-0D0E0F1011[/COLOR][/B]7E[B][COLOR="#FF0000"]03FF-0102030405060708[/COLOR][/COLOR][/B]-.......
Code:
03FF010203040506-0708090A0B0C0D0E-0F1011xxxxxxxxx-03FF010203040506-0708........
I tried logic like byte encoder which finds the lane of 7E and uses that value to slice the Qwords accordingly by putting into curr\prev format. However doing so, I'm missing some bytes whenever the 7E position changes to another, even if I try to slice that residual bytes sometimes the position of 7E gives no residual bytes. Couldn't predict a working logic or maybe a different approach. Post this I need to apply byte de-stuffing which removes dome unwanted characters and once again will reshape the 64-bit word.
Hope some of you can throw some light. Don't expect code in VHDL/VERILOG but all I need is a logic or suggestion. Delaying input by 1 clock for each frame is allowed and does not affect global timing.
Thanks.
Last edited: