Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cbbbf9c
ram: add nangate45 cross-platform regression test
Mar 7, 2026
62711fe
ram: changes to test files after word simplification
braydenlouie Mar 25, 2026
3d95c43
ram: begin removal of hard-coded pin names
braydenlouie Mar 30, 2026
6a8b7a8
ram: removed hard-coded names and tested sky130
braydenlouie Mar 30, 2026
582763a
ram: preliminary testing with nangate testing complete
braydenlouie Mar 30, 2026
e9d4890
ram: fixes to initial gemini advice
braydenlouie Mar 30, 2026
30cc938
ram: clang-tidy change
braydenlouie Mar 30, 2026
be3543f
Merge branch 'The-OpenROAD-Project:master' into pdk-support
braydenlouie Mar 30, 2026
d495b3b
ram: review changes
braydenlouie Mar 31, 2026
7c8125a
ram: change to vok file
braydenlouie Mar 31, 2026
0dcdb68
ram: cmake list change
braydenlouie Mar 31, 2026
132725e
ram: tclint change
braydenlouie Mar 31, 2026
3ca123e
Merge branch 'The-OpenROAD-Project:master' into pdk-support
braydenlouie Apr 1, 2026
813287e
ram: changes to nangate7x7 test
braydenlouie Apr 1, 2026
eb55fa6
ram: reversion to user provided pwr/gnd pins
braydenlouie Apr 1, 2026
1e6c537
ram: clang-format and ng45 test changes
braydenlouie Apr 2, 2026
4ca740a
ram: updated ng45 ok files and tclfmt
braydenlouie Apr 3, 2026
57631b6
Merge branch 'The-OpenROAD-Project:master' into pdk-support
braydenlouie Apr 4, 2026
9d02db1
Merge branch 'The-OpenROAD-Project:master' into pdk-support
braydenlouie Apr 9, 2026
cab68f4
ram: review changes
braydenlouie Apr 11, 2026
22fbb07
ram: clang-tidy
braydenlouie Apr 11, 2026
0cd9418
ram: replaced additional pointer
braydenlouie Apr 11, 2026
0b0e823
ram: clang-tidy
braydenlouie Apr 11, 2026
55f02a6
ram: fixed swig error with spaceship operator
braydenlouie Apr 12, 2026
5b53d5a
ram: fixed swig spaceship operator
braydenlouie Apr 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 32 additions & 6 deletions src/ram/include/ram/ram.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <array>
#include <functional>
#include <map>
#include <memory>
#include <string>
#include <utility>
Expand Down Expand Up @@ -50,6 +51,29 @@ class TritonRoute;

namespace ram {

enum class PortRoleType
{
Clock,
DataIn,
DataOut,
WriteEnable,
TriEnable,
Select, // for mux support in future
Power,
Ground
};

struct PortRole
{
PortRoleType type;
int index;

// for map so that keys are comparable
#ifndef SWIG
auto operator<=>(const PortRole&) const = default;
#endif
};

class RamGen
{
public:
Expand Down Expand Up @@ -96,15 +120,10 @@ class RamGen

private:
void findMasters();
std::map<PortRole, std::string> buildPortMap(odb::dbMaster*);
odb::dbMaster* findMaster(const std::function<bool(sta::LibertyPort*)>& match,
const char* name);
odb::dbNet* makeNet(const std::string& prefix, const std::string& name);
odb::dbInst* makeInst(
Layout* layout,
const std::string& prefix,
const std::string& name,
odb::dbMaster* master,
const std::vector<std::pair<std::string, odb::dbNet*>>& connections);
odb::dbInst* makeInst(
Cell* cell,
const std::string& prefix,
Expand Down Expand Up @@ -168,6 +187,13 @@ class RamGen
odb::dbMaster* buffer_cell_{nullptr};
odb::dbMaster* tapcell_{nullptr};

std::map<PortRole, std::string> storage_ports_;
std::map<PortRole, std::string> tristate_ports_;
std::map<PortRole, std::string> inv_ports_;
std::map<PortRole, std::string> and2_ports_;
std::map<PortRole, std::string> clock_gate_ports_;
std::map<PortRole, std::string> buffer_ports_;

std::vector<odb::dbBTerm*> addr_inputs_;
std::vector<odb::dbBTerm*> data_inputs_;
std::vector<std::vector<odb::dbBTerm*>> q_outputs_;
Expand Down
Loading
Loading