Replies: 6 comments 10 replies
-
|
Your suggestion is fine for a non-manufacturable PDKs like asap7/ng45. There are other uses cases where fakeram is more appropriate. |
Beta Was this translation helpful? Give feedback.
-
|
An example of where one can use mock SRAMs for real PDKs. Let's say I want to find out if it is worth setting up ORFS/OpenROAD with a commercial modern PDK and I have a design that uses some SRAMs and I'd like to run that through ASAP7, but with somewhat realistic SRAMs from the commerical PDK, to get some sense of what results to expect.
It is also possible to mix the .lib file from the real PDK and the .lef file from an ASAP7 PDK (generated from behavioral Verilog in ORFS/OpenROAD) to get somewhat more relastic timing, but these are second order approximations at best when mixing two PDKs, so might not be worth the effort. in2reg 200ps clock period - 63ps = 130ps. So 130ps to write to the SRAM. reg2out 200ps - 130ps = 70ps. So 70ps to read from the SRAM. |
Beta Was this translation helpful? Give feedback.
-
|
The process of investigating some rams and tuning others to match area/power/timing/pins is similar is either case. Its unclear the OR is adding that much value over something that generates them directly with near zero runtime overhead. Most of the effort is in correlation. |
Beta Was this translation helpful? Give feedback.
-
|
@oharboe you'll find that trying to estimate SRAM timing was the subject of great scrutiny about 10-15 years ago which is how McPAT came to be in the first place. It is extraordinarily difficult to model SRAM timing without having very involved models which requires a lot of data from the PDK, as well as low-level SRAM design tradeoffs which FakeRAM current abstracts away for the user. The notion of taking standard cells or other process-specific data won't get you that much further in estimation because SRAMs often use non-CMOS logic and other tricks to get them to be faster than standard cell designs. Using SPICE modeling is only helpful if you already have a model for the key components like the bit cell and the sense amplifier, otherwise other data is not really representative because SRAM uses separate processing rules than regular logic. Also, you cannot perform STA on an SRAM because it is not fully digital logic internally. In other words, it's really hard to do much better than FakeRAM in terms of estimation until you go to a full implementation like OpenRAM. It would be a better idea to look at publications or other open data for the process you're looking at (or a similar process) and try to modify the numbers yourself in the Also, FakeRAM doesn't produce |
Beta Was this translation helpful? Give feedback.
-
|
Somewhat related to this I'm trying to work out what the best approach is for estimating SRAM area and power for an open-source design space exploration run. I'd really like to be able to do it with open tools (even at the cost of some accuracy) since it'll be more shareable and reproducible. At the same time I don't want to get results that are totally different from what I'd get with proprietary PDKs and tools. Using the skywater130 PDK it looks like I can get a fully open-source flow. I'm using bazel_orfs, and am adding in SRAM generation with OpenRAM, and stimulus generation with some cocotb tests. I don't have it working yet, but there's a path. I'd also like to get results for a process node that's a bit more modern. I don't need a real PDK so ASAP7 would be fine, but I'm unsure what I should do there for the SRAM generation. Is https://github.com/ABKGroup/FakeRAM2.0 something that could give me reliable numbers? I don't want to build the memory macros using std cells because that will dramatically overestimate the area and power for the depths I'm looking at. |
Beta Was this translation helpful? Give feedback.
-
|
Mocking SRAMs in Verilog can be surprisingly powerful—especially for early prototyping, research flows, or when SRAM compiler models aren't available. By writing your SRAM as synthesizable Verilog with the correct ports and behavior (e.g., synchronous read), you can generate a
Even though the timing isn't realistic, it's accurate in structure and sufficient for:
|
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
fakeram has been used to generate placeholder SRAM macros for use in RTL-to-GDS flows, you get
.lib,.lef, and.gdsviews to proceed with testing OpenROAD and studying a design without having actual SRAM macros.This is especially helpful with asap7 that does not and will not obtain in the future the ability to generate actual srams.
What fakeram 2.0 Is (and Isn’t)
fakeram 2.0 presents itself as a tool to "generate SRAMs," but under the hood, it is a small Python module that emits Liberty, LEF, and GDS files through print statements and static templates. It does not:
fakeram 2.0plays to the understandable desire for a turnkey "SRAM generator"—but by creating files that look the part without meaningful modeling.A Better Approach Using What We Already Have
Now that the OpenROAD toolchain and ORFS PDK integrations are mature and available, there is a practical and scalable alternative that avoids these problems entirely:
.lib,.lef, and.gdsusing real synthesis, place-and-route, and extraction.This yields:
Example of mocking sram: https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/tree/master/flow/designs/asap7/riscv32i-mock-sram
Generalizes Beyond SRAMs
This method isn't just for mocking SRAMs. Any macro block with a defined interface can be mocked this way:
It's a flexible and reusable technique that allows early progress on physical integration without needing finalized IP.
Recommendation
Rather than extending
fakeraminto a "3.0" version, the more reliable path forward is to use the toolchains and flows we already have—OpenROAD, ORFS, and a small amount of targeted Verilog—to build mock macros that are physically and logically consistent with the rest of the design.This avoids the pitfalls of handcrafted views and brings macro modeling fully into the digital flow.
Beta Was this translation helpful? Give feedback.
All reactions