欢迎光临散文网 会员登陆 & 注册

摩尔定律

2022-12-01 17:34 作者:卢朓  | 我要投稿

【摩尔定律】 https://www.bilibili.com/video/BV1fP4y1X7Li/?share_source=copy_web&;vd_source=2adc5aa7a702b808eb8b31dbd210f954

所用的北太天元数值计算通用软件上的脚本如下:

% Moore定律声明: CPU上的晶体管的数量大约每两年翻一番。

% 用数学公式表达是

%  n_i = n_0 2 ^{(y_i - y_0)/dt} 

% 其中 n_i 表示第i年的CPU上的晶体管的数目, y_i 表示第i年

% dt = 2 是晶体管数量翻番需要的时间。

% 从摩尔定律提出以来以及各国过去了很多年,晶体管的数目非常大,

% 可以对摩尔定律取对数,得到摩尔定律的一个等价的表述 

% log_{10} (n_i) = log_{10} n_0 + \frac{ y_i - y_0}{dt} log_10 2. 

% 数据 年份列表 

year = [1972, 1974, 1978, 1982, 1985, 1989, 1993, 1997, 1999, 2000, 2003, ...

        2004, 2007, 2008, 2012];

% CPU的晶体管的数目 

ntrans = [0.0025, 0.005, 0.029, 0.12, 0.275, 1.18, 3.1, 7.5, 24.0, 42.0, ...

          220.0, 592.0, 1720.0, 2046.0, 3100.0] * 1e6; 

% 数据来源: https://scipython.com/book/chapter-3-simple-plotting-with-pylab/examples/moores-law/

y0 = year(1); n0 = ntrans(1); 

% 晶体管数量翻番需要的时间  

dt = 2

moore = log10(n0) + (year - y0) / dt * log10(2)

plot (year, moore,'--o', 'LineWidth', 3, year, log10(ntrans), 'r*', 'LineWidth', 3)

xlabel('年')

ylabel('log10(晶体管的数量)')

legend('摩尔定律预测晶体管数量', '真实数据', 'Location','SouthEast')

for i=1:length(year)

text( year(i), log10(ntrans(i))+0.2, num2str(ntrans(i)),'FontSize', 16 ) ;

end

title("摩尔定律: CPU上的晶体管的数量每两年大约翻一番")

hold off


摩尔定律的评论 (共 条)

分享到微博请遵守国家法律