{"id":2288,"date":"2022-12-11T20:18:38","date_gmt":"2022-12-11T19:18:38","guid":{"rendered":"https:\/\/ff.mhrooz.xyz\/?p=2288"},"modified":"2023-02-08T16:04:48","modified_gmt":"2023-02-08T15:04:48","slug":"system_on_chip_zhi_shi_dian","status":"publish","type":"post","link":"https:\/\/blog.mhrooz.xyz\/index.php\/2022\/12\/11\/system_on_chip_zhi_shi_dian\/","title":{"rendered":"System on Chip \u77e5\u8bc6\u70b9"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"1-intro\">1. Intro<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>The success of <em>CMOS*<\/em> as the most widely used <em>semiconductor*<\/em> technology is the result of continuously shrinking the key feature size parameters (channel length <code>L_min<\/code>, transistor width <code>w<\/code>, and oxide thickness <code>t_ox<\/code>) of the MOSFET transistors.<\/p>\n<cite>\u4f5c\u4e3a\u6700\u5e7f\u6cdb\u4f7f\u7528\u7684\u534a\u5bfc\u4f53\u6280\u672f\uff0cCMOS\u7684\u6210\u529f\u662f\u4e0d\u65ad\u7f29\u5c0fMOSFET\u6676\u4f53\u7ba1\u7684\u5173\u952e\u7279\u5f81\u5c3a\u5bf8\u53c2\u6570\uff08\u6c9f\u9053\u957f\u5ea6L_min\u3001\u6676\u4f53\u7ba1\u5bbd\u5ea6w\u548c\u6c27\u5316\u7269\u539a\u5ea6t_ox\uff09\u7684\u7ed3\u679c\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Moore&#8217;s Law: The number of transistors per chip will continue to <strong>double<\/strong> every 18 \u2013 24 months (<strong>two years<\/strong>). Note doubling the number of transistors per area implies a shrinking of both <code>L_min<\/code> and the transistor width <code>w<\/code> by <img decoding=\"async\" src=\"https:\/\/wikimedia.org\/api\/rest_v1\/media\/math\/render\/svg\/b4afc1e27d418021bf10898eb44a7f5f315735ff\" alt=\"{\\sqrt {2}}\">&nbsp;.<\/p>\n<cite>\u6469\u5c14\u5b9a\u5f8b\uff1a\u6bcf\u4e2a\u82af\u7247\u4e0a\u7684\u6676\u4f53\u7ba1\u6570\u91cf\u6bcf18-24\u4e2a\u6708\u5c06\u7ffb\u4e00\u756a\u3002\u6ce8\u610f\uff0c\u5355\u4f4d\u9762\u79ef\u6676\u4f53\u7ba1\u6570\u91cf\u7ffb\u500d\u610f\u5473\u7740\u6c9f\u9053\u957f\u5ea6L_min\u548c\u6676\u4f53\u7ba1\u5bbd\u5ea6w\u90fd\u8981\u7f29\u5c0f<img decoding=\"async\" src=\"https:\/\/wikimedia.org\/api\/rest_v1\/media\/math\/render\/svg\/b4afc1e27d418021bf10898eb44a7f5f315735ff\" alt=\"{\\sqrt {2}}\">\u500d\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>CMOS power dissipation density, i.e. power per area, is proportional to the number of transistor devices per area, the switched gate-substrate capacity per device, the device operation frequency, and the square of the supply voltage<img decoding=\"async\" loading=\"lazy\" width=\"406\" height=\"84\" class=\"wp-image-2289\" style=\"width: 183px;\" src=\"http:\/\/iizz.ddns.net:9595\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-11-20.05.31.png\" alt=\"\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-11-20.05.31.png 406w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-11-20.05.31-300x62.png 300w\" sizes=\"(max-width: 406px) 100vw, 406px\" \/>.<\/p>\n<cite>CMOS\u7684\u529f\u7387\u8017\u6563\u5bc6\u5ea6\uff0c\u5373\u5355\u4f4d\u9762\u79ef\u7684\u529f\u7387\uff0c\u4e0e\u5355\u4f4d\u9762\u79ef\u7684\u6676\u4f53\u7ba1\u5668\u4ef6\u6570\u91cf\u3001\u6bcf\u4e2a\u5668\u4ef6\u7684\u5f00\u5173\u95e8\u57fa\u677f\u5bb9\u91cf\u3001\u5668\u4ef6\u5de5\u4f5c\u9891\u7387\u548c\u7535\u6e90\u7535\u538b\u7684\u5e73\u65b9\u6210\u6b63\u6bd4\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Reducing L_min, w, and t_ox of transistors in the next CMOS generation by a factor of <img decoding=\"async\" src=\"https:\/\/wikimedia.org\/api\/rest_v1\/media\/math\/render\/svg\/b4afc1e27d418021bf10898eb44a7f5f315735ff\" alt=\"{\\sqrt {2}}\"> lowers the gate-substrate capacity C by <img decoding=\"async\" src=\"https:\/\/wikimedia.org\/api\/rest_v1\/media\/math\/render\/svg\/b4afc1e27d418021bf10898eb44a7f5f315735ff\" alt=\"{\\sqrt {2}}\"> too. Thus, implementing the same circuitry (N, f = const.) lowers power dissipation by roughly 30% when the supply voltage remains constant. However, as the number of devices per area increases by a factor of 2, the chip power dissipation density should increase by a factor of <img decoding=\"async\" src=\"https:\/\/wikimedia.org\/api\/rest_v1\/media\/math\/render\/svg\/b4afc1e27d418021bf10898eb44a7f5f315735ff\" alt=\"{\\sqrt {2}}\">, or 40% per CMOS generation.<\/p>\n<cite>\u5c06\u4e0b\u4e00\u4ee3CMOS\u6280\u672f\u4e2d\u6676\u4f53\u7ba1\u7684L_min\u3001w\u548ct_ox\u964d\u4f4e<img decoding=\"async\" src=\"https:\/\/wikimedia.org\/api\/rest_v1\/media\/math\/render\/svg\/b4afc1e27d418021bf10898eb44a7f5f315735ff\" alt=\"{\\sqrt {2}}\">\u500d\uff0c\u53ef\u4f7f\u6805\u6781\u886c\u5e95\u7684\u5bb9\u91cfC\u4e5f\u964d\u4f4e<img decoding=\"async\" src=\"https:\/\/wikimedia.org\/api\/rest_v1\/media\/math\/render\/svg\/b4afc1e27d418021bf10898eb44a7f5f315735ff\" alt=\"{\\sqrt {2}}\">\u500d\u3002\u56e0\u6b64\uff0c\u5728\u7535\u6e90\u7535\u538b\u4fdd\u6301\u4e0d\u53d8\u7684\u60c5\u51b5\u4e0b\uff0c\u5b9e\u73b0\u76f8\u540c\u7684\u7535\u8def\uff08N, f=const.\uff09\u53ef\u4ee5\u5c06\u529f\u7387\u8017\u6563\u964d\u4f4e\u5927\u7ea630%\u3002\u7136\u800c\uff0c\u5355\u4f4d\u9762\u79ef\u7684\u5668\u4ef6\u6570\u91cf\u4f1a\u589e\u52a02\u500d\uff0c\u6240\u4ee5\u82af\u7247\u7684\u529f\u7387\u8017\u6563\u5bc6\u5ea6\u589e\u52a0<img decoding=\"async\" src=\"https:\/\/wikimedia.org\/api\/rest_v1\/media\/math\/render\/svg\/b4afc1e27d418021bf10898eb44a7f5f315735ff\" alt=\"{\\sqrt {2}}\">\u500d\uff0c\u5373\u6bcf\u4e00\u4ee3CMOS\u529f\u7387\u8017\u6563\u5bc6\u5ea6\u90fd\u4f1a\u589e\u52a040%\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>There are various reasons why CMOS has become dominant. First, the growth of silicon oxide (SiO2) on the silicon surface is controllable. The fabrication of MOS transistors is highly integratable and easy to design. A second benefit of CMOS circuits results from their electrical behavior. Due to the use of complementary transistors, they offer low power dissipation, high noise immunity, and easy cascadibility of logic gates.<\/p>\n<cite>CMOS\u6210\u4e3a\u4e3b\u6d41\u7684\u539f\u56e0\u6709\u5f88\u591a\u3002 \u9996\u5148\uff0c\u7845\u8868\u9762\u4e0a\u7684\u6c27\u5316\u7845\uff08SiO2\uff09\u7684\u751f\u957f\u662f\u53ef\u63a7\u7684\u3002MOS\u6676\u4f53\u7ba1\u7684\u5236\u9020\u5177\u6709\u9ad8\u5ea6\u7684\u53ef\u96c6\u6210\u6027\uff0c\u5e76\u4e14\u6613\u4e8e\u8bbe\u8ba1\u3002 CMOS\u7535\u8def\u7684\u7b2c\u4e8c\u4e2a\u597d\u5904\u6765\u81ea\u5176\u7535\u5b50\u884c\u4e3a\u3002 \u7531\u4e8e\u4f7f\u7528\u4e92\u8865\u6676\u4f53\u7ba1\uff0c\u5b83\u4eec\u5177\u6709<strong>\u4f4e\u529f\u7387\u8017\u6563\u3001\u9ad8\u6297\u566a\u6027\u548c\u903b\u8f91\u95e8\u6613\u4e8e\u7ea7\u8054<\/strong>\u7684\u7279\u70b9\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>The source is defined as the source of carriers, so the source of nMOS is on lower potential; the source of pMOS is on higher potential. The gate-source voltage <code>V_gs<\/code> of nMOS needs to be positive to generate a conductive channel, whereas <code>V_gs<\/code> needs to be negative for pMOS.<\/p>\n<cite>\u6e90\u6781\u88ab\u5b9a\u4e49\u4e3a\u8f7d\u6d41\u5b50\u7684\u6765\u6e90\uff0c\u56e0\u6b64nMOS\u7684\u6e90\u6781\u5728\u8f83\u4f4e\u7684\u7535\u4f4d\u4e0a\uff1bpMOS\u7684\u6e90\u6781\u5728\u8f83\u9ad8\u7684\u7535\u4f4d\u4e0a\u3002 nMOS\u7684\u7535\u538bV<sub>gs<\/sub>\u9700\u8981\u4e3a\u6b63\uff0c\u4ee5\u4ea7\u751f\u5bfc\u7535\u901a\u9053\uff0c\u800c\u5bf9\u4e8epMOS\uff0cV<sub>gs<\/sub>\u9700\u8981\u4e3a\u8d1f\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>The propagation delay time of CMOS circuits is <img decoding=\"async\" loading=\"lazy\" width=\"648\" height=\"126\" class=\"wp-image-2312\" style=\"width: 320px;\" src=\"http:\/\/iizz.ddns.net:9595\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-12-00.40.06.jpeg\" alt=\"\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-12-00.40.06.jpeg 648w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-12-00.40.06-300x58.jpeg 300w\" sizes=\"(max-width: 648px) 100vw, 648px\" \/>. In order to obtain higher speed circuits, capacitive load <code>C<sub>load<\/sub><\/code>, oxide thickness <code>t<sub>ox<\/sub><\/code>, channel length <code>L<sub>p<\/sub><\/code>, and absolute threshold voltages <code>|V<sub>tp<\/sub>|<\/code> have to be decreased, whereas carrier mobility <code>\u03bc<sub>p<\/sub><\/code>, channel width <code>W<sub>p<\/sub><\/code>, relative oxide dielectric <code><em>\u03b5<\/em><sub>ox<\/sub><\/code>, and supply voltage <code>V<sub>dd<\/sub><\/code> have to be increased. This is valid for minimizing the delay time of a circuit only. If we want to optimize area and power consumption at the same time, there are conflicts.<\/p>\n<cite>\u4e3a\u4e86\u83b7\u5f97\u66f4\u9ad8\u901f\u7684\u7535\u8def\uff0c\u5fc5\u987b\u51cf\u5c11\u5bb9\u6027\u8d1f\u8f7d\u3001\u6c27\u5316\u5c42\u539a\u5ea6\u3001\u6c9f\u9053\u957f\u5ea6\u548c\u7edd\u5bf9\u9608\u503c\u7535\u538b\uff0c\u6216\u589e\u52a0\u8f7d\u6d41\u5b50\u8fc1\u79fb\u7387\u3001\u6c9f\u9053\u5bbd\u5ea6\u3001\u76f8\u5bf9\u6c27\u5316\u4ecb\u8d28\u548c\u7535\u6e90\u7535\u538b\u3002\u8fd9\u4e9b\u63aa\u65bd\u53ea\u5bf9\u51cf\u5c11\u7535\u8def\u7684\u5ef6\u8fdf\u65f6\u95f4\u6709\u6548\u3002\u5982\u679c\u6211\u4eec\u60f3\u540c\u65f6\u4f18\u5316\u9762\u79ef\u548c\u529f\u8017\uff0c\u5c31\u4f1a\u6709\u51b2\u7a81\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5728\u7814\u7a76\u4f4e\u529f\u8017\u4e4b\u524d\uff0c\u6211\u4eec\u5fc5\u987b\u4e86\u89e3CMOS\u529f\u8017\u7684\u6765\u6e90\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p><em>Dynamic power*<\/em> is mainly related to the functionality of the circuit, it is signal-edge-dependent. It consists of a capacitive part and a short-circuit part. Static power is related to parasitic effects, like sub-threshold current, leakage current, and gate tunneling current. It is signal-level-dependent.<\/p>\n<cite>\u52a8\u6001\u529f\u7387\u4e3b\u8981\u4e0e\u7535\u8def\u7684\u529f\u80fd\u6709\u5173\uff0c\u5b83\u662f\u7535\u5e73\u8fb9\u7f18\u76f8\u5173\u7684\uff0c\u5305\u62ec\u4e00\u4e2a\u7535\u5bb9\u90e8\u5206\u548c\u4e00\u4e2a\u77ed\u8def\u90e8\u5206\u3002 \u9759\u6001\u529f\u7387\u4e0e\u5bc4\u751f\u6548\u5e94\u6709\u5173\uff0c\u5982\u4e9a\u9608\u503c\u7535\u6d41\u3001\u6cc4\u6f0f\u7535\u6d41\u3001\u95e8\u96a7\u9053\u7535\u6d41\uff0c\u5b83\u662f\u4fe1\u53f7\u7535\u5e73\u76f8\u5173\u7684\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Dynamic Capacitive Power: With the switching activity of <code>\u03b1_01<\/code>, the capacitive power dissipation of CMOS is <img decoding=\"async\" loading=\"lazy\" width=\"189\" height=\"32\" class=\"wp-image-2318\" style=\"width: 140px;\" src=\"http:\/\/iizz.ddns.net:9595\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-12-09.10.46.png\" alt=\"\">.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Dynamic Short Circuit Power: Under the following assumption, the short circuit time is <img decoding=\"async\" loading=\"lazy\" width=\"366\" height=\"46\" class=\"wp-image-2317\" style=\"width: 270px;\" src=\"http:\/\/iizz.ddns.net:9595\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-12-09.11.18.png\" alt=\"\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-12-09.11.18.png 366w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-12-09.11.18-300x38.png 300w\" sizes=\"(max-width: 366px) 100vw, 366px\" \/>.<\/p>\n<\/blockquote>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"700\" height=\"141\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-12-09.11.36.png\" alt=\"\" class=\"wp-image-2316\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-12-09.11.36.png 700w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-12-09.11.36-300x60.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Static Sub-threshold Currents: An ideal MOS transistor should be completely switched off as long as the gate-source voltage is below the threshold voltage level. But in a real transistor, there will be sub-threshold currents.<\/p>\n<cite>\u4e9a\u9608\u503c\u7535\u6d41\uff1a\u4e00\u4e2a\u7406\u60f3\u7684MOS\u6676\u4f53\u7ba1\u662f\uff0c\u53ea\u8981\u6805\u6781-\u6e90\u6781\u7535\u538b\u4f4e\u4e8e\u9608\u503c\u7535\u538b\u6c34\u5e73\uff0c\u6676\u4f53\u7ba1\u5c31\u5e94\u5b8c\u5168\u5173\u95ed\u3002\u4f46\u73b0\u5b9e\u4e2d\uff0c\u4f1a\u6709\u4e9a\u9608\u503c\u7535\u6d41\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Static Diode Leakage \/ Gate Current: The gate oxide of a MOS transistor is not a perfect isolator. There is some marginal resistance, some ionic conduction related to trapped ions inside the oxide, and some tunneling through the oxide. <\/p>\n<cite>MOS\u6676\u4f53\u7ba1\u7684\u6805\u6781\u6c27\u5316\u7269\u4e0d\u662f\u5b8c\u7f8e\u7684\u9694\u79bb\u7269\uff0c\u6709\u4e00\u4e9b\u8fb9\u9645\u7535\u963b\uff0c\u4e00\u4e9b\u4e0e\u6c27\u5316\u7269\u5185\u7684\u88ab\u56f0\u79bb\u5b50\u6709\u5173\u7684\u79bb\u5b50\u4f20\u5bfc\uff0c\u4ee5\u53ca\u4e00\u4e9b\u901a\u8fc7\u6c27\u5316\u7269\u7684\u96a7\u9053\u3002<\/cite><\/blockquote>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"593\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-09.51.51-1024x593.png\" alt=\"\" class=\"wp-image-2554\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-09.51.51-1024x593.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-09.51.51-300x174.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-09.51.51-768x445.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-09.51.51.png 1468w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">If everything is done right, there will never be a conducting path between V<sub>dd<\/sub> and GND.<\/figcaption><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"546\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.00.33-1024x546.png\" alt=\"\" class=\"wp-image-2556\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.00.33-1024x546.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.00.33-300x160.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.00.33-768x409.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.00.33.png 1445w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">All logic functions can be expressed using NAND and NOR<\/figcaption><\/figure><\/div>\n\n\n<ul>\n<li>semiconductor<\/li>\n<\/ul>\n\n\n\n<p>Semiconductors are materials that have an electrical conductivity that is <strong>intermediate<\/strong> between that of a conductor and an insulator. They are generally made from elements such as silicon or germanium, and their <strong>conductivity<\/strong> can be <strong>controlled<\/strong> by adding impurities (doping) to the material.<\/p>\n\n\n\n<ul>\n<li>CMOS<\/li>\n<\/ul>\n\n\n\n<p>CMOS, or Complementary Metal-Oxide-Semiconductor, is a type of <strong>technology<\/strong> used to create semiconductor devices, such as transistors. By applying a voltage to the gate of the transistor, it is possible to control the flow of current between source and drain, which allows the transistor to function as an amplifier, switch, etc.<\/p>\n\n\n\n<ul>\n<li>Dynamic power dissipation<\/li>\n<\/ul>\n\n\n\n<p>Dynamic power dissipation is the power consumed by a CMOS circuit when it is actively switching, or changing states. This power is associated with the <strong>movement of charges<\/strong> within the circuit and is proportional to the switching frequency of the circuit.<\/p>\n\n\n\n<p>In a CMOS (complementary metal-oxide-semiconductor) circuit, dynamic capacitive power dissipation is caused by the charging and discharging of the parasitic capacitances present within the circuit. It is proportional to the switching frequency of the circuit and the total capacitance of the circuit. As a result, it can be a significant contributor to the overall power consumption of a high-speed CMOS circuit.<\/p>\n\n\n\n<ul>\n<li>Static power dissipation<\/li>\n<\/ul>\n\n\n\n<p>Static power dissipation is the power consumed by a CMOS circuit when it is not actively switching, or when it is in a static state. This power is associated with the <strong>leakage of current through the transistors<\/strong> in the circuit and is independent of the switching frequency.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">2. SoC Logic Design Recap<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>As a consequence of DeMorgan&#8217;s rule, all logic functions can be expressed by combinations of either NAND or NOR gates. Furthermore, Boolean equations can be easily converted to static CMOS circuits.<\/p>\n<cite>\u4f5c\u4e3aDeMorgan\u89c4\u5219\u7684\u7ed3\u679c\uff0c\u6240\u6709\u7684\u903b\u8f91\u529f\u80fd\u90fd\u53ef\u4ee5\u7531NAND\u6216NOR\u95e8\u7684\u7ec4\u5408\u6765\u8868\u8fbe\u3002\u6b64\u5916\uff0c\u5e03\u5c14\u65b9\u7a0b\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u8f6c\u6362\u4e3a\u9759\u6001CMOS\u7535\u8def\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>In general, a generic model can be used to convert Boolean equations into static CMOS circuits. Each AND function generates serially connected nMOS transistors on a path from the output to GND, complemented by parallel connected pMOS transistors on a path from the output to VDD. Each OR function generates parallel nMOS, complemented by serial pMOS transistors, respectively. Finally, the output is always inverted, due to the switching properties of MOS transistors.<\/p>\n<cite>\u4e00\u822c\u6765\u8bf4\uff0c\u53ef\u4ee5\u7528\u4e00\u4e2a\u901a\u7528\u6a21\u578b\u5c06\u5e03\u5c14\u65b9\u7a0b\u8f6c\u6362\u6210\u9759\u6001CMOS\u7535\u8def\u3002 \u6bcf\u4e2aAND\u51fd\u6570\u5728\u4ece\u8f93\u51fa\u5230GND\u7684\u8def\u5f84\u4e0a\u4ea7\u751f\u4e32\u884c\u8fde\u63a5\u7684nMOS\u6676\u4f53\u7ba1\uff0c\u5e76\u5728\u4ece\u8f93\u51fa\u5230VDD\u7684\u8def\u5f84\u4e0a\u4ea7\u751f\u5e73\u884c\u8fde\u63a5\u7684pMOS\u6676\u4f53\u7ba1\u4f5c\u4e3a\u8865\u5145\u3002 \u6bcf\u4e2aOR\u51fd\u6570\u5206\u522b\u4ea7\u751f\u5e76\u8054\u7684nMOS\uff0c\u8f85\u4ee5\u4e32\u884c\u7684pMOS\u6676\u4f53\u7ba1\u3002\u6700\u540e\uff0c\u7531\u4e8eMOS\u6676\u4f53\u7ba1\u7684\u5f00\u5173\u7279\u6027\uff0c\u8f93\u51fa\u603b\u662f\u5012\u7f6e\u7684\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u7531\u4e8e\u5b58\u50a8\u5143\u7d20\uff0c\u5982\u5bc4\u5b58\u5668\uff0c\u4e5f\u662f\u903b\u8f91\u7535\u8def\u7684\u91cd\u8981\u6784\u4ef6\uff0c\u6211\u4eec\u73b0\u5728\u5bf9\u5bc4\u5b58\u5668\u5185\u90e8\u8fdb\u884c\u66f4\u8be6\u7ec6\u7684\u7814\u7a76\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>The basic CMOS storage element consists of a loop of two inverters. Connected together, they form a stable circuit, which can stick to either \u201c1\u201d or \u201c0\u201d at the corresponding nodes. The circuit has just outputs, but no inputs, in order to set a specific logic value, we need to open the loop. This can be done by substituting the inverters with NAND gates. A control input x is used to determine the functionality of the NAND gate: For x = 1, the NAND gate operates like an inverter. For x = 0, the output of the NAND gate switches to \u201c1\u201d, thus setting \u201c1\u201d into the loop.<\/p>\n<cite>\u57fa\u672c\u7684CMOS\u5b58\u50a8\u5143\u4ef6\u662f\u7531\u4e24\u4e2a\u53cd\u76f8\u5668\u7ec4\u6210\u7684\u56de\u8def\u3002 \u5b83\u4eec\u8fde\u63a5\u5728\u4e00\u8d77\uff0c\u5f62\u6210\u4e00\u4e2a\u7a33\u5b9a\u7684\u7535\u8def\uff0c\u5728\u76f8\u5e94\u7684\u8282\u70b9\u4e0a\u53ef\u4ee5\u4fdd\u6301 &#8220;1&#8221; \u6216 &#8220;0&#8221;\u3002\u4f46\u662f\u8be5\u7535\u8def\u53ea\u6709\u8f93\u51fa\uff0c\u6ca1\u6709\u8f93\u5165\uff0c\u4e3a\u4e86\u8bbe\u7f6e\u4e00\u4e2a\u7279\u5b9a\u7684\u903b\u8f91\u503c\uff0c\u6211\u4eec\u9700\u8981\u6253\u5f00\u56de\u8def\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u7528NAND\u95e8\u4ee3\u66ff\u53cd\u76f8\u5668\u6765\u5b9e\u73b0\u3002\u63a7\u5236\u4fe1\u53f7x\u51b3\u5b9aNAND\u95e8\u7684\u529f\u80fd\u3002\u5f53x=1\u65f6\uff0cNAND\u95e8\u5c31\u50cf\u4e00\u4e2a\u53cd\u76f8\u5668\u3002\u5bf9\u4e8ex = 0\uff0cNAND\u95e8\u7684\u8f93\u51fa\u662f &#8220;1&#8221;\uff0c\u4ece\u800c\u5c06 &#8220;1 &#8220;\u8f93\u5165\u5230\u5faa\u73af\u4e2d\u3002<\/cite><\/blockquote>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.09.50.png\" alt=\"\" class=\"wp-image-2558\" width=\"354\" height=\"291\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.09.50.png 656w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.09.50-300x247.png 300w\" sizes=\"(max-width: 354px) 100vw, 354px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"513\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.15.15-1024x513.png\" alt=\"\" class=\"wp-image-2559\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.15.15-1024x513.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.15.15-300x150.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.15.15-768x385.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.15.15.png 1462w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"485\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.17.56-1024x485.png\" alt=\"\" class=\"wp-image-2560\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.17.56-1024x485.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.17.56-300x142.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.17.56-768x364.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.17.56.png 1508w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<blockquote class=\"wp-block-quote\">\n<p>In contrast to the level-controlled latch, a flip-flop is clock edge-controlled. A flip-flop consists of two serially connected latches, a Master and a Slave. <br>A clock signal is used to control the enable inputs of both latches. <\/p>\n\n\n\n<p>When the clock signal is \u201c0\u201d, e = 1 for the <strong>first<\/strong> latch, the value of input D is set into the Master latch. At the same time, the Slave latch is locked to the previous value of Q. <br>When the clock signal switches to \u201c1\u201d, e = 1 for the <strong>second<\/strong> latch, the Slave latch is set to the current value of the Master latch. Any further change at the input D does not affect the Slave latch, as the Master latch is locked in this state.<\/p>\n\n\n\n<p>Overall, the flip-flop is set to the current value of the input D at the positive clock edge, whereas for all other times, the output Q of the flip-flop is locked.<\/p>\n<cite>\u4e0e\u7535\u5e73\u63a7\u5236\u7684Latch\u76f8\u53cd\uff0cFlip-Flop\u662f\u7531\u65f6\u949f\u6cbf\u63a7\u5236\u7684\u3002\u4e00\u4e2aFlip-Flop\u7531\u4e24\u4e2a\u4e32\u884c\u8fde\u63a5\u7684Latch\u7ec4\u6210\uff0c\u4e00\u4e2a\u4e3a\u4e3b\uff0c\u4e00\u4e2a\u4e3a\u8f85\u3002 \u4e00\u4e2a\u65f6\u949f\u4fe1\u53f7\u88ab\u7528\u6765\u63a7\u5236\u4e24\u4e2aLatch\u7684\u4f7f\u80fd\u8f93\u5165e\u3002<br>\u5f53\u65f6\u949f\u4fe1\u53f7\u4e3a &#8220;0 &#8220;\u65f6\uff0c\u7b2c\u4e00\u4e2aLatch\u7684e=1\uff0c\u8f93\u5165D\u7684\u503c\u88ab\u8bbe\u7f6e\u5230\u4e3bLatch\u3002 \u540c\u65f6\uff0c\u8f85Latch\u88ab\u9501\u5b9a\uff0c\u5e76\u4fdd\u6301\u4e4b\u524d\u7684Q\u503c\u3002<br>\u5f53\u65f6\u949f\u4fe1\u53f7\u5207\u6362\u5230 &#8220;1 &#8220;\u65f6\uff0c\u7b2c\u4e8c\u4e2a\u9501\u5b58\u5668\u7684e=1\uff0c\u8f85Latch\u88ab\u8bbe\u7f6e\u4e3a\u4e3bLatch\u7684\u5f53\u524d\u503c\u3002 \u5728\u8f93\u5165\u7aefD\u7684\u4efb\u4f55\u8fdb\u4e00\u6b65\u53d8\u5316\u90fd\u4e0d\u4f1a\u5f71\u54cd\u8f85Latch\uff0c\u56e0\u4e3a\u4e3bLatch\u88ab\u9501\u5b9a\u3002<br>\u603b\u7684\u6765\u8bf4\uff0c\u5728\u6b63\u65f6\u949f\u8fb9\u6cbf\uff0cFlip-Flop\u88ab\u8bbe\u7f6e\u4e3a\u8f93\u5165D\u7684\u5f53\u524d\u503c\uff0c\u800c\u5bf9\u4e8e\u6240\u6709\u5176\u4ed6\u65f6\u95f4\uff0c\u89e6\u53d1\u5668\u7684\u8f93\u51faQ\u88ab\u9501\u5b9a\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>For each flip-flop, three characteristic parameters are specified: The setup-time <code>t_setup<\/code>, the hold time <code><code data-enlighter-language=\"generic\" class=\"EnlighterJSRAW\">t_hold<\/code><\/code>, and the clock-to-output delay <code>t_c2q<\/code>. The first two parameters <code>t_setup<\/code> and <code><code data-enlighter-language=\"generic\" class=\"EnlighterJSRAW\">t_hold<\/code><\/code> impose restrictions on the input signal of the flip- flop. The input signal D must be stable* for the setup-time before clock edge and for the hold-time after clock edge. This is required in order to guarantee correct setting of the flip-flop at the clock edge and to avoid metastability. The third parameter, <code>t_c2q<\/code>, specifies the delay after the clock edge until the valid data will be visible at the output.<\/p>\n<cite>\u5bf9\u4e8e\u6bcf\u4e2a\u89e6\u53d1\u5668\uff0c\u90fd\u89c4\u5b9a\u4e86\u4e00\u7ec4\u4e09\u4e2a\u7279\u5f81\u53c2\u6570\u3002\u8bbe\u7f6e\u65f6\u95f4\uff0c\u4fdd\u6301\u65f6\u95f4\uff0c\u4ee5\u53ca\u65f6\u949f\u5230\u8f93\u51fa\u7684\u5ef6\u8fdf\u3002\u524d\u4e24\u4e2a\u53c2\u6570\u5bf9\u89e6\u53d1\u5668\u7684\u8f93\u5165\u4fe1\u53f7\u6709\u9650\u5236\u3002 \u8f93\u5165\u4fe1\u53f7D\u5728\u65f6\u949f\u8fb9\u7f18\u4e4b\u524d\u7684\u8bbe\u7f6e\u65f6\u95f4\u548c\u65f6\u949f\u8fb9\u7f18\u4e4b\u540e\u7684\u4fdd\u6301\u65f6\u95f4\u5185\u5fc5\u987b\u662f\u7a33\u5b9a\u7684\u3002 \u8fd9\u662f\u4e3a\u4e86\u4fdd\u8bc1\u89e6\u53d1\u5668\u5728\u65f6\u949f\u8fb9\u7f18\u7684\u6b63\u786e\u8bbe\u7f6e\uff0c\u5e76\u907f\u514d\u504f\u79fb\u6027\u3002\u7b2c\u4e09\u4e2a\u53c2\u6570\u89c4\u5b9a\u4e86\u65f6\u949f\u8fb9\u7f18\u5230\u6709\u6548\u6570\u636e\u5728\u8f93\u51fa\u7aef\u53ef\u89c1\u7684\u5ef6\u8fdf\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u6709\u9650\u72b6\u6001\u673a\u88ab\u5e7f\u6cdb\u7528\u4e8e\u5404\u79cd\u5f62\u5f0f\u7684\u987a\u5e8f\u63a7\u5236\u5668\u548c\u53cd\u5e94\u5f0f\u7cfb\u7edf\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Finite State Machines (FSMs) consist of a register bank, input logic, output logic, and a feedback loop. The input logic <code>f(x,u)<\/code> combines primary inputs x with current-state vector <code>u = [D_1 to D_n] <\/code>to generate the next-state vector <code>v = [Q_1 to Q_n]<\/code>. The output logic <code>g(x,u) <\/code>or <code>g(u)<\/code> generate the output vector y. The clock signal switches the register bank from the current state to the next state.<\/p>\n<cite>\u6709\u9650\u72b6\u6001\u673a\uff08FSM\uff09\u7531\u4e00\u4e2a\u5bc4\u5b58\u5668\u7ec4\u3001\u8f93\u5165\u903b\u8f91\u3001\u8f93\u51fa\u903b\u8f91\u548c\u53cd\u9988\u56de\u8def\u7ec4\u6210\u3002\u8f93\u5165\u903b\u8f91f(x,u)\u5c06\u4e3b\u8f93\u5165x\u4e0e\u5f53\u524d\u72b6\u6001\u5411\u91cfu\u76f8\u7ed3\u5408\uff0c\u751f\u6210\u4e0b\u4e00\u72b6\u6001\u5411\u91cfv\u3002\u8f93\u51fa\u903b\u8f91g(x,u)\u6216g(u)\u4ea7\u751f\u8f93\u51fa\u5411\u91cfy\u3002\u65f6\u949f\u4fe1\u53f7\u5c06\u5bc4\u5b58\u5668\u7ec4\u4ece\u5f53\u524d\u72b6\u6001\u5207\u6362\u5230\u4e0b\u4e00\u4e2a\u72b6\u6001\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Communicating FSMs are sequences of combinatorial logic and registers. The maximum clock frequency is limited by the propagation time through the combinatorial logic, the setup time, and the clock-to-output delay of the registers: <img decoding=\"async\" loading=\"lazy\" width=\"770\" height=\"104\" class=\"wp-image-2358\" style=\"width: 250px;\" src=\"http:\/\/iizz.ddns.net:9595\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-12-15.43.56.png\" alt=\"\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-12-15.43.56.png 770w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-12-15.43.56-300x41.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/\u622a\u5c4f2022-12-12-15.43.56-768x104.png 768w\" sizes=\"(max-width: 770px) 100vw, 770px\" \/>.<\/p>\n<cite>Communicating FSM\u662f\u4e00\u7cfb\u5217\u7ec4\u5408\u903b\u8f91\u548c\u5bc4\u5b58\u5668\u3002\u6700\u5927\u7684\u65f6\u949f\u9891\u7387\u53d7\u9650\u4e8e\u7ec4\u5408\u903b\u8f91\u7684\u4f20\u64ad\u65f6\u95f4\u3001\u8bbe\u7f6e\u65f6\u95f4\u548c\u5bc4\u5b58\u5668\u7684\u65f6\u949f\u5230\u8f93\u51fa\u5ef6\u8fdf\u3002<\/cite><\/blockquote>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"759\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.34.58-1024x759.png\" alt=\"\" class=\"wp-image-2561\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.34.58-1024x759.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.34.58-300x222.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.34.58-768x570.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.34.58.png 1258w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"626\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.36.28-1024x626.png\" alt=\"\" class=\"wp-image-2562\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.36.28-1024x626.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.36.28-300x184.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.36.28-768x470.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-10.36.28.png 1476w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">T<sub>clk<\/sub> : \u524d\u4e00\u4e2a\u5bc4\u5b58\u5668\u8f93\u51fa\u503c\u4e4b\u540e<strong>\u591a\u4e45<\/strong>\u53ef\u4ee5\u5728\u4e0b\u4e00\u4e2a\u5bc4\u5b58\u5668<strong>\u8f93\u51fa\u7aef<\/strong>\u5f97\u5230\u672c\u8f6e\u8fd0\u7b97\u7684\u7ed3\u679c\uff0c\u6ce8\u610f\u524d\u4e00\u4e2a\u5bc4\u5b58\u5668\u5f71\u54cd<strong>\u540e\u9762\u51e0\u4e2a<\/strong>\u5bc4\u5b58\u5668\uff0c\u540e\u4e00\u4e2a\u5bc4\u5b58\u5668\u88ab<strong>\u524d\u9762\u51e0\u4e2a<\/strong>\u5bc4\u5b58\u5668\u5f71\u54cd\u3002<\/figcaption><\/figure><\/div>\n\n\n<ul>\n<li>Stable Data Input of FF<\/li>\n<\/ul>\n\n\n\n<p>The data input is latched (or <strong>captured<\/strong>) at the moment the clock edge occurs, which is typically the rising edge of the clock pulse. The flip-flop then holds the captured data in its <strong>internal memory<\/strong> until the next clock edge occurs, at which point the process repeats. It is important to ensure that the data input remains stable before and after the clock edge occurs in order to ensure the correct operation of the flip-flop.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. SoC Paradigm*<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Boolean Algebra enables a formal mathematical treatment of logic circuitry expressions and transformation\/reduction into simpler expressions \u2013 the beginning of logic term minimization. At the beginning of the 90s, the trend resulted in more abstract building blocks in IC design.<\/p>\n<cite>\u5e03\u5c14\u4ee3\u6570\u80fd\u591f\u5bf9\u903b\u8f91\u7535\u8def\u8868\u8fbe\u8fdb\u884c\u6b63\u5f0f\u7684\u6570\u5b66\u5904\u7406\uff0c\u5e76\u5c06\u5176\u8f6c\u5316\/\u8fd8\u539f\u4e3a\u66f4\u7b80\u5355\u7684\u8868\u8fbe&#8211;\u8fd9\u662f\u903b\u8f91\u672f\u8bed\u6700\u5c0f\u5316\u7684\u5f00\u59cb\u3002\u572890\u5e74\u4ee3\u521d\uff0c\u8fd9\u4e00\u8d8b\u52bf\u5bfc\u81f4IC\u8bbe\u8ba1\u4e2d\u51fa\u73b0\u4e86\u66f4\u591a\u7684\u62bd\u8c61\u6784\u4ef6\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>To keep up with the Moore\u2019s law further, the entire circuit can be represented as a SoC platform. SoC is an integrated system design paradigm where large portions of a chip are assembled from already existing function blocks maintained in so called Core or Macro Libraries. Examples of SoC function blocks are: Microprocessor cores (ARM, MIPS, PowerPC), em- bedded SRAM, on-chip busses (AMBA, CoreConnect, OCP), network interfaces (10\/100 Ethernet, Gigabit Ethernet, SONET\/SDH), system interfaces (PCI, Rapid I\/O) and standard peripherals (UART, I2C, GPIO).<\/p>\n<cite>\u4e3a\u4e86\u8fdb\u4e00\u6b65\u8ddf\u4e0a\u6469\u5c14\u5b9a\u5f8b\uff0c\u6574\u4e2a\u7535\u8def\u53ef\u4ee5\u88ab\u8868\u793a\u6210\u4e00\u4e2aSoC\u5e73\u53f0\u3002 SoC\u662f\u4e00\u79cd\u96c6\u6210\u7684\u7cfb\u7edf\u8bbe\u8ba1\u8303\u5f0f\uff0c\u5176\u4e2d\u82af\u7247\u7684\u5927\u90e8\u5206\u662f\u7531\u5df2\u7ecf\u5b58\u5728\u7684\u529f\u80fd\u5757\u7ec4\u88c5\u800c\u6210\u7684\uff0c\u8fd9\u4e9b\u529f\u80fd\u5757\u88ab\u7ef4\u62a4\u5728\u6240\u8c13\u7684\u6838\u5fc3\u6216\u5b8f\u5e93\u4e2d\u3002 SoC\u529f\u80fd\u5757\u7684\u4f8b\u5b50\u6709\u3002\u5fae\u5904\u7406\u5668\u5185\u6838\uff08ARM\u3001MIPS\u3001PowerPC\uff09\u3001\u5d4c\u5165\u5f0fSRAM\u3001\u7247\u4e0a\u603b\u7ebf\uff08AMBA\u3001CoreConnect\u3001OCP\uff09\u3001\u7f51\u7edc\u63a5\u53e3\uff0810\/100\u4ee5\u592a\u7f51\u3001\u5343\u5146\u4ee5\u592a\u7f51\u3001SONET\/SDH\uff09\u3001\u7cfb\u7edf\u63a5\u53e3\uff08PCI\u3001\u5feb\u901fI\/O\uff09\u548c\u6807\u51c6\u5916\u56f4\u8bbe\u5907\uff08UART\u3001I2C\u3001GPIO\uff09\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u4e3a\u4ec0\u4e48\u4e0d\u5728\u591a\u4e2a\u5fae\u5904\u7406\u5668\u4e0a\u8fd0\u884c\u7684\u8f6f\u4ef6\u4e2d\u5b9e\u73b0\u6240\u6709\u529f\u80fd\uff1f\u4e3a\u4ec0\u4e48\u4e0d\u5728\u786c\u4ef6\u4e2d\u5b9e\u73b0\u6240\u6709\u529f\u80fd\uff1f\u2014\u2014Computationa Density \u548c Function Diversity \u662f\u9009\u62e9\u6700\u7b26\u5408\u7075\u6d3b\u6027\/\u6027\u80fd\u8981\u6c42\u7684\u7279\u5b9a\u6280\u672f\u6765\u5b9e\u73b0SoC\u529f\u80fd\u7684\u4e3b\u8981\u52a8\u673a\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"755\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-11.10.14-1024x755.png\" alt=\"\" class=\"wp-image-2564\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-11.10.14-1024x755.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-11.10.14-300x221.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-11.10.14-768x566.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-03-11.10.14.png 1088w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<blockquote class=\"wp-block-quote\">\n<p>The most flexible alternative to implement a certain function is by means of a general purpose processor (CPU). The functionality of the CPU is solely determined by the instruction sequences of the program memory. On the other extreme of the flexibility dimension is custom IC or custom ASIC technology. Once you have designed and manufactured a certain function in custom IC technology, it\u2019s rock solid and can\u2019t be changed without re-design and re-manufacturing. <br>However, when you compare the two implementations (CPU vs. custom IC) of one and the same function from a chip area and power consumption perspective, custom IC is by up to a factor 10\u2019000 (in area) and 1\u2019000\u2019000 (in power) more efficient than CPU.<\/p>\n<cite>\u5b9e\u73b0\u67d0\u79cd\u529f\u80fd\u7684\u6700\u7075\u6d3b\u7684\u9009\u62e9\u662f\u901a\u7528\u5904\u7406\u5668\uff08CPU\uff09\u3002 CPU\u7684\u529f\u80fd\u5b8c\u5168\u7531\u7a0b\u5e8f\u5b58\u50a8\u5668\u7684\u6307\u4ee4\u5e8f\u5217\u51b3\u5b9a\u3002 \u7075\u6d3b\u6027\u7ef4\u5ea6\u7684\u53e6\u4e00\u4e2a\u6781\u7aef\u662f\u5b9a\u5236IC\u6216\u5b9a\u5236ASIC\u6280\u672f\u3002\u4e00\u65e6\u4f60\u5728\u5b9a\u5236IC\u6280\u672f\u4e2d\u8bbe\u8ba1\u548c\u5236\u9020\u4e86\u67d0\u79cd\u529f\u80fd\uff0c\u5b83\u5c31\u575a\u5982\u78d0\u77f3\uff0c\u4e0d\u91cd\u65b0\u8bbe\u8ba1\u548c\u5236\u9020\u5c31\u65e0\u6cd5\u6539\u53d8\u3002 \u7136\u800c\uff0c\u5f53\u4f60\u4ece\u82af\u7247\u9762\u79ef\u548c\u529f\u8017\u7684\u89d2\u5ea6\u6bd4\u8f83\u4e00\u4e2a\u76f8\u540c\u529f\u80fd\u7684\u4e24\u79cd\u5b9e\u73b0\u65b9\u5f0f\uff08CPU\u4e0e\u5b9a\u5236IC\uff09\u65f6\uff0c\u5b9a\u5236IC\u6bd4CPU\u7684\u6548\u7387\u9ad8\u8fbe10&#8217;000\uff08\u9762\u79ef\uff09\u548c1&#8217;000&#8217;000\uff08\u529f\u8017\uff09\u500d\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Computational density (CD) is defined as computations per unit area and time. Functional Diversity (FD) can either be interpreted as the number of instructions per compute element which is stored local to the compute unit, or as an empiric metric to express the flexibility of a specific implementation technique.<\/p>\n<cite>\u8ba1\u7b97\u5bc6\u5ea6\uff08CD\uff09\u88ab\u5b9a\u4e49\u4e3a\u6bcf\u5355\u4f4d\u9762\u79ef\u548c\u65f6\u95f4\u7684\u8ba1\u7b97\u91cf\u3002\u529f\u80fd\u591a\u6837\u6027\uff08FD\uff09\u65e2\u53ef\u4ee5\u89e3\u91ca\u4e3a\u6bcf\u4e2a\u8ba1\u7b97\u5143\u7d20\u7684\u6307\u4ee4\u6570\u91cf\uff0c\u8fd9\u4e9b\u6307\u4ee4\u5b58\u50a8\u5728\u8ba1\u7b97\u5355\u5143\u7684\u672c\u5730\uff0c\u4e5f\u53ef\u4ee5\u89e3\u91ca\u4e3a\u4e00\u4e2a\u7ecf\u9a8c\u6307\u6807\uff0c\u8868\u8fbe\u7279\u5b9a\u5b9e\u73b0\u6280\u672f\u7684\u7075\u6d3b\u6027\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u8f6f\u4ef6\u548c\u786c\u4ef6\u5b9e\u73b0\u4e4b\u95f4\u7684\u6839\u672c\u533a\u522b\u662f\u5728\u6267\u884c\u76ee\u6807\u529f\u80fd\u65f6\u7684\u5e76\u884c\u7a0b\u5ea6\u3002\u8f6f\u786c\u4ef6\u5212\u5206\u662f\u4e00\u4e2a\u5f88\u5927\u7684\u8bbe\u8ba1\u6311\u6218\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>The range of hardware implementation techniques spans from standard software programmable microprocessor\/DSP cores, to Application Specific Instruction Processors (ASIP), to Field Programmable Gate arrays (FPGA)*, to Application Specific Integrated Circuits (ASIC) and (full) custom IC.<\/p>\n<cite>\u786c\u4ef6\u5b9e\u73b0\u6280\u672f\u7684\u8303\u56f4\u4ece\u6807\u51c6\u7684\u8f6f\u4ef6\u53ef\u7f16\u7a0b\u5fae\u5904\u7406\u5668\/DSP\u6838\u5fc3\uff0c\u5230\u7279\u5b9a\u5e94\u7528\u6307\u4ee4\u5904\u7406\u5668\uff08ASIP\uff09\uff0c\u5230\u73b0\u573a\u53ef\u7f16\u7a0b\u95e8\u9635\u5217\uff08FPGA\uff09\uff0c\u5230\u7279\u5b9a\u5e94\u7528\u96c6\u6210\u7535\u8def\uff08ASIC\uff09\u548c\uff08\u5168\uff09\u5b9a\u5236IC\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>The difference between Standard Cell and Macro Cell SoC (System on Chip) solutions is the complexity of the individual cell. SoC Macro Cells may represent entire CPU cores.<\/p>\n<cite>\u6807\u51c6SoC\u5355\u5143\u548c\u5b8f\u89c2SoC\u5355\u5143\u89e3\u51b3\u65b9\u6848\u7684\u4e0d\u540c\u4e4b\u5904\u5728\u4e8e\u5355\u4e2a\u5355\u5143\u7684\u590d\u6742\u6027\u3002 \u5b8f\u89c2SoC\u5355\u5143\u53ef\u4ee5\u4ee3\u8868\u6574\u4e2aCPU\u6838\u5fc3\u3002<\/cite><\/blockquote>\n\n\n\n<p>HW\u5b9e\u73b0\u65b9\u6cd5\u6bd4\u8f83\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Gate array architecture consists of an array of prefabricated transistors. These transistors are supplied with V<sub>DD<\/sub> and GND connections. Any circuit can be implemented using these transistors by depositing wire interconnects on top of the array.<\/p>\n<cite>\u95e8\u9635\u5217\u67b6\u6784\u7531\u9884\u5236\u6676\u4f53\u7ba1\u9635\u5217\u7ec4\u6210\u3002 \u8fd9\u4e9b\u6676\u4f53\u7ba1\u63d0\u4f9b V<sub>DD<\/sub> \u548c GND \u8fde\u63a5\u3002 \u901a\u8fc7\u4e92\u8fde\u9635\u5217\u9876\u90e8\u7684\u5bfc\u7ebf\uff0c\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e9b\u6676\u4f53\u7ba1\u5b9e\u73b0\u4efb\u4f55\u7535\u8def\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>In Standard Cell ASIC there are no prefabricated transistors, but a library of pre-developed logic cells. Any circuit can be implemented using these cells.<\/p>\n<cite>\u5728Standard Cell ASIC\u4e2d\uff0c\u6ca1\u6709\u9884\u5236\u6676\u4f53\u7ba1\uff0c\u800c\u662f\u9884\u5148\u5f00\u53d1\u7684\u903b\u8f91\u5355\u5143\u5e93\u3002 \u4f7f\u7528\u8fd9\u4e9b\u5355\u5143\u53ef\u4ee5\u5b9e\u73b0\u4efb\u4f55\u7535\u8def\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>ASIC chip<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Full Custom Design<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u4e0eASIC\u82af\u7247\u6216\u5168\u5b9a\u5236IC\u76f8\u6bd4\uff0c\u53ef\u7f16\u7a0b\u903b\u8f91(PLDs, Programmable Logic Devices)\u7684\u529f\u80fd\u53ef\u4ee5\u5728\u82af\u7247\u5236\u9020\u540e\u88ab\u4fee\u6539\uff0c\u5373\u901a\u8fc7\u4fdd\u9669\u4e1d\/\u7194\u65ad\u5668\u6280\u672f\u91cd\u65b0\u7f16\u7a0b\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>The basic ingredients of an FPGA(Field Programmable Gate Array) are configurable logic blocks (CLBs), configurable routing resources, and I\/O pads. Each CLB contains multiple look-up tables which are configured by the program data.<\/p>\n\n\n\n<p>There are two general ways of implementing Boolean logic. According to the truth table, a Boolean equation could be implemented either by using logic gates (systematic complementary CMOS logic design), or by a Look Up Table (LUT). With a LUT, the input variables x1 to x3 are used as addresses for a memory, whereas the values of the output variable y are stored in the memory cells. For simple combinatorial circuits, the gate delay of a circuit may be lower than the access delay of a LUT, but with the LUT you have the possibility of programming any Boolean combination of the input variables into it. Therefore LUTs are widely used for FPGAs.<\/p>\n\n\n\n<p>Next to LUTs for combinatorial logic functions, FPGAs contain programmable interconnect resources. Each output signal of a configurable logic block can be switched on one of multiple signal lines of a routing channel. Individual lines inside the routing channels can be connected with other lines at cross section points. Conventional MOS transistors are used as switches. The state of each switch is stored in a memory cell close to the switch.<\/p>\n<cite>FPGA \u7684\u57fa\u672c\u7ec4\u6210\u90e8\u5206\u662f\u53ef\u914d\u7f6e\u903b\u8f91\u5757 (CLB)\u3001\u53ef\u914d\u7f6e\u8def\u7531\u8d44\u6e90\u548c I\/O \u710a\u76d8\u3002 \u6bcf\u4e2a CLB \u5305\u542b\u591a\u4e2a\u7531\u7a0b\u5e8f\u6570\u636e\u914d\u7f6e\u7684\u67e5\u627e\u8868\u3002<br>\u6709\u4e24\u79cd\u5b9e\u73b0\u5e03\u5c14\u903b\u8f91\u7684\u4e00\u822c\u65b9\u6cd5\u3002\u6839\u636e\u771f\u503c\u8868\uff0c\u5e03\u5c14\u65b9\u7a0b\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u903b\u8f91\u95e8\uff08\u7cfb\u7edf\u4e92\u8865CMOS\u903b\u8f91\u8bbe\u8ba1\uff09\uff0c\u6216\u901a\u8fc7\u67e5\u627e\u8868\uff08LUT\uff09\u6765\u5b9e\u73b0\u3002\u5728LUT\u4e2d\uff0c\u8f93\u5165\u53d8\u91cfx1\u5230x3\u88ab\u7528\u4f5c\u5b58\u50a8\u5668\u7684\u5730\u5740\uff0c\u800c\u8f93\u51fa\u53d8\u91cfy\u7684\u503c\u88ab\u5b58\u50a8\u5728\u5b58\u50a8\u5668\u5355\u5143\u4e2d\u3002 \u5bf9\u4e8e\u7b80\u5355\u7684\u7ec4\u5408\u7535\u8def\uff0c\u7535\u8def\u7684\u95e8\u5ef6\u8fdf\u53ef\u80fd\u4f4e\u4e8eLUT\u7684\u5b58\u53d6\u5ef6\u8fdf\uff0c\u4f46\u6709\u4e86LUT\uff0c\u4f60\u5c31\u6709\u53ef\u80fd\u5c06\u8f93\u5165\u53d8\u91cf\u7684\u4efb\u4f55\u5e03\u5c14\u7ec4\u5408\u7f16\u7a0b\u5230\u5176\u4e2d\u3002 \u56e0\u6b64\uff0cLUT\u88ab\u5e7f\u6cdb\u7528\u4e8eFPGA\u3002<br>\u9664\u4e86\u7528\u4e8e\u7ec4\u5408\u903b\u8f91\u529f\u80fd\u7684LUT\u4e4b\u5916\uff0cFPGA\u8fd8\u5305\u542b\u53ef\u7f16\u7a0b\u7684\u4e92\u8fde\u8d44\u6e90\u3002\u53ef\u914d\u7f6e\u903b\u8f91\u5757\u7684\u6bcf\u4e2a\u8f93\u51fa\u4fe1\u53f7\u53ef\u4ee5\u5728\u8def\u7531\u901a\u9053\u7684\u591a\u6761\u4fe1\u53f7\u7ebf\u4e2d\u7684\u4e00\u6761\u4e0a\u5207\u6362\u3002\u8def\u7531\u901a\u9053\u5185\u7684\u4e2a\u522b\u7ebf\u8def\u53ef\u4ee5\u5728\u622a\u9762\u70b9\u4e0a\u4e0e\u5176\u4ed6\u7ebf\u8def\u8fde\u63a5\u3002 \u4f20\u7edf\u7684MOS\u6676\u4f53\u7ba1\u88ab\u7528\u4f5c\u5f00\u5173\u3002\u6bcf\u4e2a\u5f00\u5173\u7684\u72b6\u6001\u88ab\u5b58\u50a8\u5728\u9760\u8fd1\u5f00\u5173\u7684\u5b58\u50a8\u5355\u5143\u4e2d\u3002<\/cite><\/blockquote>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"434\" src=\"http:\/\/iizz.ddns.net:9595\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-01-20.00.57-1024x434.png\" alt=\"\" class=\"wp-image-2545\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-01-20.00.57-1024x434.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-01-20.00.57-300x127.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-01-20.00.57-768x325.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-01-20.00.57.png 1312w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5bf9\u4e8e\u7ecf\u5178\u7684\u7cfb\u7edf\u677f\u8bbe\u8ba1\u8005\u6765\u8bf4\uff0c\u5904\u7406\u5668\u662f\u4e00\u4e2a<strong>\u5c01\u88c5<\/strong>\u7684\u7ec4\u4ef6\u3002\u5bf9\u4e8e\u4eca\u5929\u7684\u7247\u4e0a\u7cfb\u7edf\u8bbe\u8ba1\u8005\u6765\u8bf4\uff0c\u5fae\u5904\u7406\u5668\u662f\u4e00\u4e2a\u865a\u62df\u7ec4\u4ef6\uff0c\u5373\u4e00\u4e2a\u9884\u5148\u8bbe\u8ba1\u597d\u7684\u6784\u4ef6\uff0c\u53ef\u4ee5<strong>\u7528\u4e8e<\/strong>\u82af\u7247\u7684\u8bbe\u8ba1\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Virtual components (VCs) are available as soft VC, firm VC, and hard VC. A soft VC consists of a synthesizable code in a hardware description language, e.g. VHDL or Verilog. The architecture of the soft VC can be modified by the SoC designer and it can be easily transferred to the newest technology generation by logic synthesis tools. In contrast, the hard VC is an optimized, technology dependent macro with fixed layout (placement and wiring), which can- not be modified by the SoC designer and which requires significant design effort to be transferred to a newer technology. The benefit of hard VCs is their higher speed\/area\/power optimization in their target technology, compared to a soft VC.<\/p>\n<cite>\u865a\u62df\u7ec4\u4ef6\uff08VCs\uff09\u6709\u8f6fVC\u3001\u786cVC\u548c\u786cVC\u4e4b\u5206\u3002\u8f6fVC\u7531\u786c\u4ef6\u63cf\u8ff0\u8bed\u8a00\u7684\u53ef\u5408\u6210\u4ee3\u7801\u7ec4\u6210\uff0c\u5982VHDL\u6216Verilog\u3002 \u8f6fVC\u7684\u7ed3\u6784\u53ef\u4ee5\u7531SoC\u8bbe\u8ba1\u8005\u4fee\u6539\uff0c\u5b83\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u901a\u8fc7\u903b\u8f91\u7efc\u5408\u5de5\u5177\u8f6c\u79fb\u5230\u6700\u65b0\u4e00\u4ee3\u7684\u6280\u672f\u3002\u76f8\u6bd4\u4e4b\u4e0b\uff0c\u786cVC\u662f\u4e00\u4e2a\u64cd\u4f5c\u65f6\u95f4\u5316\u7684\u3001\u4f9d\u8d56\u4e8e\u6280\u672f\u7684\u5b8f\uff0c\u5177\u6709\u56fa\u5b9a\u7684\u5e03\u5c40\uff08\u653e\u7f6e\u548c\u5e03\u7ebf\uff09\uff0c\u4e0d\u80fd\u7531SoC\u8bbe\u8ba1\u8005\u4fee\u6539\uff0c\u5e76\u4e14\u9700\u8981\u5927\u91cf\u7684\u8bbe\u8ba1\u5de5\u4f5c\u6765\u8f6c\u79fb\u5230\u4e00\u4e2a\u8f83\u65b0\u7684\u6280\u672f\u3002\u4e0e\u8f6fVC\u76f8\u6bd4\uff0c\u786cVC\u7684\u597d\u5904\u662f\u5728\u5176\u76ee\u6807\u6280\u672f\u4e2d\u5177\u6709\u66f4\u9ad8\u7684\u901f\u5ea6\/\u9762\u79ef\/\u529f\u7387\u64cd\u4f5c\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u591a\u6838\u8bbe\u8ba1\u539f\u5219\u662f\u57fa\u4e8e\u5e73\u53f0\u7684SoC\u8bbe\u8ba1\u4e2d\u7684\u4e00\u4e2a\u65b0\u8303\u5f0f\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"910\" height=\"98\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-01-20.18.41.png\" alt=\"\" class=\"wp-image-2546\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-01-20.18.41.png 910w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-01-20.18.41-300x32.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-01-20.18.41-768x83.png 768w\" sizes=\"(max-width: 910px) 100vw, 910px\" \/><figcaption class=\"wp-element-caption\">Case 1: T<sub>app<\/sub> unchanged. f decreases by a factor of n.<br>case 2: T<sub>app<\/sub> decreases by a factor of k. f increase by a factor of k\/n.<\/figcaption><\/figure><\/div>\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Case 1: Assuming that the application can be <strong>perfectly parallelized <\/strong>and distributed over n cores, i.e. T<sub>app<\/sub> keeps unchanged. The <strong>operating frequency<\/strong> and <strong>supply voltage <\/strong>of the cores can be scaled by 1\/n without changing the execution time of the application. In this case, the dynamic power consumption of the multicore processor will be reduced by a factor of 1\/n<sup>2<\/sup> compared to the single-core processor.<\/p>\n\n\n\n<p>Case 2: If we want to increase the application performance on a multicore processor by factor k, i.e. T<sub>app<\/sub> keeps unchanged. The dynamic power consumption will be still lower than in a single core by a factor of k<sup>3<\/sup>\/n<sup>2<\/sup>. As long as (k<sup>3<\/sup>\/n<sup>2<\/sup>) is lower than 1, the multicore processor will be more efficient in terms of <strong>dynamic power consumption<\/strong> than a single-core processor (but not in terms of <strong>static power consumption<\/strong> since we will have more core instances).<\/p>\n<cite>Case 1: \u5047\u8bbe\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u5b8c\u7f8e\u5730\u5e76\u884c\u5316\u5e76\u5206\u5e03\u5728n\u4e2a\u5185\u6838\u4e0a\uff0c\u5185\u6838\u7684\u5de5\u4f5c\u9891\u7387\u548c\u7535\u6e90\u7535\u538b\u53ef\u4ee5\u63091\/n\u7684\u6bd4\u4f8b\u8c03\u6574\uff0c\u800c\u4e0d\u6539\u53d8\u5e94\u7528\u7a0b\u5e8f\u7684\u6267\u884c\u65f6\u95f4\u3002 \u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u4e0e\u5355\u6838\u5904\u7406\u5668\u76f8\u6bd4\uff0c\u591a\u6838\u5904\u7406\u5668\u7684\u52a8\u6001\u529f\u8017\u5c06\u51cf\u5c111\/n<sup>2<\/sup>\u3002<br>Case 2: \u5982\u679c\u6211\u4eec\u60f3\u628a\u591a\u6838\u5904\u7406\u5668\u7684\u5e94\u7528\u6027\u80fd\u63d0\u9ad8k\u500d\uff0c\u90a3\u4e48\u52a8\u6001\u529f\u8017\u4ecd\u5c06\u6bd4\u5355\u6838\u5904\u7406\u5668\u4f4ek<sup>3<\/sup>\/n<sup>2<\/sup>\u500d\u3002 \u53ea\u8981\uff08k<sup>3<\/sup>\/n<sup>2<\/sup>\uff09\u4f4e\u4e8e1\uff0c\u591a\u6838\u5904\u7406\u5668\u5728\u52a8\u6001\u529f\u8017\u65b9\u9762\u5c06\u6bd4\u5355\u6838\u5904\u7406\u5668\u66f4\u6709\u6548\uff08\u4f46\u5728\u9759\u6001\u529f\u8017\u65b9\u9762\u4e0d\u662f\uff0c\u56e0\u4e3a\u6211\u4eec\u5c06\u6709\u66f4\u591a\u7684\u6838\u5fc3\u5b9e\u4f8b\uff09\u3002<\/cite><\/blockquote>\n\n\n\n<ul>\n<li>SoC Paradigm<\/li>\n<\/ul>\n\n\n\n<p>The system on chip (SoC) paradigm is a design approach in which all or most of the components of a computer or electronic system are integrated onto a single chip. In an SoC design, the various components of the system, such as the microprocessor, memory, input\/output (I\/O) interfaces, and other peripherals, are all combined onto a single piece of silicon.<\/p>\n\n\n\n<ul>\n<li>FPGA<\/li>\n<\/ul>\n\n\n\n<p>A field-programmable gate array (FPGA) is a type of programmable logic device (PLD) that can be used to implement digital circuits. It is called a &#8220;<strong>field-programmable<\/strong>&#8221; device because it can be programmed by the user after it has been manufactured, allowing the user to customize the device for a specific application.<\/p>\n\n\n\n<p>An FPGA consists of an array of configurable logic blocks (CLBs) and interconnect resources that can be used to implement a wide variety of digital circuits. The CLBs and interconnect resources can be programmed by the user to perform specified logic functions. Each CLB consists of a number of programmable logic elements (PLEs), which can be configured to perform a specific logic function. The PLEs are typically implemented using programmable function blocks (PFBs) and look-up tables (LUTs).<\/p>\n\n\n\n<p>The number and complexity of the CLBs in an FPGA determine the overall capacity and performance of the device.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">4. Processor Architecture<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Instruction Set Architecture (ISA) is the interface between a computer&#8217;s software and hardware, which defines the set of instructions that a computer&#8217;s processor can execute. It specifies the types of instructions that can be used and the format of those instructions, as well as the memory and input\/output operations that can be performed by the processor.<\/p>\n<cite>\u5904\u7406\u5668\u7684\u6307\u4ee4\u96c6\u67b6\u6784\uff08ISA\uff09\u662f\u8ba1\u7b97\u673a\u7684\u8f6f\u4ef6\u548c\u786c\u4ef6\u4e4b\u95f4\u7684\u63a5\u53e3\uff0c\u5b83\u5b9a\u4e49\u4e86\u8ba1\u7b97\u673a\u5904\u7406\u5668\u53ef\u4ee5\u6267\u884c\u7684\u6307\u4ee4\u96c6\u3002\u5b83\u89c4\u5b9a\u4e86\u53ef\u4ee5\u4f7f\u7528\u7684\u6307\u4ee4\u7c7b\u578b\u548c\u8fd9\u4e9b\u6307\u4ee4\u7684\u683c\u5f0f\uff0c\u4ee5\u53ca\u5904\u7406\u5668\u53ef\u4ee5\u6267\u884c\u7684\u5185\u5b58\u548c\u8f93\u5165\/\u8f93\u51fa\u64cd\u4f5c\u3002<\/cite><\/blockquote>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"200\" height=\"148\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-12.10.09.png\" alt=\"\" class=\"wp-image-2573\"\/><\/figure><\/div>\n\n\n<blockquote class=\"wp-block-quote\">\n<p>We can differentiate the processors by their instruction complexity (e.g. RISC or CISC), type of instruction-level parallelism (dynamically scheduled superscalars or statically scheduled VLIW) as well as by application-specific areas of their employment. The performance of processors can be significantly improved by exploiting instruction-level parallelism (ILP).<\/p>\n<cite>\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u6307\u4ee4\u7684\u590d\u6742\u6027\uff08\u5982RISC\u6216CISC\uff09\u3001\u7ed3\u6784\u7ea7\u5e76\u884c\u7684\u7c7b\u578b\uff08\u52a8\u6001\u8c03\u5ea6\u7684\u8d85\u6807\u91cf\u6216\u9759\u6001\u8c03\u5ea6\u7684VLIW\uff09\u4ee5\u53ca\u5177\u4f53\u7684\u5e94\u7528\u9886\u57df\u6765\u533a\u5206\u5904\u7406\u5668\u3002\u5904\u7406\u5668\u7684\u6027\u80fd\u53ef\u4ee5\u901a\u8fc7\u5229\u7528\u6307\u4ee4\u7ea7\u5e76\u884c\u6027\uff08ILP\uff09\u800c\u5f97\u5230\u663e\u8457\u63d0\u9ad8\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>The high-level code is transformed by a compiler into an ISA-specific machine code (also called binary or object code). Alternatively, the target code can be written in an assembly language by specifying the program functionality using target ISA instructions. <\/p>\n\n\n\n<p>On the hardware side, the actual processor <strong>decodes<\/strong> instructions and generates control <strong>signals<\/strong> that are necessary for instructions\u2019 execution. The control signal specification is ISA and processor-dependent.<\/p>\n<cite>\u9ad8\u7ea7\u4ee3\u7801\u7531\u7f16\u8bd1\u5668\u8f6c\u5316\u4e3a\u7279\u5b9a\u4e8eISA\u7684\u673a\u5668\u7801\uff08\u4e5f\u79f0\u4e3a\u4e8c\u8fdb\u5236\u6216\u76ee\u6807\u7801\uff09\u3002 \u53e6\u5916\uff0c\u76ee\u6807\u4ee3\u7801\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u76ee\u6807ISA\u6307\u4ee4\u6765\u6307\u5b9a\u7a0b\u5e8f\u529f\u80fd\uff0c\u4ee5\u6c47\u7f16\u8bed\u8a00\u7f16\u5199\u3002<br><br>\u5728\u786c\u4ef6\u65b9\u9762\uff0c\u5b9e\u9645\u7684\u5904\u7406\u5668\u5bf9\u6307\u4ee4\u8fdb\u884c\u89e3\u7801\u5e76\u4ea7\u751f\u6307\u4ee4\u6267\u884c\u6240\u9700\u7684\u63a7\u5236\u4fe1\u53f7\u3002\u63a7\u5236\u4fe1\u53f7\u7684\u6307\u5b9a\u53d6\u51b3\u4e8eISA\u548c\u5904\u7406\u5668\u3002<\/cite><\/blockquote>\n\n\n\n<figure class=\"wp-block-gallery aligncenter has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex\">\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"719\" height=\"392\" data-id=\"2572\"  src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-12.09.29.png\" alt=\"\" class=\"wp-image-2572\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-12.09.29.png 719w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-12.09.29-300x164.png 300w\" sizes=\"(max-width: 719px) 100vw, 719px\" \/><\/figure>\n<\/figure>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>An Instruction Set Architecture (ISA) typically includes several key parameters that define the capabilities and functionality of a processor. These parameters can include: (1) Data Types: types of data that the processor can handle, such as integers, floating-point numbers, and memory addresses. (2) Instructions: the set of instructions that the processor can execute, such as arithmetic and logic operations, branching, and memory access. (3) Registers: the number and size of registers that the processor has, which are used to temporarily store data and perform calculations. (4) Memory Models: the memory models that the processor supports, such as a flat or segmented memory model, and how memory is accessed and managed by the processor.<\/p>\n\n\n\n<p>For example, the MIPS instruction set consists of different instruction groups. Arithmetic instructions perform arithmetic operations on the registers, e.g. addition and subtraction. Load\/store instructions read and write data from the registers to the main memory. Jumps and branch instructions change the sequential execution flow of the target program. They are used to construct loops or when the program execution must be conditioned. <\/p>\n\n\n\n<p>The register file consists of a fixed number of architecture registers. The ISA specifies how the <strong>corresponding registers can be used<\/strong> and what kind of information they contain at a certain moment of execution. <\/p>\n\n\n\n<p>The accessible memory region is defined by the address space.<\/p>\n<cite>\u4e00\u4e2a\u6307\u4ee4\u96c6\u67b6\u6784\uff08ISA\uff09\u901a\u5e38\u5305\u62ec\u51e0\u4e2a\u5173\u952e\u53c2\u6570\uff0c\u5b9a\u4e49\u4e86\u4e00\u4e2a\u5904\u7406\u5668\u7684\u80fd\u529b\u548c\u529f\u80fd\u3002\u8fd9\u4e9b\u53c2\u6570\u53ef\u4ee5\u5305\u62ec\u3002(1) \u6570\u636e\u7c7b\u578b\uff1a\u5904\u7406\u5668\u53ef\u4ee5\u5904\u7406\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5982\u6574\u6570\u3001\u6d6e\u70b9\u6570\u548c\u5185\u5b58\u5730\u5740\u3002(2) \u6307\u4ee4\uff1a\u5904\u7406\u5668\u53ef\u4ee5\u6267\u884c\u7684\u6307\u4ee4\u96c6\uff0c\u5982\u7b97\u672f\u548c\u903b\u8f91\u8fd0\u7b97\u3001\u5206\u652f\u548c\u5185\u5b58\u8bbf\u95ee\u3002(3) \u5bc4\u5b58\u5668\uff1a\u5904\u7406\u5668\u62e5\u6709\u7684\u5bc4\u5b58\u5668\u7684\u6570\u91cf\u548c\u5927\u5c0f\uff0c\u7528\u4e8e\u4e34\u65f6\u5b58\u50a8\u6570\u636e\u548c\u6267\u884c\u8ba1\u7b97\u3002(4) \u5185\u5b58\u6a21\u578b\uff1a\u5904\u7406\u5668\u652f\u6301\u7684\u5185\u5b58\u6a21\u578b\uff0c\u5982\u5e73\u5766\u7684\u6216\u5206\u6bb5\u7684\u5185\u5b58\u6a21\u578b\uff0c\u4ee5\u53ca\u5185\u5b58\u5982\u4f55\u88ab\u5904\u7406\u5668\u8bbf\u95ee\u548c\u7ba1\u7406\u3002<br><br>\u4f8b\u5982\uff0cMIPS\u6307\u4ee4\u96c6\u7531\u4e0d\u540c\u7684\u6307\u4ee4\u7ec4\u7ec4\u6210\u3002\u7b97\u672f\u6307\u4ee4\u5bf9\u5bc4\u5b58\u5668\u8fdb\u884c\u7b97\u672f\u8fd0\u7b97\uff0c\u5982\u52a0\u6cd5\u548c\u51cf\u6cd5\u3002\u52a0\u8f7d\/\u5b58\u50a8\u6307\u4ee4\u4ece\u5bc4\u5b58\u5668\u4e2d\u8bfb\u5199\u6570\u636e\u5230\u4e3b\u5b58\u50a8\u5668\u4e2d\u3002\u8df3\u8f6c\u548c\u5206\u652f\u6307\u4ee4\u6539\u53d8\u76ee\u6807\u7a0b\u5e8f\u7684\u987a\u5e8f\u6267\u884c\u6d41\u7a0b\u3002\u5b83\u4eec\u88ab\u7528\u6765\u6784\u5efa\u5faa\u73af\u6216\u5f53\u7a0b\u5e8f\u6267\u884c\u5fc5\u987b\u6709\u6761\u4ef6\u65f6\u3002 <br><br>\u5bc4\u5b58\u5668\u6587\u4ef6\u7531\u56fa\u5b9a\u6570\u91cf\u7684\u67b6\u6784\u5bc4\u5b58\u5668\u7ec4\u6210\u3002ISA\u89c4\u5b9a\u4e86\u5728\u6267\u884c\u7684\u67d0\u4e00\u65f6\u523b\u5982\u4f55\u4f7f\u7528\u76f8\u5e94\u7684\u5bc4\u5b58\u5668\u4ee5\u53ca\u5b83\u4eec\u5305\u542b\u4ec0\u4e48\u6837\u7684\u4fe1\u606f\u3002<br><br>\u53ef\u8bbf\u95ee\u7684\u5185\u5b58\u533a\u57df\u662f\u7531\u5730\u5740\u7a7a\u95f4\u5b9a\u4e49\u7684\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5c3d\u7ba1\u76ee\u524d\u7684\u5904\u7406\u5668\u8981\u590d\u6742\u5f97\u591a\uff0c\u4f46\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u57fa\u672c\u5904\u7406\u5668\u7684\u7b80\u5316\u6846\u56fe\u6765\u7814\u7a76\u95ee\u9898\u3002\u8fd9\u79cd\u7c7b\u578b\u7684\u5fae\u5904\u7406\u5668\u88ab\u79f0\u4e3aRISC\uff08\u7cbe\u7b80\u6307\u4ee4\u96c6\u8ba1\u7b97\u673a\uff09\u67b6\u6784\u3002\u6240\u6709\u6307\u4ee4(<strong>instruction i\/o<\/strong>)\u53ea\u5bf9\u5bc4\u5b58\u5668(<strong>registers<\/strong>)\u548c\u7d2f\u52a0\u5668(<strong>accumulator<\/strong>)\u8fdb\u884c\u64cd\u4f5c\u3002\u5bf9\u4e8e\u5185\u5b58\u7684\u8bbf\u95ee(<strong>data i\/o<\/strong>)\uff0c\u5fc5\u987b\u4f7f\u7528\u7279\u6b8a\u7684\u52a0\u8f7d\/\u5b58\u50a8\u6307\u4ee4\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"403\" height=\"373\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-12.12.51.png\" alt=\"\" class=\"wp-image-2574\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-12.12.51.png 403w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-12.12.51-300x278.png 300w\" sizes=\"(max-width: 403px) 100vw, 403px\" \/><\/figure><\/div>\n\n\n<blockquote class=\"wp-block-quote\">\n<p>A program is executed in the following sequence:<br>\u2022<strong> Instruction fetch (IF):<\/strong> The <strong>program counter<\/strong> is incremented and the next instruction is fetched into instruction register (IR). If the instruction was present in the instruction cache, IF takes only 1 clock cycle; otherwise the instruction must be loaded from the main memory, taking more cycles.<br>\u2022 <strong>Instruction decode (ID):<\/strong> The processor <strong>decodes<\/strong> the instruction in IR, and a set of <strong>control signals <\/strong>is generated. Then the processor retrieves the operands from registers specified in the instruction.<br>\u2022 <strong>Execution (EX):<\/strong> In this stage, computational instructions are executed in the ALU and their <strong>result<\/strong> is stored in the <strong>accumulator<\/strong>. For load\/store instructions, the effective memory address is <strong>calculated<\/strong>.<br>\u2022 <strong>Memory (MEM):<\/strong> If the current instruction is <code>load\/store<\/code>, the content of a register in the <strong>register<\/strong> block is read from or written to the <strong>main memory<\/strong>.<br>\u2022 <strong>Write back (WB):<\/strong> The result of computational instructions or the data retrieved by <code>load<\/code> instructions is<strong> written back into the register block<\/strong>.<\/p>\n<cite>\u4e00\u4e2a\u7a0b\u5e8f\u6309\u4ee5\u4e0b\u987a\u5e8f\u6267\u884c:<br>&#8211; \u6307\u4ee4\u83b7\u53d6\uff08IF\uff09\u7a0b\u5e8f\u8ba1\u6570\u5668\u88ab\u9012\u589e\uff0c\u4e0b\u4e00\u6761\u6307\u4ee4\u88ab\u9001\u5165\u6307\u4ee4\u5bc4\u5b58\u5668\uff08IR\uff09\u3002\u5982\u679c\u8be5\u6307\u4ee4\u5b58\u5728\u4e8e\u6307\u4ee4\u7f13\u5b58\u4e2d\uff0cIF\u53ea\u9700\u89811\u4e2a\u65f6\u949f\u5468\u671f\uff1b\u5426\u5219\uff0c\u8be5\u6307\u4ee4\u5fc5\u987b\u4ece\u4e3b\u5b58\u50a8\u5668\u4e2d\u52a0\u8f7d\uff0c\u9700\u8981\u66f4\u591a\u5468\u671f\u3002<br>&#8211; \u6307\u4ee4\u89e3\u7801\uff08ID\uff09\u5904\u7406\u5668\u5bf9IR\u4e2d\u7684\u6307\u4ee4\u8fdb\u884c\u89e3\u7801\uff0c\u5e76\u4ea7\u751f\u4e00\u7ec4\u63a7\u5236\u4fe1\u53f7\u3002\u7136\u540e\uff0c\u5904\u7406\u5668\u4ece\u6307\u4ee4\u4e2d\u6307\u5b9a\u7684\u5bc4\u5b58\u5668\u4e2d\u53d6\u64cd\u4f5c\u6570\u3002<br>&#8211; \u6267\u884c\uff08EX\uff09\u5728\u8fd9\u4e2a\u9636\u6bb5\uff0c\u7b97\u672f\u6307\u4ee4\u5728ALU\u4e2d\u88ab\u6267\u884c\uff0c\u5176\u7ed3\u679c\u88ab\u5b58\u50a8\u5728\u7d2f\u52a0\u5668\u4e2d\u3002\u5bf9\u4e8e\u52a0\u8f7d\/\u5b58\u50a8\u6307\u4ee4\uff0c\u8ba1\u7b97\u6709\u6548\u7684\u5185\u5b58\u5730\u5740\u3002<br>&#8211; \u5185\u5b58\uff08MEM\uff09\u5982\u679c\u5f53\u524d\u6307\u4ee4\u662f\u52a0\u8f7d\/\u5b58\u50a8\uff0c\u5bc4\u5b58\u5668\u5757\u4e2d\u7684\u4e00\u4e2a\u5bc4\u5b58\u5668\u7684\u5185\u5bb9\u88ab\u4ece\u4e3b\u5b58\u50a8\u5668\u4e2d\u8bfb\u51fa\u6216\u5199\u5165\u3002<br>&#8211; \u56de\u5199\uff08WB\uff09\u8ba1\u7b97\u6307\u4ee4\u7684\u7ed3\u679c\u6216\u52a0\u8f7d\u6307\u4ee4\u83b7\u53d6\u7684\u6570\u636e\u88ab\u5199\u56de\u5bc4\u5b58\u5668\u5757\u4e2d\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5982\u679c\u6211\u4eec\u5047\u8bbe\u6bcf\u4e2a\u9636\u6bb5\u9700\u8981\u4e00\u4e2a\u65f6\u949f\u5468\u671f\uff0c\u90a3\u4e48\u6267\u884c\u6bcf\u6761\u6307\u4ee4\u5c06\u9700\u89815\u4e2a\u5468\u671f\uff0c\u8fd9\u4e2a\u5904\u7406\u5668\u7684\u603b\u4f53CPI\uff08\u6bcf\u6761\u6307\u4ee4\u7684\u5468\u671f\uff09\u4e3a5\u3002\u73b0\u5b9e\u4e2d\uff0c\u5904\u7406\u5668\u5e76\u4e0d\u603b\u662f\u9700\u8981\u7b49\u5f85\u4e00\u6761\u6307\u4ee4\u5b8c\u6210\u540e\u518d\u5f00\u59cb\u4e0b\u4e00\u6761\u3002\u901a\u8fc7\u5229\u7528\u6307\u4ee4\u4e4b\u95f4\u53ef\u80fd\u7684\u5e76\u884c\u6027\uff08ILP, instruction-level parallelism\uff09\uff0c\u53ef\u4ee5\u63d0\u9ad8\u5904\u7406\u5668\u7684\u6267\u884c\u6548\u7387\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"490\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.00.27-1024x490.png\" alt=\"\" class=\"wp-image-2579\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.00.27-1024x490.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.00.27-300x143.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.00.27-768x367.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.00.27-1536x735.png 1536w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.00.27-1568x750.png 1568w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.00.27.png 1614w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">\u6bcf\u4e2a\u5468\u671f\u90fd\u6267\u884cIF\uff0c\u53d6\u4e0b\u4e00\u6761\u6307\u4ee4\u3002\u5355\u4e2a\u6307\u4ee4\u7684\u6267\u884c\u4ecd\u9700\u89815\u4e2a\u5468\u671f\uff0c\u4f46\u603b\u7684CPI\u5c06\u9010\u6e10\u63a5\u8fd11\u3002<\/figcaption><\/figure><\/div>\n\n\n<blockquote class=\"wp-block-quote\">\n<p>To enable pipelining in hardware, the result of each pipeline operation has to be stored in the intermediate registers at each clock cycle. The period of the clock signal (or its maximum frequency) is defined by the longest pipeline stage. The total instruction rate is typically expressed in <strong>MIPS<\/strong> (Millions of Instructions Per Second) and can be determined by dividing the clock frequency of a processor by its CPI value (<strong>f \/ CPI<\/strong>).<\/p>\n<cite>\u4e3a\u4e86\u5728\u786c\u4ef6\u4e2d\u5b9e\u73b0\u6d41\u6c34\u7ebf\uff0c\u6bcf\u4e2a\u6d41\u6c34\u7ebf\u64cd\u4f5c\u7684\u7ed3\u679c\u5fc5\u987b\u5728\u6bcf\u4e2a\u65f6\u949f\u5468\u671f\u5b58\u50a8\u5728\u4e2d\u95f4\u5bc4\u5b58\u5668\u4e2d\u3002\u65f6\u949f\u4fe1\u53f7\u7684\u5468\u671f\uff08\u6216\u5176\u6700\u5927\u9891\u7387\uff09\u662f\u7531\u6700\u957f\u7684\u6d41\u6c34\u7ebf\u9636\u6bb5\u5b9a\u4e49\u7684\u3002\u603b\u6307\u4ee4\u7387\u901a\u5e38\u4ee5MIPS\uff08\u6bcf\u79d2\u767e\u4e07\u6761\u6307\u4ee4\uff09\u4e3a\u5355\u4f4d\uff0c\u7b49\u4e8e<strong>f \/ CPI<\/strong>.<\/cite><\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"394\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.11.07-1024x394.png\" alt=\"\" class=\"wp-image-2580\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.11.07-1024x394.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.11.07-300x116.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.11.07-768x296.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.11.07.png 1418w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u6709\u6548\u6d41\u6c34\u7ebf\u7684\u5148\u51b3\u6761\u4ef6\u662f\u5404\u4e2a\u6307\u4ee4\u9636\u6bb5\u7684\u89c4\u5f8b\u6027\uff0c\u4e00\u7ec4\u5c11\u800c\u7cbe\u7684\u6307\u4ee4\u548c\u5bfb\u5740\u6a21\u5f0f\u3002\u7136\u800c\uff0c\u6307\u4ee4\u6d41\u6c34\u7ebf\u7684\u6548\u7387\u53d7\u5230\u7ed3\u6784\u5371\u9669\u3001\u6570\u636e\u5371\u9669\u548c\u63a7\u5236\u5371\u9669\u7684\u9650\u5236\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<div class=\"wp-block-group is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p><strong>Structural<\/strong> <strong>Hazards<\/strong>: Structural hazards occur if a <strong>resource conflict<\/strong> exists between instructions in the pipeline. Assume that the processor has only one memory port that is used both for <strong>fetching<\/strong> instructions and data <code>load\/store<\/code> operations, then IF and MEM cannot be done in one cycle.<\/p>\n<\/div><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"408\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.34.29-1024x408.png\" alt=\"\" class=\"wp-image-2582\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.34.29-1024x408.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.34.29-300x120.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.34.29-768x306.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.34.29.png 1240w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p><strong>Data Hazards<\/strong>: In a pipeline, a data hazard arises if a <strong>result<\/strong> of an operation is required <strong>before<\/strong> it has been <strong>calculated<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"541\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.36.54-1024x541.png\" alt=\"\" class=\"wp-image-2583\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.36.54-1024x541.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.36.54-300x158.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.36.54-768x406.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-15.36.54.png 1424w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">The pipeline has to be <strong>stalled<\/strong> until the first instruction writes the right value into register <code>r3<\/code>.<\/figcaption><\/figure>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p><strong>Control Hazards<\/strong>: If a <strong>branch<\/strong> operation causes the program counter to jump to another location, the instructions in the pipeline following the branch have to be <strong>flushed<\/strong> and the pipeline has to be <strong>filled<\/strong> again starting from the correct instruction.<\/p>\n\n\n\n<p>The overall performance loss due to control hazards is typically even greater than the loss due to data hazards. To cope with this, current processors employ <strong>branch prediction<\/strong> in order to predict the right instruction after branches.<\/p>\n\n\n\n<p><strong>Branch History Table(BHT):<\/strong> <\/p>\n\n\n\n<p>In a <strong>1-bit branch predictor<\/strong>, we assume that the next outcome of a branch is likely to be the same as the previous outcome stored in the table. The last outcome of a branch (taken or not taken) is stored in a 1-bit branch history table. The table is indexed by the last x bits of the <strong>branch address<\/strong>, and, thus, the branch table contains 2<sup>x<\/sup> elements in total. In loops, the 1-bit branch predictor always predicts <mark style=\"background-color:rgba(0, 0, 0, 0);color:#f74308\" class=\"has-inline-color\"><strong>incorrectly<\/strong> <strong>twice<\/strong><\/mark>: after the first loop iteration (because the branch was not taken before), and at the last loop iteration when we exit the loop (because the branch was previously taken).<\/p>\n\n\n\n<figure class=\"wp-block-gallery aligncenter has-nested-images columns-default is-cropped wp-block-gallery-4 is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"576\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-16.11.07-1024x576.png\" alt=\"\" class=\"wp-image-2587\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-16.11.07-1024x576.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-16.11.07-300x169.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-16.11.07-768x432.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-16.11.07.png 1312w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/figure>\n\n\n\n<p>Branch accuracy can be further improved using 2-bit branch prediction, where two bits are used to encode the state of each branch in the branch history table. A branch will be predicted as taken only if it has been previously taken two times in a row. The same is valid for the branch to be considered as non-taken.<\/p>\n\n\n\n<figure class=\"wp-block-gallery aligncenter has-nested-images columns-default is-cropped wp-block-gallery-6 is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"497\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-16.11.32-1024x497.png\" alt=\"\" class=\"wp-image-2588\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-16.11.32-1024x497.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-16.11.32-300x145.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-16.11.32-768x372.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-04-16.11.32.png 1464w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/figure>\n\n\n\n<p>In general, by observing m last outcomes of former branches, we will get 2<sup>m<\/sup> possible branch predictors for <strong>each branch<\/strong> in the history table. In general, we can define an <strong>(m, n)-predictor<\/strong> in which the <strong>last m branches<\/strong> are analyzed to select one of the 2<sup>m<\/sup> n-bit predictors for the current branch.<\/p>\n<cite>\u63a7\u5236\u5371\u9669: \u5982\u679c\u4e00\u4e2a\u5206\u652f\u64cd\u4f5c\u5bfc\u81f4\u7a0b\u5e8f\u8ba1\u6570\u5668\u8df3\u8f6c\u5230\u53e6\u4e00\u4e2a\u4f4d\u7f6e\uff0c\u90a3\u4e48\u5206\u652f\u4e4b\u540e\u7684\u6d41\u6c34\u7ebf\u4e0a\u7684\u6307\u4ee4\u5c31\u5fc5\u987b\u88ab\u5237\u65b0\uff0c\u800c\u6d41\u6c34\u7ebf\u5fc5\u987b\u4ece\u6b63\u786e\u7684\u6307\u4ee4\u5f00\u59cb\u91cd\u65b0\u586b\u5145\u3002<br><br>\u7531\u4e8e\u63a7\u5236\u5371\u9669\u9020\u6210\u7684\u6574\u4f53\u6027\u80fd\u635f\u5931\u901a\u5e38\u6bd4\u6570\u636e\u5371\u9669\u9020\u6210\u7684\u635f\u5931\u8fd8\u8981\u5927\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u76ee\u524d\u7684\u5904\u7406\u5668\u91c7\u7528\u4e86\u5206\u652f\u9884\u6d4b\u6cd5\uff0c\u4ee5\u9884\u6d4b\u5206\u652f\u540e\u7684\u6b63\u786e\u6307\u4ee4\u3002<br><br>\u5206\u652f\u5386\u53f2\u8868\uff08BHT\uff09:<br><br>\u5728\u4e00\u4e2a1\u4f4d\u5206\u652f\u9884\u6d4b\u5668\u4e2d\uff0c\u6211\u4eec\u5047\u8bbe\u5206\u652f\u7684\u4e0b\u4e00\u4e2a\u7ed3\u679c\u53ef\u80fd\u4e0e\u5b58\u50a8\u5728\u8868\u4e2d\u7684\u4e0a\u4e00\u4e2a\u7ed3\u679c\u76f8\u540c\u3002\u4e00\u4e2a\u5206\u652f\u7684\u6700\u540e\u7ed3\u679c\uff08\u91c7\u53d6\u6216\u4e0d\u91c7\u53d6\uff09\u88ab\u5b58\u50a8\u5728\u4e00\u4e2a1\u4f4d\u5206\u652f\u5386\u53f2\u8868\u4e2d\u3002\u8be5\u8868\u4ee5\u5206\u652f\u5730\u5740\u7684\u6700\u540ex\u4f4d\u4e3a\u7d22\u5f15\uff0c\u56e0\u6b64\uff0c\u5206\u652f\u8868\u603b\u5171\u5305\u542b2\u4e2a\u5143\u7d20\u3002\u5728\u5faa\u73af\u4e2d\uff0c1\u4f4d\u5206\u652f\u9884\u6d4b\u5668\u603b\u662f\u9519\u8bef\u5730\u9884\u6d4b\u4e24\u6b21\uff1a\u5728\u7b2c\u4e00\u6b21\u5faa\u73af\u8fed\u4ee3\u4e4b\u540e\uff08\u56e0\u4e3a\u4e4b\u524d\u6ca1\u6709\u91c7\u53d6\u5206\u652f\uff09\uff0c\u4ee5\u53ca\u5728\u6700\u540e\u4e00\u6b21\u5faa\u73af\u8fed\u4ee3\u65f6\u9000\u51fa\u5faa\u73af\uff08\u56e0\u4e3a\u4e4b\u524d\u5df2\u7ecf\u91c7\u53d6\u4e86\u5206\u652f\uff09\u3002<br><br>\u4f7f\u75282\u4f4d\u5206\u652f\u9884\u6d4b\u53ef\u4ee5\u8fdb\u4e00\u6b65\u63d0\u9ad8\u5206\u652f\u7684\u51c6\u786e\u6027\uff0c\u5176\u4e2d\u4e24\u4e2a\u6bd4\u7279\u7528\u4e8e\u7f16\u7801\u5206\u652f\u5386\u53f2\u8868\u4e2d\u6bcf\u4e2a\u5206\u652f\u7684\u72b6\u6001\u3002\u4e00\u4e2a\u5206\u652f\u53ea\u6709\u5728\u4e4b\u524d\u8fde\u7eed\u4e24\u6b21\u88ab\u5360\u7528\u7684\u60c5\u51b5\u4e0b\u624d\u4f1a\u88ab\u9884\u6d4b\u4e3a\u88ab\u5360\u7528\u3002\u540c\u6837\u7684\u60c5\u51b5\u4e5f\u9002\u7528\u4e8e\u88ab\u8ba4\u4e3a\u662f\u672a\u91c7\u53d6\u7684\u5206\u652f\u3002<br><br>\u4e00\u822c\u6765\u8bf4\uff0c\u901a\u8fc7\u89c2\u5bdf\u4ee5\u524d\u5206\u652f\u7684m\u4e2a\u6700\u540e\u7ed3\u679c\uff0c\u6211\u4eec\u5c06\u4e3a\u5386\u53f2\u8868\u4e2d\u7684\u6bcf\u4e2a\u5206\u652f\u5f97\u52302<sup>m<\/sup>\u4e2a\u53ef\u80fd\u7684\u5206\u652f\u9884\u6d4b\u5668\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9a\u4e49\u4e00\u4e2a(m, n)\u9884\u6d4b\u5668\uff0c\u5bf9\u6700\u540e\u7684m\u4e2a\u5206\u652f\u8fdb\u884c\u5206\u6790\uff0c\u4e3a\u5f53\u524d\u5206\u652f\u9009\u62e92<sup>m<\/sup>\u4e2an\u4f4d\u9884\u6d4b\u5668\u4e2d\u7684\u4e00\u4e2a\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>A <strong>superscalar processor<\/strong> uses multiple execution units within the processor, each of which can execute a different instruction <strong>at the same time<\/strong>. To effectively utilize the multiple execution units in a superscalar processor, the processor must be able to <strong>identify<\/strong> independent instructions that can be executed concurrently. This is typically done using a combination of static analysis (analyzing the code at <strong>compile<\/strong> time) and dynamic analysis (analyzing the code as it is being <strong>executed<\/strong>).<\/p>\n\n\n\n<p><strong>Very Long Instruction Word (VLIW) processors<\/strong> use multiple execution units to improve performance by taking advantage of instruction-level parallelism (ILP) in a program, like superscalar processors. <\/p>\n\n\n\n<p>One key <strong>difference<\/strong> between VLIW processors and superscalar processors is that VLIW processors rely on <strong>static<\/strong> analysis (analyzing the code at compile time) to identify independent instructions that can be executed concurrently, while superscalar processors <strong>also use dynamic<\/strong> analysis (analyzing the code as it is being executed). This means that VLIW processors must be specifically designed and optimized for the types of programs they will be running, while superscalar processors can adapt to a wider range of programs.<\/p>\n<cite>\u4e00\u4e2a\u8d85\u6807\u91cf\u5904\u7406\u5668\u5728\u5904\u7406\u5668\u5185\u4f7f\u7528\u591a\u4e2a\u6267\u884c\u5355\u5143\uff0c\u6bcf\u4e2a\u6267\u884c\u5355\u5143\u53ef\u4ee5\u540c\u65f6\u6267\u884c\u4e0d\u540c\u7684\u6307\u4ee4\u3002\u4e3a\u4e86\u6709\u6548\u5229\u7528\u8d85\u6807\u91cf\u5904\u7406\u5668\u4e2d\u7684\u591a\u4e2a\u6267\u884c\u5355\u5143\uff0c\u5904\u7406\u5668\u5fc5\u987b\u80fd\u591f\u8bc6\u522b\u53ef\u4ee5\u540c\u65f6\u6267\u884c\u7684\u72ec\u7acb\u6307\u4ee4\u3002\u8fd9\u901a\u5e38\u662f\u901a\u8fc7\u9759\u6001\u5206\u6790\uff08\u5728\u7f16\u8bd1\u65f6\u5206\u6790\u4ee3\u7801\uff09\u548c\u52a8\u6001\u5206\u6790\uff08\u5728\u6267\u884c\u65f6\u5206\u6790\u4ee3\u7801\uff09\u7684\u7ed3\u5408\u6765\u5b8c\u6210\u7684\u3002<br><br>\u8d85\u957f\u6307\u4ee4\u5b57\uff08VLIW\uff09\u5904\u7406\u5668\u4f7f\u7528\u591a\u4e2a\u6267\u884c\u5355\u5143\uff0c\u901a\u8fc7\u5229\u7528\u7a0b\u5e8f\u4e2d\u7684\u6307\u4ee4\u7ea7\u5e76\u884c\u6027\uff08ILP\uff09\u6765\u63d0\u9ad8\u6027\u80fd\uff0c\u5c31\u50cf\u8d85\u6807\u91cf\u5904\u7406\u5668\u4e00\u6837\u3002<br><br>VLIW\u5904\u7406\u5668\u548c\u8d85\u6807\u91cf\u5904\u7406\u5668\u7684\u4e00\u4e2a\u5173\u952e\u533a\u522b\u662f\uff0cVLIW\u5904\u7406\u5668\u4f9d\u9760\u9759\u6001\u5206\u6790\uff08\u5728\u7f16\u8bd1\u65f6\u5206\u6790\u4ee3\u7801\uff09\u6765\u786e\u5b9a\u53ef\u4ee5\u5e76\u53d1\u6267\u884c\u7684\u72ec\u7acb\u6307\u4ee4\uff0c\u800c\u8d85\u6807\u91cf\u5904\u7406\u5668\u8fd8\u4f7f\u7528\u52a8\u6001\u5206\u6790\uff08\u5728\u6267\u884c\u65f6\u5206\u6790\u4ee3\u7801\uff09\u3002\u8fd9\u610f\u5473\u7740VLIW\u5904\u7406\u5668\u5fc5\u987b\u4e3a\u5176\u5c06\u8981\u8fd0\u884c\u7684\u7a0b\u5e8f\u7c7b\u578b\u8fdb\u884c\u4e13\u95e8\u8bbe\u8ba1\u548c\u4f18\u5316\uff0c\u800c\u8d85\u6807\u91cf\u5904\u7406\u5668\u53ef\u4ee5\u9002\u5e94\u66f4\u5e7f\u6cdb\u7684\u7a0b\u5e8f\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>There are several ways to measure the performance of a CPU, ultimately we are interested in CPU time of a program, task or function.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"404\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-28-23.17.06-1024x404.png\" alt=\"\" class=\"wp-image-2687\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-28-23.17.06-1024x404.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-28-23.17.06-300x118.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-28-23.17.06-768x303.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-28-23.17.06.png 1251w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Cycles per instruction (<strong>CPI<\/strong>) is a measure of the number of clock cycles that a CPU requires to execute a single instruction. It is used to evaluate the performance of a CPU and to compare the performance of different processors.<\/p>\n\n\n\n<p>A lower CPI indicates that a CPU can execute instructions more quickly and efficiently. Factors that can affect CPI include the complexity of the instruction set, the number of clock cycles required to execute each instruction, and the amount of time required to access data from memory.<\/p>\n\n\n\n<p>It is important to note that CPI alone does not reflect the overall performance of a CPU. A high clock speed or a high number of instructions per clock (IPC) can offset a high CPI, and other factors such as cache size and memory bandwidth can also affect overall performance. Thus it&#8217;s used in conjunction with other metrics to get a complete picture of a CPU&#8217;s performance.<\/p>\n<cite>\u6bcf\u6761\u6307\u4ee4\u7684\u5468\u671f\uff08CPI\uff09\u662f\u5bf9CPU\u6267\u884c\u4e00\u6761\u6307\u4ee4\u6240\u9700\u7684\u65f6\u949f\u5468\u671f\u6570\u7684\u8861\u91cf\u3002\u5b83\u88ab\u7528\u6765\u8bc4\u4f30CPU\u7684\u6027\u80fd\u548c\u6bd4\u8f83\u4e0d\u540c\u5904\u7406\u5668\u7684\u6027\u80fd\u3002<br><br>\u8f83\u4f4e\u7684CPI\u8868\u660eCPU\u53ef\u4ee5\u66f4\u5feb\u3001\u66f4\u6709\u6548\u5730\u6267\u884c\u6307\u4ee4\u3002\u5f71\u54cdCPI\u7684\u56e0\u7d20\u5305\u62ec\u6307\u4ee4\u96c6\u7684\u590d\u6742\u6027\uff0c\u6267\u884c\u6bcf\u6761\u6307\u4ee4\u6240\u9700\u7684\u65f6\u949f\u5468\u671f\u6570\uff0c\u4ee5\u53ca\u4ece\u5185\u5b58\u8bbf\u95ee\u6570\u636e\u6240\u9700\u7684\u65f6\u95f4\u3002<br><br>\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u5355\u51edCPI\u5e76\u4e0d\u80fd\u53cd\u6620CPU\u7684\u6574\u4f53\u6027\u80fd\u3002\u9ad8\u7684\u65f6\u949f\u901f\u5ea6\u6216\u9ad8\u7684\u6bcf\u65f6\u949f\u6307\u4ee4\u6570\uff08IPC\uff09\u53ef\u4ee5\u62b5\u6d88\u9ad8\u7684CPI\uff0c\u5176\u4ed6\u56e0\u7d20\u5982\u9ad8\u901f\u7f13\u5b58\u5927\u5c0f\u548c\u5185\u5b58\u5e26\u5bbd\u4e5f\u4f1a\u5f71\u54cd\u6574\u4f53\u6027\u80fd\u3002\u56e0\u6b64\uff0c\u5b83\u4e0e\u5176\u4ed6\u6307\u6807\u7ed3\u5408\u4f7f\u7528\uff0c\u4ee5\u83b7\u5f97\u4e00\u4e2aCPU\u6027\u80fd\u7684\u5b8c\u6574\u56fe\u50cf\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>We can decompose CPI<sub>MEM<\/sub> into CPI of instruction accesses and CPI of data accesses. In a system with cache memory, if data\/instructions are in the cache, the access time is 1 cycle, otherwise, there is a penalty (i.e. an increased number of cycles).<\/p>\n<cite>\u6211\u4eec\u53ef\u4ee5\u5c06CPI<sub>MEM<\/sub>\u5206\u89e3\u4e3a\u6307\u4ee4\u8bbf\u95ee\u7684CPI\u548c\u6570\u636e\u8bbf\u95ee\u7684CPI\u3002\u5728\u4e00\u4e2a\u6709\u9ad8\u901f\u7f13\u5b58\u7684\u7cfb\u7edf\u4e2d\uff0c\u5982\u679c\u6570\u636e\/\u6307\u4ee4\u5728\u9ad8\u901f\u7f13\u5b58\u4e2d\uff0c\u8bbf\u95ee\u65f6\u95f4\u4e3a1\u4e2a\u5468\u671f\uff0c\u5426\u5219\u5c31\u4f1a\u6709\u60e9\u7f5a\uff08\u5373\u5468\u671f\u6570\u589e\u52a0\uff09\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u4e00\u4e2a\u6570\u636e\u5757\u4ece\u4e3b\u5b58\u50a8\u5668\u4e2d\u68c0\u7d22\u5e76\u5b58\u50a8\u5728\u9ad8\u901f\u7f13\u5b58\u4e2d\u65f6\uff0c\u4f1a\u88ab\u653e\u5728\u4e00\u4e2a\u7279\u5b9a\u7684\u4f4d\u7f6e\uff0c\u79f0\u4e3a\u9ad8\u901f\u7f13\u5b58\u884c\u3002\u7f13\u5b58\u884c\u662f\u53ef\u4ee5\u5728\u7f13\u5b58\u548c\u4e3b\u5b58\u4e4b\u95f4\u4f20\u8f93\u7684\u6700\u5c0f\u7684\u6570\u636e\u5355\u4f4d\u3002<\/p>\n\n\n\n<p>\u7f13\u5b58\u53ea\u5305\u542b\u4e3b\u5b58\u7684\u4e00\u5c0f\u90e8\u5206\uff0c\u4e14\u4e24\u8005\u4e4b\u95f4\u6709\u4e0d\u540c\u7684\u6620\u5c04\u65b9\u5f0f\uff0c\u5982\u76f4\u63a5\u6620\u5c04\u3001\u96c6\u5408\u5173\u8054\u548c\u5b8c\u5168\u5173\u8054\u7b49\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>In a cache, an address is divided into three parts: offset, index, and tag.<\/p>\n\n\n\n<p>Offset: The offset is the least significant bits of the address, and it is used to identify a specific byte within a cache line. The size of the offset depends on the size of the cache line. For example, if the cache line size is 64 bytes, the offset would be 6 bits (2^6=64).<\/p>\n\n\n\n<p>Index: The index is the next most significant bits of the address, and it is used to identify a specific cache line within the cache. The size of the index depends on the number of cache lines in the cache. For example, if the cache has 64 lines, the index would be 6 bits (2^6=64).<\/p>\n\n\n\n<p>Tag: The tag is the most significant bits of the address, and it is used to identify a specific block of memory within main memory. The tag is used to compare the memory address being accessed to the addresses stored in the cache. If the tag matches, then the data is likely to be in the cache, and the index and offset are used to locate it.<\/p>\n<cite>\u5728\u7f13\u5b58\u4e2d\uff0c\u4e00\u4e2a\u5730\u5740\u88ab\u5206\u4e3a\u4e09\u4e2a\u90e8\u5206\uff1a\u504f\u79fb\u91cf\u3001\u7d22\u5f15\u548c\u6807\u7b7e\u3002<br><br>\u504f\u79fb\u91cf: \u5730\u5740\u7684\u6700\u5c0f\u6709\u6548\u4f4d\uff0c\u7528\u4e8e\u8bc6\u522b\u7f13\u5b58\u884c\u4e2d\u7684\u4e00\u4e2a\u7279\u5b9a\u5b57\u8282\u3002\u504f\u79fb\u91cf\u7684\u5927\u5c0f\u53d6\u51b3\u4e8e\u7f13\u51b2\u533a\u884c\u7684\u5927\u5c0f\u3002\u4f8b\u5982\uff0c\u5982\u679c\u7f13\u5b58\u884c\u7684\u5927\u5c0f\u662f64\u5b57\u8282\uff0c\u504f\u79fb\u91cf\u662f6\u4f4d\uff082<sup>6<\/sup>=64\uff09<br><br>\u7d22\u5f15: \u5730\u5740\u7684\u4e0b\u4e00\u4e2a\u6700\u91cd\u8981\u7684\u4f4d\uff0c\u5b83\u88ab\u7528\u6765\u8bc6\u522b\u9ad8\u901f\u7f13\u5b58\u4e2d\u7684\u7279\u5b9a\u9ad8\u901f\u7f13\u5b58\u884c\u3002\u7d22\u5f15\u7684\u5927\u5c0f\u53d6\u51b3\u4e8e\u7f13\u5b58\u4e2d\u7684\u7f13\u5b58\u884c\u7684\u6570\u91cf\u3002\u4f8b\u5982\uff0c\u5982\u679c\u7f13\u51b2\u533a\u670964\u884c\uff0c\u7d22\u5f15\u5c06\u662f6\u4f4d\uff082<sup>6<\/sup>=64\uff09<br><br>\u6807\u7b7e: \u5730\u5740\u7684\u6700\u91cd\u8981\u7684\u4f4d\uff0c\u5b83\u88ab\u7528\u6765\u8bc6\u522b\u4e3b\u5185\u5b58\u4e2d\u7684\u7279\u5b9a\u5185\u5b58\u5757\u3002\u6807\u7b7e\u7528\u4e8e\u6bd4\u8f83\u88ab\u8bbf\u95ee\u7684\u5185\u5b58\u5730\u5740\u548c\u5b58\u50a8\u5728\u9ad8\u901f\u7f13\u5b58\u4e2d\u7684\u5730\u5740\u3002\u5982\u679c\u6807\u7b7e\u5339\u914d\uff0c\u90a3\u4e48\u6570\u636e\u5c31\u53ef\u80fd\u5728\u9ad8\u901f\u7f13\u5b58\u4e2d\uff0c\u7d22\u5f15\u548c\u504f\u79fb\u91cf\u88ab\u7528\u6765\u5b9a\u4f4d\u5b83<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p><strong>Direct-mapped cache<\/strong>: The cache is divided into a fixed number of lines, and each line has a unique address. Each block of main memory is mapped to a specific location in the cache.<\/p>\n\n\n\n<p><strong>Set-associative cache<\/strong>: The cache is divided into a fixed number of sets, and each set contains a fixed number of lines. Each block of main memory can be mapped to one of several locations in the cache.<\/p>\n\n\n\n<p><strong>Fully associative cache<\/strong>: In this type of cache organization, each block of main memory can be mapped to any location in the cache. The cache is not divided into sets, and each block of memory is compared to all the tags in the cache. To determine if a block of memory is in the cache, the address is divided into two parts: the offset and the tag. The tag is used to identify a specific block of memory, and the offset is used to identify a specific byte within a cache line.<\/p>\n<cite>\u76f4\u63a5\u6620\u5c04\u7684\u9ad8\u901f\u7f13\u5b58: \u7f13\u5b58\u88ab\u5206\u4e3a\u56fa\u5b9a\u6570\u91cf\u7684\u884c\uff0c\u6bcf\u884c\u90fd\u6709\u4e00\u4e2a\u552f\u4e00\u7684\u5730\u5740\u3002\u4e3b\u5185\u5b58\u7684\u6bcf\u4e2a\u5757\u90fd\u88ab\u6620\u5c04\u5230\u9ad8\u901f\u7f13\u5b58\u4e2d\u7684\u4e00\u4e2a\u7279\u5b9a\u4f4d\u7f6e\u3002<br><br>\u96c6\u5408\u5f0f\u9ad8\u901f\u7f13\u5b58: \u7f13\u5b58\u88ab\u5206\u4e3a\u56fa\u5b9a\u6570\u91cf\u7684\u7ec4\uff0c\u6bcf\u7ec4\u5305\u542b\u56fa\u5b9a\u6570\u91cf\u7684\u884c\u3002\u6bcf\u4e2a\u4e3b\u5185\u5b58\u5757\u53ef\u4ee5\u88ab\u6620\u5c04\u5230\u9ad8\u901f\u7f13\u5b58\u4e2d\u7684\u51e0\u4e2a\u4f4d\u7f6e\u4e4b\u4e00\u3002<br><br>\u5b8c\u5168\u5173\u8054\u7684\u9ad8\u901f\u7f13\u5b58: \u5728\u8fd9\u79cd\u7c7b\u578b\u7684\u9ad8\u901f\u7f13\u5b58\u7ec4\u7ec7\u4e2d\uff0c\u4e3b\u5185\u5b58\u7684\u6bcf\u4e2a\u5757\u90fd\u53ef\u4ee5\u88ab\u6620\u5c04\u5230\u9ad8\u901f\u7f13\u5b58\u7684\u4efb\u4f55\u4f4d\u7f6e\u3002\u7f13\u5b58\u672c\u8eab\u662f\u4e00\u7ec4\uff0c\u6bcf\u4e2a\u5185\u5b58\u5757\u90fd\u4e0e\u7f13\u5b58\u4e2d\u7684\u6240\u6709\u6807\u8bb0\u8fdb\u884c\u6bd4\u8f83\u3002\u4e3a\u4e86\u786e\u5b9a\u4e00\u4e2a\u5185\u5b58\u5757\u662f\u5426\u5728\u9ad8\u901f\u7f13\u5b58\u4e2d\uff0c\u5730\u5740\u88ab\u5206\u4e3a\u4e24\u90e8\u5206\uff1a\u504f\u79fb\u91cf\u548c\u6807\u7b7e\u3002\u6807\u7b7e\u7528\u4e8e\u8bc6\u522b\u7279\u5b9a\u7684\u5185\u5b58\u5757\uff0c\u800c\u504f\u79fb\u91cf\u5219\u7528\u4e8e\u8bc6\u522b\u9ad8\u901f\u7f13\u5b58\u884c\u4e2d\u7684\u7279\u5b9a\u5b57\u8282\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>In the set-associative cache, when a cache line set is full and a new block of memory needs to be added, one cache line will be replaced. The most commonly used cache replacement policies are:<\/p>\n\n\n\n<p>Least Recently Used (LRU): This policy replaces the cache line that has not been accessed for the longest period of time. It works by maintaining a linked list of the cache lines in order of the time they were last accessed, with the most recently accessed line at the front of the list and the least recently accessed line at the back of the list. When a new block of memory needs to be added to the cache, the least recently accessed line is removed from the list and replaced with the new data.<\/p>\n\n\n\n<p>Least Frequently Used (LFU): This policy replaces the cache line that has been accessed the least number of times. It works by maintaining a counter for each cache line that keeps track of how many times the line has been accessed. When a new block of memory needs to be added to the cache, the line with the lowest access count is removed from the cache and replaced with the new data.<\/p>\n\n\n\n<p>First In First Out (FIFO): This policy replaces the oldest block in the cache. It works by maintaining a queue of the cache lines in the order they were added, with the oldest block at the head of the queue and the newest block at the tail of the queue. When a new block of memory needs to be added to the cache, the oldest block is removed from the queue and replaced with the new data.<\/p>\n\n\n\n<p>Random: This policy replaces a random block in the cache. It works by randomly selecting a cache line to be replaced when a new block of memory needs to be added to the cache.<\/p>\n<cite>\u7f13\u5b58\u66ff\u6362\u7b56\u7565\u51b3\u5b9a\u4e86\u5728\u7f13\u5b58\u884c\u7528\u5b8c\u540e\u9700\u8981\u4e3a\u65b0\u6570\u636e\u817e\u51fa\u7a7a\u95f4\u65f6\uff0c\u7f13\u5b58\u5982\u4f55\u5904\u7406\u3002\u6700\u5e38\u7528\u7684\u7f13\u5b58\u66ff\u6362\u7b56\u7565\u662f\u3002<br><br>\u6700\u8fd1\u4f7f\u7528\u6700\u5c11\u7684(LRU): \u8fd9\u4e2a\u7b56\u7565\u66ff\u6362\u7684\u662f\u5728\u6700\u957f\u65f6\u95f4\u5185\u6ca1\u6709\u88ab\u8bbf\u95ee\u8fc7\u7684\u7f13\u5b58\u884c\u3002\u5b83\u7684\u5de5\u4f5c\u539f\u7406\u662f\u6309\u7167\u6700\u540e\u8bbf\u95ee\u7684\u65f6\u95f4\u987a\u5e8f\u7ef4\u62a4\u4e00\u4e2a\u7f13\u5b58\u884c\u7684\u94fe\u63a5\u5217\u8868\uff0c\u6700\u8fd1\u8bbf\u95ee\u7684\u884c\u5728\u5217\u8868\u7684\u524d\u9762\uff0c\u6700\u8fd1\u8bbf\u95ee\u7684\u884c\u5728\u5217\u8868\u7684\u540e\u9762\u3002\u5f53\u4e00\u4e2a\u65b0\u7684\u5185\u5b58\u5757\u9700\u8981\u88ab\u6dfb\u52a0\u5230\u7f13\u5b58\u4e2d\u65f6\uff0c\u6700\u8fd1\u8bbf\u95ee\u6b21\u6570\u6700\u5c11\u7684\u884c\u5c06\u4ece\u5217\u8868\u4e2d\u5220\u9664\uff0c\u5e76\u88ab\u65b0\u7684\u6570\u636e\u6240\u53d6\u4ee3\u3002<br><br>\u6700\u4e0d\u7ecf\u5e38\u4f7f\u7528(LFU): \u8fd9\u4e2a\u7b56\u7565\u53d6\u4ee3\u4e86\u88ab\u8bbf\u95ee\u6b21\u6570\u6700\u5c11\u7684\u7f13\u5b58\u884c\u3002\u5b83\u7684\u5de5\u4f5c\u539f\u7406\u662f\u4e3a\u6bcf\u4e2a\u9ad8\u901f\u7f13\u5b58\u884c\u7ef4\u62a4\u4e00\u4e2a\u8ba1\u6570\u5668\uff0c\u8bb0\u5f55\u8be5\u884c\u88ab\u8bbf\u95ee\u7684\u6b21\u6570\u3002\u5f53\u4e00\u4e2a\u65b0\u7684\u5185\u5b58\u5757\u9700\u8981\u88ab\u6dfb\u52a0\u5230\u9ad8\u901f\u7f13\u5b58\u4e2d\u65f6\uff0c\u8bbf\u95ee\u6b21\u6570\u6700\u5c11\u7684\u4e00\u884c\u5c06\u4ece\u9ad8\u901f\u7f13\u5b58\u4e2d\u88ab\u79fb\u9664\uff0c\u5e76\u88ab\u65b0\u7684\u6570\u636e\u6240\u53d6\u4ee3\u3002<br><br>\u5148\u5165\u5148\u51fa(FIFO): \u8fd9\u4e2a\u7b56\u7565\u53d6\u4ee3\u4e86\u9ad8\u901f\u7f13\u5b58\u4e2d\u6700\u8001\u7684\u5757\u3002\u5b83\u7684\u5de5\u4f5c\u539f\u7406\u662f\u6309\u7167\u6dfb\u52a0\u7684\u987a\u5e8f\u7ef4\u6301\u4e00\u4e2a\u7f13\u5b58\u884c\u7684\u961f\u5217\uff0c\u6700\u8001\u7684\u5757\u5728\u961f\u5217\u7684\u5934\uff0c\u6700\u65b0\u7684\u5757\u5728\u961f\u5217\u7684\u5c3e\u3002\u5f53\u4e00\u4e2a\u65b0\u7684\u5185\u5b58\u5757\u9700\u8981\u88ab\u6dfb\u52a0\u5230\u7f13\u5b58\u4e2d\u65f6\uff0c\u6700\u65e7\u7684\u5757\u4f1a\u4ece\u961f\u5217\u4e2d\u88ab\u79fb\u9664\uff0c\u5e76\u88ab\u65b0\u7684\u6570\u636e\u6240\u53d6\u4ee3\u3002<br><br>\u968f\u673a: \u8fd9\u4e2a\u7b56\u7565\u5728\u9ad8\u901f\u7f13\u5b58\u4e2d\u66ff\u6362\u4e00\u4e2a\u968f\u673a\u5757\u3002\u5b83\u7684\u5de5\u4f5c\u539f\u7406\u662f\uff0c\u5f53\u6709\u65b0\u7684\u5185\u5b58\u5757\u9700\u8981\u6dfb\u52a0\u5230\u9ad8\u901f\u7f13\u5b58\u4e2d\u65f6\uff0c\u968f\u673a\u9009\u4e00\u4e2a\u9ad8\u901f\u7f13\u5b58\u884c\u6765\u8fdb\u884c\u66ff\u6362\u3002<br><\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Cache write strategies determine how data is written to the cache when a block of memory is updated or modified. Some common cache write strategies are:<\/p>\n\n\n\n<p>Write-Through: In this strategy, data is written to both the cache and the main memory at the same time. This ensures that the data in the cache is always consistent with the data in the main memory. However, this strategy can result in increased write traffic to the main memory, which can slow down the system.<\/p>\n\n\n\n<p>Write-Back: In this strategy, data is first written to the cache, and then written to the main memory at a later time. This can improve system performance by reducing the number of writes to the main memory. However, it also increases the chances of cache data becoming inconsistent with main memory data in case of system crashes or power failures.<\/p>\n<cite>\u7f13\u5b58\u5199\u5165\u7b56\u7565\u51b3\u5b9a\u4e86\u5f53\u4e00\u4e2a\u5185\u5b58\u5757\u88ab\u66f4\u65b0\u6216\u4fee\u6539\u65f6\uff0c\u6570\u636e\u5982\u4f55\u88ab\u5199\u5165\u7f13\u5b58\u3002\u4e00\u4e9b\u5e38\u89c1\u7684\u9ad8\u901f\u7f13\u5b58\u5199\u5165\u7b56\u7565\u662f\u3002<br><br>Write-Through\uff1a\u5728\u8fd9\u79cd\u7b56\u7565\u4e2d\uff0c\u6570\u636e\u88ab\u540c\u65f6\u5199\u5165\u9ad8\u901f\u7f13\u5b58\u548c\u4e3b\u5185\u5b58\u3002\u8fd9\u786e\u4fdd\u4e86\u9ad8\u901f\u7f13\u5b58\u4e2d\u7684\u6570\u636e\u4e0e\u4e3b\u5b58\u4e2d\u7684\u6570\u636e\u59cb\u7ec8\u662f\u4e00\u81f4\u7684\u3002\u7136\u800c\uff0c\u8fd9\u79cd\u7b56\u7565\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5bf9\u4e3b\u5b58\u7684\u5199\u5165\u6d41\u91cf\u589e\u52a0\uff0c\u4ece\u800c\u964d\u4f4e\u7cfb\u7edf\u7684\u901f\u5ea6\u3002<br><br>Write-Back\uff1a\u5728\u8fd9\u4e2a\u7b56\u7565\u4e2d\uff0c\u6570\u636e\u9996\u5148\u88ab\u5199\u5165\u9ad8\u901f\u7f13\u5b58\uff0c\u7136\u540e\u5728\u7a0d\u540e\u7684\u65f6\u95f4\u5199\u5165\u4e3b\u5185\u5b58\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u51cf\u5c11\u5bf9\u4e3b\u5185\u5b58\u7684\u5199\u5165\u6b21\u6570\u6765\u63d0\u9ad8\u7cfb\u7edf\u6027\u80fd\u3002\u7136\u800c\uff0c\u5728\u7cfb\u7edf\u5d29\u6e83\u6216\u65ad\u7535\u7684\u60c5\u51b5\u4e0b\uff0c\u5b83\u4e5f\u589e\u52a0\u4e86\u7f13\u5b58\u6570\u636e\u4e0e\u4e3b\u5185\u5b58\u6570\u636e\u4e0d\u4e00\u81f4\u7684\u673a\u4f1a\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>In a write-back cache, a &#8220;dirty bit&#8221; is used to keep track of whether a block of memory in the cache has been modified (written to) or not.<\/p>\n\n\n\n<p>When a block of memory is first brought into the cache, the dirty bit is set to &#8220;not dirty&#8221; (or &#8220;clean&#8221;). If a write operation is then performed on the block of memory in the cache, the dirty bit is set to &#8220;dirty&#8221; to indicate that the block of memory has been modified and the copy in the main memory is no longer up-to-date.<\/p>\n\n\n\n<p>When the cache replacement algorithm decides that a dirty block needs to be evicted, the data in that block is written back to main memory first, so as to maintain the consistency between the main memory and the cache.<\/p>\n\n\n\n<p>The use of dirty bits allows the write-back cache to avoid writing back all blocks to main memory, thus reducing the number of writes to main memory and improving performance.<\/p>\n<cite>\u5728\u56de\u5199\u5f0f\u9ad8\u901f\u7f13\u5b58\u4e2d\uff0c\u4e00\u4e2a &#8220;\u810f\u4f4d &#8220;\u7528\u4e8e\u8ddf\u8e2a\u9ad8\u901f\u7f13\u5b58\u4e2d\u7684\u4e00\u4e2a\u5185\u5b58\u5757\u662f\u5426\u88ab\u4fee\u6539\u8fc7\uff08\u5199\u5165\uff09\u3002<br>\u5f53\u4e00\u4e2a\u5185\u5b58\u5757\u7b2c\u4e00\u6b21\u88ab\u5e26\u5165\u9ad8\u901f\u7f13\u5b58\u65f6\uff0c\u810f\u4f4d\u88ab\u8bbe\u7f6e\u4e3a &#8220;\u4e0d\u810f&#8221;\uff08\u6216 &#8220;\u5e72\u51c0&#8221;\uff09\u3002\u5982\u679c\u968f\u540e\u5bf9\u7f13\u5b58\u4e2d\u7684\u5185\u5b58\u5757\u8fdb\u884c\u4e86\u5199\u64cd\u4f5c\uff0cdirty\u4f4d\u88ab\u8bbe\u7f6e\u4e3a &#8220;dirty&#8221;\uff0c\u8868\u793a\u8be5\u5185\u5b58\u5757\u5df2\u88ab\u4fee\u6539\uff0c\u4e3b\u5185\u5b58\u4e2d\u7684\u62f7\u8d1d\u4e0d\u518d\u662f\u6700\u65b0\u7684\u3002<br><br>\u5f53\u7f13\u5b58\u66ff\u6362\u7b97\u6cd5\u51b3\u5b9a\u4e00\u4e2a\u810f\u5757\u9700\u8981\u88ab\u9a71\u9010\u65f6\uff0c\u8be5\u5757\u4e2d\u7684\u6570\u636e\u9996\u5148\u88ab\u5199\u56de\u4e3b\u5185\u5b58\uff0c\u4ee5\u4fdd\u6301\u4e3b\u5185\u5b58\u548c\u7f13\u5b58\u4e4b\u95f4\u7684\u4e00\u81f4\u6027\u3002<br>\u810f\u4f4d\u7684\u4f7f\u7528\u4f7f\u56de\u5199\u7f13\u5b58\u907f\u514d\u5c06\u6240\u6709\u5757\u5199\u56de\u4e3b\u5185\u5b58\uff0c\u4ece\u800c\u51cf\u5c11\u5bf9\u4e3b\u5185\u5b58\u7684\u5199\u5165\u6b21\u6570\uff0c\u63d0\u9ad8\u6027\u80fd\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">5. Memory<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"938\" height=\"381\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-29-11.01.53.png\" alt=\"\" class=\"wp-image-2701\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-29-11.01.53.png 938w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-29-11.01.53-300x122.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-29-11.01.53-768x312.png 768w\" sizes=\"(max-width: 938px) 100vw, 938px\" \/><figcaption class=\"wp-element-caption\">classification of memory<\/figcaption><\/figure><\/div>\n\n\n<p>\u5bc4\u5b58\u5668\u548cRAM\u90fd\u662f\u7531\u6676\u4f53\u7ba1\u6784\u6210\u7684\u3002\u7136\u800c\uff0c\u5bc4\u5b58\u5668\u901a\u5e38\u7531\u5c11\u91cf\u7684\u6676\u4f53\u7ba1\u7ec4\u6210\uff0c\u4e0eCPU\u7d27\u5bc6\u7ed3\u5408\uff0c\u7528\u4e8e\u4e34\u65f6\u5b58\u50a8\u88abCPU\u9ad8\u9891\u4f7f\u7528\u548c\u5904\u7406\u7684\u6570\u636e\u3002\u5b83\u4eec\u88ab\u8bbe\u8ba1\u6210\u5c0f\u800c\u5feb\uff0c\u56e0\u6b64\u6570\u636e\u53ef\u4ee5\u88ab\u5feb\u901f\u5b58\u50a8\u548c\u68c0\u7d22\u3002\u5bc4\u5b58\u5668\u5141\u8bb8\u5bf9\u5b58\u50a8\u4fe1\u606f\u7684\u8fde\u7eed\u8bbf\u95ee\u3002<\/p>\n\n\n\n<p>\u53e6\u4e00\u65b9\u9762\uff0cRAM\u901a\u5e38\u7531\u66f4\u591a\u7684\u6676\u4f53\u7ba1\u7ec4\u6210\uff0c\u901a\u8fc7\u4e00\u4e2a\u5185\u5b58\u63a7\u5236\u5668\u4e0eCPU\u76f8\u8fde\uff0c\u7528\u4e8e\u5b58\u50a8\u6b63\u5728\u88ab\u64cd\u4f5c\u7cfb\u7edf\u548c\u5e94\u7528\u7a0b\u5e8f\u9ad8\u9891\u4f7f\u7528\u7684\u6570\u636e\u3002\u5185\u5b58\u63a7\u5236\u5668\u4f5c\u4e3aCPU\u548cRAM\u4e4b\u95f4\u7684\u4e2d\u4ecb\uff0c\u7ba1\u7406\u6570\u636e\u4f20\u8f93\u5e76\u63a7\u5236\u5bf9\u5185\u5b58\u7684\u8bbf\u95ee\u3002RAM\u53ea\u5141\u8bb8\u8bbf\u95ee\u5b58\u50a8\u4fe1\u606f\u7684\u4e00\u5c0f\u90e8\u5206\u3002RAM\u7684\u7269\u7406\u7ed3\u6784\u53ef\u4ee5\u6839\u636eRAM\u7684\u7c7b\u578b\uff08\u5982DDR\u3001SDRAM\u7b49\uff09\u800c\u6709\u6240\u4e0d\u540c\uff0c\u4f46\u5b83\u901a\u5e38\u6bd4\u5bc4\u5b58\u5668\u7684\u7ed3\u6784\u66f4\u5927\u3001\u66f4\u590d\u6742\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"540\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-29-11.03.14-1024x540.png\" alt=\"\" class=\"wp-image-2704\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-29-11.03.14-1024x540.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-29-11.03.14-300x158.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-29-11.03.14-768x405.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-29-11.03.14.png 1042w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">characteristics of memory<\/figcaption><\/figure>\n\n\n\n<ul>\n<li>SRAM\uff08\u9759\u6001\u968f\u673a\u5b58\u53d6\u5b58\u50a8\u5668\uff09&amp; DRAM\uff08\u52a8\u6001\u968f\u673a\u5b58\u53d6\u5b58\u50a8\u5668\uff09<\/li>\n<\/ul>\n\n\n\n<p>\u5237\u65b0: DRAM\u9700\u8981\u5b9a\u671f\u5237\u65b0\u5176\u5185\u5bb9\uff0c\u800cSRAM\u4e0d\u9700\u8981\u3002<\/p>\n\n\n\n<p>\u5355\u5143\u8bbe\u8ba1: DRAM\u5728\u7535\u5bb9\u5668\u4e2d\u4ee5\u7535\u8377\u7684\u5f62\u5f0f\u5b58\u50a8\u6570\u636e\uff0c\u800cSRAM\u5728\u89e6\u53d1\u5668\u7535\u8def\u4e2d\u4ee5\u4e8c\u8fdb\u5236\u72b6\u6001\u5b58\u50a8\u6570\u636e\u3002<\/p>\n\n\n\n<p>\u8bbf\u95ee\u65f6\u95f4: SRAM\u7684\u8bbf\u95ee\u65f6\u95f4\u6bd4DRAM\u5feb\uff0c\u56e0\u4e3a\u5b83\u4e0d\u9700\u8981\u5237\u65b0\u5468\u671f\u3002<\/p>\n\n\n\n<p>\u8017\u7535\u91cf: \u7531\u4e8eSRAM\u7684\u5355\u5143\u8bbe\u8ba1\u548c\u4e0d\u9700\u8981\u5237\u65b0\uff0c\u5b83\u6bd4DRAM\u6d88\u8017\u66f4\u591a\u7684\u80fd\u91cf\u3002<\/p>\n\n\n\n<p>\u6210\u672c: \u7531\u4e8eDRAM\u7684\u5355\u5143\u8bbe\u8ba1\u6bd4\u8f83\u7b80\u5355\uff0c\u56e0\u6b64\u6bcf\u6bd4\u7279\u7684\u5b58\u50a8\u6210\u672c\u6bd4SRAM\u4f4e\u3002<\/p>\n\n\n\n<p>\u5bb9\u91cf: DRAM\u7684\u5bb9\u91cf\u6bd4SRAM\u5927\u5f97\u591a\uff0c\u8fd9\u4f7f\u5f97\u5b83\u6210\u4e3a\u5927\u591a\u6570\u8ba1\u7b97\u673a\u7cfb\u7edf\u4e2d\u4e3b\u5b58\u50a8\u5668\u7684\u9996\u9009\u3002<\/p>\n\n\n\n<p>\u603b\u4e4b\uff0cSRAM\u6bd4DRAM\u66f4\u5feb\u3001\u66f4\u8017\u7535\uff0c\u4f46\u5b83\u4e5f\u66f4\u6602\u8d35\uff0c\u800c\u4e14\u901a\u5e38\u5bb9\u91cf\u8f83\u5c0f\u3002DRAM\u7684\u901f\u5ea6\u8f83\u6162\uff0c\u529f\u8017\u8f83\u4f4e\uff0c\u4f46\u4ef7\u683c\u8f83\u4f4e\uff0c\u800c\u4e14\u5bb9\u91cf\u8f83\u5927\uff0c\u8fd9\u4f7f\u5b83\u6210\u4e3a\u5927\u591a\u6570\u8ba1\u7b97\u673a\u7cfb\u7edf\u4e2d\u4e3b\u5b58\u50a8\u5668\u7684\u9996\u9009\u3002<\/p>\n\n\n\n<ul>\n<li>DDR SRAM<\/li>\n<\/ul>\n\n\n\n<p>\u901a\u8fc7\u4f7f\u7528\u53cc\u6570\u636e\u901f\u7387\uff08DDR\uff09\u67b6\u6784\u6765\u5b9e\u73b0\u9ad8\u901f\u6570\u636e\u4f20\u8f93\uff0c\u5176\u4e2d\u6570\u636e\u5728\u65f6\u949f\u4fe1\u53f7\u7684\u4e0a\u5347\u6cbf\u548c\u4e0b\u964d\u6cbf\u4e0a\u4f20\u8f93\u3002\u4e0e\u4f20\u7edfSRAM\u76f8\u6bd4\uff0c\u8fd9\u5141\u8bb8\u66f4\u9ad8\u7684\u6570\u636e\u4f20\u8f93\u7387\uff0c\u4f20\u7edfSRAM\u53ea\u5728\u65f6\u949f\u4fe1\u53f7\u7684\u4e0a\u5347\u6cbf\u4f20\u8f93\u6570\u636e\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>We first clarify some basic definitions in the context of memory:<\/p>\n\n\n\n<p>Access <strong>bandwidth [bits\/s]<\/strong>: Amount of data transported into or out of a memory array (or memory interface) per unit of time.<\/p>\n\n\n\n<p><strong>Latency<\/strong>: Delay or time elapsed between the request and actual delivery of data.<\/p>\n\n\n\n<p><strong>Cycle time<\/strong>: Minimum time period between two consecutive read or write accesses to memory.<\/p>\n\n\n\n<p><strong>Asynchronous memory<\/strong>, also known as asynchronous DRAM, does not operate in sync with the clock speed of the computer&#8217;s processor. Instead, it operates on its own clock, which can be slower or faster than the processor&#8217;s clock. This results in longer access times, but it also means that asynchronous memory can be manufactured using simpler and less expensive technology.<\/p>\n\n\n\n<p><strong>Synchronous memory<\/strong> operates in sync with the clock speed of the computer&#8217;s processor. This results in faster access times, as the memory and processor can work in tandem to quickly transfer data. However, synchronous memory is typically more expensive to manufacture, as it requires more advanced technology to synchronize its operation with the processor&#8217;s clock.<\/p>\n<cite>\u8bbf\u95ee\u5e26\u5bbd: \u6bcf\u5355\u4f4d\u65f6\u95f4\u5185\u4f20\u9001\u5230\u5185\u5b58\u9635\u5217\uff08\u6216\u5185\u5b58\u63a5\u53e3\uff09\u7684\u6570\u636e\u91cf\u3002<br>\u5ef6\u8fdf: \u8bf7\u6c42\u548c\u5b9e\u9645\u4ea4\u4ed8\u6570\u636e\u4e4b\u95f4\u7684\u5ef6\u8fdf\u6216\u65f6\u95f4\u3002<br>\u5468\u671f\u65f6\u95f4: \u4e24\u4e2a\u8fde\u7eed\u7684\u8bfb\u6216\u5199\u8bbf\u95ee\u4e4b\u95f4\u7684\u6700\u5c0f\u65f6\u95f4\u6bb5\u7684\u6700\u5c0f\u65f6\u95f4\u95f4\u9694\u3002<br>\u5f02\u6b65\u5185\u5b58: \u4e5f\u88ab\u79f0\u4e3a\u5f02\u6b65DRAM\uff0c\u4e0d\u4e0e\u8ba1\u7b97\u673a\u5904\u7406\u5668\u7684\u65f6\u949f\u901f\u5ea6\u540c\u6b65\u8fd0\u884c\u3002\u76f8\u53cd\uff0c\u5b83\u5728\u81ea\u5df1\u7684\u65f6\u949f\u4e0a\u8fd0\u884c\uff0c\u5176\u901f\u5ea6\u53ef\u80fd\u6bd4\u5904\u7406\u5668\u7684\u65f6\u949f\u6162\u6216\u5feb\u3002\u8fd9\u5bfc\u81f4\u4e86\u66f4\u957f\u7684\u8bbf\u95ee\u65f6\u95f4\uff0c\u4f46\u5b83\u4e5f\u610f\u5473\u7740\u5f02\u6b65\u5185\u5b58\u53ef\u4ee5\u4f7f\u7528\u66f4\u7b80\u5355\u3001\u66f4\u4fbf\u5b9c\u7684\u6280\u672f\u6765\u5236\u9020\u3002<br>\u540c\u6b65\u5b58\u50a8\u5668\u7684\u8fd0\u884c\u4e0e\u8ba1\u7b97\u673a\u5904\u7406\u5668\u7684\u65f6\u949f\u901f\u5ea6\u540c\u6b65\u3002\u8fd9\u5bfc\u81f4\u66f4\u5feb\u7684\u8bbf\u95ee\u65f6\u95f4\uff0c\u56e0\u4e3a\u5185\u5b58\u548c\u5904\u7406\u5668\u53ef\u4ee5\u534f\u540c\u5de5\u4f5c\uff0c\u5feb\u901f\u4f20\u8f93\u6570\u636e\u3002\u7136\u800c\uff0c\u540c\u6b65\u5b58\u50a8\u5668\u7684\u5236\u9020\u6210\u672c\u901a\u5e38\u66f4\u9ad8\uff0c\u56e0\u4e3a\u5b83\u9700\u8981\u66f4\u5148\u8fdb\u7684\u6280\u672f\u6765\u4f7f\u5176\u8fd0\u884c\u4e0e\u5904\u7406\u5668\u7684\u65f6\u949f\u540c\u6b65\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u6240\u6709\u7684\u5b58\u50a8\u5668\u90fd\u6709\u4e00\u4e2a\u5171\u540c\u70b9\uff0c\u5373\u5b83\u4eec\u662f\u4ee5\u4e8c\u7ef4\u9635\u5217\u7ed3\u6784\u7ec4\u7ec7\u7684\u3002\u5b58\u50a8\u7684\u4fe1\u606f\u4e0d\u662f\u4ee5\u6bcf\u4e00\u4f4d\u4e3a\u57fa\u7840\u8fdb\u884c\u8bbf\u95ee\u7684\uff0c\u800c\u662f\u4ee5\u6240\u8c13\u7684\u5b57\u4e3a\u5355\u4f4d\uff0c\u7531M\u4f4d\u7ec4\u6210\u3002M\u662f\u4e00\u4e2a\u53ef\u53d8\u7684\u6570\u5b57 \uff0c\u901a\u5e38\u4e0e\u76f8\u5e94\u7684\u5fae\u5904\u7406\u5668\u67b6\u6784\u7684\u6570\u636e\u8def\u5f84\u5bbd\u5ea6\u76f8\u5339\u914d\uff088\u4f4d\u300116\u4f4d\u300132\u4f4d\u300164\u4f4d\uff09\u3002<\/p>\n\n\n\n<figure class=\"wp-block-gallery aligncenter has-nested-images columns-default is-cropped wp-block-gallery-8 is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"606\" data-id=\"2711\"  src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-29-11.28.50-1024x606.png\" alt=\"\" class=\"wp-image-2711\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-29-11.28.50-1024x606.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-29-11.28.50-300x177.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-29-11.28.50-768x454.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/01\/\u622a\u5c4f2023-01-29-11.28.50.png 1119w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/figure>\n\n\n\n<p>\u5b58\u50a8\u5668\u9635\u5217\u7684\u5185\u5bb9\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e2a\u5171\u4eab\u7684\u3001\u53cc\u5411\u7684\uff08\u8f93\u5165\/\u8f93\u51fa\uff09\u6570\u636e\u603b\u7ebf\u8bbf\u95ee\uff0c\u8be5\u603b\u7ebf\u4e3aM\u4f4d\u5bbd\u3002\u7531\u4e8e\u5b9e\u9645\u539f\u56e0\uff08\u4e3a\u4e86\u9650\u5236\u5916\u90e8\u9700\u8981\u7684\u63a7\u5236\u4fe1\u53f7\u7684\u6570\u91cf\uff09\uff0c\u6211\u4eec\u4f7f\u7528\u4e86\u4e00\u4e2a\u5730\u5740\u89e3\u7801\u5668\u3002\u7528L\u4e2a\u5730\u5740\u4fe1\u53f7\u53ef\u4ee5\u4ece2<sup>L<\/sup>\u4e2a\u5b57\u4e2d\u9009\u62e9\u4e00\u4e2a\u3002<\/p>\n\n\n\n<p>\u5728\u5b9e\u8df5\u4e2d\uff0c\u5185\u5b58\u9635\u5217\u7684\u5c3a\u5bf8\u662f\u8fd9\u6837\u7684\uff1a\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u5927\u81f4\u76f8\u7b49\u3002\u8fd9\u610f\u5473\u7740\u6bcf\u4e00\u884c\u5305\u542b\u591a\u4e2a\u5b57\u3002\u56e0\u6b64\uff0c\u5730\u5740\u89e3\u7801\u5668\u88ab\u5206\u6210\u4e00\u4e2a\u5217\u89e3\u7801\u5668\uff08K\u4f4d\uff09\u548c\u4e00\u4e2a\u884c\u89e3\u7801\u5668\uff08L-K\u4f4d\uff09\uff0c\u524d\u8005\u4ece2<sup>K<\/sup> \u4e2a\uff0c \u540e\u8005\u4ece2<sup>L-K <\/sup>\u4e2a\u5b57\u4e2d\u9009\u62e9\u4e00\u4e2a\u3002\u5217\u89e3\u7801\u5668\u548c\u5b58\u50a8\u5668\u9635\u5217\u4e4b\u95f4\u8bbe\u7f6e\u4e86\u611f\u5e94\u653e\u5927\u5668\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-08-16.04.24-1024x629.png\" alt=\"\" class=\"wp-image-2751\" width=\"570\" height=\"349\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-08-16.04.24-1024x629.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-08-16.04.24-300x184.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-08-16.04.24-768x472.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-08-16.04.24.png 1286w\" sizes=\"(max-width: 570px) 100vw, 570px\" \/><figcaption class=\"wp-element-caption\">sequence of memory access<\/figcaption><\/figure><\/div>\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Burst access modes allow for reading\/writing more than a single data word from\/to memory. In order to store\/retrieve larger chunks of information to\/from consecutive memory locations, it is sufficient to <strong>increment<\/strong> the column decoder address lines (while keeping the row decoder lines fixed). The maximum burst size (i.e. number of words that can be accessed during one burst command) equals the number of words in one word line (= 2<sup>K<\/sup>).<\/p>\n<cite>\u7a81\u53d1\u8bbf\u95ee\u6a21\u5f0f\u5141\u8bb8\u4ece\/\u5411\u5b58\u50a8\u5668\u8bfb\/\u5199\u8d85\u8fc7\u4e00\u4e2a\u6570\u636e\u5b57\u3002 \u4e3a\u4e86\u5411\/\u4ece\u8fde\u7eed\u7684\u5b58\u50a8\u5668\u4f4d\u7f6e\u5b58\u50a8\/\u68c0\u7d22\u66f4\u5927\u7684\u4fe1\u606f\u5757\uff0c\u53ea\u9700\u589e\u52a0\u5217\u89e3\u7801\u5668\u7684\u5730\u5740\u7ebf\uff08\u540c\u65f6\u4fdd\u6301\u884c\u89e3\u7801\u5668\u7ebf\u7684\u56fa\u5b9a\uff09\u3002 \u6700\u5927\u7684\u7a81\u53d1\u5927\u5c0f\uff08\u5373\u5728\u4e00\u4e2a\u7a81\u53d1\u547d\u4ee4\u4e2d\u53ef\u4ee5\u8bbf\u95ee\u7684\u5b57\u6570\uff09\u7b49\u4e8e\u4e00\u4e2a\u5b57\u884c\u7684\u5b57\u6570\uff08=2<sup>K<\/sup>\uff09<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Hierarchical Memory Architecture<br>An assembly consisting of a memory cell matrix, a row decoder, and a column decoder is a memory block or <strong>page<\/strong>. Memory blocks can be <strong>cascaded<\/strong> horizontally, further partitioning the address bits into <strong>block address<\/strong>, column address, and row addresses.<\/p>\n<cite>\u5206\u5c42\u5185\u5b58\u7ed3\u6784:<br>\u7531\u4e00\u4e2a\u5b58\u50a8\u5355\u5143\u77e9\u9635\u3001\u4e00\u4e2a\u884c\u89e3\u7801\u5668\u548c\u4e00\u4e2a\u5217\u89e3\u7801\u5668\u7ec4\u6210\u7684\u7ec4\u4ef6\u662f\u4e00\u4e2a\u5b58\u50a8\u5757\u6216\u9875\u3002\u5b58\u50a8\u5757\u53ef\u4ee5\u6c34\u5e73\u7ea7\u8054\uff0c\u8fdb\u4e00\u6b65\u5c06\u5730\u5740\u4f4d\u5212\u5206\u4e3a\u5757\u5730\u5740\u3001\u5217\u5730\u5740\u548c\u884c\u5730\u5740\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u6211\u4eec\u73b0\u5728\u7814\u7a76\u5b9e\u9645\u7684\u5b58\u50a8\u5355\u5143\uff1aDRAM\u5355\u5143\u3002DRAM\u5728\u5b58\u50a8\u5bc6\u5ea6\u65b9\u9762\u8868\u73b0\u51fa\u8272\uff0c\u56e0\u4e3a\u5b83\u9700\u8981\u6700\u5c11\u7684\u57fa\u672cCMOS\u5668\u4ef6\u6765\u5b9e\u73b0\u5b58\u50a8\u5355\u5143\uff0c\u5373\u4e00\u4e2aCMOS\u6676\u4f53\u7ba1\u52a0\u4e00\u4e2a\u7535\u5bb9\u3002 <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-16.00.46.png\" alt=\"\" class=\"wp-image-2725\" width=\"198\" height=\"270\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-16.00.46.png 399w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-16.00.46-220x300.png 220w\" sizes=\"(max-width: 198px) 100vw, 198px\" \/><figcaption class=\"wp-element-caption\">SRAM cell<\/figcaption><\/figure><\/div>\n\n\n<blockquote class=\"wp-block-quote\">\n<p>The transistor acts as a switch which is controlled by the word line WL. The bit information is stored in the storage capacitor C<sub>S<\/sub>. BL is precharged to V<sub>DD<\/sub>\/2.<\/p>\n\n\n\n<p>When a logic \u201c1\u201d (V<sub>DD<\/sub>) shall be written to a particular memory cell, the corresponding BL and WL lines are driven with V<sub>DD<\/sub>. As a consequence, CS is charged to &#8220;1&#8221;, i.e., V<sub>DD<\/sub>-V<sub>t <\/sub>(If there was already a \u201c1\u201d stored on CS, the logic level is refreshed.) Similarly, storing a \u201c0\u201d is realized by driving BL to GND which discharges C<sub>S<\/sub>.<\/p>\n\n\n\n<p>When a particular memory cell is read, the corresponding BL and WL lines are driven with V<sub>DD<\/sub>. In case a \u201c1\u201d was stored, the voltage of C<sub>S <\/sub>is V<sub>DD<\/sub>-V<sub>t<\/sub>, which is greater than the voltage of C<sub>BL<\/sub>: V<sub>DD<\/sub>\/2, the <strong>charge redistribution<\/strong> between C<sub>S<\/sub> and the bit line capacitor C<sub>BL<\/sub> raises the voltage on BL. As C<sub>S<\/sub> is much smaller than C<sub>BL<\/sub>, the total charge Q = Q<sub>S<\/sub>+Q<sub>BL <\/sub>= C<sub>S<\/sub>V<sub>S<\/sub> + C<sub>BL<\/sub>V<sub>BL<\/sub> keeps unchanged, this voltage swing is small compared to V<sub>DD<\/sub>. However, it\u2019s big enough to be sensed by the sense amplifier who drives BL to V<sub>DD<\/sub> and recharges C<sub>S<\/sub>. Hence, during a DRAM read, the stored &#8220;1&#8221; of the memory cell is re-written. <\/p>\n<cite>\u6676\u4f53\u7ba1\u5145\u5f53\u4e00\u4e2a\u5f00\u5173\uff0c\u7531\u5b57\u7ebfWL\u63a7\u5236\u3002\u4f4d\u4fe1\u606f\u5b58\u50a8\u5728\u5b58\u50a8\u7535\u5bb9C<sub>S<\/sub>\u4e2d\uff0cBL\u9884\u5145\u7535\u5230V<sub>DD<\/sub>\/2\u3002 <br>\u5f53\u4e00\u4e2a\u903b\u8f91 &#8220;1&#8221;\uff08V<sub>DD<\/sub>\uff09\u88ab\u5199\u5165\u4e00\u4e2a\u7279\u5b9a\u7684\u5b58\u50a8\u5355\u5143\u65f6\uff0c\u76f8\u5e94\u7684BL\u548cWL\u7ebf\u88abV<sub>DD<\/sub>\u9a71\u52a8\u3002 \u56e0\u6b64\uff0cC<sub>S<\/sub>\u88ab\u5145\u7535\u5230V<sub>DD<\/sub>-V<sub>t<\/sub>\uff08\u5982\u679cCS\u4e0a\u5df2\u7ecf\u5b58\u50a8\u4e86\u4e00\u4e2a &#8220;1&#8221;\uff0c\u5219\u903b\u8f91\u7535\u5e73\u88ab\u5237\u65b0\u3002\uff09\u540c\u6837\uff0c\u5b58\u50a8 &#8220;0 &#8220;\u662f\u901a\u8fc7\u5c06BL\u9a71\u52a8\u5230GND\u6765\u5b9e\u73b0\u7684\uff0cGND\u4f7fC<sub>S<\/sub>\u653e\u7535\u3002<br>\u5f53\u67d0\u4e00\u5b58\u50a8\u5355\u5143\u88ab\u8bfb\u53d6\u65f6\uff0c\u76f8\u5e94\u7684BL\u548cWL\u7ebf\u88abV<sub>DD<\/sub>\u9a71\u52a8\u3002\u5728\u5b58\u50a8 &#8220;1&#8221;\u7684\u60c5\u51b5\u4e0b\uff0cC<sub>S<\/sub>\u7684\u7535\u538b\u4e3aV<sub>DD<\/sub>-Vt\uff0c\u5927\u4e8eCBL\u7684\u7535\u538bV<sub>DD<\/sub>\/2\uff0cC<sub>S<\/sub>\u548c\u4f4d\u7ebf\u7535\u5bb9CBL\u4e4b\u95f4\u7684\u7535\u8377\u91cd\u65b0\u5206\u914d\u63d0\u9ad8\u4e86BL\u7684\u7535\u538b\u3002\u7531\u4e8eC<sub>S<\/sub>\u6bd4C<sub>BL<\/sub>\u5c0f\u5f97\u591a\uff0c\u603b\u7535\u8377Q=Q<sub>S<\/sub>+Q<sub>BL<\/sub>=C<sub>S<\/sub>V<sub>S<\/sub>+C<sub>BL<\/sub>V<sub>BL<\/sub>\uff0c\u8fd9\u4e2a\u7535\u538b\u6ce2\u52a8\u5f88\u5c0f\uff08\u4e0eV<sub>DD<\/sub>\u76f8\u6bd4\uff09\u3002 \u7136\u800c\uff0c\u5b83\u5927\u5230\u8db3\u4ee5\u88ab\u611f\u5e94\u653e\u5927\u5668\u6240\u611f\u5e94\u5230\uff0c\u653e\u5927\u5668\u9a71\u52a8BL\u5230V<sub>DD<\/sub>\u5e76\u4e3aC<sub>S<\/sub>\u5145\u7535\u3002 \u56e0\u6b64\uff0c\u5728DRAM\u8bfb\u53d6\u671f\u95f4\uff0c\u5b58\u50a8\u7684&#8221;1&#8243;\u88ab\u91cd\u65b0\u5199\u5165\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>C<sub>S<\/sub> may lose the stored content due to charge leakage. That\u2019s why the stored content in DynamicRAM memories has to be refreshed periodically when the time between consecutive memory accesses exceeds certain intervals.<\/p>\n<cite>\u7531\u4e8e\u7535\u8377\u6cc4\u6f0f\uff0cCS\u53ef\u80fd\u4f1a\u4e22\u5931\u5b58\u50a8\u7684\u5185\u5bb9\u3002\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48\u5f53\u8fde\u7eed\u8bbf\u95ee\u5b58\u50a8\u5668\u7684\u65f6\u95f4\u8d85\u8fc7\u4e00\u5b9a\u95f4\u9694\u65f6\uff0c\u5fc5\u987b\u5b9a\u671f\u5237\u65b0DynamicRAM\u5b58\u50a8\u5668\u4e2d\u7684\u5b58\u50a8\u5185\u5bb9\u3002<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Trench DRAM Cell implements the <strong>conducting electrodes of the capacitor<\/strong> along the walls of a <strong>deep and narrow<\/strong> trench cut into the Si substrate, which increases the storage capacity C<sub>S<\/sub>, thus the information stored is more robust.<\/p>\n<cite>\u6c9f\u69fd\u5f0fDRAM\u5355\u5143\u5c06\u7535\u5bb9\u5668\u7684\u5bfc\u7535\u7535\u6781\u6cbf\u7740\u5207\u5165\u7845\u886c\u5e95\u7684\u6df1\u800c\u7a84\u7684\u6c9f\u69fd\u58c1\u5b9e\u73b0\uff0c\u8fd9\u589e\u52a0\u4e86\u5b58\u50a8\u5bb9\u91cfCS\uff0c\u4ece\u800c\u4f7f\u5b58\u50a8\u7684\u4fe1\u606f\u66f4\u52a0\u7a33\u56fa\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5728DRAM\u9635\u5217\u4e2d\uff0c\u6bcf\u4e2a\u4f4d\u7ebfBL\u6709\u4e00\u4e2a\u611f\u5e94\u653e\u5927\u5668\u3002\u4ece\u903b\u8f91\u7535\u5e73\u7684\u89d2\u5ea6\u6765\u770b\uff0cV<sub>DD<\/sub>\u768410%\u523090%\u662f\u4e00\u4e2a\u7981\u6b62\u7684\u8303\u56f4\uff0c\u7535\u538b\u5fc5\u987b\u88ab\u653e\u5927\u5230V<sub>DD<\/sub>\u6216GND\uff0c \u8fd9\u662f\u611f\u5e94\u653e\u5927\u5668\u5728DRAM\u5b58\u50a8\u5355\u5143\u7684\u4e3b\u8981\u529f\u80fd\u3002\u6b64\u5916\uff0c\u4e00\u65e6\u53d1\u73b0\u6709\u671d\u5411V<sub>DD<\/sub>\u6216GND\u7684 &#8220;\u8d8b\u52bf&#8221;\uff0c\u611f\u5e94\u653e\u5927\u5668\u4f1a\u7acb\u5373\u52a0\u901f\u4fe1\u53f7\u7684\u53d8\u5316\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-20.30.55.png\" alt=\"\" class=\"wp-image-2726\" width=\"357\" height=\"473\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-20.30.55.png 651w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-20.30.55-226x300.png 226w\" sizes=\"(max-width: 357px) 100vw, 357px\" \/><figcaption class=\"wp-element-caption\">SRAM cell sense amplifier<\/figcaption><\/figure><\/div>\n\n\n<blockquote class=\"wp-block-quote\">\n<p>The sense amplifier works as follows:<\/p>\n\n\n\n<p>Activation of the word line WL connects the storage capacitor C<sub>S<\/sub> to BL. If C<sub>S<\/sub> was charged to V<sub>DD<\/sub> (Reading a \u201c1\u201d), the voltage on BL will slightly increase, which makes T4 conduct and the voltage on T1 decrease. Thus, T1 conducts, BL is connected to V<sub>DD <\/sub>and the originally stored logic level on C<sub>S<\/sub> is refreshed. <\/p>\n\n\n\n<p>Reading a &#8220;0&#8221; from the DRAM cell works similarly.<\/p>\n<cite>\u5b57\u7ebfWL\u7684\u6fc0\u6d3b\u5c06\u5b58\u50a8\u7535\u5bb9CS\u8fde\u63a5\u5230BL\u3002\u5982\u679cCS\u88ab\u5145\u7535\u5230VDD\uff08\u8bfb &#8220;1&#8221;\uff09\uff0cBL\u4e0a\u7684\u7535\u538b\u5c06\u7565\u6709\u589e\u52a0\uff0c\u8fd9\u4f7f\u5f97T4\u5bfc\u901a\uff0cT1\u4e0a\u7684\u7535\u538b\u4e0b\u964d\u3002\u56e0\u6b64\uff0cT1\u5bfc\u901a\uff0cBL\u88ab\u8fde\u63a5\u5230VDD\uff0cCS\u4e0a\u539f\u6765\u5b58\u50a8\u7684\u903b\u8f91\u7535\u5e73\u88ab\u5237\u65b0\u3002<br>\u8bfb\u53d6\u4e00\u4e2a\u903b\u8f910\u7684\u5de5\u4f5c\u539f\u7406\u7c7b\u4f3c\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>6-\u6676\u4f53\u7ba1SRAM\u5355\u5143\u7531\u53cc\u53cd\u76f8\u5668\u7ec4\u6210\uff0c\u53cc\u53cd\u76f8\u5668\u662f\u6700\u7b80\u5355\u7684\u9759\u6001\u5bc4\u5b58\u5668\u5143\u4ef6\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-20.37.45.png\" alt=\"\" class=\"wp-image-2727\" width=\"586\" height=\"305\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-20.37.45.png 689w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-20.37.45-300x157.png 300w\" sizes=\"(max-width: 586px) 100vw, 586px\" \/><figcaption class=\"wp-element-caption\">6-transistor DRAM cell<\/figcaption><\/figure><\/div>\n\n\n<blockquote class=\"wp-block-quote\">\n<p>In DRAM, a sense amplifier is not necessary, but we use it for performance reasons. <\/p>\n\n\n\n<p>In contrast to the 1 transistor DRAM cell, the SRAM cell needs no periodic refreshing and keeps the stored bit value unless it is disconnected from the power supply.<\/p>\n<cite>\u5728DRAM\u4e2d\uff0c\u611f\u5e94\u653e\u5927\u5668\u4e0d\u662f\u5fc5\u987b\u7684\uff0c\u4f46\u6211\u4eec\u51fa\u4e8e\u6027\u80fd\u539f\u56e0\u4f7f\u7528\u5b83\u3002<br>\u4e0e1\u4e2a\u6676\u4f53\u7ba1\u7684DRAM\u5355\u5143\u76f8\u6bd4\uff0cSRAM\u5355\u5143\u4e0d\u9700\u8981\u5b9a\u671f\u5237\u65b0\uff0c\u5e76\u80fd\u4fdd\u6301\u5b58\u50a8\u7684\u6bd4\u7279\u503c\uff0c\u9664\u975e\u5b83\u4e0e\u7535\u6e90\u65ad\u5f00\u8fde\u63a5\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u53ea\u8bfb\u5b58\u50a8\u5668\uff08ROM\uff09\u5355\u5143\u7531\u4e00\u4e2ap-n\u4e8c\u6781\u7ba1\u548c\u4e00\u4e2a\u4f4d\u4e8e\u5b58\u50a8\u5668\u77e9\u9635\u7684\u5b57\u7ebfWL\u548c\u4f4d\u7ebfBL\u4ea4\u53c9\u70b9\u7684\u5fae\u5c0f\u91d1\u5c5e\u4fdd\u9669\u4e1d\u7ec4\u6210\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-20.42.07.png\" alt=\"\" class=\"wp-image-2728\" width=\"420\" height=\"310\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-20.42.07.png 546w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-20.42.07-300x221.png 300w\" sizes=\"(max-width: 420px) 100vw, 420px\" \/><figcaption class=\"wp-element-caption\">ROM<\/figcaption><\/figure><\/div>\n\n\n<blockquote class=\"wp-block-quote\">\n<p>An open fuse represents a logic &#8220;0&#8221;, whereas a closed fuse represents a logic &#8220;1&#8221;.<\/p>\n\n\n\n<p>The diode prevents reverse currents to flow from BL to WL and, thus, impacting the logic values on other BL. The resistor between the BL and GND is mandatory to discharge C<sub>BL<\/sub> after each access, thus ensuring a proper &#8220;0&#8221; level.<\/p>\n<cite>\u4fdd\u9669\u4e1d\u6253\u5f00\u4ee3\u8868\u903b\u8f91 &#8220;0&#8221;\uff0c\u800c\u4fdd\u9669\u4e1d\u5173\u95ed\u4ee3\u8868\u903b\u8f91 &#8220;1&#8221;\u3002<br>\u4e8c\u6781\u7ba1\u9632\u6b62\u53cd\u5411\u7535\u6d41\u4eceBL\u6d41\u5411WL\uff0c\u4ece\u800c\u5f71\u54cd\u5176\u4ed6BL\u7684\u903b\u8f91\u503c\u3002\u5728BL\u548cGND\u4e4b\u95f4\u7684\u7535\u963b\u662f\u5fc5\u8981\u7684\uff0c\u4ee5\u4fbf\u5728\u6bcf\u6b21\u8bbf\u95ee\u540e\u5bf9C<sub>BL<\/sub>\u653e\u7535\uff0c\u4ece\u800c\u786e\u4fdd\u4e00\u4e2a\u9002\u5f53\u7684\u903b\u8f91&#8221;0&#8243;\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u6d6e\u52a8\u95e8\u6676\u4f53\u7ba1\u5355\u5143<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"392\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-08-15.30.19-1024x392.png\" alt=\"\" class=\"wp-image-2744\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-08-15.30.19-1024x392.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-08-15.30.19-300x115.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-08-15.30.19-768x294.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-08-15.30.19-1536x588.png 1536w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-08-15.30.19-1568x600.png 1568w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-08-15.30.19.png 1694w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<blockquote class=\"wp-block-quote\">\n<p>When programming the floating gate transistor cell, a high programming voltage (e.g. four times higher than V<sub>DD<\/sub>) is applied to both the control gate and the drain (bit line), making electrons able to tunnel through the first oxide layer onto the floating gate.<br>Removing the programming voltages leaves negative charge trapped on the floating gate. When now applying V<sub>DD<\/sub> to the control gate (word line) the effective floating gate to substrate voltage isn\u2019t large enough to establish a conducting channel. The negative voltage on the floating gate results in a higher threshold voltage V<sub>t<\/sub>.<\/p>\n<cite>\u5f53\u5bf9\u6d6e\u52a8\u6805\u6781\u6676\u4f53\u7ba1\u5355\u5143\u8fdb\u884c\u7f16\u7a0b\u65f6\uff0c\u4e00\u4e2a\u9ad8\u7684\u7f16\u7a0b\u7535\u538b\uff08\u4f8b\u5982V<sub>DD<\/sub>\u7684\u56db\u500d\uff09\u88ab\u65bd\u52a0\u5230\u63a7\u5236\u6805\u6781\u548c\u6f0f\u6781\uff08\u4f4d\u7ebf\uff09\uff0c\u4f7f\u5f97\u7535\u5b50\u80fd\u591f\u901a\u8fc7\u7b2c\u4e00\u6c27\u5316\u5c42\u96a7\u9053\u5230\u6d6e\u52a8\u6805\u6781\u4e0a\u3002<br>\u79fb\u9664\u7f16\u7a0b\u7535\u538b\u540e\uff0c\u6d6e\u52a8\u6805\u6781\u4e0a\u4ecd\u6709\u8d1f\u7535\u8377\u88ab\u6355\u83b7\u3002\u5f53\u73b0\u5728\u5bf9\u63a7\u5236\u95e8(\u5b57\u7ebf)\u65bd\u52a0V<sub>DD<\/sub>\u65f6\uff0c\u6709\u6548\u7684\u6d6e\u52a8\u95e8\u5230\u5b50\u95e8\u7684\u7535\u538b\u5e76\u4e0d\u8db3\u4ee5\u5efa\u7acb\u4e00\u4e2a\u5bfc\u7535\u901a\u9053\u3002\u6d6e\u52a8\u95e8\u4e0a\u7684\u8d1f\u7535\u538b\u5bfc\u81f4\u4e86\u66f4\u9ad8\u7684\u9608\u503c\u7535\u538bV<sub>t<\/sub>\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u95ea\u5b58\u5355\u5143<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>In contrast to EPROM, EEPROM, and flash memory cells are electrically erasable. Erasing a stored bit value means removing the trapped charges from the floating gate. This can be done by making the source electrode float (disconnect from GND), connecting the drain electrode to a high voltage, and the control gate to GND. Thus, electrons on the floating gate are attracted through the thin oxide layer to drain. This effect is called \u201cFowler-Nordheim\u201d tunneling.<\/p>\n<cite>\u4e0eEPROM\u4e0d\u540c\u7684\u662f\uff0cEEPROM\u548c\u95ea\u5b58\u5355\u5143\u662f\u53ef\u4ee5\u7535\u64e6\u9664\u7684\u3002 \u64e6\u9664\u4e00\u4e2a\u5b58\u50a8\u7684\u4f4d\u503c\u610f\u5473\u7740\u4ece\u6d6e\u52a8\u6805\u6781\u4e0a\u6e05\u9664\u56f0\u4f4f\u7684\u7535\u8377\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u4f7f\u6e90\u6781\u6d6e\u52a8\uff08\u4e0eGND\u65ad\u5f00\uff09\uff0c\u5c06\u6f0f\u6781\u8fde\u63a5\u5230\u4e00\u4e2a\u9ad8\u7535\u538b\u548c\u63a7\u5236\u95e8\u8fde\u63a5\u5230GND\u6765\u5b9e\u73b0\u3002\u56e0\u6b64\uff0c\u6d6e\u52a8\u6805\u6781\u4e0a\u7684\u7535\u5b50\u901a\u8fc7\u8584\u7684\u6c27\u5316\u5c42\u88ab\u5438\u5f15\u5230\u6f0f\u6781\u3002\u8fd9\u79cd\u6548\u5e94\u88ab\u79f0\u4e3a &#8220;Fowler-Nordheim &#8220;\u96a7\u9053\u6548\u5e94\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-21.02.01.png\" alt=\"\" class=\"wp-image-2729\" width=\"478\" height=\"266\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-21.02.01.png 803w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-21.02.01-300x167.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-03-21.02.01-768x428.png 768w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><figcaption class=\"wp-element-caption\">\u8ba1\u7b97\u673a\u7cfb\u7edf\u7684\u5185\u5b58\u5c42\u6b21\u7ed3\u6784<\/figcaption><\/figure><\/div>\n\n\n<blockquote class=\"wp-block-quote\">\n<p>CPU caches are closely integrated with the processor core and operate at the same cycle times as the CPU data path pipelines. <\/p>\n\n\n\n<p>The next faster (and bigger) data repository is on-chip (or off-chip) SRAM. However, in order to access SRAM, the CPU request already has to traverse across the <strong>CPU bus<\/strong> introducing additional latency. <\/p>\n\n\n\n<p>For larger quantities of data, external SDRAM (or variants) are the next choice. The single transistor DRAM cell achieves larger storage densities than the six transistor SRAM cell, but introduces longer access times due to the more complex access mechanism and the need to interleave data accesses with periodic refresh cycles. <\/p>\n\n\n\n<p>SDRAM memory acts as a \u201cmirror space\u201d for data residing on the hard disk. <strong>DMA<\/strong> (direct memory access) controllers shuffle data from external disk drives via system interfaces (e.g. PCI, SCSI) into the SDRAM <strong>without requiring CPU attention.<\/strong><\/p>\n<cite>CPU\u7f13\u5b58\u4e0e\u5904\u7406\u5668\u6838\u5fc3\u7d27\u5bc6\u7ed3\u5408\uff0c\u5e76\u4ee5\u4e0eCPU\u6570\u636e\u8def\u5f84\u7ba1\u9053\u76f8\u540c\u7684\u5468\u671f\u65f6\u95f4\u8fd0\u884c\u3002<br>\u4e0b\u4e00\u4e2a\u66f4\u5feb\u7684\uff08\u548c\u66f4\u5927\u7684\uff09\u6570\u636e\u5b58\u50a8\u5e93\u662f\u7247\u4e0a\uff08\u6216\u7247\u5916\uff09SRAM\u3002\u7136\u800c\uff0c\u4e3a\u4e86\u8bbf\u95eeSRAM\uff0cCPU\u7684\u8bf7\u6c42\u5df2\u7ecf\u5fc5\u987b\u7a7f\u8d8aCPU\u603b\u7ebf\uff0c\u5f15\u5165\u989d\u5916\u7684\u5ef6\u8fdf\u3002<br>\u5bf9\u4e8e\u66f4\u5927\u6570\u91cf\u7684\u6570\u636e\uff0c\u5916\u90e8SDRAM\uff08\u6216\u53d8\u4f53\uff09\u662f\u4e0b\u4e00\u4e2a\u9009\u62e9\u3002 \u5355\u6676\u4f53\u7ba1DRAM\u5355\u5143\u6bd4\u516d\u6676\u4f53\u7ba1SRAM\u5355\u5143\u5b9e\u73b0\u4e86\u66f4\u5927\u7684\u5b58\u50a8\u5bc6\u5ea6\uff0c\u4f46\u7531\u4e8e\u66f4\u590d\u6742\u7684\u8bbf\u95ee\u673a\u5236\u4ee5\u53ca\u9700\u8981\u5c06\u6570\u636e\u8bbf\u95ee\u4e0e\u5b9a\u671f\u5237\u65b0\u5468\u671f\u4ea4\u9519\u8fdb\u884c\uff0c\u56e0\u6b64\u5f15\u5165\u4e86\u66f4\u957f\u7684\u8bbf\u95ee\u65f6\u95f4\u3002<br>SDRAM\u5b58\u50a8\u5668\u5145\u5f53\u4e86\u9a7b\u7559\u5728\u786c\u76d8\u4e0a\u7684\u6570\u636e\u7684 &#8220;\u955c\u50cf\u7a7a\u95f4&#8221;\u3002DMA\uff08\u76f4\u63a5\u5185\u5b58\u8bbf\u95ee\uff09\u63a7\u5236\u5668\u901a\u8fc7\u7cfb\u7edf\u63a5\u53e3\uff08\u5982PCI\u3001SCSI\uff09\u5c06\u6570\u636e\u4ece\u5916\u90e8\u78c1\u76d8\u9a71\u52a8\u5668\u6d17\u8fdbSDRAM\uff0c\u800c\u4e0d\u9700\u8981CPU\u7684\u5173\u6ce8\u3002<\/cite><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u6211\u4eec\u73b0\u5728\u66f4\u8be6\u7ec6\u5730\u7814\u7a76\u5b9e\u73b0\u4e00\u4e2a\u6700\u5c0f\u7684\u5185\u5b58\u5b50\u7cfb\u7edf\u5230\u6807\u51c6SDRAM\u5185\u5b58\u82af\u7247\u6240\u9700\u7684\u534f\u8bae\u3001\u63a5\u53e3\u548c\u6784\u5efa\u6a21\u5757\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>The memory controller translates the linear addresses for read and write used by the CPU into two-dimensional (row, column) addresses and corresponding control signals for SDRAM internal use. In general, memory controllers hide features and requirements of a specific memory technology.<br>If necessary, the memory controller can stall the CPU until the SDRAM is again able to accept subsequent read or write accesses.<br>Three buses are distinguished for data (b), control signals (c), and addresses (a). In some systems, combinations of these signals are multiplexed onto a single bus.<\/p>\n<cite>\u5185\u5b58\u63a7\u5236\u5668\u5c06CPU\u4f7f\u7528\u7684\u7ebf\u6027\u8bfb\u5199\u5730\u5740\u8f6c\u6362\u4e3a\u4e8c\u7ef4\uff08\u884c\u3001\u5217\uff09\u5730\u5740\u548c\u76f8\u5e94\u7684\u63a7\u5236\u4fe1\u53f7\uff0c\u4f9bSDRAM\u5185\u90e8\u4f7f\u7528\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u5185\u5b58\u63a7\u5236\u5668\u9690\u85cf\u4e86\u7279\u5b9a\u5185\u5b58\u6280\u672f\u7684\u7279\u70b9\u548c\u8981\u6c42\u3002<br>\u5982\u679c\u6709\u5fc5\u8981\uff0c\u5185\u5b58\u63a7\u5236\u5668\u53ef\u4ee5\u4f7fCPU\u505c\u987f\uff0c\u76f4\u5230SDRAM\u518d\u6b21\u80fd\u591f\u63a5\u53d7\u540e\u7eed\u7684\u8bfb\u6216\u5199\u8bbf\u95ee\u3002<br>\u4e09\u6761\u603b\u7ebf\u88ab\u533a\u5206\u4e3a\u6570\u636e\uff08b\uff09\u3001\u63a7\u5236\u4fe1\u53f7\uff08c\uff09\u548c\u5730\u5740\uff08a\uff09\u3002 \u5728\u4e00\u4e9b\u7cfb\u7edf\u4e2d\uff0c\u8fd9\u4e9b\u4fe1\u53f7\u7684\u7ec4\u5408\u88ab\u590d\u7528\u5230\u4e00\u6761\u603b\u7ebf\u4e0a\u3002<\/cite><\/blockquote>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-08-16.01.01.png\" alt=\"\" class=\"wp-image-2750\" width=\"259\" height=\"77\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-08-16.01.01.png 412w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2023\/02\/\u622a\u5c4f2023-02-08-16.01.01-300x89.png 300w\" sizes=\"(max-width: 259px) 100vw, 259px\" \/><figcaption class=\"wp-element-caption\">peak data bandwidth<\/figcaption><\/figure><\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Intro The success of CMOS* as the most widely used s<a class=\"more-link\" href=\"https:\/\/blog.mhrooz.xyz\/index.php\/2022\/12\/11\/system_on_chip_zhi_shi_dian\/\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">&#8220;System on Chip \u77e5\u8bc6\u70b9&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[49],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/posts\/2288"}],"collection":[{"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=2288"}],"version-history":[{"count":54,"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/posts\/2288\/revisions"}],"predecessor-version":[{"id":2752,"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/posts\/2288\/revisions\/2752"}],"wp:attachment":[{"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=2288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=2288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=2288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}