This project is a tool to help find the read/hod/write margins of SRAM bitcell and draw the corresponding butterfly diagrams.
There are two examples, app_01.ipynb
and app_02.ipynb
.
And you can run the command python main.py
.
The pictures below are the generated butterfly diagrams of hold
, read
and write
.
- The hold-marin butterfly diagram
- The read-marin butterfly diagram
- The write-marin butterfly diagram
Taking the SRAM supply voltage of 1.2V as an example, two curves are generated by simulation.
By scanning the offset of the y-axis, a series of y=x+offset_y
lines are generated, and then the two intersection points of the line and the two curves are calculated. These two intersection points generally correspond to the two diagonal coordinates of the square. The final margin value is obtained by comparing the size of this series of squares.
The data is generated by Cadence Virtuoso
and Spectre
Simulator.
The tool Parameter Analysis
in Spectre is very useful. And the data can be directly exported in the visualization window.