Skip to content

Commit 38a6b13

Browse files
committed
Analysis and cleanup
1 parent 8eefa3c commit 38a6b13

File tree

5 files changed

+45
-20
lines changed

5 files changed

+45
-20
lines changed
File renamed without changes.

analysis/figs/progread-cdf.pdf

18.2 KB
Binary file not shown.

analysis/figs/progread-g-cdf.pdf

17.6 KB
Binary file not shown.

analysis/readdist.py

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Import libraries
2+
import matplotlib.pyplot as plt, numpy as np, pandas as pd
3+
4+
# Chip number
5+
CHIP = 10
6+
7+
# Load bitstream
8+
bs = np.loadtxt(open("../bitstream/vectors_bitstream.txt"), dtype=np.int32)
9+
10+
# Load target output as dataframe
11+
cols = ['addr', 'R']
12+
dtypes = {
13+
'addr': np.int32,
14+
'R': np.float64
15+
}
16+
data = pd.read_csv(f'../log/chip{CHIP}/read.tsv', names=cols, sep='\t', dtype=dtypes, index_col='addr')
17+
data['bin'] = bs[:len(data)]
18+
19+
# CDF curves
20+
plt.figure(figsize=(4,3))
21+
plt.xlim(5, 1e3)
22+
plt.xscale('log')
23+
plt.title('Post-Prog. READ Resistance Dist.')
24+
for i in range(2):
25+
rdata = data[data['bin'] == i]
26+
counts, bin_edges = np.histogram(rdata['R']/1000, bins=65536, density=True)
27+
cdf = np.cumsum(counts)
28+
plt.plot(bin_edges[1:], cdf/cdf[-1]*100)
29+
plt.xlabel('Resistance (kOhm)')
30+
plt.ylabel('CDF (%)')
31+
plt.tight_layout()
32+
plt.savefig('figs/progread-cdf.pdf')
33+
34+
plt.figure(figsize=(4,3))
35+
plt.xlim(0, 150)
36+
plt.title('Post-Prog. READ Conductance Dist.')
37+
for i in range(2):
38+
rdata = data[data['bin'] == i]
39+
counts, bin_edges = np.histogram(1e6/rdata['R'], bins=65536, density=True)
40+
cdf = np.cumsum(counts)
41+
plt.plot(bin_edges[1:], cdf/cdf[-1]*100)
42+
plt.xlabel('Conductance (uS)')
43+
plt.ylabel('CDF (%)')
44+
plt.tight_layout()
45+
plt.savefig('figs/progread-g-cdf.pdf')

gpib.py

-20
This file was deleted.

0 commit comments

Comments
 (0)