Debug initial docker run scripts

This commit is contained in:
mrg
2021-11-02 15:07:18 -07:00
parent 9d49a369ea
commit d7a20bc69b
5 changed files with 93 additions and 43 deletions
+19 -2
View File
@@ -2,8 +2,13 @@ MACRO_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
TOP_DIR := $(realpath $(MACRO_DIR)/..)
include $(TOP_DIR)/openram.mk
UID = $(shell id -u)
GID = $(shell id -g)
.DEFAULT_GOAL := all
SKY130_PDK ?= $(PDK_ROOT)/share/pdk/sky130A
OPENRAM_OPTS := $(OPENRAM_OPTS)
# Define `OPENRAM_FULL` in your environment to run a full characterize
ifeq ($(OPENRAM_FULL),)
@@ -51,14 +56,26 @@ all: | configs
@echo "Building $*"
@mkdir -p $*
docker run -v $(TOP_DIR):/openram \
-v $(PDK_ROOT)/share/sky130A:/sky130A \
-e PDK_ROOT=/ \
-v $(SKY130_PDK):$(SKY130_PDK) \
-e PDK_ROOT=$(PDK_ROOT) \
-e OPENRAM_HOME=/openram/compiler \
-e OPENRAM_TECH=/openram/technology \
-e OPENRAM_TMP=/openram/macros/$*/tmp \
--user $(UID):$(GID) \
vlsida/openram-ubuntu:latest \
python3 -u /openram/compiler/openram.py $(OPENRAM_OPTS) -o $* -p /openram/macros/$* /openram/macros/$< && touch $@
mount:
docker run -it -v $(TOP_DIR):/openram \
-v $(SKY130_PDK):$(SKY130_PDK) \
-e PDK_ROOT=$(PDK_ROOT) \
-e OPENRAM_HOME=/openram/compiler \
-e OPENRAM_TECH=/openram/technology \
--user $(UID):$(GID) \
vlsida/openram-ubuntu:latest
.PHONY: macros
.DELETE_ON_ERROR: $(STAMPS)
$(DIRS):
+21
View File
@@ -0,0 +1,21 @@
"""
Dual port (1 read/write + 1 read only) 1 kbytes SRAM with byte write.
FIXME: What is this useful for?
FIXME: Why would you want byte write on this?
"""
word_size = 8 # Bits
num_words = 16
human_byte_size = "{:.0f}kbytes".format((word_size * num_words)/1024/8)
# Allow byte writes
write_size = 2 # Bits
# Dual port
num_rw_ports = 1
num_r_ports = 1
num_w_ports = 0
ports_human = '1rw1r'
import os
exec(open(os.path.join(os.path.dirname(__file__), 'sky130_sram_common.py')).read())