1. Write back / write through / write evict

These policies determine how to handle a write hit.

Hit means that the requested cache block exists at the current level cache.

 

Write back just handles the request at the current level cache only. Later, when this block would be evicted to the lower level, the modified data would be applied. In other words, the updated data would exist at the current level only.

 

Write through handles the request not only at the current level cache but to lower levels. In other words, the updated data would be exist at current level and lower levels.

 

Write evict passes the request to lower level and invalidates the cache block at the current level. In other words, the updated data would exist at the lower level only. 

 

2. Write allocation / no write allocation

These policies determine how to handle a write miss.

Miss means that the requested cache block does not exist at the current level cache.

 

No write allocation just passes the request to the lower level. 

 

Write allocation handles the request at the current level. In this case, the cache block would be fetched ahead or not, regarding to the following fetch policies.

 

3. Fetch on write / lazy fetch on read

Fetch on write: When a write miss is handled with write allocation policy, the cache block would be fetched ahead.

 

Lazy fetch on read: When a write miss is handled with write allocation policy, the cache block would not be fetched, and the data just written to the current level cache. In this case, the modified sectors must be marked, and when the cache block would be fetched for read hit, the modified sectors would be applied.

 

'Programming > Computer Architecture' 카테고리의 다른 글

Basic of the DRAM Subsystem  (0) 2019.04.19

Hierarchy of the DRAM Subsystem

Every channel has its own memory controller that means it has its own address, command, and data bus.

In a rank, the address and command bus are shared to all chips, but the data bus is dedicated to a chip. Therefore the rank can offer a wide interface.

In a chip, all of the address, command, and data bus are shared to banks. However, in each bank, the address, command, and data are latched, and each bank operates its own command.

A column can be accessed when a row is open(activated).

 

DRAM Operation

DRAM Operation starts with row activation. Activating a row means select and open a row of DRAM cells in a specific bank and then the data could be accessed through row buffer(which is also called sense amplifier) in size of a column. When accessing a row is finished then, the row should be precharged(closed) for activating another row. 

The most critical timing parameters of DRAM are tRCD, tCL, tRP. tRCD stands for RAS to CAS delay time which means activating a row is finished and the row is ready to read or write, after tRCD from the ACT(Activation) command. Once RD(Read) or WR(Write) command, data could be transferred after tCL. And when accessing a row is finished, the PRE(Precharge) command should be followed. Precharging a row takes tRP. 

Because the row address is transferred with ACT command and the column address is transferred with RD/WR, which means that row and column address are not used simultaneously, address pins could be shared. 

 

DRAM Bank Structure

DRAM Bank is a set of rows and columns, which operates a command. A DRAM chip consists of multiple banks, and each bank could operate its own command. However, the command, address, data pins are shared to all of the banks, and all of DRAM commands are synchronized, DRAM operations could be pipelined. With pipelining, bank structure is good for hiding long latency of DRAM(tRCD, tCL, tRP, etc).

This is a logical structure of a DRAM Bank. All of the pin counts are referenced from Micron DDR4 8Gb X8 DRAM Chip. In this case, a DRAM bank consists of 64K rows and 1K columns. This chip has 8 bit of data pin, generally, 8 of chips are combined into a DIMM. With 8 chips, each of 8 data pins, and 8 burst length, 64Byte of data could be read or write at single DRAM command. Row buffer size is 8Kb for each chip. 

This is a functional block diagram from Micron DDR4 8Gb X8 DRAM chip. Note that it is a chip. Because DDR4 uses 8 burst length, it seems that 64 bit of data in the row buffer could be transferred to FIFO, in a operation. The LSB 3 bits of column address are discarded, and 8 columns, each of 8 bits are accessed at once.

'Programming > Computer Architecture' 카테고리의 다른 글

Cache write policies  (0) 2022.10.31

+ Recent posts