diff --git a/modules/module_1_bandgap_reference/part_1_OTA/design_of_ota.md b/modules/module_1_bandgap_reference/part_1_OTA/design_of_ota.md index 81a48c14..5cc22e98 100644 --- a/modules/module_1_bandgap_reference/part_1_OTA/design_of_ota.md +++ b/modules/module_1_bandgap_reference/part_1_OTA/design_of_ota.md @@ -8,7 +8,7 @@ First step in our procedure is to create the schematic for the OTA we will use i Next, instantiate six MOSFETs (three PMOS and two NMOS) from the IHP Open PDK. Refer to the foundations markdown file from Module 0 for guidance on adding these components. Arrange the transistors as shown in the image below and configure their parameters accordingly. -![First Stage Configuration](first_stage_img.png) +

To locate the necessary labels, open the Components Manager and search for `iopin.sym` under `xschem_library/devices`. ### Transistor Dimensions for the First Stage @@ -26,8 +26,7 @@ For clarity, here are the transistor dimensions for the initial stage: Proceed to draw the output stage, which includes a Miller compensation capacitor. Follow the configuration shown below: - -![[full_system_img.png]] +

Dimensions for the output stage components are as follows: @@ -58,7 +57,9 @@ Its also possible to remove the bias current pin and replace with an actual on c ### Step 3: Adding and Placing Pins on the Symbol In symbol mode, Xschem automatically creates a small rectangle that includes pins with default names based on your schematic. Give the symbol an appropriate name and you should see the following -![[symbol_1.png]] + +

+ ### Step 4: Designing the Symbol Shape @@ -66,7 +67,9 @@ Now, using the **Draw** tools in Xschem, modify the default rectangle to create If you’re interested in learning to create more complex shapes, there are resources on YouTube and other platforms. However, if you already have experience drawing schematic symbols, this step should feel straightforward. Refer to the provided images as a guide for arranging the shape and positioning the pins for a clean, organized symbol. -![[ota_sym.png]] + +

+ (Note: If the grid size and snapping values are too big, you can adjust at view - -> Set snap value/set grid spacing ) @@ -121,7 +124,7 @@ To set up the first testbench for simulating the open-loop frequency response of 5. **Verify the Setup**: - At this point, your schematic should resemble the provided image, ensuring all components are placed and connected correctly. - ![[tb_img_1.png]] +

As you may see there is additional components in the picture. The reasoning behind this can be seen in the following sections #### **Series Feedback with Infinite Inductor** @@ -181,8 +184,7 @@ In the **Value** field, insert the following code: - **`mos_tt`**: Specifies the **Typical-Typical (TT)** process corner for the MOSFETs By including this code block, you ensure the simulation has access to the correct models and process corners. At this point, your code block should resemble the provided image. - -![[tb_img_3.png]] +

### Extra Information About process corners: Understanding Variations in Semiconductor Fabrication Process corners are sets of predefined conditions that account for variations in semiconductor manufacturing processes. These variations affect the electrical characteristics of devices (like MOSFETs and capacitors) and can impact circuit performance. Simulating across process corners ensures your design works reliably under real-world manufacturing tolerances. @@ -276,8 +278,8 @@ write output_file.raw - **`let phase = 180*cph(vout)/pi`**: Converts the phase of the output voltage from radians to degrees. - **`write output_file.raw`**: Saves the AC analysis results to a raw file for further processing. #### **Verifying the Code Block** -The complete code block should look as shown in the image below: -![[tb_img_4.png]] +The complete code block should look as shown in the image below: +

### Step 6: Running simulation and confirming operation @@ -318,8 +320,7 @@ tclcommand="xschem raw_read $netlist_dir/output_file.raw ac" ``` After this press ctrl and left click the arrow, and after this double click the bottom plot. From here you should see all the avaliable signals for plotting and select the ph(vout). This gives the phase response. This is used instead of the statement we defined since xschem automatically saves the data in the raw format as a complex number with a real and imaginary number. From check the Log X box and set the x max to 6.65 and the y min to -200 and Y max to 0. For the second plot double press this and now select the Av to be plotted. From here also check the log x box, set the x axis to the same as for the phase plot and the Y max to 77. From here you should see the same as in the following picture - -![[Pasted image 20241120133624.png]] +

Refer to the provided images and simulations to confirm the setup and ensure everything is correctly configured for the analysis. @@ -331,7 +332,8 @@ After confirming the open-loop, you will introduce a second **OTA symbol** to te 2. Connect the two inputs together By now you should have the following setup -![[tb_img_5.png]] +

+ Now the code block should also have an extended definition where we will define our CMRR calculation as ``` @@ -339,8 +341,7 @@ Now the code block should also have an extended definition where we will define ``` Now you can add another graph window, or just use the XTerm terminal. You should now see a CMRR in the same region as the following image - -![[CMRR.png]] +

### Step 9: Insert a Third OTA Symbol for PSRR Analysis @@ -357,7 +358,8 @@ For the simulation setup, we refer to the description below 3. For the supply now add a AC signal of 1 and a phase of 0 For the setup it should something like this -![[tb_img_6.png]] +

+ For the code block you can define the PSRR as given @@ -366,5 +368,7 @@ let PSRR = db(v(vout2)/v(VDDac)) ``` For the power supply rejection ratio you should see something like this: -![[PSRR.png]] +

+ +