Open a terminal
On the laptop, press Ctrl + Alt + T together. A window with a blinking cursor opens. That's the terminal, where you type commands.
From a closed laptop to a real simulated memristor curve on your screen, and a look at the chip itself, in 24 steps. You only ever need to click whatever is inside the red box, or type exactly what is in a black box.
First time on this computer? Do Install from scratch first.
All the chip-design programs live inside a "container", which is like a separate computer running inside this one. You start it with one command and then look at its screen through your web browser.
On the laptop, press Ctrl + Alt + T together. A window with a blinking cursor opens. That's the terminal, where you type commands.
Type these two lines into the terminal, pressing Enter after each one. Copy-paste is fine: in a terminal, paste with Ctrl + Shift + V.
$ cd ~/Documentos/rodrigo/openPDKcreator$ ./start_eda_container.sh --gui-memristor[INFO] iic-osic-tools_openpdkcreator_uid_1001 is already running. [INFO] VNC session: http://127.0.0.1:8081/?password=abc123&autoconnect=true&resize=scale (NOT the 'localhost' form -- see header comment) [INFO] Launching the openMemristorPDK GUI inside the container ... c54598e723c7af51640f993fd393d7c0ae1cb0b3375ecd7fd972c940bb0a9557
does not exist -- creating it or exists but is stopped -- starting it instead. The very first time it can take a few minutes. Just wait for the terminal to finish.Open Firefox (or Chrome) and go to this address. Type it exactly, with 127.0.0.1 and not localhost:
http://127.0.0.1:8081/?password=abc123&autoconnect=true&resize=scale
127.0.0.1 and 8081, then go back to step 2 and make sure the command finished without an error.After a few seconds the openPDKcreator window appears. It's too small to show all its buttons, so click the square button at its top-right corner to make it fill the screen.
Nothing to click here, just a look around. The program opens on the Wizard tab: a map of everything the PDK contains. Green boxes are parts that are already finished. You don't need this map today.
While it starts, openPDKcreator also compiles the memristor recipes (step 10 shows one) into files the simulator can load. That happens by itself, there's nothing to click. The first time, the bar at the very bottom of the window says Compilation performed correctly.
The Library Manager is like a parts catalogue. We'll open the gold/titanium-dioxide/gold memristor and read the little program that describes how it behaves.
Click the Library Manager tab, near the top-left.
In the Libraries list on the left, click openmemristorpdk_pr (real). It's the only one there.
The middle list (Cells) fills up with parts. Click memristor_tio2_au (9 view(s)).
tio2 is titanium dioxide, the material in the middle that actually switches. au is gold (from the Latin aurum), used for the electrodes on top and bottom. So this part is a gold / TiO₂ / gold sandwich.The right side now lists every "view" of this part: its drawing, its layout, its models... Find the Verilog-A row and click its View button.
A window shows the file. This is the "recipe" the simulator uses to work out how much current flows through the memristor. When you've had a look, click Close. Nothing else happens: the recipe was already compiled when the program started (step 5).
`include "disciplines.vams" module memristor_tio2_au(BE, TE); inout BE, TE; electrical BE, TE; electrical dx; // hidden node: how far x has moved from x0 parameter real Ron = 100 from (0:inf); parameter real Roff = 16e3 from (0:inf); parameter real D = 10n from (0:inf); parameter real uv = 1e-14 from (0:inf); parameter real x0 = 0.1 from [0:1]; real x, Rmem, dxdt; analog begin x = min(max(x0 + V(dx), 0.0), 1.0); // the memory, kept between 0 and 1 Rmem = Ron * x + Roff * (1.0 - x); I(BE, TE) <+ V(BE, TE) / Rmem; dxdt = (uv * Ron / (D * D)) * V(BE, TE) / Rmem; // the boundary moves with the current if ((x >= 1.0 && dxdt > 0.0) || (x <= 0.0 && dxdt < 0.0)) dxdt = 0.0; // at an end: stop there I(dx) <+ ddt(V(dx)) - dxdt; // x moves at dxdt I(dx) <+ 1e-12 * V(dx); // keeps dx defined at rest end endmodule
x0, and stops at 0 and at 1.x grows while current flows one way and shrinks when it flows back.dx, whose voltage is how far x has moved. ddt(...) means "how fast it changes", so that line says: make dx change at speed dxdt.Roff and Ron depending on x.To see what a memristor does, we connect it to a battery that keeps flipping between +1 V and −1 V (a sine wave), and measure the current.
In the Cells list, click memristor_tio2_au_tb (1 view(s)). The tb stands for testbench, a circuit made for testing a part.
On the Schematic row, click Open in xschem. xschem is the program for drawing circuits.
A black xschem window opens on top. Wait until you can see the drawing: the very first time it can take up to half a minute, so don't click anything else meanwhile. The small box on the left is the memristor n1. The circle on the right is the sine-wave source V1. They're joined by a wire called te. The text below the circuit tells the simulator what to do.
v {xschem version=3.4.8RC file_version=1.3}
G {}
K {}
V {}
S {}
F {}
E {}
T {Memristor testbench} -60 -300 0 0 0.6 0.6 {}
T {Press "Netlist", then "Simulate" (top-right of the menu bar).} -60 -240 0 0 0.3 0.3 {}
T {The sine-wave source V1 pushes current back and forth through the memristor n1.} -60 -210 0 0 0.3 0.3 {}
N 40 -100 400 -100 {lab=te}
N 400 -40 400 -20 {lab=0}
C {/foss/designs/openMemristorPDK/export/openmemristorpdk/libs.tech/xschem/openmemristorpdk_pr/memristor_tio2_au.sym} 0 -100 0 1 {name=n1 model=mm}
C {gnd.sym} -40 -100 0 0 {name=l1 lab=0}
C {lab_wire.sym} 220 -100 0 0 {name=p1 sig_type=std_logic lab=te}
C {vsource.sym} 400 -70 0 0 {name=V1 value="dc 0 sin(0 1.0 0.6)" savecurrent=false}
C {gnd.sym} 400 -20 0 0 {name=l2 lab=0}
C {code_shown.sym} -60 40 0 0 {name=s1 only_toplevel=false value="
.model mm memristor_tio2_au ron=100 roff=16k d=10n uv=1e-14 x0=0
.control
pre_osdi /foss/designs/openMemristorPDK/user_models/veriloga/memristor_tio2_au.osdi
tran 300u 3.34
plot -i(V1) vs v(te) retraceplot title 'Memristor I-V loop' xlabel 'Voltage (V)' ylabel 'Current (A)'
.endc
"}
lab=te names it "te"; lab=0 means ground (0 volts).V1, and the code block.n1, and its numbers (the same ones from step 10). x0=0 means the memory starts fully off: 16 000 Ω.memristor_tio2_au.osdi, made automatically when openPDKcreator started) into the simulator before anything else.Two clicks: first turn the drawing into a list the simulator understands (the netlist), then run the simulator (ngspice).
In xschem's top menu bar, on the right, click Netlist. It turns green when it's done (it takes about a second).
** sch_path: /foss/designs/openMemristorPDK/libraries/openmemristorpdk_pr/memristor_tio2_au_tb.sch **.subckt memristor_tio2_au_tb n1 te 0 mm V1 te 0 dc 0 sin(0 1.0 0.6) **** begin user architecture code .model mm memristor_tio2_au ron=100 roff=16k d=10n uv=1e-14 x0=0 .control pre_osdi /foss/designs/openMemristorPDK/user_models/veriloga/memristor_tio2_au.osdi tran 300u 3.34 plot -i(V1) vs v(te) retraceplot title 'Memristor I-V loop' xlabel 'Voltage (V)' ylabel 'Current (A)' .endc **** end user architecture code **.ends .end
The two highlighted lines are the whole circuit: "memristor n1 sits between wire te and ground (0)" and "source V1 sits between te and ground". Lines starting with * are comments.
Now click Simulate, right next to Netlist. Wait about 10 seconds.
Two new windows appear. The small white one in the middle is the simulator (ngspice) reporting what it did. The black one on the right is the result.
Close things in this order so nothing is left running.
In the plot window, click the small orange Quit button at the top-right.
Click once inside the white ngspice window, where it says ngspice 1 ->. Then type quit and press Enter. The window closes by itself.
Click the X at the top-right of the black xschem window. You're back in the Library Manager, with the test circuit still selected.
The simulation showed how the memristor behaves. The layout shows how it is built: the shapes the factory would actually print onto the chip, seen from above.
In the Cells list, click memristor_tio2_au (9 view(s)), the same part as in step 8.
On the GDS/Layout row, click Open in KLayout. KLayout is the program for looking at chip layouts. It takes a few seconds to appear, at the top-left of the screen.
Nothing to click. The big hatched square is the memristor seen from above. It's 1 µm on each side, a thousandth of a millimetre, so about 80 of them would fit across one human hair. The little ruler at the bottom-left shows 0.2 µm.
BE_Au is the gold bottom electrode, MEM_TiO2 the 10 nm titanium-dioxide layer in the middle, and TE_Au the gold top electrode.
The grey names are layers the other memristors in this PDK use: hafnium dioxide, titanium and aluminium.
VIA1 (solid red) is the via layer: a hole that joins a bottom-electrode wire straight to a top-electrode wire elsewhere on the chip, only where someone draws one. A memristor has none: its current has to go through the oxide.
Each layer has its own colour and hatch pattern, which is why you can see the lines of all three layers crossing.
<?xml version="1.0" encoding="utf-8"?>
<layer-properties>
<properties>
<frame-color>#8a6a00</frame-color>
<fill-color>#d4a017</fill-color>
<frame-brightness>0</frame-brightness>
<fill-brightness>0</fill-brightness>
<dither-pattern>I9</dither-pattern>
<line-style>C0</line-style>
<valid>true</valid>
<visible>true</visible>
<transparent>false</transparent>
<width>1</width>
<marked>false</marked>
<animation>0</animation>
<name>BE_Au.drawing</name>
<source>10/0</source>
</properties>
<properties>
<frame-color>#3a8fa8</frame-color>
<fill-color>#9fd3e6</fill-color>
<frame-brightness>0</frame-brightness>
<fill-brightness>0</fill-brightness>
<dither-pattern>I5</dither-pattern>
<line-style>C0</line-style>
<valid>true</valid>
<visible>true</visible>
<transparent>false</transparent>
<width>1</width>
<marked>false</marked>
<animation>0</animation>
<name>MEM_TiO2.drawing</name>
<source>11/0</source>
</properties>
<properties>
<frame-color>#5a3f99</frame-color>
<fill-color>#8e6cc9</fill-color>
<frame-brightness>0</frame-brightness>
<fill-brightness>0</fill-brightness>
<dither-pattern>I3</dither-pattern>
<line-style>C0</line-style>
<valid>true</valid>
<visible>true</visible>
<transparent>false</transparent>
<width>1</width>
<marked>false</marked>
<animation>0</animation>
<name>MEM_HfO2.drawing</name>
<source>12/0</source>
</properties>
<properties>
<frame-color>#b0221a</frame-color>
<fill-color>#e2483d</fill-color>
<frame-brightness>0</frame-brightness>
<fill-brightness>0</fill-brightness>
<dither-pattern>I0</dither-pattern>
<line-style>C0</line-style>
<valid>true</valid>
<visible>true</visible>
<transparent>false</transparent>
<width>1</width>
<marked>false</marked>
<animation>0</animation>
<name>VIA1.drawing</name>
<source>15/0</source>
</properties>
<properties>
<frame-color>#a07800</frame-color>
<fill-color>#f0c419</fill-color>
<frame-brightness>0</frame-brightness>
<fill-brightness>0</fill-brightness>
<dither-pattern>I13</dither-pattern>
<line-style>C0</line-style>
<valid>true</valid>
<visible>true</visible>
<transparent>false</transparent>
<width>1</width>
<marked>false</marked>
<animation>0</animation>
<name>TE_Au.drawing</name>
<source>20/0</source>
</properties>
<properties>
<frame-color>#4f5b66</frame-color>
<fill-color>#8c99a6</fill-color>
<frame-brightness>0</frame-brightness>
<fill-brightness>0</fill-brightness>
<dither-pattern>I8</dither-pattern>
<line-style>C0</line-style>
<valid>true</valid>
<visible>true</visible>
<transparent>false</transparent>
<width>1</width>
<marked>false</marked>
<animation>0</animation>
<name>TE_Ti.drawing</name>
<source>21/0</source>
</properties>
<properties>
<frame-color>#7d858c</frame-color>
<fill-color>#c0c6cc</fill-color>
<frame-brightness>0</frame-brightness>
<fill-brightness>0</fill-brightness>
<dither-pattern>I4</dither-pattern>
<line-style>C0</line-style>
<valid>true</valid>
<visible>true</visible>
<transparent>false</transparent>
<width>1</width>
<marked>false</marked>
<animation>0</animation>
<name>TE_Al.drawing</name>
<source>22/0</source>
</properties>
</layer-properties>
10/0 is layer 10, type 0. The factory only sees these numbers. The names are for humans.#d4a017 for the bottom electrode, light blue #9fd3e6 for TiO₂, and so on.Click the X at the top-right of the KLayout window. It closes straight away. Nothing was changed, so there's nothing to save.
When you're done for the day.
When you're done for the day, close the openPDKcreator window with its X and close the browser tab. Then, back in the laptop's terminal from step 1, type:
$ podman stop iic-osic-tools_openpdkcreator_uid_$(id -u)