Priority encoder for TDC in Verilog

Status
Not open for further replies.

yeya

Newbie
Joined
Jun 8, 2022
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
11
I am implementing a TDC TDL on Artix 7 and I need an encoder to convert the thermometer code to binary code using an encoder. I did my research on several encoder approaches and ultimately chose to work with the priority encoder due to its effectiveness against bubble errors. it is a 7 bit 128 encoder. When I synthesized the TOP module (TDC+ENCODER), the encoder output of the submodule is changed (Q instead of bin) and the output is always 7 after the first pulse of the input signal. I don't understand the reason. (I put the diagram below) This is my encoder code (I tried to do pipelining) I have also posted the TDC code and the TOP module and the simulation for anyone interested in helping me. Thanks a lot.
 

Attachments

  • bh_simulation_encoder.PNG
    33.1 KB · Views: 156
  • encoder.txt
    2.2 KB · Views: 183
  • tdc.txt
    1.4 KB · Views: 170
  • testbench.txt
    786 bytes · Views: 168
  • top.txt
    1.2 KB · Views: 148

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…