Digital Processing-In-Memory

Digital PIM macro is an emerging VLSI macro that can perform Hadamard product in digital domain, besides the memory read/write function. Analog-Digital converters are saved from APIM by integrating local processing units (LPU) into the macro.

Info

VMM are performed in a way of logic gate circuits within the bitcell array in DPIM.

For research idea introduction visit [B. Yan, et al. ISSCC'22]

Mode/Function

DPIM address map

Address Map

An example of DPIM:

DPIM address map

IO Port

macro global ports:

CIM mode ports:

Tip

You can always revise the port width per your own need.

Timing Diagram

Warning

We only talking about synchronous memory, i.e. the data comes out from "q" (data output port) with 1 clock cycle delay after a rising clock edge captures a deasserted "we" (write enable port)

Memory timing diagram

Note: A0, A1, ... are addresses; D0, D1, ... are data.

Core Code in Verilog

//--------------Internal variables---------------- 
reg [DATA_WIDTH-1:0] mem [0:RAM_DEPTH-1];
//--------------Code Starts Here------------------ 
// Memory Write Block 
// Write Operation : When we = 1, cs = 1
always @ (posedge clk)
begin : MEM_WRITE
   if ( cs && !web ) begin
       mem[a] = d;
   end
end

// Memory Read Block 
// Read Operation : When we = 0, oe = 1, cs = 1
always @ (posedge clk)
begin : MEM_READ
  if (cs && web) begin
    if(cimeb) begin
      q = mem[a];
    end else begin
      // enter CIM mode, this is only behavioral sim
      // actual CIM macro is designed with transistor-level circuits
      cim_out = LPU_Func(cim_in, mem)
    end
  end
end