Created
November 22, 2013 16:06
-
-
Save stevedoyle/7602330 to your computer and use it in GitHub Desktop.
Simple utility script to generate a table of PCIe bandwidth for various link width configurations and for raw and 75% efficiency
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
def divider(): | |
print '-'*40 | |
def width_str(width): | |
return "x%d" % (width) | |
gens = [1,2,3] | |
link_widths = [1,2,4,8,16,24,32] | |
for gen in gens: | |
divider() | |
for width in link_widths: | |
raw = (2**gen)*width | |
print "Gen %d, %3s: raw: %3d Gbps; 75%s: %3d Gbps" % (gen, width_str(width), raw, '%', raw*0.75) | |
divider() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment