{"id":13830182,"url":"https://github.com/xzlashutosh/avsddac_3v3","last_synced_at":"2025-07-09T11:32:19.299Z","repository":{"id":60306360,"uuid":"286603057","full_name":"xzlashutosh/avsddac_3v3","owner":"xzlashutosh","description":"This repository contains the design and simulation process and results of potentiometric digital to analog converter.","archived":false,"fork":false,"pushed_at":"2020-10-06T10:06:24.000Z","size":20592,"stargazers_count":15,"open_issues_count":2,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-20T12:09:37.774Z","etag":null,"topics":["dac","potentiometric"],"latest_commit_sha":null,"homepage":"","language":"PostScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xzlashutosh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-10T23:58:51.000Z","updated_at":"2024-08-27T12:03:13.000Z","dependencies_parsed_at":"2022-09-27T22:00:13.771Z","dependency_job_id":null,"html_url":"https://github.com/xzlashutosh/avsddac_3v3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xzlashutosh/avsddac_3v3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzlashutosh%2Favsddac_3v3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzlashutosh%2Favsddac_3v3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzlashutosh%2Favsddac_3v3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzlashutosh%2Favsddac_3v3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xzlashutosh","download_url":"https://codeload.github.com/xzlashutosh/avsddac_3v3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzlashutosh%2Favsddac_3v3/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264450556,"owners_count":23610194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dac","potentiometric"],"created_at":"2024-08-04T10:00:57.045Z","updated_at":"2025-07-09T11:32:17.719Z","avatar_url":"https://github.com/xzlashutosh.png","language":"PostScript","funding_links":[],"categories":["Analog and Analog Mixed Signals (AMS)"],"sub_categories":["Data Coverters"],"readme":"## 1. Introduction to Potentiometric Digital to Analog Converter\nThis repository presents a 10-bit Potentiometric Digital to Analog Converter.\n\nThe target is to design a 10-bit potentiometric DAC with 3.3v analog voltage and 1 off-chip external reference using the osu180nm technology node. Here are the specifications from [VSD Corporation Pvt. Ltd.](https://github.com/xzlashutosh/avsddac_3v3/blob/master/potentiometricDAC_IP.pdf)\n\nA DAC is a building block required to convert digital data into analog.\n\n## Table of Contents\n- [1. Introduction to Potentiometric Digital to Analog Converter](#1-introduction-to-potentiometric-digital-to-analog-converter)\n- [2. Potentiometric DAC Architecture Design](#2-potentiometric-dac-architecture-design)\n- [3. Specification List](#3-specification-list)\n- [4. EDA Tools Used](#4-eda-tools-used)\n- [5. Pre-layout and Simulations](#5-pre-layout-and-simulations)\n  * [A. Switch](#a-switch)\n  * [B. 2-Bit DAC subcircuit](#b-2-bit-dac-subcircuit)\n  * [C. 3-Bit DAC subcircuit](#c-3-bit-dac-subcircuit)\n  * [D. 4-Bit DAC subcircuit](#d-4-bit-dac-subcircuit)\n  * [E. 5-Bit DAC subcircuit](#e-5-bit-dac-subcircuit)\n  * [F. 6-Bit DAC subcircuit](#f-6-bit-dac-subcircuit)\n  * [G. 7-Bit DAC subcircuit](#g-7-bit-dac-subcircuit)\n  * [H. 8-Bit DAC subcircuit](#h-8-bit-dac-subcircuit)\n  * [I. 9-Bit DAC subcircuit](#i-9-bit-dac-subcircuit)\n  * [J. 10-Bit-DAC](#j-10-bit-dac)\n  * [Vout v/s Digital Code Graph for 10-Bit DAC](https://github.com/xzlashutosh/avsddac_3v3#vout-vs-digital-code-graph-for-10-bit-dac)\n  * [INL(LSB) v/s Digital Code Graph for 10-Bit DAC](https://github.com/xzlashutosh/avsddac_3v3#inllsb-vs-digital-code-graph-for-10-bit-dac)\n  * [DNL(LSB) v/s Digital Code Graph for 10-Bit DAC](https://github.com/xzlashutosh/avsddac_3v3#dnllsb-vs-digital-code-graph-for-10-bit-dac)\n- [6. Layout and Simulations](#6-layout-and-simulations)\n  * [A. Switch Layout](#a-switch-layout)\n  * [B. Resistor Layout](#b-resistor-layout)\n  * [C. Capacitor Layout](#c-capacitor-layout)\n    + [Modification done in osu180nm to make use of a capacitor as a device -](#modification-done-in-osu180nm-to-make-use-of-a-capacitor-as-a-device--)\n    + [Limitation of osu180 PDK -](#limitation-of-osu180-pdk--)\n  * [D. 2-Bit DAC Subcircuit Layout](#d-2-bit-dac-subcircuit-layout)\n  * [E. 3-Bit DAC Subcircuit Layout](#e-3-bit-dac-subcircuit-layout)\n  * [F. 4-Bit DAC Subcircuit Layout](#f-4-bit-dac-subcircuit-layout)\n  * [G. 5-Bit DAC Subcircuit Layout](#g-5-bit-dac-subcircuit-layout)\n  * [H. 6-Bit DAC Subcircuit Layout](#h-6-bit-dac-subcircuit-layout)\n  * [I. 7-Bit DAC Subcircuit Layout](#i-7-bit-dac-subcircuit-layout)\n  * [J. 8-Bit DAC Subcircuit Layout](#j-8-bit-dac-subcircuit-layout)\n  * [K. 9-Bit DAC Subcircuit Layout](#k-9-bit-dac-subcircuit-layout)\n  * [L. 10-Bit-DAC Layout](#l-10-bit-dac-layout)\n  * [Vout v/s Digital Code Graph for 10-Bit DAC](#vout-v-s-digital-code-graph-for-10-bit-dac-1)\n  * [INL(LSB) v/s Digital Code Graph for 10-Bit DAC](#inl-lsb--v-s-digital-code-graph-for-10-bit-dac-1)\n  * [DNL(LSB) v/s Digital Code Graph for 10-Bit DAC](#dnl-lsb--v-s-digital-code-graph-for-10-bit-dac-1)\n- [7. Instructions to get started with the design](#7-instructions-to-get-started-with-the-design)\n  * [For Pre-Layout Simulation -](#for-pre-layout-simulation--)\n  * [For Post-Layout Simulation -](#for-post-layout-simulation--)\n- [8. Author](#8-author)\n- [9. Acknowledgments](#9-acknowledgments)\n- [10. Contact Information -](#10-contact-information--)\n\n## 2. Potentiometric DAC Architecture Design\n\nThe basic idea is to divide the voltage into N different voltage values in the range of Vref+ and Vref- for an N-Bit DAC. The design used here to achieve this is the simple resistor string DAC which consists of resistors in series. These resistors are then connected to various switches in such a fashion that it routes the exact voltage to the output.\n\nThe problem of the largeness of the circuit is reduced by building hierarchical subcircuits of switch, 2 Bit, 3 Bit, 4 Bit,....., 9 Bit DAC, and then two 9 Bit DAC is used to build the 10-Bit potentiometric DAC.\n\nHave a look at the simplified architecture for potentiometric-DAC given below\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"7000\" height=\"700\" src=\"https://github.com/xzlashutosh/avsddac_3v3/blob/master/subcircuits/An%20overview%20of%2010-Bit%20PotDAC.png\"\u003e\n\u003c/p\u003e\n\nGiven below is the block diagram of the DAC - \n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"7000\" height=\"700\" src=\"https://github.com/xzlashutosh/avsddac_3v3/blob/master/subcircuits/overview%20of%20design.png\"\u003e\n\u003c/p\u003e\n\n## 3. Specification List\n\n| Parameter| Description| Min | Type | Max | Unit | Condition |\n| :---:  | :-: | :-: | :-: | :---:  | :-: | :-: |\n|RL|Load resistance| 50|||Mohm|T=-40 to 85C|\n|CL|Load capacitance|||1|pF|T=-40 to 85C|\n|VDDA|Analog supply| |3.3||V|T=-40 to 85C|\n|VDD|Digital supply voltage||1.8||V|T=-40 to 85C|\n|VREFH|Reference voltage high|||3.3|V|T=-40 to 85C|\n|VREFL|Reference voltage low|0|||V|T=-40 to 85C|\n|RES|Resolution| |10||bit|T=27C|\n|VFS|Full Scale Voltage|0| |3.291627| V |T=27C|\n\n| Parameter| Pre-layout | Post-Layout |\n| :---:  | :-: | :-: |\n|DNL| -0.999893345 LSB to 2.03065020 LSB | -1.182952606 LSB to 2.380283181 LSB |\n|INL| -1.953038429 LSB to 0.527216491 LSB| -3.698306813 LSB to 0.181125461 LSB |\n|Gain Error| 0 | 0 |\n|Offset Error| 2.12E-07 V | 2.14E-07 V |\n\n## 4. EDA Tools Used \nThe design has been built using open-source EDA tools. The library used is osu180nm. \n\nI have used [eSim](https://esim.fossee.in/downloads) to build schematic, [ngSpice](http://ngspice.sourceforge.net/download.html) to run simulations and verify the circuit. [Magic](http://opencircuitdesign.com/magic/) has been used to lay-out the circuit.\n\n## 5. Pre-layout and Simulations\nThe complete circuit of 10-Bit potentiometric DAC is built hierarchically using the following subcircuits.\n\n### A. Switch\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Pre-Layout%20and%20Simulation/Switch%20-%20prelayout.JPG)\n\n### B. 2-Bit DAC subcircuit\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/subcircuits/2-Bit_DAC.png)\n\n### C. 3-Bit DAC subcircuit\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/subcircuits/3-bit_DAC.png)\n\n### D. 4-Bit DAC subcircuit\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/subcircuits/4-bitDAC.png)\n\n### E. 5-Bit DAC subcircuit\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/subcircuits/5_bit_dac.png)\n\n### F. 6-Bit DAC subcircuit\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/subcircuits/6_bit_dac.png)\n\n### G. 7-Bit DAC subcircuit\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/subcircuits/7_bit_dac.png)\n\n### H. 8-Bit DAC subcircuit\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/subcircuits/8_bit_dac.png)\n\n### I. 9-Bit DAC subcircuit\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/subcircuits/9_bit_dac.png)\n\n### J. 10-Bit-DAC\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/subcircuits/10_bit_dac.png)\n\n#### The source details at Vref+ = 3.3V and Vref- = 0V are given [here](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Pre-Layout%20and%20Simulation/SourceDetails.txt).\n\n\n### Vout v/s Digital Code Graph for 10-Bit DAC\n\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Pre-Layout%20and%20Simulation/prelayout%20-%20output%20waveform.png)\n\n\n### INL(LSB) v/s Digital Code Graph for 10-Bit DAC\n\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Pre-Layout%20and%20Simulation/INL(LSB).png)\n\n### DNL(LSB) v/s Digital Code Graph for 10-Bit DAC\n\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Pre-Layout%20and%20Simulation/DNL(LSB).png)\n\n### For pre-layout simulation please follow [this](https://github.com/xzlashutosh/avsddac_3v3#for-pre-layout-simulation--).\n\n## 6. Layout and Simulations \n\n### A. Switch Layout\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/LayoutImages/sw.JPG)\n \n\n### B. Resistor Layout\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/LayoutImages/resistor.JPG)\n\nvalue = 253 Ω\n\n### C. Capacitor Layout\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/LayoutImages/capacitor.JPG)\n\nvalue = 3.12nF\n\n#### Modification done in osu180nm to make use of a capacitor as a device - \n add \n \n        device capacitor None glass poly,pc 9000 73000 \n\nin the #devices section inside the osu180nm.tech node.\n\n#### Limitation of osu180 PDK - \nAs the capacitor layer, or poly2 none are present in osu180nm, the capacitor can not be built in a straight forward way using the osu PDK.The above given modifications in the technology node were done to simulate the characteristics of the circuit. Here, defining the capacitor in a certain manner gives the required characteristics in the circuit.\n\n### D. 2-Bit DAC Subcircuit Layout\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/LayoutImages/2.JPG)\n\n\n### E. 3-Bit DAC Subcircuit Layout\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/LayoutImages/3.JPG)\n\n### F. 4-Bit DAC Subcircuit Layout\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/LayoutImages/4.JPG)\n \n\n### G. 5-Bit DAC Subcircuit Layout\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/LayoutImages/5.JPG)\n\n\n### H. 6-Bit DAC Subcircuit Layout\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/LayoutImages/6.JPG)\n\n### I. 7-Bit DAC Subcircuit Layout\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/LayoutImages/7.JPG)\n\n\n### J. 8-Bit DAC Subcircuit Layout\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/LayoutImages/8.JPG)\n\n\n### K. 9-Bit DAC Subcircuit Layout\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/LayoutImages/9.JPG)\n\n\n### L. 10-Bit-DAC Layout\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/LayoutImages/10.JPG)\n\nsize = 635.1 x 684.8 microns\n\n#### The source details are [here](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/toPasteInEnd.txt).\n\n\n### Vout v/s Digital Code Graph for 10-Bit DAC\n\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/OutputWaveform.png)\n\n\n### INL(LSB) v/s Digital Code Graph for 10-Bit DAC\n\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/INL(LSB)-postLayout.png)\n\n### DNL(LSB) v/s Digital Code Graph for 10-Bit DAC\n\n![Alt Text](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/DNL(LSB)-postLayout.png)\n\n### For post-layout simulation please follow [this](https://github.com/xzlashutosh/avsddac_3v3#for-post-layout-simulation--).\n\n\n## 7. Instructions to get started with the design\n### For Pre-Layout Simulation - \n1. Download eSim from the given [website](https://esim.fossee.in/downloads).\n2. Download [this](https://github.com/xzlashutosh/avsddac_3v3/tree/master/Pre-Layout%20and%20Simulation) folder.\n3. Keep the contents of [subcircuits folder](https://github.com/xzlashutosh/avsddac_3v3/tree/master/subcircuits) inside the eSim subcircuits folder (C:\\FOSSEE\\eSim\\library\\SubcircuitLibrary).\n4. Store the [libary files](https://github.com/xzlashutosh/avsddac_3v3/tree/master/Libraries) in the eSim User Library section (C:\\FOSSEE\\eSim\\library\\deviceModelLibrary\\User Libraries).\n5. Open the 10_bit_dac project in eSim kept in Pre-Layout Simulation [folder ](https://github.com/xzlashutosh/avsddac_3v3/tree/master/Pre-Layout%20and%20Simulation).\n6. Run the schematic, extract spice netlist, and simulate the design using ngSpice to view the output. You should get the output as shown above in the [figure](https://github.com/xzlashutosh/potentiometric-DAC/blob/master/subcircuits/10_bit_dac.png).\n\nThe simulation may take more than an hour to complete. Kindly keep patience.\n\n### For Post-Layout Simulation - \n1. Download Magic from the given [website](http://opencircuitdesign.com/magic/) for Linux and Mac.\nFor windows, you will have to install Cygwin Terminal and then Magic can run on the Windows platform also. Kindly look [here](http://opencircuitdesign.com/cygwin/magic.html) for Windows operating system. \n\n2. Download [this](https://github.com/xzlashutosh/avsddac_3v3/tree/master/Layout%20and%20Simulation) folder or complete repository.\n3. Go to the specific directory to run the Magic file.\n4. To open the 10BitDac.mag with osu180nm.tech using terminal type - \n       magic -T osu180nm.tech 10BitDac\n5. To extract the spice netlist type in tkcon window -\n\n       extract all\n       ext2spice 10BitDac.ext\n     \n6. After you get the extracted netlist, to add the contents of [this](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/toPasteInStarting.txt) file at the beginning of the spice file, and also add the contents of [this](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/toPasteInEnd.txt) file at the end of the spice file to append the pmos,nmos libraries, and simulation parameters.\n7. Now, to simulate the layout, run ngspice in another terminal using -\n\n       ngspice 10BitDac.spice\n       \n8. You should get the output as shown above in the [figure](https://github.com/xzlashutosh/avsddac_3v3/blob/master/Layout%20and%20Simulation/OutputWaveform.png).\n  \n## 8. Author \n- Ashutosh Sharma, B.Tech, Electronics \u0026 Communication Engineering, IIITD\u0026M Kurnool\n\n## 9. Acknowledgments\n- Kunal Ghosh, Co-founder VSD Corp. Pvt. Ltd.\n- Philipp Gühring, Software Architect, LibreSilicon Association.\n\nI would also like to thank research fellows for extending their help and guidance during the research internship program. Many Thanks to \n\n- Ankur Sah, M.tech Embedded Systems, NIT Jamshedpur, ankursah5@gmail.com\n- Nikhil Shinde, B.E., KJSIEIT Mumbai, shinde.nv@somaiya.edu\n- Shubham Negi, B.Tech. Computer Engineering, IIITD\u0026M Kurnool, coe17b030@iiitk.ac.in\n- Sheryl Serrao, Undergraduate Student, Mumbai University, sherylcorina@gmail.com\n\n## 10. Contact Information - \n - Ashutosh Sharma, B.Tech, Electronics, and Communication Engineering, IIITD\u0026M Kurnool, xzlashutosh@gmail.com\n - Kunal Ghosh, Co-founder, VSD Corp. Pvt. Ltd. - kunalghosh@gmail.com\n - Philipp Gühring, Software Architect, LibreSilicon Association - pg@futureware.at\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxzlashutosh%2Favsddac_3v3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxzlashutosh%2Favsddac_3v3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxzlashutosh%2Favsddac_3v3/lists"}