How does one design a pseudo dual port RAM using a single port RAM in Verilog ? What are the design considerations? Are there frequency limitations ?

Clarification on 'pseudo dual port - single port RAM (1RW) with external logic' to make it appear like dual port RAM (1R/1W).

  • 2
    \$\begingroup\$ What's a 'pseudo' dual port RAM? \$\endgroup\$ Aug 21, 2020 at 6:19
  • 2
    \$\begingroup\$ Welcome new user. Think how you would design a circuit to do this. Ignore Verilog to start. \$\endgroup\$ Aug 21, 2020 at 7:29
  • 1
    \$\begingroup\$ Arbitration. With only one port, only one thing can read and write at the same time. \$\endgroup\$ Aug 21, 2020 at 8:09

1 Answer 1


I assume your 'pseudo dual port' is what I often hear as "simple dual-port" i.e. one write port and one read port.

Since I see you tagged with 'ASIC' I doubt this will be complete nonetheless I think it would be useful to consider FPGA solution as proposed by Xilinx (UG901) as an example. There are many possible variations you are encouraged to check, especially when it comes to read-write ordering.

Simple Dual-Port Block RAM with Single Clock (Verilog)

module simple_dual_one_clock (clk,ena,enb,wea,addra,addrb,dia,dob);
input clk,ena,enb,wea;
input [9:0] addra,addrb;
input [15:0] dia;
output [15:0] dob;
reg [15:0] ram [1023:0];
reg [15:0] doa,dob;

always @(posedge clk) begin
  if (ena) begin
    if (wea)
      ram[addra] <= dia;

always @(posedge clk) begin
  if (enb)
    dob <= ram[addrb];


I have just dumped the code from the original documentation. I'm not particularly fond of the indentation, the use of reg or the i/o declaration but that's it.

As far as I know in ASICs you should be using foundry cells (I honestly hope those basic constructs can go through).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.