forked from cnfeat/blog.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
2021-07-15-RRAM Simulation.html
598 lines (558 loc) · 93.4 KB
/
2021-07-15-RRAM Simulation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
<!doctype html>
<html>
<head>
<meta charset='UTF-8'><meta name='viewport' content='width=device-width initial-scale=1'>
<style type='text/css'>html {overflow-x: initial !important;}:root { --bg-color:#ffffff; --text-color:#333333; --select-text-bg-color:#B5D6FC; --select-text-font-color:auto; --monospace:"Lucida Console",Consolas,"Courier",monospace; --title-bar-height:20px; }
.mac-os-11 { --title-bar-height:28px; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857; overflow-x: hidden; background: inherit; tab-size: 4; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; overflow-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 36px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
.typora-export .task-list-item input { pointer-events: none; }
@media screen and (max-width: 500px) {
body.typora-export { padding-left: 0px; padding-right: 0px; }
#write { padding-left: 20px; padding-right: 20px; }
.CodeMirror-sizer { margin-left: 0px !important; }
.CodeMirror-gutters { display: none !important; }
}
#write li > figure:last-child { margin-bottom: 0.5rem; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; image-orientation: from-image; }
button, input, select, textarea { color: inherit; font: inherit; }
input[type="checkbox"], input[type="radio"] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
p { line-height: inherit; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 4; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.7); color: rgb(85, 85, 85); border-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type="checkbox"] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure > table { margin: 0px; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right: 0px; background-color: inherit; }
.CodeMirror-linenumber { user-select: none; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background: inherit; position: relative !important; }
.md-fences-adv-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; background: 0px 0px; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; -webkit-tap-highlight-color: transparent; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li blockquote { margin: 1rem 0px; }
li { margin: 0px; position: relative; }
blockquote > :last-child { margin-bottom: 0px; }
blockquote > :first-child, li > :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
body, html { border: 1px solid transparent; height: 99%; break-after: avoid; break-before: avoid; font-variant-ligatures: no-common-ligatures; }
#write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
.typora-export * { -webkit-print-color-adjust: exact; }
.typora-export #write { break-after: avoid; }
.typora-export #write::after { height: 0px; }
.is-mac table { break-inside: avoid; }
.typora-export-show-outline .typora-export-sidebar { display: none; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background: rgb(204, 204, 204); display: block; overflow-x: hidden; }
p > .md-image:only-child:not(.md-img-error) img, p > img:only-child { display: block; margin: auto; }
#write.first-line-indent p > .md-image:only-child:not(.md-img-error) img { left: -2em; position: relative; }
p > .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
.MathJax_ref { fill: currentcolor; }
[contenteditable="true"]:active, [contenteditable="true"]:focus, [contenteditable="false"]:active, [contenteditable="false"]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item > input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
.md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
.md-toc-h4 .md-toc-inner { margin-left: 5em; }
.md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
.md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: "."; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; vertical-align: initial; }
a.md-print-anchor { white-space: pre !important; border-width: initial !important; border-style: none !important; border-color: initial !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; background: 0px 0px !important; text-decoration: initial !important; text-shadow: initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px; }
.md-fences-math .MathJax_SVG_Display, .md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: visible; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; overflow-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; zoom: 90%; }
#math-inline-preview-content { zoom: 1.1; }
.MathJax_SVG * { transition: none 0s ease 0s; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; margin-top: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: "Segoe UI Symbol", sans-serif; }
.md-diagram-panel > svg { max-width: 100%; }
[lang="flow"] svg, [lang="mermaid"] svg { max-width: 100%; height: auto; }
[lang="mermaid"] .node text { font-size: 1rem; }
table tr th { border-bottom: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }
mark { background: rgb(255, 255, 0); color: rgb(0, 0, 0); }
.md-html-inline .md-plain, .md-html-inline strong, mark .md-inline-math, mark strong { color: inherit; }
.md-expand mark .md-meta { opacity: 0.3 !important; }
mark .md-meta { color: rgb(0, 0, 0); }
@media print {
.typora-export h1, .typora-export h2, .typora-export h3, .typora-export h4, .typora-export h5, .typora-export h6 { break-inside: avoid; }
}
.md-diagram-panel .messageText { stroke: none !important; }
.md-diagram-panel .start-state { fill: var(--node-fill); }
.md-diagram-panel .edgeLabel rect { opacity: 1 !important; }
.md-require-zoom-fix foreignobject { font-size: var(--mermaid-font-zoom); }
.md-fences.md-fences-math { font-size: 1em; }
.md-fences-math .MathJax_SVG_Display { margin-top: 8px; cursor: default; }
.md-fences-advanced:not(.md-focus) { padding: 0px; white-space: nowrap; border: 0px; }
.md-fences-advanced:not(.md-focus) { background: inherit; }
.typora-export-show-outline .typora-export-content { max-width: 1440px; margin: auto; display: flex; flex-direction: row; }
.typora-export-sidebar { width: 300px; font-size: 0.8rem; margin-top: 80px; margin-right: 18px; }
.typora-export-show-outline #write { --webkit-flex:2; flex: 2 1 0%; }
.typora-export-sidebar .outline-content { position: fixed; top: 0px; max-height: 100%; overflow: hidden auto; padding-bottom: 30px; padding-top: 60px; width: 300px; }
@media screen and (max-width: 1024px) {
.typora-export-sidebar, .typora-export-sidebar .outline-content { width: 240px; }
}
@media screen and (max-width: 800px) {
.typora-export-sidebar { display: none; }
}
.outline-content li, .outline-content ul { margin-left: 0px; margin-right: 0px; padding-left: 0px; padding-right: 0px; list-style: none; }
.outline-content ul { margin-top: 0px; margin-bottom: 0px; }
.outline-content strong { font-weight: 400; }
.outline-expander { width: 1rem; height: 1.42857rem; position: relative; display: table-cell; vertical-align: middle; cursor: pointer; padding-left: 4px; }
.outline-expander::before { content: ""; position: relative; font-family: Ionicons; display: inline-block; font-size: 8px; vertical-align: middle; }
.outline-item { padding-top: 3px; padding-bottom: 3px; cursor: pointer; }
.outline-expander:hover::before { content: ""; }
.outline-h1 > .outline-item { padding-left: 0px; }
.outline-h2 > .outline-item { padding-left: 1em; }
.outline-h3 > .outline-item { padding-left: 2em; }
.outline-h4 > .outline-item { padding-left: 3em; }
.outline-h5 > .outline-item { padding-left: 4em; }
.outline-h6 > .outline-item { padding-left: 5em; }
.outline-label { cursor: pointer; display: table-cell; vertical-align: middle; text-decoration: none; color: inherit; }
.outline-label:hover { text-decoration: underline; }
.outline-item:hover { border-color: rgb(245, 245, 245); background-color: var(--item-hover-bg-color); }
.outline-item:hover { margin-left: -28px; margin-right: -28px; border-left: 28px solid transparent; border-right: 28px solid transparent; }
.outline-item-single .outline-expander::before, .outline-item-single .outline-expander:hover::before { display: none; }
.outline-item-open > .outline-item > .outline-expander::before { content: ""; }
.outline-children { display: none; }
.info-panel-tab-wrapper { display: none; }
.outline-item-open > .outline-children { display: block; }
.typora-export .outline-item { padding-top: 1px; padding-bottom: 1px; }
.typora-export .outline-item:hover { margin-right: -8px; border-right: 8px solid transparent; }
.typora-export .outline-expander::before { content: "+"; font-family: inherit; top: -1px; }
.typora-export .outline-expander:hover::before, .typora-export .outline-item-open > .outline-item > .outline-expander::before { content: "−"; }
.typora-export-collapse-outline .outline-children { display: none; }
.typora-export-collapse-outline .outline-item-open > .outline-children, .typora-export-no-collapse-outline .outline-children { display: block; }
.typora-export-no-collapse-outline .outline-expander::before { content: "" !important; }
.typora-export-show-outline .outline-item-active > .outline-item .outline-label { font-weight: 700; }
.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background: inherit; }
.CodeMirror-scroll { overflow: auto hidden; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right: 1px solid rgb(221, 221, 221); background: inherit; white-space: nowrap; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background: inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background: inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; background: 0px 0px !important; border: none !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-radius: 0px; border-width: 0px; background: 0px 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; overflow-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; }
.CodeMirror-wrap pre { overflow-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right: 30px solid transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background: rgba(255, 255, 0, 0.4); }
span.cm-underlined { text-decoration: underline; }
span.cm-strikethrough { text-decoration: line-through; }
.cm-tw-syntaxerror { color: rgb(255, 255, 255); background-color: rgb(153, 0, 0); }
.cm-tw-deleted { text-decoration: line-through; }
.cm-tw-header5 { font-weight: 700; }
.cm-tw-listitem:first-child { padding-left: 10px; }
.cm-tw-box { border-style: solid; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-color: inherit; border-top-width: 0px !important; }
.cm-tw-underline { text-decoration: underline; }
@media print {
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}
html {
font-size: 19px;
}
html, body {
margin: auto;
background: #fefefe;
}
body {
font-family: "Vollkorn", Palatino, Times;
color: #333;
line-height: 1.4;
text-align: justify;
}
#write {
max-width: 960px;
margin: 0 auto;
margin-bottom: 2em;
line-height: 1.53;
padding-top: 40px;
}
@media only screen and (min-width: 1400px) {
#write {
max-width: 1100px;
}
}
@media print {
html {
font-size: 13px;
}
}
/* Typography
-------------------------------------------------------- */
#write>h1:first-child,
h1 {
margin-top: 1.6em;
font-weight: normal;
}
h1 {
font-size:3em;
}
h2 {
margin-top:2em;
font-weight: normal;
}
h3 {
font-weight: normal;
font-style: italic;
margin-top: 3em;
}
h1,
h2,
h3{
text-align: center;
}
h2:after{
border-bottom: 1px solid #2f2f2f;
content: '';
width: 100px;
display: block;
margin: 0 auto;
height: 1px;
}
h1+h2, h2+h3 {
margin-top: 0.83em;
}
p,
.mathjax-block {
margin-top: 0;
-webkit-hypens: auto;
-moz-hypens: auto;
hyphens: auto;
}
ul {
list-style: square;
padding-left: 1.2em;
}
ol {
padding-left: 1.2em;
}
blockquote {
margin-left: 1em;
padding-left: 1em;
border-left: 1px solid #ddd;
}
code,
pre {
font-family: "Consolas", "Menlo", "Monaco", monospace, serif;
font-size: .9em;
background: white;
}
.md-fences{
margin-left: 1em;
padding-left: 1em;
border: 1px solid #ddd;
padding-bottom: 8px;
padding-top: 6px;
margin-bottom: 1.5em;
}
a {
color: #2484c1;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a img {
border: none;
}
h1 a,
h1 a:hover {
color: #333;
text-decoration: none;
}
hr {
color: #ddd;
height: 1px;
margin: 2em 0;
border-top: solid 1px #ddd;
border-bottom: none;
border-left: 0;
border-right: 0;
}
.ty-table-edit {
background: #ededed;
padding-top: 4px;
}
table {
margin-bottom: 1.333333rem
}
table th,
table td {
padding: 8px;
line-height: 1.333333rem;
vertical-align: top;
border-top: 1px solid #ddd
}
table th {
font-weight: bold
}
table thead th {
vertical-align: bottom
}
table caption+thead tr:first-child th,
table caption+thead tr:first-child td,
table colgroup+thead tr:first-child th,
table colgroup+thead tr:first-child td,
table thead:first-child tr:first-child th,
table thead:first-child tr:first-child td {
border-top: 0
}
table tbody+tbody {
border-top: 2px solid #ddd
}
.task-list{
padding:0;
}
.md-task-list-item {
padding-left: 1.6rem;
}
.md-task-list-item > input:before {
content: '\221A';
display: inline-block;
width: 1.33333333rem;
height: 1.6rem;
vertical-align: middle;
text-align: center;
color: #ddd;
background-color: #fefefe;
}
.md-task-list-item > input:checked:before,
.md-task-list-item > input[checked]:before{
color: inherit;
}
.md-tag {
color: inherit;
font: inherit;
}
#write pre.md-meta-block {
min-height: 35px;
padding: 0.5em 1em;
}
#write pre.md-meta-block {
white-space: pre;
background: #f8f8f8;
border: 0px;
color: #999;
width: 100vw;
max-width: calc(100% + 60px);
margin-left: -30px;
border-left: 30px #f8f8f8 solid;
border-right: 30px #f8f8f8 solid;
margin-bottom: 2em;
margin-top: -1.3333333333333rem;
padding-top: 26px;
padding-bottom: 10px;
line-height: 1.8em;
font-size: 0.9em;
font-size: 0.76em;
padding-left: 0;
}
.md-img-error.md-image>.md-meta{
vertical-align: bottom;
}
#write>h5.md-focus:before {
top: 2px;
}
.md-toc {
margin-top: 40px;
}
.md-toc-content {
padding-bottom: 20px;
}
.outline-expander:before {
color: inherit;
font-size: 14px;
top: auto;
content: "\f0da";
font-family: FontAwesome;
}
.outline-expander:hover:before,
.outline-item-open>.outline-item>.outline-expander:before {
content: "\f0d7";
}
/** source code mode */
#typora-source {
font-family: Courier, monospace;
color: #6A6A6A;
}
.html-for-mac #typora-sidebar {
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
}
.cm-s-typora-default .cm-header,
.cm-s-typora-default .cm-property,
.CodeMirror.cm-s-typora-default div.CodeMirror-cursor {
color: #428bca;
}
.cm-s-typora-default .cm-atom, .cm-s-typora-default .cm-number {
color: #777777;
}
.typora-node .file-list-item-parent-loc,
.typora-node .file-list-item-time,
.typora-node .file-list-item-summary {
font-family: arial, sans-serif;
}
.md-task-list-item>input {
margin-left: -1.3em;
margin-top: calc(1rem - 12px);
}
.md-mathjax-midline {
background: #fafafa;
}
.md-fences .code-tooltip {
bottom: -2em !important;
}
.dropdown-menu .divider {
border-color: #e5e5e5;
}
</style><title>RRAM Simulation</title>
</head>
<body class='typora-export os-windows'><div class='typora-export-content'>
<div id='write' class=''><h1 id='rram-simulation-crosssim'><span>RRAM Simulation (CrossSim)</span></h1><h1 id='rram-background'><span>RRAM Background</span></h1><p><strong><span>Resistive random-access memory</span></strong><span> (ReRAM or RRAM) is based on Memristor.</span></p><h2 id='history-of-memristor'><span>History of Memristor</span></h2><blockquote><p><span>1971, Leon O. Chua in UC Berkeley, predicted its existence </span><em><span>IEEE,</span></em><span> “Memristor-The missing circuit element”</span></p></blockquote><p><span>Memristor is first introduced by Leon O, Chua in 1971, combining Memory and Resistor.</span></p><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片1.47ldsy8v86o0.png" referrerpolicy="no-referrer" alt="图片1"></p><div contenteditable="false" spellcheck="false" class="mathjax-block md-end-block md-math-block md-rawblock" id="mathjax-n9" cid="n9" mdtype="math_block"><div class="md-rawblock-container md-math-container" tabindex="-1"><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-1-Frame" tabindex="-1" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="12.676ex" height="2.673ex" viewBox="0 -821.2 5457.6 1150.9" role="img" focusable="false" style="vertical-align: -0.766ex; margin-right: -0.019ex; max-width: 100%;"><defs><path stroke-width="0" id="E8-MJMATHBI-4D" d="M258 624H231Q214 624 208 626T199 639Q203 678 216 684Q220 686 347 686H473Q474 685 478 682T484 677Q487 673 535 413L584 153L608 187Q631 221 672 281T761 410Q935 663 943 671Q949 678 962 686H1082H1166Q1201 686 1210 683T1219 668Q1215 632 1203 626Q1199 624 1149 624H1100L1031 344Q960 64 960 63T1004 62H1031Q1063 62 1063 44Q1060 7 1046 2Q1042 0 1034 0Q1030 0 990 1T875 2Q804 2 767 1T725 0H723Q707 0 703 15Q707 54 720 60Q724 62 773 62H822Q961 618 961 619L754 318Q546 15 543 12Q531 0 510 0Q500 0 495 0T484 5T477 19Q477 20 421 315L367 604L299 335Q234 72 234 68Q234 62 302 62Q334 62 334 46Q332 8 317 2Q313 0 306 0Q301 0 267 1T181 2Q125 2 96 1T63 0Q48 0 43 15Q43 19 47 35Q52 55 57 58T94 62Q147 64 164 69L233 345Q302 619 302 622Q302 624 258 624Z"></path><path stroke-width="0" id="E8-MJMAIN-3D" d="M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z"></path><path stroke-width="0" id="E8-MJMATHBI-64" d="M222 -8Q140 -8 89 34T38 158Q38 220 68 285T151 391Q230 452 329 452Q382 452 416 428L422 424Q423 424 447 523L472 622H468Q467 622 463 622T453 623T441 624T430 624T420 624T415 625Q403 628 403 642Q403 647 407 661T413 679Q417 684 428 685T504 690Q577 694 591 694Q608 694 612 679L467 91Q466 87 466 72Q466 43 483 43Q518 43 541 134Q546 155 550 158T571 162H576H587Q607 162 607 148Q606 142 604 132T590 94T566 47T528 9T474 -8Q396 -8 358 40Q295 -8 222 -8ZM404 351Q383 401 324 401Q300 401 270 385T221 330Q206 296 186 220Q166 136 166 106Q166 72 184 58T228 43Q256 43 284 57T328 84T343 103Q343 106 374 228L404 351Z"></path><path stroke-width="0" id="E8-MJMATHBI-3D5" d="M274 -7Q232 -4 195 7T125 38T71 94T51 176V190Q51 213 60 242T95 307T156 373T255 425T393 451L397 452L427 568Q434 597 443 636Q452 677 456 685T472 694H486H495Q517 694 517 680L514 665Q510 650 503 621T489 564L460 451H469Q527 447 574 430T657 370T693 266Q693 163 599 82T350 -7H346L322 -100Q301 -190 295 -197Q291 -202 283 -202H269H258Q238 -202 238 -188Q238 -186 260 -96L283 -7H274ZM449 400Q448 400 404 225T359 47T366 45Q464 55 516 119Q542 149 558 199T575 295Q575 387 462 398L449 400ZM384 398Q384 399 381 399Q350 399 298 378T214 308Q168 236 168 149Q168 68 259 49Q282 44 294 44H295L384 398Z"></path><path stroke-width="0" id="E8-MJMAIN-2F" d="M423 750Q432 750 438 744T444 730Q444 725 271 248T92 -240Q85 -250 75 -250Q68 -250 62 -245T56 -231Q56 -221 230 257T407 740Q411 750 423 750Z"></path><path stroke-width="0" id="E8-MJMATHBI-71" d="M38 159Q38 209 58 260T113 355T205 425T327 452Q338 452 348 451T366 449T382 444T394 440T405 434T414 429T422 423T429 418Q440 429 481 440T533 452Q540 452 545 447T550 437Q550 432 481 152Q410 -130 410 -131T437 -132H452Q479 -132 479 -150Q476 -187 462 -192Q458 -194 451 -194Q447 -194 414 -193T330 -192Q277 -192 249 -193T217 -194Q202 -194 197 -179Q197 -175 201 -159Q206 -139 211 -136T243 -132H283L319 15L307 10Q295 4 270 -2T220 -8Q134 -8 86 37T38 159ZM402 353Q402 358 395 368T369 390T324 401Q301 401 282 394T249 369T226 338T208 297T196 258T186 218Q166 141 166 107Q166 44 229 44Q265 44 294 61T337 95Q341 100 371 222T402 353Z"></path></defs><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#E8-MJMATHBI-4D" x="0" y="0"></use><use xlink:href="#E8-MJMAIN-3D" x="1419" y="0"></use><use xlink:href="#E8-MJMATHBI-64" x="2475" y="0"></use><use xlink:href="#E8-MJMATHBI-3D5" x="3085" y="0"></use><use xlink:href="#E8-MJMAIN-2F" x="3797" y="0"></use><use xlink:href="#E8-MJMATHBI-64" x="4297" y="0"></use><use xlink:href="#E8-MJMATHBI-71" x="4907" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-1">𝑴=𝒅𝝓/𝒅𝒒</script></div></div><div contenteditable="false" spellcheck="false" class="mathjax-block md-end-block md-math-block md-rawblock" id="mathjax-n10" cid="n10" mdtype="math_block"><div class="md-rawblock-container md-math-container" tabindex="-1"><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-2-Frame" tabindex="-1" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="22.729ex" height="2.673ex" viewBox="0 -821.2 9786 1150.9" role="img" focusable="false" style="vertical-align: -0.766ex; max-width: 100%;"><defs><path stroke-width="0" id="E9-MJMATHBI-56" d="M401 686Q415 680 415 668Q415 651 404 629Q398 624 356 624Q318 624 318 623Q318 620 337 508T377 284L397 174L472 285Q548 396 623 507T699 620Q698 621 652 624Q634 624 627 627T619 641Q619 648 622 658Q627 677 631 681T650 686Q654 686 686 685T766 684Q794 684 823 684T858 685Q874 685 878 683T886 671Q886 667 882 651Q877 632 873 628T850 624Q800 624 779 617Q774 617 770 613Q767 610 560 304T350 -5Q346 -9 332 -16H306H291Q270 -16 267 -2Q267 -1 260 37T238 161T210 313L156 624H116H94Q62 624 62 642Q66 678 78 684Q82 686 99 686Q144 684 246 684Q330 684 368 685L401 686Z"></path><path stroke-width="0" id="E9-MJMAIN-28" d="M94 250Q94 319 104 381T127 488T164 576T202 643T244 695T277 729T302 750H315H319Q333 750 333 741Q333 738 316 720T275 667T226 581T184 443T167 250T184 58T225 -81T274 -167T316 -220T333 -241Q333 -250 318 -250H315H302L274 -226Q180 -141 137 -14T94 250Z"></path><path stroke-width="0" id="E9-MJMATHBI-74" d="M82 382H55Q21 382 21 399Q21 422 33 439Q39 444 93 444H144L162 517Q163 522 167 541T174 567T181 589T192 611T206 627T226 639T253 643Q276 643 291 630T306 594Q306 586 288 514Q284 499 280 481T273 454L271 445Q271 444 317 444Q322 444 331 444T345 445Q377 445 377 428Q377 408 368 390Q360 382 341 382H306H255Q182 86 182 75Q182 43 201 43H204Q242 46 279 81Q298 101 309 119T323 145T330 157T350 162H356H363Q377 162 382 160T387 146Q385 136 372 114T337 64T275 14T192 -7Q131 -7 95 19T59 90V105L128 381Q128 382 82 382Z"></path><path stroke-width="0" id="E9-MJMAIN-29" d="M60 749L64 750Q69 750 74 750H86L114 726Q208 641 251 514T294 250Q294 182 284 119T261 12T224 -76T186 -143T145 -194T113 -227T90 -246Q87 -249 86 -250H74Q66 -250 63 -250T58 -247T55 -238Q56 -237 66 -225Q221 -64 221 250T66 725Q56 737 55 738Q55 746 60 749Z"></path><path stroke-width="0" id="E9-MJMAIN-3D" d="M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z"></path><path stroke-width="0" id="E9-MJMATHBI-4D" d="M258 624H231Q214 624 208 626T199 639Q203 678 216 684Q220 686 347 686H473Q474 685 478 682T484 677Q487 673 535 413L584 153L608 187Q631 221 672 281T761 410Q935 663 943 671Q949 678 962 686H1082H1166Q1201 686 1210 683T1219 668Q1215 632 1203 626Q1199 624 1149 624H1100L1031 344Q960 64 960 63T1004 62H1031Q1063 62 1063 44Q1060 7 1046 2Q1042 0 1034 0Q1030 0 990 1T875 2Q804 2 767 1T725 0H723Q707 0 703 15Q707 54 720 60Q724 62 773 62H822Q961 618 961 619L754 318Q546 15 543 12Q531 0 510 0Q500 0 495 0T484 5T477 19Q477 20 421 315L367 604L299 335Q234 72 234 68Q234 62 302 62Q334 62 334 46Q332 8 317 2Q313 0 306 0Q301 0 267 1T181 2Q125 2 96 1T63 0Q48 0 43 15Q43 19 47 35Q52 55 57 58T94 62Q147 64 164 69L233 345Q302 619 302 622Q302 624 258 624Z"></path><path stroke-width="0" id="E9-MJMATHBI-71" d="M38 159Q38 209 58 260T113 355T205 425T327 452Q338 452 348 451T366 449T382 444T394 440T405 434T414 429T422 423T429 418Q440 429 481 440T533 452Q540 452 545 447T550 437Q550 432 481 152Q410 -130 410 -131T437 -132H452Q479 -132 479 -150Q476 -187 462 -192Q458 -194 451 -194Q447 -194 414 -193T330 -192Q277 -192 249 -193T217 -194Q202 -194 197 -179Q197 -175 201 -159Q206 -139 211 -136T243 -132H283L319 15L307 10Q295 4 270 -2T220 -8Q134 -8 86 37T38 159ZM402 353Q402 358 395 368T369 390T324 401Q301 401 282 394T249 369T226 338T208 297T196 258T186 218Q166 141 166 107Q166 44 229 44Q265 44 294 61T337 95Q341 100 371 222T402 353Z"></path><path stroke-width="0" id="E9-MJMAIN-D7" d="M630 29Q630 9 609 9Q604 9 587 25T493 118L389 222L284 117Q178 13 175 11Q171 9 168 9Q160 9 154 15T147 29Q147 36 161 51T255 146L359 250L255 354Q174 435 161 449T147 471Q147 480 153 485T168 490Q173 490 175 489Q178 487 284 383L389 278L493 382Q570 459 587 475T609 491Q630 491 630 471Q630 464 620 453T522 355L418 250L522 145Q606 61 618 48T630 29Z"></path><path stroke-width="0" id="E9-MJMATHBI-49" d="M247 624Q242 624 233 624T220 623Q186 623 186 640Q186 647 190 664T202 684Q206 686 226 686Q277 684 393 684Q435 684 471 684T528 685T553 686Q573 686 573 670Q573 650 564 632Q556 624 537 624H501H449L380 344Q309 64 309 63T356 62Q361 62 370 62T384 63Q417 63 417 46Q417 26 408 8Q403 3 396 0L352 1Q325 2 216 2T82 1L45 0Q30 7 30 16Q33 51 46 60Q51 62 102 62H154L294 623Q294 624 247 624Z"></path></defs><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#E9-MJMATHBI-56" x="0" y="0"></use><use xlink:href="#E9-MJMAIN-28" x="678" y="0"></use><use xlink:href="#E9-MJMATHBI-74" x="1067" y="0"></use><use xlink:href="#E9-MJMAIN-29" x="1482" y="0"></use><use xlink:href="#E9-MJMAIN-3D" x="2148" y="0"></use><use xlink:href="#E9-MJMATHBI-4D" x="3204" y="0"></use><use xlink:href="#E9-MJMAIN-28" x="4346" y="0"></use><use xlink:href="#E9-MJMATHBI-71" x="4735" y="0"></use><use xlink:href="#E9-MJMAIN-28" x="5277" y="0"></use><use xlink:href="#E9-MJMATHBI-74" x="5666" y="0"></use><use xlink:href="#E9-MJMAIN-29" x="6081" y="0"></use><use xlink:href="#E9-MJMAIN-29" x="6470" y="0"></use><use xlink:href="#E9-MJMAIN-D7" x="7081" y="0"></use><use xlink:href="#E9-MJMATHBI-49" x="8082" y="0"></use><use xlink:href="#E9-MJMAIN-28" x="8593" y="0"></use><use xlink:href="#E9-MJMATHBI-74" x="8982" y="0"></use><use xlink:href="#E9-MJMAIN-29" x="9397" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-2">𝑽(𝒕)=𝑴(𝒒(𝒕))×𝑰(𝒕)</script></div></div><blockquote><p><span>•2008, HP company’s laboratory made the first memristor </span><em><span>Nature,</span></em><span> “The missing memristor found” </span></p></blockquote><h2 id='component-structure'><span>Component Structure</span></h2><p><span>•Two </span><span class="MathJax_SVG" tabindex="-1" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="2.583ex" height="2.057ex" viewBox="0 -780.1 1112 885.9" role="img" focusable="false" style="vertical-align: -0.246ex;"><defs><path stroke-width="0" id="E11-MJMATHI-50" d="M287 628Q287 635 230 637Q206 637 199 638T192 648Q192 649 194 659Q200 679 203 681T397 683Q587 682 600 680Q664 669 707 631T751 530Q751 453 685 389Q616 321 507 303Q500 302 402 301H307L277 182Q247 66 247 59Q247 55 248 54T255 50T272 48T305 46H336Q342 37 342 35Q342 19 335 5Q330 0 319 0Q316 0 282 1T182 2Q120 2 87 2T51 1Q33 1 33 11Q33 13 36 25Q40 41 44 43T67 46Q94 46 127 49Q141 52 146 61Q149 65 218 339T287 628ZM645 554Q645 567 643 575T634 597T609 619T560 635Q553 636 480 637Q463 637 445 637T416 636T404 636Q391 635 386 627Q384 621 367 550T332 412T314 344Q314 342 395 342H407H430Q542 342 590 392Q617 419 631 471T645 554Z"></path><path stroke-width="0" id="E11-MJMATHI-74" d="M26 385Q19 392 19 395Q19 399 22 411T27 425Q29 430 36 430T87 431H140L159 511Q162 522 166 540T173 566T179 586T187 603T197 615T211 624T229 626Q247 625 254 615T261 596Q261 589 252 549T232 470L222 433Q222 431 272 431H323Q330 424 330 420Q330 398 317 385H210L174 240Q135 80 135 68Q135 26 162 26Q197 26 230 60T283 144Q285 150 288 151T303 153H307Q322 153 322 145Q322 142 319 133Q314 117 301 95T267 48T216 6T155 -11Q125 -11 98 4T59 56Q57 64 57 83V101L92 241Q127 382 128 383Q128 385 77 385H26Z"></path></defs><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#E11-MJMATHI-50" x="0" y="0"></use><use xlink:href="#E11-MJMATHI-74" x="751" y="0"></use></g></svg></span><script type="math/tex">Pt</script><span> Metal layer </span></p><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片2.ac7k3kn2sao.jpg" referrerpolicy="no-referrer" alt="图片2"></p><p><span>• Intermediate layer: </span></p><p><span> </span><strong><span>Not doped region: Pure TiO2, high resistance</span></strong><span> </span></p><p><span> </span><strong><span>Doped region: with oxygen deficiencies</span></strong><span> </span><strong><span>TiO2-X, low resistance</span></strong></p><p><span>• Stored information: resistance </span></p><p><span>• Memristor crossbar : each node is a memristor </span></p><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片3.3n4doyy0yh20.png" referrerpolicy="no-referrer" alt="图片3"></p><h2 id='in-memory-computing'><span>In-memory Computing</span></h2><p><span>•Apply N voltage signals in the rows</span></p><p><span>•The crossbar is a N×M matrix. Each intersection node is a memristor</span></p><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片4.rkfne39h0sg.png" referrerpolicy="no-referrer" alt="图片4"></p><p><span>• According to Kirchhoff’s Current Law, The current of </span><span class="MathJax_SVG" tabindex="-1" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="2.756ex" height="2.78ex" viewBox="-12 -935.7 1186.6 1197.1" role="img" focusable="false" style="vertical-align: -0.607ex; margin-left: -0.028ex;"><defs><path stroke-width="0" id="E12-MJMATHI-6A" d="M297 596Q297 627 318 644T361 661Q378 661 389 651T403 623Q403 595 384 576T340 557Q322 557 310 567T297 596ZM288 376Q288 405 262 405Q240 405 220 393T185 362T161 325T144 293L137 279Q135 278 121 278H107Q101 284 101 286T105 299Q126 348 164 391T252 441Q253 441 260 441T272 442Q296 441 316 432Q341 418 354 401T367 348V332L318 133Q267 -67 264 -75Q246 -125 194 -164T75 -204Q25 -204 7 -183T-12 -137Q-12 -110 7 -91T53 -71Q70 -71 82 -81T95 -112Q95 -148 63 -167Q69 -168 77 -168Q111 -168 139 -140T182 -74L193 -32Q204 11 219 72T251 197T278 308T289 365Q289 372 288 376Z"></path><path stroke-width="0" id="E12-MJMATHI-74" d="M26 385Q19 392 19 395Q19 399 22 411T27 425Q29 430 36 430T87 431H140L159 511Q162 522 166 540T173 566T179 586T187 603T197 615T211 624T229 626Q247 625 254 615T261 596Q261 589 252 549T232 470L222 433Q222 431 272 431H323Q330 424 330 420Q330 398 317 385H210L174 240Q135 80 135 68Q135 26 162 26Q197 26 230 60T283 144Q285 150 288 151T303 153H307Q322 153 322 145Q322 142 319 133Q314 117 301 95T267 48T216 6T155 -11Q125 -11 98 4T59 56Q57 64 57 83V101L92 241Q127 382 128 383Q128 385 77 385H26Z"></path><path stroke-width="0" id="E12-MJMATHI-68" d="M137 683Q138 683 209 688T282 694Q294 694 294 685Q294 674 258 534Q220 386 220 383Q220 381 227 388Q288 442 357 442Q411 442 444 415T478 336Q478 285 440 178T402 50Q403 36 407 31T422 26Q450 26 474 56T513 138Q516 149 519 151T535 153Q555 153 555 145Q555 144 551 130Q535 71 500 33Q466 -10 419 -10H414Q367 -10 346 17T325 74Q325 90 361 192T398 345Q398 404 354 404H349Q266 404 205 306L198 293L164 158Q132 28 127 16Q114 -11 83 -11Q69 -11 59 -2T48 16Q48 30 121 320L195 616Q195 629 188 632T149 637H128Q122 643 122 645T124 664Q129 683 137 683Z"></path></defs><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#E12-MJMATHI-6A" x="0" y="0"></use><g transform="translate(412,362)"><use transform="scale(0.707)" xlink:href="#E12-MJMATHI-74" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#E12-MJMATHI-68" x="361" y="0"></use></g></g></svg></span><script type="math/tex"> j^{th} </script><span> column </span><span class="MathJax_SVG" tabindex="-1" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.931ex" height="2.66ex" viewBox="0 -780.1 831.3 1145.2" role="img" focusable="false" style="vertical-align: -0.848ex;"><defs><path stroke-width="0" id="E13-MJMATHI-49" d="M43 1Q26 1 26 10Q26 12 29 24Q34 43 39 45Q42 46 54 46H60Q120 46 136 53Q137 53 138 54Q143 56 149 77T198 273Q210 318 216 344Q286 624 286 626Q284 630 284 631Q274 637 213 637H193Q184 643 189 662Q193 677 195 680T209 683H213Q285 681 359 681Q481 681 487 683H497Q504 676 504 672T501 655T494 639Q491 637 471 637Q440 637 407 634Q393 631 388 623Q381 609 337 432Q326 385 315 341Q245 65 245 59Q245 52 255 50T307 46H339Q345 38 345 37T342 19Q338 6 332 0H316Q279 2 179 2Q143 2 113 2T65 2T43 1Z"></path><path stroke-width="0" id="E13-MJMATHI-6A" d="M297 596Q297 627 318 644T361 661Q378 661 389 651T403 623Q403 595 384 576T340 557Q322 557 310 567T297 596ZM288 376Q288 405 262 405Q240 405 220 393T185 362T161 325T144 293L137 279Q135 278 121 278H107Q101 284 101 286T105 299Q126 348 164 391T252 441Q253 441 260 441T272 442Q296 441 316 432Q341 418 354 401T367 348V332L318 133Q267 -67 264 -75Q246 -125 194 -164T75 -204Q25 -204 7 -183T-12 -137Q-12 -110 7 -91T53 -71Q70 -71 82 -81T95 -112Q95 -148 63 -167Q69 -168 77 -168Q111 -168 139 -140T182 -74L193 -32Q204 11 219 72T251 197T278 308T289 365Q289 372 288 376Z"></path></defs><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#E13-MJMATHI-49" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#E13-MJMATHI-6A" x="622" y="-213"></use></g></svg></span><script type="math/tex">I_j</script><span>:</span></p><div contenteditable="false" spellcheck="false" class="mathjax-block md-end-block md-math-block md-rawblock" id="mathjax-n27" cid="n27" mdtype="math_block"><div class="md-rawblock-container md-math-container" tabindex="-1"><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-3-Frame" tabindex="-1" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="14.883ex" height="7.24ex" viewBox="0 -1804.3 6408 3117.1" role="img" focusable="false" style="vertical-align: -3.049ex; max-width: 100%;"><defs><path stroke-width="0" id="E10-MJMATHI-49" d="M43 1Q26 1 26 10Q26 12 29 24Q34 43 39 45Q42 46 54 46H60Q120 46 136 53Q137 53 138 54Q143 56 149 77T198 273Q210 318 216 344Q286 624 286 626Q284 630 284 631Q274 637 213 637H193Q184 643 189 662Q193 677 195 680T209 683H213Q285 681 359 681Q481 681 487 683H497Q504 676 504 672T501 655T494 639Q491 637 471 637Q440 637 407 634Q393 631 388 623Q381 609 337 432Q326 385 315 341Q245 65 245 59Q245 52 255 50T307 46H339Q345 38 345 37T342 19Q338 6 332 0H316Q279 2 179 2Q143 2 113 2T65 2T43 1Z"></path><path stroke-width="0" id="E10-MJMATHI-6A" d="M297 596Q297 627 318 644T361 661Q378 661 389 651T403 623Q403 595 384 576T340 557Q322 557 310 567T297 596ZM288 376Q288 405 262 405Q240 405 220 393T185 362T161 325T144 293L137 279Q135 278 121 278H107Q101 284 101 286T105 299Q126 348 164 391T252 441Q253 441 260 441T272 442Q296 441 316 432Q341 418 354 401T367 348V332L318 133Q267 -67 264 -75Q246 -125 194 -164T75 -204Q25 -204 7 -183T-12 -137Q-12 -110 7 -91T53 -71Q70 -71 82 -81T95 -112Q95 -148 63 -167Q69 -168 77 -168Q111 -168 139 -140T182 -74L193 -32Q204 11 219 72T251 197T278 308T289 365Q289 372 288 376Z"></path><path stroke-width="0" id="E10-MJMAIN-3D" d="M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z"></path><path stroke-width="0" id="E10-MJSZ2-2211" d="M60 948Q63 950 665 950H1267L1325 815Q1384 677 1388 669H1348L1341 683Q1320 724 1285 761Q1235 809 1174 838T1033 881T882 898T699 902H574H543H251L259 891Q722 258 724 252Q725 250 724 246Q721 243 460 -56L196 -356Q196 -357 407 -357Q459 -357 548 -357T676 -358Q812 -358 896 -353T1063 -332T1204 -283T1307 -196Q1328 -170 1348 -124H1388Q1388 -125 1381 -145T1356 -210T1325 -294L1267 -449L666 -450Q64 -450 61 -448Q55 -446 55 -439Q55 -437 57 -433L590 177Q590 178 557 222T452 366T322 544L56 909L55 924Q55 945 60 948Z"></path><path stroke-width="0" id="E10-MJMATHI-69" d="M184 600Q184 624 203 642T247 661Q265 661 277 649T290 619Q290 596 270 577T226 557Q211 557 198 567T184 600ZM21 287Q21 295 30 318T54 369T98 420T158 442Q197 442 223 419T250 357Q250 340 236 301T196 196T154 83Q149 61 149 51Q149 26 166 26Q175 26 185 29T208 43T235 78T260 137Q263 149 265 151T282 153Q302 153 302 143Q302 135 293 112T268 61T223 11T161 -11Q129 -11 102 10T74 74Q74 91 79 106T122 220Q160 321 166 341T173 380Q173 404 156 404H154Q124 404 99 371T61 287Q60 286 59 284T58 281T56 279T53 278T49 278T41 278H27Q21 284 21 287Z"></path><path stroke-width="0" id="E10-MJMAIN-30" d="M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z"></path><path stroke-width="0" id="E10-MJMATHI-4E" d="M234 637Q231 637 226 637Q201 637 196 638T191 649Q191 676 202 682Q204 683 299 683Q376 683 387 683T401 677Q612 181 616 168L670 381Q723 592 723 606Q723 633 659 637Q635 637 635 648Q635 650 637 660Q641 676 643 679T653 683Q656 683 684 682T767 680Q817 680 843 681T873 682Q888 682 888 672Q888 650 880 642Q878 637 858 637Q787 633 769 597L620 7Q618 0 599 0Q585 0 582 2Q579 5 453 305L326 604L261 344Q196 88 196 79Q201 46 268 46H278Q284 41 284 38T282 19Q278 6 272 0H259Q228 2 151 2Q123 2 100 2T63 2T46 1Q31 1 31 10Q31 14 34 26T39 40Q41 46 62 46Q130 49 150 85Q154 91 221 362L289 634Q287 635 234 637Z"></path><path stroke-width="0" id="E10-MJMAIN-2212" d="M84 237T84 250T98 270H679Q694 262 694 250T679 230H98Q84 237 84 250Z"></path><path stroke-width="0" id="E10-MJMAIN-31" d="M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z"></path><path stroke-width="0" id="E10-MJMATHI-56" d="M52 648Q52 670 65 683H76Q118 680 181 680Q299 680 320 683H330Q336 677 336 674T334 656Q329 641 325 637H304Q282 635 274 635Q245 630 242 620Q242 618 271 369T301 118L374 235Q447 352 520 471T595 594Q599 601 599 609Q599 633 555 637Q537 637 537 648Q537 649 539 661Q542 675 545 679T558 683Q560 683 570 683T604 682T668 681Q737 681 755 683H762Q769 676 769 672Q769 655 760 640Q757 637 743 637Q730 636 719 635T698 630T682 623T670 615T660 608T652 599T645 592L452 282Q272 -9 266 -16Q263 -18 259 -21L241 -22H234Q216 -22 216 -15Q213 -9 177 305Q139 623 138 626Q133 637 76 637H59Q52 642 52 648Z"></path><path stroke-width="0" id="E10-MJMATHI-47" d="M50 252Q50 367 117 473T286 641T490 704Q580 704 633 653Q642 643 648 636T656 626L657 623Q660 623 684 649Q691 655 699 663T715 679T725 690L740 705H746Q760 705 760 698Q760 694 728 561Q692 422 692 421Q690 416 687 415T669 413H653Q647 419 647 422Q647 423 648 429T650 449T651 481Q651 552 619 605T510 659Q492 659 471 656T418 643T357 615T294 567T236 496T189 394T158 260Q156 242 156 221Q156 173 170 136T206 79T256 45T308 28T353 24Q407 24 452 47T514 106Q517 114 529 161T541 214Q541 222 528 224T468 227H431Q425 233 425 235T427 254Q431 267 437 273H454Q494 271 594 271Q634 271 659 271T695 272T707 272Q721 272 721 263Q721 261 719 249Q714 230 709 228Q706 227 694 227Q674 227 653 224Q646 221 643 215T629 164Q620 131 614 108Q589 6 586 3Q584 1 581 1Q571 1 553 21T530 52Q530 53 528 52T522 47Q448 -22 322 -22Q201 -22 126 55T50 252Z"></path><path stroke-width="0" id="E10-MJMAIN-2C" d="M78 35T78 60T94 103T137 121Q165 121 187 96T210 8Q210 -27 201 -60T180 -117T154 -158T130 -185T117 -194Q113 -194 104 -185T95 -172Q95 -168 106 -156T131 -126T157 -76T173 -3V9L172 8Q170 7 167 6T161 3T152 1T140 0Q113 0 96 17Z"></path></defs><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#E10-MJMATHI-49" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#E10-MJMATHI-6A" x="622" y="-213"></use><use xlink:href="#E10-MJMAIN-3D" x="1109" y="0"></use><g transform="translate(2164,0)"><use xlink:href="#E10-MJSZ2-2211" x="43" y="0"></use><g transform="translate(191,-1088)"><use transform="scale(0.707)" xlink:href="#E10-MJMATHI-69" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#E10-MJMAIN-3D" x="345" y="0"></use><use transform="scale(0.707)" xlink:href="#E10-MJMAIN-30" x="1123" y="0"></use></g><g transform="translate(0,1150)"><use transform="scale(0.707)" xlink:href="#E10-MJMATHI-4E" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#E10-MJMAIN-2212" x="888" y="0"></use><use transform="scale(0.707)" xlink:href="#E10-MJMAIN-31" x="1666" y="0"></use></g></g><g transform="translate(3863,0)"><use xlink:href="#E10-MJMATHI-56" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#E10-MJMATHI-69" x="824" y="-213"></use><g transform="translate(926,0)"><use xlink:href="#E10-MJMATHI-47" x="0" y="0"></use><g transform="translate(786,-150)"><use transform="scale(0.707)" xlink:href="#E10-MJMATHI-69" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#E10-MJMAIN-2C" x="345" y="0"></use><use transform="scale(0.707)" xlink:href="#E10-MJMATHI-6A" x="623" y="0"></use></g></g></g></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-3">I_j=\sum_{i=0}^{N-1}{V_iG_{i,j}}</script></div></div><p><span class="MathJax_SVG" tabindex="-1" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="3.758ex" height="2.66ex" viewBox="0 -780.1 1617.9 1145.2" role="img" focusable="false" style="vertical-align: -0.848ex;"><defs><path stroke-width="0" id="E14-MJMATHI-47" d="M50 252Q50 367 117 473T286 641T490 704Q580 704 633 653Q642 643 648 636T656 626L657 623Q660 623 684 649Q691 655 699 663T715 679T725 690L740 705H746Q760 705 760 698Q760 694 728 561Q692 422 692 421Q690 416 687 415T669 413H653Q647 419 647 422Q647 423 648 429T650 449T651 481Q651 552 619 605T510 659Q492 659 471 656T418 643T357 615T294 567T236 496T189 394T158 260Q156 242 156 221Q156 173 170 136T206 79T256 45T308 28T353 24Q407 24 452 47T514 106Q517 114 529 161T541 214Q541 222 528 224T468 227H431Q425 233 425 235T427 254Q431 267 437 273H454Q494 271 594 271Q634 271 659 271T695 272T707 272Q721 272 721 263Q721 261 719 249Q714 230 709 228Q706 227 694 227Q674 227 653 224Q646 221 643 215T629 164Q620 131 614 108Q589 6 586 3Q584 1 581 1Q571 1 553 21T530 52Q530 53 528 52T522 47Q448 -22 322 -22Q201 -22 126 55T50 252Z"></path><path stroke-width="0" id="E14-MJMATHI-69" d="M184 600Q184 624 203 642T247 661Q265 661 277 649T290 619Q290 596 270 577T226 557Q211 557 198 567T184 600ZM21 287Q21 295 30 318T54 369T98 420T158 442Q197 442 223 419T250 357Q250 340 236 301T196 196T154 83Q149 61 149 51Q149 26 166 26Q175 26 185 29T208 43T235 78T260 137Q263 149 265 151T282 153Q302 153 302 143Q302 135 293 112T268 61T223 11T161 -11Q129 -11 102 10T74 74Q74 91 79 106T122 220Q160 321 166 341T173 380Q173 404 156 404H154Q124 404 99 371T61 287Q60 286 59 284T58 281T56 279T53 278T49 278T41 278H27Q21 284 21 287Z"></path><path stroke-width="0" id="E14-MJMAIN-2C" d="M78 35T78 60T94 103T137 121Q165 121 187 96T210 8Q210 -27 201 -60T180 -117T154 -158T130 -185T117 -194Q113 -194 104 -185T95 -172Q95 -168 106 -156T131 -126T157 -76T173 -3V9L172 8Q170 7 167 6T161 3T152 1T140 0Q113 0 96 17Z"></path><path stroke-width="0" id="E14-MJMATHI-6A" d="M297 596Q297 627 318 644T361 661Q378 661 389 651T403 623Q403 595 384 576T340 557Q322 557 310 567T297 596ZM288 376Q288 405 262 405Q240 405 220 393T185 362T161 325T144 293L137 279Q135 278 121 278H107Q101 284 101 286T105 299Q126 348 164 391T252 441Q253 441 260 441T272 442Q296 441 316 432Q341 418 354 401T367 348V332L318 133Q267 -67 264 -75Q246 -125 194 -164T75 -204Q25 -204 7 -183T-12 -137Q-12 -110 7 -91T53 -71Q70 -71 82 -81T95 -112Q95 -148 63 -167Q69 -168 77 -168Q111 -168 139 -140T182 -74L193 -32Q204 11 219 72T251 197T278 308T289 365Q289 372 288 376Z"></path></defs><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#E14-MJMATHI-47" x="0" y="0"></use><g transform="translate(786,-150)"><use transform="scale(0.707)" xlink:href="#E14-MJMATHI-69" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#E14-MJMAIN-2C" x="345" y="0"></use><use transform="scale(0.707)" xlink:href="#E14-MJMATHI-6A" x="623" y="0"></use></g></g></svg></span><script type="math/tex">G_{i,j}</script><span>: the conductance of memristor </span></p><blockquote><p><strong><span>Input vector: 1×N (voltage signals)</span></strong></p><p><strong><span>Vector-matrix multiplication: (1×N) × (N×M)</span></strong></p><p><strong><span>Output vector: 1×M (current signals)</span></strong></p></blockquote><h2 id='application-in-ai-artificial-intelligence'><span>Application in AI (Artificial Intelligence)</span></h2><p><span>•Each memristor: a biological neuron In-memory computing</span></p><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片5.sa19tlngmxc.png" referrerpolicy="no-referrer" alt="图片5"></p><p><span>•Crossbars accelerate 3 operations:</span></p><p><span> 1) Vector-matrix multiplication</span></p><p><span> 2) Matrix-vector multiplication</span></p><p><span> 3) Outer product of two vectors</span></p><p><span>• Building artificial intelligent algorithm with memristor: </span></p><p><span> 1) Backpropagation</span></p><p><span> 2) Liquid state machine</span></p><p><span> 3) Restricted Boltzmann machines</span></p><h1 id='cross-sim'><span>Cross-Sim</span></h1><p><em><span>CrossSim</span></em><span> is a crossbar simulator designed to model resistive memory crossbars for both neuromorphic computing and digital memories. It provides a clean python API so that different algorithms can be built upon crossbars while modelling realistic device properties and variability.</span></p><blockquote><p><span>Three operations:</span></p><p><span>Vector *Matrix: </span><em><span>.run_xbar_vmm</span></em></p><p><span>Matrix*Vector: </span><em><span>.run_xbar_mvm</span></em></p><p><span>Vector*Vector: </span><em><span>.update_matrix</span></em></p></blockquote><h2 id='example-results---multiplication'><span>Example Results - Multiplication</span></h2><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片6.18lgz78jwqu8.jpg" referrerpolicy="no-referrer" alt="图片6"></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="python"><div class="CodeMirror cm-s-inner CodeMirror-wrap" lang="python"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable">vector</span> = <span class="cm-variable">np</span>.<span class="cm-property">array</span>([<span class="cm-number">0</span>, <span class="cm-operator">-</span><span class="cm-number">0.5</span>, <span class="cm-number">0</span>, <span class="cm-number">1</span>, <span class="cm-number">0</span>, <span class="cm-number">0</span>])</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable">weights</span> = <span class="cm-variable">np</span>.<span class="cm-property">array</span>([[<span class="cm-number">1</span>, <span class="cm-number">0</span>, <span class="cm-number">0.4</span>, <span class="cm-number">0.6</span>, <span class="cm-number">0.8</span>, <span class="cm-number">1</span>],</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> [<span class="cm-number">1</span>, <span class="cm-number">0.2</span>, <span class="cm-number">0.4</span>, <span class="cm-number">0.6</span>, <span class="cm-number">0.8</span>, <span class="cm-number">1</span>],</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> [<span class="cm-number">1</span>, <span class="cm-number">0.2</span>, <span class="cm-number">0.4</span>, <span class="cm-number">0.6</span>, <span class="cm-number">0.8</span>, <span class="cm-number">1</span>],</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> [<span class="cm-number">1</span>, <span class="cm-number">0.2</span>, <span class="cm-number">0.4</span>, <span class="cm-number">0.6</span>, <span class="cm-number">0.8</span>, <span class="cm-number">1</span>],</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> [<span class="cm-number">1</span>, <span class="cm-number">0.2</span>, <span class="cm-number">0.4</span>, <span class="cm-number">0.6</span>, <span class="cm-number">0.8</span>, <span class="cm-number">1</span>],</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> [<span class="cm-operator">-</span><span class="cm-number">1</span>, <span class="cm-operator">-</span><span class="cm-number">0.2</span>, <span class="cm-operator">-</span><span class="cm-number">0.4</span>, <span class="cm-operator">-</span><span class="cm-number">0.6</span>, <span class="cm-operator">-</span><span class="cm-number">0.8</span>, <span class="cm-operator">-</span><span class="cm-number">1</span>]]) <span class="cm-operator">*</span> <span class="cm-number">10</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable">neural_core</span> = <span class="cm-variable">MakeCore</span>(<span class="cm-variable">params</span>=<span class="cm-variable">params</span>)</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable">neural_core</span>.<span class="cm-property">set_matrix</span>(<span class="cm-variable">weights</span>)</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 234px;"></div><div class="CodeMirror-gutters" style="display: none; height: 234px;"></div></div></div></pre><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片7.5phm76jyzug0.gif" referrerpolicy="no-referrer" alt="图片7"></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="python"><div class="CodeMirror cm-s-inner CodeMirror-wrap" lang="python"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable">neural_core</span>.<span class="cm-property">run_xbar_vmm</span>(<span class="cm-variable">vector</span>) </span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-comment">#vector*matrix</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-comment">#np.dot(vector, weights)</span></span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 78px;"></div><div class="CodeMirror-gutters" style="display: none; height: 78px;"></div></div></div></pre><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片8.4rda0jpwjns0.gif" referrerpolicy="no-referrer" alt="图片8">
<img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片9.592mvv79h0s0.jpg" referrerpolicy="no-referrer" alt="图片9"></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="python"><div class="CodeMirror cm-s-inner CodeMirror-wrap" lang="python"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable">weights2</span> = <span class="cm-variable">np</span>.<span class="cm-property">transpose</span>(<span class="cm-variable">weights</span>)</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable">neural_core</span>.<span class="cm-property">set_matrix</span>(<span class="cm-variable">weights2</span>)</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable">neural_core</span>.<span class="cm-property">run_xbar_mvm</span>(<span class="cm-variable">vector</span>) <span class="cm-comment">#matrix*vector #np.dot(weights2, vector)</span></span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 78px;"></div><div class="CodeMirror-gutters" style="display: none; height: 78px;"></div></div></div></pre><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片10.6rmp3k5uoxs0.gif" referrerpolicy="no-referrer" alt="图片10">
<img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片11.6s0kwh7xkks0.jpg" referrerpolicy="no-referrer" alt="图片11"></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="python"><div class="CodeMirror cm-s-inner CodeMirror-wrap" lang="python"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable">neural_core</span>.<span class="cm-property">update_matrix</span>(<span class="cm-variable">vector1</span>, <span class="cm-variable">vector2</span>)</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-comment">#weights + np.outer(vector1, vector2)</span></span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片12.693i6lwa1ps0.gif" referrerpolicy="no-referrer" alt="图片12">
<img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片13.5v1w4lk3rb00.gif" referrerpolicy="no-referrer" alt="图片13">
<img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片14.3hcmd8reta80.jpg" referrerpolicy="no-referrer" alt="图片14"></p><h1 id='cross-sim-simulation'><span>Cross-Sim Simulation</span></h1><h2 id='original-simulation-results'><span>Original Simulation Results</span></h2><figure><table><thead><tr><th><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片15.3uldtpojpuo0.png" referrerpolicy="no-referrer" alt="图片15"></th><th><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片16.7fdnrjhisak0.png" referrerpolicy="no-referrer" alt="图片16"></th><th><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片17.44f2ehvksuq0.png" referrerpolicy="no-referrer" alt="图片17"></th></tr></thead><tbody></tbody></table></figure><h2 id='tuning-layers'><span>Tuning Layers</span></h2><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="python" style="break-inside: unset;"><div class="CodeMirror cm-s-inner CodeMirror-wrap" lang="python"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text=""></span></span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-keyword">if</span> <span class="cm-variable">dataset</span> == <span class="cm-string">"small"</span>:</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-variable">sizes</span> = (<span class="cm-number">64</span>, <span class="cm-number">36</span>, <span class="cm-number">10</span>)</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable">trainfile</span> = <span class="cm-variable">os</span>.<span class="cm-property">path</span>.<span class="cm-property">join</span>(<span class="cm-variable">datapath</span>, <span class="cm-string">"backprop/small_digits/image_digit_small.train"</span>)</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-variable">testfile</span>=<span class="cm-variable">os</span>.<span class="cm-property">path</span>.<span class="cm-property">join</span>(<span class="cm-variable">datapath</span>,<span class="cm-string">"backprop/small_digits/image_digit_small.test"</span>)</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-keyword">elif</span> <span class="cm-variable">dataset</span> == <span class="cm-string">"large"</span>:</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-variable">sizes</span> = (<span class="cm-number">784</span>,<span class="cm-number">300</span>,<span class="cm-number">10</span>)</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-variable">trainfile</span> = <span class="cm-variable">os</span>.<span class="cm-property">path</span>.<span class="cm-property">join</span>(<span class="cm-variable">datapath</span>, <span class="cm-string">"backprop/mnist/mnist.train"</span>)</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-variable">testfile</span> = <span class="cm-variable">os</span>.<span class="cm-property">path</span>.<span class="cm-property">join</span>(<span class="cm-variable">datapath</span>, <span class="cm-string">"backprop/mnist/mnist.test"</span>)</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-keyword">elif</span> <span class="cm-variable">dataset</span> ==<span class="cm-string">"cyber"</span>:</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-variable">sizes</span> = (<span class="cm-number">256</span>,<span class="cm-number">512</span>,<span class="cm-number">9</span>)</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-variable">trainfile</span> = <span class="cm-variable">os</span>.<span class="cm-property">path</span>.<span class="cm-property">join</span>(<span class="cm-variable">datapath</span>, <span class="cm-string">"backprop/file_types/cyber.train"</span>)</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-variable">testfile</span> = <span class="cm-variable">os</span>.<span class="cm-property">path</span>.<span class="cm-property">join</span>(<span class="cm-variable">datapath</span>, <span class="cm-string">"backprop/file_types/cyber.test"</span>)</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text=""></span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable">bp</span> = <span class="cm-variable">Backprop</span>(<span class="cm-variable">sizes</span>, <span class="cm-variable">seed</span>=<span class="cm-variable">seed</span>) </span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 416px;"></div><div class="CodeMirror-gutters" style="display: none; height: 416px;"></div></div></div></pre><h2 id='layer'><span>Layer</span></h2><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片18.hy4xb509wa0.jpg" referrerpolicy="no-referrer" alt="图片18"></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="python"><div class="CodeMirror cm-s-inner CodeMirror-wrap" lang="python"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text=""></span></span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-keyword">if</span> <span class="cm-variable">dataset</span> == <span class="cm-string">"small"</span>:</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-variable">sizes</span> = (<span class="cm-number">64</span>, <span class="cm-number">36</span>, <span class="cm-number">10</span>) <span class="cm-variable">→</span> <span class="cm-variable">sizes</span> = (<span class="cm-number">64</span>, <span class="cm-number">36</span>, <span class="cm-number">20</span>, <span class="cm-number">10</span>) <span class="cm-comment">#Accuracy: 0.956 </span></span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 78px;"></div><div class="CodeMirror-gutters" style="display: none; height: 78px;"></div></div></div></pre><blockquote><p><span>2 layer</span></p><p><span>2 core</span></p><p><span>Input: (64*1)</span></p><p><span>Core[0]: (36*64)</span></p><p><span>Core[1]: (10*36)</span></p></blockquote><h2 id='tuning-pulse'><span>Tuning Pulse</span></h2><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="python"><div class="CodeMirror cm-s-inner CodeMirror-wrap" lang="python"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable">pd</span>.<span class="cm-property">load_set_reset_csv</span>(<span class="cm-variable">set_file</span>=<span class="cm-variable">set_file</span>, <span class="cm-variable">reset_file</span>=<span class="cm-variable">reset_file</span>, <span class="cm-variable">skip_header</span>=<span class="cm-variable">header_lines</span>, <span class="cm-variable">skip_footer</span>=<span class="cm-variable">skip_footer</span>, <span class="cm-variable">read_voltage</span>=<span class="cm-variable">read_voltage</span>)</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 78px;"></div><div class="CodeMirror-gutters" style="display: none; height: 78px;"></div></div></div></pre><p><span>read_voltage=0.1</span></p><p><span>set_file: a series of current value detected (increasing pulse)</span></p><p><span>reset_file: a series of current value detected (decreasing pulse)</span></p><h2 id='bin-data--delta-g'><span>Bin data & Delta G</span></h2><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="python"><div class="CodeMirror cm-s-inner CodeMirror-wrap" lang="python"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-variable">binned_dG</span>, <span class="cm-variable">binned_CDF</span>, <span class="cm-variable">Gbins</span> = <span class="cm-variable">pd</span>.<span class="cm-property">bin_data</span>(<span class="cm-variable">increasing_pulses</span>, <span class="cm-variable">Gmin</span>, <span class="cm-variable">Gmax</span>, <span class="cm-variable">nbins</span>=<span class="cm-variable">nbins</span>, <span class="cm-variable">fig_prefix</span>=<span class="cm-string">"increasing"</span>, <span class="cm-variable">extrapolate</span>=<span class="cm-variable">extrapolate</span>)</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><p><span>Returns binned data: bins is the G value of each bin</span></p><p><span>binned_dG : the sorted dG values in each bin (list of numpy arrays)</span></p><p><span>binned_CDF: the CDF at each dG value in binned_dG (list of numpy arrays)</span></p><h2 id='setfile'><span>Set_file </span></h2><p><span>rmp: NO.period</span></p><p><span>row: NO.pulse</span></p><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片19.1voswxs6e7z4.jpg" referrerpolicy="no-referrer" alt="图片19"></p><h2 id='tuning-lookuptable'><span>Tuning Lookup_table</span></h2><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="python"><div class="CodeMirror cm-s-inner CodeMirror-wrap" lang="python"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text=""></span></span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-variable">lookup_table</span> = <span class="cm-string">"LISTA_current"</span><span class="cm-comment">#"LISTA_voltage""LISTA_current""TaOx" "ENODe""DIY" </span></span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片20.4vzadwskrsw0.jpg" referrerpolicy="no-referrer" alt="图片20"></p><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片21.1qsqzf6ecs0w.jpg" referrerpolicy="no-referrer" alt="图片21"></p><h2 id='other-parameters'><span>Other Parameters</span></h2><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片22.1h2exctqrao0.jpg" referrerpolicy="no-referrer" alt="图片22"></p><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片23.6zywwgsmrv40.jpg" referrerpolicy="no-referrer" alt="图片23"></p><h1 id='xyce'><span>Xyce</span></h1><blockquote><p><span>A SPICE (Simulation Program with Integrated Circuit Emphasis)-compatible circuit simulator</span></p></blockquote><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="python"><div class="CodeMirror cm-s-inner CodeMirror-wrap" lang="python"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">if</span> <span class="cm-variable">params</span>.<span class="cm-property">xbar_params</span>.<span class="cm-property">weights</span>.<span class="cm-property">minimum</span> <span class="cm-operator">!</span>= <span class="cm-number">0</span> <span class="cm-keyword">or</span> <span class="cm-variable">params</span>.<span class="cm-property">xbar_params</span>.<span class="cm-property">weights</span>.<span class="cm-property">maximum</span> <span class="cm-operator">!</span>= <span class="cm-number">1</span>:</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-keyword">raise</span> <span class="cm-variable">ValueError</span>(<span class="cm-string">"The xbar weights must have a 0-1 range"</span>)</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text=""></span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-variable cm-error">a</span>=<span class="cm-variable">params</span>.<span class="cm-property">xbar_params</span>.<span class="cm-property">weights</span>.<span class="cm-property">minimum</span>=<span class="cm-number">0.8063</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-variable">b</span>= <span class="cm-variable">params</span>.<span class="cm-property">xbar_params</span>.<span class="cm-property">weights</span>.<span class="cm-property">maximum</span>=<span class="cm-number">1</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text=""></span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text=""></span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">if</span> <span class="cm-variable">params</span>.<span class="cm-property">xbar_params</span>.<span class="cm-property">weights</span>.<span class="cm-property">minimum</span> <span class="cm-operator"><</span> <span class="cm-number">0</span> <span class="cm-keyword">or</span> <span class="cm-variable">params</span>.<span class="cm-property">xbar_params</span>.<span class="cm-property">weights</span>.<span class="cm-property">maximum</span> <span class="cm-operator">!</span>= <span class="cm-number">1</span>:</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-keyword">raise</span> <span class="cm-variable">ValueError</span>(<span class="cm-string">"The xbar weights must have a 0-1 range"</span>)</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 234px;"></div><div class="CodeMirror-gutters" style="display: none; height: 234px;"></div></div></div></pre><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片24.a4q5se6bgws.jpg" referrerpolicy="no-referrer" alt="图片24"></p><p><img src="https://cdn.jsdelivr.net/gh/Mi5sssss/blog_image@main/RRAM-Simulation/图片26.9tllxk62h4s.png" referrerpolicy="no-referrer" alt="图片26"></p><h1 id='reference'><span>Reference</span></h1><p><span>•L. Chua, "Memristor-The missing circuit element," in IEEE Transactions on Circuit Theory, vol. 18, no. 5, pp. 507-519, September 1971.</span></p><p><span>•Memristor. Wikipedia. </span><a href='https://en.wikipedia.org/wiki/Memristor' target='_blank' class='url'>https://en.wikipedia.org/wiki/Memristor</a></p><p><span>•Strukov, D., Snider, G., Stewart, D. et al. The missing memristor found. Nature 453, 80–83 (2008). </span><a href='https://doi.org/10.1038/nature06932' target='_blank' class='url'>https://doi.org/10.1038/nature06932</a></p><p><span>•S. N. Truong, K. Van Pham, W. Yang and K. Min, "Memristor circuits and systems for future computing and bio-inspired information processing," 2016 IEEE Biomedical Circuits and Systems Conference (BioCAS), Shanghai, 2016, pp. 456-459.</span></p></div></div>
</body>
</html>