Professional Documents
Culture Documents
Chapter 5
Memories
Portions of this work are from the book, Digital Design: An Embedded
Systems Approach Using Verilog, by Peter J. Ashenden, published by Morgan
Kaufmann Publishers, Copyright 2007 Elsevier Inc. All rights reserved.
Verilog
Compute function y ci x
Verilog
Multiplier Datapath
Verilog
Verilog
Pipelined SSRAM
a2
xx
xx
M(a2)
Verilog
Memories in Verilog
Verilog
y,
c_in, x,
i,
start,
clk, reset );
wire
c_ram_wr;
reg
c_ram_en, x_ce, mult_sel, y_ce;
reg signed [7:-12] c_out, x_out;
reg signed [7:-12] c_RAM [0:4095];
Verilog
Verilog
// State register
// Next-state logic
always @* begin
...
// Output logic
endmodule
Verilog
Multiport Memories
Scenario
10
Verilog
FIFO Memories
First-In/First-Out buffer
Producer
subsystem
Consumer
subsystem
FIFO
Implementation using
dual-port RAM
Circular buffer
Full: write-addr = read-addr
Empty: write-addr = read-addr
read
write
11
Verilog
FIFO Example
12
Verilog
13
Verilog
Control FSM
14
Verilog
15
Verilog
Write operation
Read operation
16
Verilog
DRAM Refresh
17
Verilog
UV erasable
Electrically erasable (EEPROM)
Flash RAM
Digital Design Chapter 5 Memories
18
Verilog
Combinational ROM
Content
Address
Content
0111111
1111101
0000110
0000111
1011011
1111111
1001111
1101111
1100110
1015
1000000
1101101
1631
0000000
19
Verilog
//
//
//
//
//
//
//
//
//
//
0
1
2
3
4
5
6
7
8
9
endmodule
Digital Design Chapter 5 Memories
20
Verilog
Flash RAM
NOR Flash
NAND Flash
21
Verilog
Summary
22