@@ -87,7 +87,21 @@ Caravel Integration
87
87
User Project: Power on Reset
88
88
----------------------------
89
89
90
- > :construction: Under construction :construction:
90
+ This is an example user analog project which breaks out the power-on-reset
91
+ circuit used by the management SoC for power-up behavior so that the circuit
92
+ input and output can be independently controlled and measured.
93
+
94
+ The power-on-reset circuit itself is a simple, non-temperature-compensated
95
+ analog delay calibrated to 15ms under nominal conditions, with a Schmitt
96
+ trigger inverter to provide hysteresis around the trigger point to provide
97
+ a clean output reset signal.
98
+
99
+ The circuit provides a single high-voltage (3.3V domain) sense-inverted reset
100
+ signal "porb_h" and complementary low-voltage (1.8V domain) reset signals
101
+ "por_l" and "porb_l".
102
+
103
+ The only input to the circuit is the 3.3V domain power supply itself.
104
+
91
105
92
106
Verilog Integration
93
107
-------------------
@@ -100,6 +114,16 @@ have the same input and output ports as the analog wrapper template. The wrapper
100
114
user space utilities provided by caravel like IO ports, logic analyzer
101
115
probes, and wishbone bus connection to the management SoC.
102
116
117
+ The verilog modules instantiated in the wrapper module should represent
118
+ the analog project; they need not be more than empty blocks, but it is
119
+ encouraged to write a simple behavioral description of the analog circuit
120
+ in standard verilog, using real-valued wires when necessary. This allows
121
+ the whole system to be run in a verilog testbench and verify the connectivity
122
+ to the padframe and management SoC, even if the testbench C code does nothing
123
+ more than set the mode of each GPIO pin. The example top-level verilog code
124
+ emulates the behavior of the power-on-reset delay after applying a valid
125
+ power supply to the circuit.
126
+
103
127
104
128
Building the PDK
105
129
================
@@ -165,7 +189,58 @@ The verilog test-benches are under this directory
165
189
Analog Design Flow
166
190
===================
167
191
168
- > :construction: Under construction :construction:
192
+ The example project uses a very simple analog design flow with schematics
193
+ made with xschem, simulation done using ngspice, layout done with magic,
194
+ and LVS verification done with netgen. Sources for the power-on-reset
195
+ circuit are in the "xschem/" directory, which also includes a schematic
196
+ representing the wrapper with all of its ports, for use in a testbench
197
+ circuit. There are several testbenches in the example, starting from
198
+ tests of the component devices to a full test of the completed project
199
+ inside the wrapper.
200
+
201
+ There is no automation in this project; the schematic and layout were
202
+ done by hand, including both the power-on-reset block and the power and
203
+ signal routing to the pins on the wrapper.
204
+
205
+ The power-on-reset circuit itself is simple and is not compensated for
206
+ temperature or voltage variation. When the power supply reaches a
207
+ sufficient level, the voltage divider sets the gate voltage on an nFET
208
+ device to draw a current of nominally 240nA. The testbench
209
+ "threshold_test_tb.spice" does a DC sweep to find the gate voltage that
210
+ produces this value. Next, a cascaded current mirror divides down the
211
+ current by a factor of (roughly) 400. The testbench current_test.spice
212
+ checks the current division value. Finally, the output ~600pA from the
213
+ end of the current mirror is accumulated on a capacitor until the value
214
+ trips the input of the 3.3V Schmitt trigger buffer from the
215
+ sky130_fd_sd_hvl library. The capacitor is sized to peg the nominal
216
+ time to trigger at 15ms. The schematic "example_por_tb.sch" sets up
217
+ the testbench for this timing test.
218
+
219
+ The output of the Schmitt trigger buffer becomes the high-voltage
220
+ output, and is input to a standard buffer and inverter used as
221
+ level shifters from the 3.3V domain to the 1.8V domain, producing
222
+ complementary low-voltage outputs.
223
+
224
+ The user project is formed from two power-on-reset circuits, one of
225
+ which is connected to the user area VDDA1 power supply, and the other
226
+ of which is connected to one of the analog I/O pads, used as a power
227
+ supply input and connected to its voltage ESD clamp circuit. The
228
+ 3.3V domain outputs are connected directly to GPIO pads through the
229
+ ESD (150 ohm series) connection. The 1.8V domain outputs are connected
230
+ to GPIO pads through the usual I/O connections, with the corresponding
231
+ user output enable (sense inverted) held low to keep the output always
232
+ active.
233
+
234
+ The C code testbench is in "verilog/dv/mprj_por/mprj_por.c" and only
235
+ sets the GPIO pins used to the correct state (user output function).
236
+ The POR circuit outputs are monitored by the testbench verilog file
237
+ "mprj_por_tb.v" which will fail if the connections are wrong or if
238
+ the behavioral POR verilog does not work as intended.
239
+
240
+ Note that to properly test this circuit, the GPIO pins have to be
241
+ configured for output to be seen and measured, implying that the
242
+ management SoC power supply must be stable and the C program running
243
+ off of the SPI flash before the user area power supplies are raised.
169
244
170
245
171
246
Running Open-MPW Precheck Locally
0 commit comments