Skip to content

Add multi-port SRAM generation support#3

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/add-multi-port-sram
Draft

Add multi-port SRAM generation support#3
Copilot wants to merge 3 commits into
mainfrom
copilot/add-multi-port-sram

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 12, 2026

Exposes OpenRAM's existing multi-port capability through configuration parameters, enabling generation of single-port and dual-port SRAMs.

Changes

Configuration Interface

  • Added num_rw_ports, num_r_ports, num_w_ports parameters to config files
  • Validates total port count (1-2 ports supported by OpenRAM)
  • Updated SRAM naming: sram_1rw0r0w_16x32_1v (single-port) vs sram_1rw1r0w_16x32_1v (dual-port)

Generator Integration

  • Passes port configuration to globals.OPTS before SRAM initialization
  • Enhanced output display with port configuration details
  • Error handling for invalid port combinations

Documentation

  • Port type descriptions (RW, R, W) and common configurations
  • Usage examples for FIFO buffers (1 RW + 1 R) and video buffers (1 W + 1 R)

Example Usage

# config.py - Dual-port SRAM for FIFO
word_size = 32
num_words = 256
num_banks = 1
num_rw_ports = 1  # Read-write port
num_r_ports = 1   # Read-only port
num_w_ports = 0

Generates Verilog with dual interfaces:

module sram_1rw1r0w_32x256_1v(
  // Port 0: RW
  input clk0, csb0, web0, addr0[4:0], din0[31:0],
  output dout0[31:0],
  // Port 1: R
  input clk1, csb1, addr1[4:0],
  output dout1[31:0]
);

Default configuration remains single-port (backward compatible).

Original prompt

This section details on the original issue you should resolve

<issue_title>Adding multi port srams</issue_title>
<issue_description>Need to implement multi port sram generation</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 12, 2026 08:58
Co-authored-by: KATTA-00 <83855665+KATTA-00@users.noreply.github.com>
Co-authored-by: KATTA-00 <83855665+KATTA-00@users.noreply.github.com>
Copilot AI changed the title [WIP] Add multi port SRAM generation Add multi-port SRAM generation support Feb 12, 2026
Copilot AI requested a review from KATTA-00 February 12, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding multi port srams

2 participants