| With the continuous development of Internet of Things technology,the smart water meter based on ultrasonic technology has become one of the best choices for the next generation of smart water meters due to its advantages of no mechanical moving parts,low pressure loss,high accuracy and easy digital management.In this thesis,the TDC(Time to Digital Converter)circuit of the ultrasonic smart water meter chip is studied,firstly,the flexibility of FPGA design is utilized,and the combination of "coarse" + "fine" measurement scheme is adopted to achieve high precision time measurement,which can reach the 100 microsecond range and 100 picosecond measurement resolution required by ultrasonic smart water meter chip.Then,we will carry out a fully customized design for the "fine" measurement module to optimize the measurement resolution and complete the IC layout design.The main tasks of the thesis are as follows.1.Firstly,we analyzed and compared the TDC design principles and methods,and at the same time,we understood the internal resources of FPGA,based on which we determined the design scheme of "coarse" + "fine" measurement.The "coarse" timing module uses two ordinary binary counters with 180° phase difference to obtain more accurate coarse timing results with less resources utilization.The "fine" measurement module uses the Xilinx Artix-7 chip,which uses the CARRY4 overrun logic resource to form a delay chain and insert sampling points,and optimizes the design of CARRY4 to eliminate timing errors and facilitate the subsequent coding work.2.By comparing the simulation of three coding circuits,we choose the binary search method to design the coding circuit,which reduces the use of resources and shortens the coding time.The serial communication module uses RS232 protocol serial communication in UART,and the average calibration method is used to obtain the actual measurement resolution,and finally the system test platform is built on the FPGA development board.3.The full custom design method is used for the fine measurement part by Cadence software to reduce the influence of layout wiring on the measurement,the ring structure design is used,and post-simulation is performed after the circuit layout is completed.Finally,the system is tested.The results show that the theoretical measurement resolution of the TDC system is 102 ps,and after the optimization of the average calibration method,the measurement resolution is 96.2ps,which can reach the ultrasonic smart water meter chip hundred ps level measurement resolution requirements.At the same time,the "fine" measurement part was fully customized and optimized using the SMIC 0.18μm process,and the resolution was determined to be 76.5ps by post-simulation. |