mirror of https://github.com/VLSIDA/OpenRAM.git
Add sram_config example to documentation
This commit is contained in:
parent
e15454ebb9
commit
45ee3c7e55
|
|
@ -39,9 +39,27 @@ openram.init_openram("myconfig.py") # Config files are explained on this page
|
|||
from openram import tech
|
||||
...
|
||||
```
|
||||
|
||||
Note that you should need to initalize OpenRAM so that the modules are imported properly. You can also look
|
||||
at [sram_compiler.py](../../sram_compiler.py) as an example on how to use "openram."
|
||||
|
||||
If you want to pass custom configuration when generating an SRAM, you can use `sram_config` class.
|
||||
```python
|
||||
import openram
|
||||
openram.init_openram("myconfig.py")
|
||||
openram.setup_bitcell()
|
||||
|
||||
from openram.modules import sram_config
|
||||
c = sram_config(...)
|
||||
|
||||
from openram.modules import sram
|
||||
s = sram(sram_config=c,
|
||||
name="custom_name")
|
||||
|
||||
s.save()
|
||||
|
||||
openram.end_openram()
|
||||
```
|
||||
|
||||
|
||||
## Command Line Usage (with library)
|
||||
|
|
@ -60,7 +78,6 @@ You can continue with following section for more details.
|
|||
|
||||
|
||||
## Command Line Usage (without library)
|
||||
|
||||
Once you have defined the environment, you can run OpenRAM from the command line
|
||||
using a single configuration file written in Python.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue