{"id":3444,"date":"2014-12-08T00:00:16","date_gmt":"2014-12-08T08:00:16","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=3444"},"modified":"2025-06-02T03:39:33","modified_gmt":"2025-06-02T10:39:33","slug":"computer-memory-differences-between-the-types-of-what-was-it-again-memory","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/computer-memory-differences-between-the-types-of-what-was-it-again-memory\/","title":{"rendered":"Types of Computer Memory: RAM vs DRAM vs SRAM"},"content":{"rendered":"<p>Welcome back to the Digilent Blog!<\/p>\n<p>Computers have several difference ways of keeping track of the information that it is given. Most people in the world, which included myself until recently, might think there are only two\u00a0kinds of memory: the &#8220;random access memory&#8221; (RAM) that computers have, and the flash memory that you can put on a thumb drive and carry around in your backpack without an issue. However, despite knowing that these two types of memory are not the whole picture, it was my personal experience that trying to learn more usually resulted in my eyes instantly glazing over; this is rather unhelpful in terms of actually learning something. Keeping this in mind, we&#8217;re going to do a broad overview of the different types of RAM, hopefully without the glazing over effect.<\/p>\n<p>The idea behind RAM is that you can access some part of the memory in the same amount of time that it takes you to access a different location in the memory. Thus, you can access all of the memory in a random order and not observe a slower overall access time than getting the memory in a different order. What we will be focusing on are the two main types of RAM: dynamic random access memory (DRAM) and static random access memory (SRAM).<\/p>\n<p>Both of these types of memory are volatile. This means that if they are disconnected from a power source, whatever information that they had in storage will eventually be lost. For SRAM this memory loss happens more or less instantaneously and for DRAM the memory will be lost within a few seconds. The source of the difference in memory loss for these two types, as well as all of the other difference between them, is because of how they are internally structured.<\/p>\n<p>Most memory today is available in a Gigabyte (GiB) form. This means that in 16 GiB of RAM there are over\u00a016 billion bytes, with each byte broken up into 8 individual bits. It is these individual bits where the memory is stored inside a small circuit. For DRAM, each of these circuits consist of just one transistor and one capacitor. The charge that is stored inside the capacitor is what determines if that bit of memory is a &#8216;0&#8217; or &#8216;1&#8217; in binary. These capacitors are what make this RAM dynamic.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_3457\" aria-describedby=\"caption-attachment-3457\" style=\"width: 601px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/DRAM1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-3457\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/DRAM1.jpg\" alt=\"Basic schematic of dynamic RAM\" width=\"601\" height=\"450\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/DRAM1.jpg 3000w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/DRAM1-600x450.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/DRAM1-1024x767.jpg 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/DRAM1-225x168.jpg 225w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/DRAM1-800x599.jpg 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/DRAM1-1200x900-cropped.jpg 1200w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/a><figcaption id=\"caption-attachment-3457\" class=\"wp-caption-text\">Basic schematic of dynamic RAM.<\/figcaption><\/figure>\n<p>By nature, capacitors are always slowly losing some of their charge. Because it would be incredibly awkward to lose information simply because it (literally) leaked out, a timer circuit incorporated into the chip refreshes the DRAM every so often, using external resources to bring the each of the capacitors back to their fully charged (or not charged if they didn&#8217;t have any before) state. It is this property of the capacitors holding charge and slowly leaking that allows any information that they were storing to still potentially be available for a few seconds after the power to the memory bank shuts off.<\/p>\n<p>On the other hand, each of the circuits that make up an individual bit for SRAM never need to be refreshed. The circuits in a bit of SRAM consisting of 6 MOSFETs arranged in what is called a <a title=\"Learn Module on Flip-Flops\" href=\"https:\/\/learn.blog.digilentinc.com\/Documents\/286\" target=\"_blank\" rel=\"noopener\">flip-flop<\/a>, which will easily maintain the correct charged or uncharged state for the entire time that the memory chip is connected to a source of power. With the fact that SRAM does not need to be refreshed, and thus is available for access all of the time, it is also generally faster than DRAM.<\/p>\n<p>Unfortunately, there is a drawback to SRAM and the reason why the RAM in your computer is DRAM instead of SRAM. SRAM simply costs more with its 6 required components as opposed to DRAM&#8217;s 2 required components. It even costs enough more that, at least as far as I am aware, there are no commercially available computers that use SRAM instead of DRAM as their &#8220;RAM&#8221;; manufacturers simply don&#8217;t make them.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_3454\" aria-describedby=\"caption-attachment-3454\" style=\"width: 601px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/SRAM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-3454\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/SRAM.jpg\" alt=\"Basic schematic of static RAM\" width=\"601\" height=\"450\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/SRAM.jpg 3000w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/SRAM-600x449.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/SRAM-1024x767.jpg 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/SRAM-225x168.jpg 225w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/a><figcaption id=\"caption-attachment-3454\" class=\"wp-caption-text\">Basic schematic of static RAM from the <a title=\"Digilent Learn Module on Flip-Flops\" href=\"https:\/\/learn.blog.digilentinc.com\/Documents\/286\" target=\"_blank\" rel=\"noopener\">Digilent Learn Module on Fip-Flops<\/a>.<\/figcaption><\/figure>\n<p>But let&#8217;s bring this focus to Digilent boards. System boards like the Basys\u2122 3 only use flash memory, which is slower than RAM, but for all practical purposes will never lose the information stored in it (yay flash drives!). Other Digilent boards make use of multiple types of memory. For example, chipKIT\u2122 boards use both flash memory and SRAM. The ZYBO board uses both flash and DDR3 memory whereas the Nexys\u2122 4 utilizes flash and CellularRAM\u00ae. This brings up an important question: what is CellularRAM\u00ae and DDR3?<\/p>\n<p>CellularRAM\u00ae is a type of pseudo-static RAM \u00a0(PSRAM) developed by Micron\u00ae. While technically still DRAM, CellularRAM\u00ae incorporates both the timer and refresh circuitry into DRAM so that it is able to refresh the charges on its capacitors by itself without any external circuitry (although as RAM it still needs a source of power). However, this internal refresh allows the main processor to treat this RAM as pseudo-SRAM because as far as the processor is concerned, CellularRAM is always available to read or write to.<\/p>\n<figure id=\"attachment_3469\" aria-describedby=\"caption-attachment-3469\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/CellularRAM-Nexys-4.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-3469\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/CellularRAM-Nexys-4.jpg\" alt=\"The CellularRAM chip on the Nexys 4\" width=\"600\" height=\"450\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/CellularRAM-Nexys-4.jpg 4000w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/CellularRAM-Nexys-4-600x450.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/CellularRAM-Nexys-4-1024x768.jpg 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/CellularRAM-Nexys-4-225x168.jpg 225w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-3469\" class=\"wp-caption-text\">The CellularRAM chip on the Nexys 4.<\/figcaption><\/figure>\n<p>DDR3 on the other hand, is the third generation of double-date rate synchronous DRAM (DDR SDRAM). Switching back to plain English, this means it is a type of DRAM that uses a clock signal (the synchronous part of the name) to control the rate at which information is read from (or written to) the memory chip. The special thing about DDR is how it transfers data with the I\/O clock signal from the system board. With most components, such as shift registers, data is only transferred on one of the clock edges: the rising or the falling edge. DDR uses a type of technology called &#8220;double pumping&#8221;. This means that it transfers data on both the rising edge and the falling edge of a clock signal, allowing for twice the amount of data to be transferred at a certain rate than something that only transfers data on a single clock edge. The third generation of DDR has a larger &#8220;pre-fetch buffer&#8221; allowing it collect more data from memory before transferring it\u00a0to the main computer, effectively increasing the data transfer to 8 times that of single word transfer per clock cycle.<\/p>\n<figure id=\"attachment_3471\" aria-describedby=\"caption-attachment-3471\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/DDR3-SDRAM-ZYBO.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-3471\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/DDR3-SDRAM-ZYBO.jpg\" alt=\"The DDR3 SDRAM chip on the ZYBO\" width=\"600\" height=\"450\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/DDR3-SDRAM-ZYBO.jpg 4000w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/DDR3-SDRAM-ZYBO-600x450.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/DDR3-SDRAM-ZYBO-1024x768.jpg 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/DDR3-SDRAM-ZYBO-225x168.jpg 225w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-3471\" class=\"wp-caption-text\">The DDR3 SDRAM chip on the ZYBO.<\/figcaption><\/figure>\n<p>With this much capacity for data transfer, along with the advent of DDR4 which is able to transfer 8 chunks of data at even a faster rate than DDR3, SDRAM is able to transfer data at rates comparable to that of static RAM. So why use SRAM at all if DRAM is cheaper and nearly as fast? That reason comes from the power consumption of the two types of RAM. Because DRAM needs to be constantly refreshing the charge on its capacitors, it will draw a lot of power just to keep itself working, whereas if you&#8217;re using SRAM which never needs to refresh, its power draw can be almost next to nothing. For boards like the chipKIT\u2122 boards which are only rated to use approximately 1A, SRAM with it&#8217;s low power consumption is almost necessary over DRAM.<\/p>\n<p>Please feel free to give us a comment if you have any questions!<\/p>\n<p>&nbsp;<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-3444 jlk' data-task='like' data-post_id='3444' data-nonce='5286a1c13f' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-3444 lc'>+9<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-3444 jlk' data-task='unlike' data-post_id='3444' data-nonce='5286a1c13f' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-3444 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-3444 status align-left'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Computers have several difference ways of keeping track of the information that it is given. Most people in the world, which included myself until recently, might think there are only two kinds of memory: the &#8220;random access memory&#8221; (RAM) that computers have, and the flash memory that you can put on a thumb drive and carry around in your backpack without an issue. However, despite knowing that these two types of memory are not the whole picture, it was my personal experience that trying to learn more usually resulted in my eyes instantly glazing over; this is rather unhelpful in terms of actually learning something. Keeping this in mind, we&#8217;re going to do a broad overview of the different types of RAM, hopefully without the glazing over effect.<\/p>\n","protected":false},"author":17,"featured_media":3457,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[35,1563],"tags":[],"ppma_author":[4469],"class_list":["post-3444","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fpga","category-guide"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2014\/11\/DRAM1.jpg","jetpack_sharing_enabled":true,"authors":[{"term_id":4469,"user_id":17,"is_guest":0,"slug":"jamescolvin","display_name":"James Colvin","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/8aa85f7d11711acc7e571e1ed26c901b614a7064a2e15e522f54d9f26792ea9e?s=96&d=mm&r=g","1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":"","9":"","10":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/3444","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=3444"}],"version-history":[{"count":2,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/3444\/revisions"}],"predecessor-version":[{"id":31612,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/3444\/revisions\/31612"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/3457"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=3444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=3444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=3444"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=3444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}