Comments (15)
See https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/designs/sky130hd/microwatt/config.mk where ADDITIONAL_* are set
from openroad-flow-scripts.
To add some more context, OpenRAM should generate 4 files that you need: The verilog model (or rather, just the module interface), the digital timing model (.lib
), the physical abstract (.lef
) and the physical model (.gds
). The .lef
can be generated from the .gds
if it isn't automatically generated by OpenRAM, although you may have to use a tool like Magic to do so.
Once you have these files, you need to instantiate your RAM macro in your RTL, just like you would for any other module. This module will only have an instantiation, not a definition (in other words, do not include the SRAM verilog model in your list of source files).
Next, as @maliberty mentioned above, you need to add the other model files for OpenROAD to use them. Add the .lib file to ADDITIONAL_LIBS
, the .lef file to ADDITIONAL_LEFS
, and the .gds to ADDITIONAL_GDS
.
Once you have that, ORFS should automatically do the rest, including macro placement, macro power grid, etc. I think most OpenRAM macros should work out of the box with ORFS, but if the maximum metal layer for the RAM is not the usual one (usually metal4?) then you might have to alter the macro power grid script, which is located in the $(PLATFORM_DIR) directory (whichever PDK you are using).
from openroad-flow-scripts.
Mocking SRAMs can be an alternative and give important insight into the design early on even if fakerams are not available or too difficult to implement: #1980
from openroad-flow-scripts.
Do you have further questions?
from openroad-flow-scripts.
Thank you @maliberty
I'm looking into the example you shared, and I will try to run it.
Thanks, @rovinski, for the additional information. I'm working on it and will try to incorporate my generated SRAM into my design.
I will keep you posted then,
from openroad-flow-scripts.
@mbautista-lab There is now an example of how to mock sram in OpenROAD-flow-scripts. This can be easier than fakesram to set up initially and also covers SRAM types that don't exist in fakesram:
Here is the readme:
Pull request was just merged has some more information even if the history is a bit messier than the final result, it is interesting and there are some screenshots: #1980
from openroad-flow-scripts.
Thank you, @oharboe. This is helpful. I will check it out.
from openroad-flow-scripts.
I have follow-up questions. I encountered this error below. I have the generated SRAM from OpenRAM, and I have added the .gds, .lef, and .lib in my config,mk. There is a compatibility issue with the units. I tried changing the unit in my .lef file, but I don't know if it's the right thing to do. Also, When I change the unit to 1000 in my .lef file. The flow runs and is finished, but I do not see the Sram macro in my layout, its missing.
Running floorplan.tcl, stage 2_1_floorplan
[INFO ODB-0227] LEF file: /home/mgbautista/OpenROAD-flow-scripts/flow/platforms/sky130hd/lef/sky130_fd_sc_hd.tlef, created 13 layers, 25 vias
[INFO ODB-0227] LEF file: /home/mgbautista/OpenROAD-flow-scripts/flow/platforms/sky130hd/lef/sky130_fd_sc_hd_merged.lef, created 441 library cells
[WARNING ODB-0205] The LEF UNITS DATABASE MICRON convert factor (2000) is greater than the database units per micron (1000) of the current technology.
[INFO ODB-0227] LEF file: ./designs/sky130hd/noc_buffer_in/lef/sky130_sram_2kbyte_1rw1r_32x512_8.lef, created 1 library cells
[ERROR ODB-0292] LEF data from ./designs/sky130hd/noc_buffer_in/lef/sky130_sram_2kbyte_1rw1r_32x512_8.lef is discarded due to errors
Error: floorplan.tcl, 3 ODB-0292
Command exited with non-zero status 1
Elapsed time: 0:00.35[h:]min:sec. CPU time: user 0.32 sys 0.02 (99%). Peak memory: 102468KB.
make[1]: *** [Makefile:615: do-2_1_floorplan] Error 1
make: *** [Makefile:614: results/sky130hd/noc_buffer_in/base/2_1_floorplan.odb] Error 2
from openroad-flow-scripts.
When you generate the ram I hope you have an option to set the dbu/micro to the correct value. Simply changing it in the LEF will result in it being the wrong size.
Do you have an instance of your RAM in the netlist?
from openroad-flow-scripts.
Yes I did, this is how instantiate the ram,
`ifdef SYNTH
sky130_sram_2kbyte_1rw1r_32x512_8 sky_sram_macro(
// Port 0: RW
.clk0 (wr_clk]),
.csb0 (wr_en), //- Chip select
.web0 (wr_en), //- Write enable
.wmask0 (4{wr_en}),
.addr0 (addra),
.din0 (din),
.dout0 (),
// Port 1: R
.clk1 (rd_clk),
.csb1 (rd_en), //- Chip select
.addr1 (addrb),
.dout1 (dout)
);
`else
reg [WRITE_DATA_WIDTH - 1:0] mem [0:FIFO_WRITE_DEPTH - 1];
always @(posedge wr_clk)
if (wr_en)
mem[addra] <= din;
always @(posedge rd_clk)
if (rst)
dout <= 'h0;
else if (rd_en)
dout <= mem[addrb];
`endif
from openroad-flow-scripts.
Do you see that instance in the .v coming out of yosys? Do you see it in the final .def from ORFS?
from openroad-flow-scripts.
I can see the xpm_fifo_async, which the top module that contains the SRAM, but I cant see the SRAM in the .v and .def file.
from openroad-flow-scripts.
If it isn't in the yosys output then there is nothing OR can do. Did you define SYNTH when you ran yosys?
from openroad-flow-scripts.
I have updated a new .lef with the correct unit, and yes, it's the definition I'm missing.
Now I can see the macro in my layout. many thanks,
from openroad-flow-scripts.
np
from openroad-flow-scripts.
Related Issues (20)
- VIA Routing over VIA Obstruction HOT 5
- Bug in ihp-sg13g2 jpeg flow HOT 14
- Platform SG13G2 misses antenna diode definition in the LEF HOT 13
- Error in building locally in WSL docker HOT 3
- make file error HOT 4
- Error in ” make DESIGN_CONFIG=./designs/asap7/aes/config.mk” cts.tcl HOT 2
- Questions about cell selection and padding. HOT 8
- Error when executing setup.sh on RHEL8
- 请教
- OOM in Global placement asap7/aes-block HOT 2
- Excute yosys returns an error message HOT 4
- Could I have an idea how to start from Gatenetlsit in Openroad-flow-script? HOT 5
- Error when running build_openroad.sh HOT 2
- make synth should fail on syntax error in .lib file HOT 1
- Improve mpl2 so that sky130hd/chameleon don't have to use manual macro placement
- GRT crashes for mpl2 change secure-ci run when repairing setup and hold violations HOT 5
- Failure to build ORFS docker image: unknown flag: --progress HOT 4
- Document official docker images in README.md
- XDG_RUNTIME_DIR error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openroad-flow-scripts.