Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Oversampling / Skew compensation - VHDL

Status
Not open for further replies.

The_Dutchman

Member level 1
Member level 1
Joined
Feb 12, 2008
Messages
37
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,286
Visit site
Activity points
1,704
Hello,

For my master thesis I'm using a transceiver (fancy serializer) that has a 64-bit wide TXDATA input port that gets serialized from bit 0 to 63 on the rising edge of TXUSERCLK2.
However there is skew between different transceivers (PCB track lengths etc) and I am trying to compensate this skew misalignment by oversampling and placing the right amount of 0's in front of the data.

So e.g. if this is the output of 4 transceivers (started at the same time)
0000000011011001110 (add 0 zeros)
0000001000101010001 (add 2 zeros)
0000010000001010001 (add 3 zeros)
1001011100111111000 (add 8 zeros)

To increase the resolution I also use oversampling, so if the oversamplingfactor is 2 then TXDATA(1) & TXDATA(0) have to stay TXNEEDTOSEND(0) and so on.

I'm really stuck with this because I have written code (attachment) that does what I need, but does not synthesize and using a switch statement will be very very very much lines of code. I'm thinking I'm just overlooking the simple solution here, could someone maybe help a hand ?

Thanks in advance,
 

Attachments

  • SkewComp.zip
    1.5 KB · Views: 77

Hi from the synthesis POV i can also say that this code would not be synthesizable. For a quick analysis as to the other best possible option you could use a linting tool if you have like spyglass. This construct would show an error and you would know how best to implement it.
 
  • Like
Reactions: pdude

    pdude

    Points: 2
    Helpful Answer Positive Rating
Hi from the synthesis POV i can also say that this code would not be synthesizable. For a quick analysis as to the other best possible option you could use a linting tool if you have like spyglass. This construct would show an error and you would know how best to implement it.

It looks ok to me...
 

The synthesis tool probably doesn't like to have vector ranges defined by variables or signals:


Code VHDL - [expand]
1
2
3
TXDATAOVERSAMPLED(upindex downto lowindex) := (others => '0');
...
TXDATA <= TXDATAOVERSAMPLED(oindex+63 downto oindex);

 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top