mirror of https://github.com/VLSIDA/OpenRAM.git
Update options for arguments and readme.
This commit is contained in:
parent
3902cee003
commit
edf3a701e4
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Porting to a New Technology
|
||||||
|
|
||||||
|
If you want to support a new technology, you will need to create:
|
||||||
|
+ a setup script for each technology you want to use
|
||||||
|
+ a technology directory for each technology with the base cells
|
||||||
|
|
||||||
|
We provide two technology examples for [SCMOS] and [FreePDK45]. Each
|
||||||
|
specific technology (e.g., [FreePDK45]) should be a subdirectory
|
||||||
|
(e.g., $OPENRAM_TECH/freepdk45) and include certain folders and files:
|
||||||
|
* gds_lib folder with all the .gds (premade) library cells:
|
||||||
|
* dff.gds
|
||||||
|
* sense_amp.gds
|
||||||
|
* write_driver.gds
|
||||||
|
* cell_1rw.gds
|
||||||
|
* replica\_cell\_1rw.gds
|
||||||
|
* dummy\_cell\_1rw.gds
|
||||||
|
* sp_lib folder with all the .sp (premade) library netlists for the above cells.
|
||||||
|
* layers.map
|
||||||
|
* A valid tech Python module (tech directory with \_\_init\_\_.py and tech.py) with:
|
||||||
|
* References in tech.py to spice models
|
||||||
|
* DRC/LVS rules needed for dynamic cells and routing
|
||||||
|
* Layer information
|
||||||
|
* Spice and supply information
|
||||||
|
* etc.
|
||||||
51
README.md
51
README.md
|
|
@ -67,6 +67,11 @@ We include the tech files necessary for [SCMOS] SCN4M_SUBM,
|
||||||
generic and should be replaced with foundry models. You may get the
|
generic and should be replaced with foundry models. You may get the
|
||||||
entire [FreePDK45 PDK here][FreePDK45].
|
entire [FreePDK45 PDK here][FreePDK45].
|
||||||
|
|
||||||
|
To install [Sky130], simply run:
|
||||||
|
```
|
||||||
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
# Basic Usage
|
# Basic Usage
|
||||||
|
|
||||||
Once you have defined the environment, you can run OpenRAM from the command line
|
Once you have defined the environment, you can run OpenRAM from the command line
|
||||||
|
|
@ -111,6 +116,12 @@ python3 $OPENRAM_HOME/openram.py myconfig
|
||||||
You can see all of the options for the configuration file in
|
You can see all of the options for the configuration file in
|
||||||
$OPENRAM\_HOME/options.py
|
$OPENRAM\_HOME/options.py
|
||||||
|
|
||||||
|
To run designs in Docker, it is suggested to use, for example:
|
||||||
|
```
|
||||||
|
cd openram/macros
|
||||||
|
make example_config_scn4m_subm
|
||||||
|
```
|
||||||
|
|
||||||
# Unit Tests
|
# Unit Tests
|
||||||
|
|
||||||
Regression testing performs a number of tests for all modules in OpenRAM.
|
Regression testing performs a number of tests for all modules in OpenRAM.
|
||||||
|
|
@ -118,50 +129,28 @@ From the unit test directory ($OPENRAM\_HOME/tests),
|
||||||
use the following command to run all regression tests:
|
use the following command to run all regression tests:
|
||||||
|
|
||||||
```
|
```
|
||||||
python3 regress.py
|
cd openram/compiler/tests
|
||||||
|
make regress
|
||||||
```
|
```
|
||||||
|
|
||||||
To run a specific test:
|
To run a specific test:
|
||||||
```
|
```
|
||||||
python3 {unit test}.py
|
ce openram/compiler/tests
|
||||||
|
make 05_bitcell_array_test
|
||||||
```
|
```
|
||||||
The unit tests take the same arguments as openram.py itself.
|
|
||||||
|
|
||||||
To increase the verbosity of the test, add one (or more) -v options:
|
To increase the verbosity of the test, add one (or more) -v options and
|
||||||
|
pass it as an argument to OpenRAM:
|
||||||
```
|
```
|
||||||
python3 tests/00_code_format_check_test.py -v -t freepdk45
|
make 05_bitcell_array_test ARGS="-v -t scn4m_subm"
|
||||||
```
|
```
|
||||||
To specify a particular technology use "-t <techname>" such as
|
To specify a particular technology use "-t <techname>" such as
|
||||||
"-t freepdk45". The default for a unit test is scn4m_subm.
|
"-t freepdk45". The default for a unit test is scn4m_subm.
|
||||||
The default for openram.py is specified in the configuration file.
|
The default for openram.py is specified in the configuration file.
|
||||||
|
|
||||||
|
|
||||||
# Porting to a New Technology
|
|
||||||
|
|
||||||
If you want to support a new technology, you will need to create:
|
|
||||||
+ a setup script for each technology you want to use
|
|
||||||
+ a technology directory for each technology with the base cells
|
|
||||||
|
|
||||||
We provide two technology examples for [SCMOS] and [FreePDK45]. Each
|
|
||||||
specific technology (e.g., [FreePDK45]) should be a subdirectory
|
|
||||||
(e.g., $OPENRAM_TECH/freepdk45) and include certain folders and files:
|
|
||||||
* gds_lib folder with all the .gds (premade) library cells:
|
|
||||||
* dff.gds
|
|
||||||
* sense_amp.gds
|
|
||||||
* write_driver.gds
|
|
||||||
* cell_1rw.gds
|
|
||||||
* replica\_cell\_1rw.gds
|
|
||||||
* dummy\_cell\_1rw.gds
|
|
||||||
* sp_lib folder with all the .sp (premade) library netlists for the above cells.
|
|
||||||
* layers.map
|
|
||||||
* A valid tech Python module (tech directory with \_\_init\_\_.py and tech.py) with:
|
|
||||||
* References in tech.py to spice models
|
|
||||||
* DRC/LVS rules needed for dynamic cells and routing
|
|
||||||
* Layer information
|
|
||||||
* Spice and supply information
|
|
||||||
* etc.
|
|
||||||
|
|
||||||
# Get Involved
|
# Get Involved
|
||||||
|
|
||||||
|
+ [Port it](./PORTING.md) to a new technology.
|
||||||
+ Report bugs by submitting [Github issues].
|
+ Report bugs by submitting [Github issues].
|
||||||
+ Develop new features (see [how to contribute](./CONTRIBUTING.md))
|
+ Develop new features (see [how to contribute](./CONTRIBUTING.md))
|
||||||
+ Submit code/fixes using a [Github pull request]
|
+ Submit code/fixes using a [Github pull request]
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
TOP_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))../..)
|
||||||
|
include $(TOP_DIR)/openram.mk
|
||||||
|
|
||||||
|
.DEFAULT_GOAL := regress
|
||||||
|
|
||||||
|
ARGS ?= ""
|
||||||
|
|
||||||
|
TEST_DIR = $(TOP_DIR)/compiler/tests
|
||||||
|
TEST_SRCS=$(sort $(notdir $(wildcard $(TEST_DIR)/*_test.py)))
|
||||||
|
TEST_DIRS=$(basename $(TEST_SRCS))
|
||||||
|
TEST_STAMPS=$(addsuffix .ok,$(TEST_DIRS))
|
||||||
|
|
||||||
|
TEST_BROKEN := \
|
||||||
|
50_riscv_1k_1rw1r_func_test.py \
|
||||||
|
50_riscv_1k_1rw_func_test.py \
|
||||||
|
50_riscv_1rw1r_func_test.py \
|
||||||
|
50_riscv_1rw1r_phys_test.py \
|
||||||
|
50_riscv_1rw_func_test.py \
|
||||||
|
50_riscv_1rw_phys_test.py \
|
||||||
|
50_riscv_2k_1rw1r_func_test.py \
|
||||||
|
50_riscv_2k_1rw_func_test.py \
|
||||||
|
50_riscv_4k_1rw1r_func_test.py \
|
||||||
|
50_riscv_4k_1rw_func_test.py \
|
||||||
|
50_riscv_512b_1rw1r_func_test.py \
|
||||||
|
50_riscv_512b_1rw_func_test.py \
|
||||||
|
50_riscv_8k_1rw1r_func_test.py \
|
||||||
|
50_riscv_8k_1rw_func_test.py
|
||||||
|
|
||||||
|
|
||||||
|
WORKING_TEST_STAMPS=$(filter-out $(addsuffix .ok, (TEST_BROKEN)), $(TEST_STAMPS))
|
||||||
|
|
||||||
|
$(TEST_DIRS):
|
||||||
|
@$(MAKE) --no-print-directory $@.ok
|
||||||
|
|
||||||
|
tests:
|
||||||
|
@echo "Running the following tests"
|
||||||
|
@for S in $(WORKING_TEST_STAMPS); do echo " - $$S"; done
|
||||||
|
@sleep 5
|
||||||
|
@$(MAKE) $(WORKING_TEST_STAMPS)
|
||||||
|
.PHONY:
|
||||||
|
|
||||||
|
%.ok: %.py
|
||||||
|
@echo "Running $*"
|
||||||
|
@mkdir -p $(TOP_DIR)/compiler/tests/results/$*
|
||||||
|
@docker run -v $(TOP_DIR):/openram \
|
||||||
|
-v $(SKY130_PDK):$(SKY130_PDK) \
|
||||||
|
-e PDK_ROOT=$(PDK_ROOT) \
|
||||||
|
-e OPENRAM_HOME=/openram/compiler \
|
||||||
|
-e OPENRAM_TECH=/openram/technology \
|
||||||
|
-e OPENRAM_TMP=/openram/compiler/tests/results/$* \
|
||||||
|
--user $(UID):$(GID) \
|
||||||
|
vlsida/openram-ubuntu:latest \
|
||||||
|
python3 -u /openram/compiler/tests/$*.py $(ARGS) && touch $@
|
||||||
|
|
||||||
|
.DELETE_ON_ERROR: $(TEST_STAMPS)
|
||||||
|
|
||||||
|
TECHS := scn4m_subm freepdk45
|
||||||
|
#sky130
|
||||||
|
|
||||||
|
$(TECHS):
|
||||||
|
@docker run -v $(TOP_DIR):/openram \
|
||||||
|
-e OPENRAM_HOME=/openram/compiler \
|
||||||
|
-e OPENRAM_TECH=/openram/technology \
|
||||||
|
--user $(UID):$(GID) \
|
||||||
|
-e OPENRAM_TMP=/openram/compiler/tests/tmp_$@/$* \
|
||||||
|
vlsida/openram-ubuntu:latest \
|
||||||
|
sh -c "python3 -u /openram/compiler/tests/regress.py $(ARGS) -t $@"
|
||||||
|
.PHONY: $(TECHS)
|
||||||
|
|
||||||
|
regress: $(TECHS)
|
||||||
|
.PHONY: regress
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@rm -rf $(TEST_STAMPS)
|
||||||
|
@rm -rf $(TEST_DIRS)
|
||||||
|
.PHONE: clean
|
||||||
Loading…
Reference in New Issue