Memories & More: CRC and Fec
Memories & More: CRC and Fec
1
10/17/19
Pipelining Thing:
Closer Look
12ns
4ns
2
10/17/19
Closer Look
~4ns
~8ns
4ns
• Bottom is a SumàComparisonàSelect/Assign
• deltax stuff is SumàComparisonàSelect/Assign
• I’d expect them to both be ~4 ns since it says the original
blob stuff was 4ns
~4ns
12ns
Some module
deltax,y
comb comb
register
tpd~4ns tpd~12
clk
3
10/17/19
~4ns
~12ns
Some module
clk clk
~4ns
~4ns
~8ns
Some module
clk
4
10/17/19
~4ns
~8ns
~4ns
Some module
x,ysquared
comb comb pixel
register
tpd~12ns tpd~4ns register
clk clk
5
10/17/19
Memory
6
10/17/19
7
10/17/19
• Drum Memory:
• Information stored magnetically on large rotating
metallic cylinder
• Could read/write to it
• Did not require periodic refresh
8
10/17/19
William’s Tube
• Take advantage of non-negligible decay
time of phosphors on CRT to store data
• Project data image
• Little bit later (milliseconds) recover it .
• Either use it or re-project it for later use
• Requires periodic refresh
9
10/17/19
Core Memory
• MIT!
• Store 1’s and 0’s in the
magnetic field of small
torroids (magnetic cores)
• Where the term “core
dump” comes from.
• Used up until mid 70’s https://en.wikipedia.org/wiki/Magnetic-
core_memory#/media/File:KL_Kernspeicher_
• Few on display in fourth Makro_1.jpg
floor of 38
• Non volatile!
10/16/19 6.111 Fall 2019 19
EPROM Mask-
SRAM
FIFO E2PROM Programmed
DRAM
FLASH ROM
10
10/17/19
• DDR2 SDRAM
• 128MiB (Megabytes)
Outside • Requires MIG (Memory Interface Generator) Wizard
11
10/17/19
!" !"
12
10/17/19
13
10/17/19
BRAM Timing
14
10/17/19
…
Out
• Can alternatively use this SRAM SRAM
1
for other purposes!
0
SRAM
I0
I1
I2
I3
I4
I5
15
10/17/19
Memories in Verilog
• logic bit; // a single register
• logic [31:0] word; // a 32-bit register
• logic [31:0] array[15:0]; // 16 32-bit
16
10/17/19
// read ports
assign rd1 = (ra1 == 5’d31) ? 32’d0 : regfile[ra1];
assign rd2 = (ra2 == 5’d31) ? 32’d0 : regfile[ra2];
// write port
always_ff @(posedge clk)
if (werf) regfile[wa] <= wd;
17
10/17/19
BRAM Example
Each entry is 8 bits
18
10/17/19
BRAM Example
• If making a
ROM or if we
want RAM to
start with
something can
load init file
00000000,
00111110,
01100011, Memory contents with location 0 first, then location
00000011, 1, etc. You can specify input radix, in this example
00000011, we’re using binary. MSB is on the left, LSB on the
right. Unspecified locations (if memory has more
00011110, locations than given in .coe file) are set to 0.
00000011,
00000011,
01100011,
00111110,
00000000,
00000000,
10/16/19 6.111 Fall 2019 38
19
10/17/19
BRAM Example
• How much will this thing
use?
• To store 64Kbits, we’d
need 2 36K BRAMs
• To store 64KBytes, we’d
need 8 times as many
• So 16 36K BRAMs!
Write enable
20
10/17/19
RAM Uses
• Store Audio (Lab 5a)
• Set up a Dual port BRAM and use this as a frame
buffer for video:
• Write pixels in as they come in/read them out as you
need them
• Store anything you want! (exciting)
21
10/17/19
FIFO (First-In-First-Out)
• Basically a Queue like you see in Python or
something, but we can’t dynamically allocate storage
space ahead of time at our low level!
FIFO DOUT
DIN SRAM
22
10/17/19
FIFO
• From menus: IP Catalog à FIFO Generator
FIFO
23
10/17/19
FIFO
DIN SRAM DOUT
Some Some
module module
More Reading
• Resource utilization on an FPGA is not easy nor simple (but is really
cool). Some resources:
• Series 7 Memory Resources:
• https://www.xilinx.com/support/documentation/user_guides/ug473_7Series_Memory_Resources.pdf
24
10/17/19
25
10/17/19
Row Decode
AK
A K+1 Word Line 2L-K row
by
Mx2K column
A L-1 cell array
M*2K
A0
Column Decode
A K-1 Selects appropriate word
(i.e., multiplexer)
Input-Output
(M bits)
26
10/17/19
EPROM Families
• Includes EPROM, EEPROM, Flash
memory, (and SSDs)
• Utilize Floating Gates
• Different from SRAM!
• Instead of ~6 transistors per bit,
you can do about 1!
• Acts sorta like SRAM from
outside but Non-Volatile and
writes are much slower than An early EPROM.
reads You’d program electrically and
then shine UV onto it to erase
• Invented by Dov Frohman while it…don’t use these anymore
at Intel ~1970ish
10/16/19 6.111 Fall 2019 53
!$
• Basically:
• If VG is > VT you conduct (are ”on”)
• If VG is < VT you do not conduct (are ”off”)
• Traditionally VT is a function of doping,
transistor dimensions, etc…
• BUT!....
10/16/19 6.111 Fall 2019 54
27
10/17/19
Floating GATE
Floating Gate MOSFETs GATE
!#
!" %&'
!$
Drain 10 nm Flash Gate Source
Presence or absence of carriers on floating gate affects the threshold
voltage of MOSFET
• Default (“binary 1”)…Threshold voltage is lower VTL
• (no electrons trapped in gate)
• Programmed bit (”binary 0”)…threshold voltage is higher VTH
• (electrons trapped in gate)
https://www.electronicsweekly.com/news/research-news/device-rd/iedm-hybrid-floating-gate-scales-flash-to-10nm-2012-12/
10/16/19 6.111 Fall 2019 55
28
10/17/19
Bit Line
S0 S1 S2 S3
0 1 0 0 0 if B1==1, 1 if B1==0
0 0 1 0 0 if B2==1, 1 if B2==0
0 0 0 1 0 if B3==1, 1 if B3==0
29
10/17/19
https://www.semanticscholar.org/paper/White-Paper-Two-Flash-Technologies-Compared-%3A-NOR-
Tal/52f7d974a7be1911b33cb64c26ba4d7f5b337d9e/figure/0
10/17/19 6.111 Fall 2019 59
Address Data
Charge
Chip Enable pump
EPROM omits
Output Enable Programming FSM, charge
voltage (12V)
FSM pump, and write
Write Enable
enable
30
10/17/19
Floating Gates
• Some neat recent work using floating gates and
their adjustable threshold capabilities
• Result is ability to adjust/teach a single transistor
when to fire based on input signals!
31
10/17/19
DRAM
• Dynamic Random Access Memory!
• Single transistor and capacitor per bit (capacitor
does the storage)
• Capacitors decay rather quickly (especially since
DRAM capacitors are about 10 femtoFarads) so
need to be refreshed
• Can be made extremely dense and therefore
economical
• Are fast-ish:
• SRAM will have access time of down to 10ns or less
• DRAM will have access time from 50-150ns
• EEPROM/Flash way slower (esp for writes)
32
10/17/19
Asynchronous DRAM
33
10/17/19
Asynchronous DRAM
Asynchronous DRAM
34
10/17/19
Asynchronous DRAM
Asynchronous DRAM
35
10/17/19
Asynchronous DRAM
36
10/17/19
RAS
CAS
(Tristate)
Data Q (data from RAM)
RAS-before-CAS CAS-before-RAS
for a read or write for a refresh
(Row and column addresses taken on
falling edges of RAS and CAS)
• Clever manipulation of RAS and CAS after reads/writes provide more efficient modes: early-
write, read-write, hidden-refresh, etc.
(See datasheets for details)
Even though we can run DRAM very fast, because of all the maintenance involved
in it (we have to clean up after ourselves every time we do something), there’s a
lot of downtime on the data bus. Compare that to the SRAM from earlier!
https://pubweb.eng.utah.edu/~cs7810/pres/dram-cs7810-protocolx2.pdf
10/17/19 6.111 Fall 2019 74
37
10/17/19
38
10/17/19
39