#!/usr/bin/python3 # vim: fileencoding=utf-8: ts=4: sw=4: expandtab: #┌────────────────────────────────────────────────────────────────────────────┒ #│ Transfer rate ESP-PSRAM64H (QPI Read Operations) ┃ #┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ from matplotlib import pyplot as plt CLOCK = 84 # in MHz MAX = 256 # in bytes x,y = [],[] for i in range(4,MAX+1,4): x.append(i//4) # x axis in WORDS z = 14 + 2*i # 14 cycles addr. setup plus two cycles per byte y.append(84/z*i) # read speed in MB/s #─────[ Tests ]───── cyc = 14 + 2*4 # for 1WORD (4BYTE) print(f'{84 / cyc * 4:.3f} MB/s') # 84MHz / cycles * numbytes cyc = 14 + 2*256 # for 64WORD (256BYTE) print(f'{84 / cyc * 256:.3f} MB/s') # 84MHz / cycles * numbytes #─────[ Plot ]───── plt.title('sequential forward reads (WORD size)') plt.xlabel('WORDS (32bit)') plt.ylabel('MB/s') plt.xticks([n for n in range(0,MAX+1,4)]) plt.yticks([n for n in range(0,42+1,2)]) plt.tight_layout() plt.grid() plt.plot(x,y) plt.show()