Skip to content

Commit

Permalink
Merge pull request #495 from efabless/openframe_tapeout
Browse files Browse the repository at this point in the history
Openframe tapeout
  • Loading branch information
jeffdi authored Sep 12, 2023
2 parents 0907f7a + a4ff88b commit 7f820d8
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 9 deletions.
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,47 @@ __truck:
@cd $(CARAVEL_ROOT)/mag && PDKPATH=${PDK_ROOT}/$(PDK) MAGTYPE=mag magic -noc -dnull -rcfile ./.magicrc $(UPRJ_ROOT)/mag/mag2gds_caravan.tcl 2>&1 | tee $(UPRJ_ROOT)/signoff/build/make_truck.out
### @rm $(UPRJ_ROOT)/mag/mag2gds_caravan.tcl

.PHONY: openframe
openframe: check-env uncompress uncompress-caravel
ifeq ($(FOREGROUND),1)
@echo "Running make openframe in the foreground..."
$(MAKE) -f $(CARAVEL_ROOT)/Makefile __openframe
@echo "Make openframe completed." 2>&1 | tee -a ./signoff/build/make_openframe.out
else
@echo "Running make openframe in the background..."
nohup $(MAKE) -f $(CARAVEL_ROOT)/Makefile __openframe >/dev/null 2>&1 &
tail -f signoff/build/make_openframe.out
@echo "Make openframe completed." 2>&1 | tee -a ./signoff/build/make_openframe.out
endif

__openframe:
@echo "###############################################"
@echo "Generating Caravel GDS (sources are in the 'gds' directory)"
@sleep 1
#### Runs from the CARAVEL_ROOT mag directory
@echo "\
drc off; \
crashbackups stop; \
addpath hexdigits; \
addpath $(UPRJ_ROOT)/mag; \
load openframe_project_wrapper; \
property LEFview true; \
property GDS_FILE $(UPRJ_ROOT)/gds/openframe_project_wrapper.gds; \
property GDS_START 0; \
load $(UPRJ_ROOT)/mag/user_id_programming; \
load $(UPRJ_ROOT)/mag/user_id_textblock; \
load $(CARAVEL_ROOT)/maglef/simple_por; \
load caravel_openframe -dereference; \
select top cell; \
expand; \
cif *hier write disable; \
cif *array write disable; \
gds write $(UPRJ_ROOT)/gds/caravel_openframe.gds; \
quit -noprompt;" > $(UPRJ_ROOT)/mag/mag2gds_caravel_openframe.tcl
### Runs from CARAVEL_ROOT
@mkdir -p ./signoff/build
@cd $(CARAVEL_ROOT)/mag && PDKPATH=${PDK_ROOT}/$(PDK) MAGTYPE=mag magic -noc -dnull -rcfile ${PDK_ROOT}/$(PDK)/libs.tech/magic/$(PDK).magicrc $(UPRJ_ROOT)/mag/mag2gds_caravel_openframe.tcl 2>&1 | tee $(UPRJ_ROOT)/signoff/build/make_openframe.out

.PHONY: clean
clean:
cd $(CARAVEL_ROOT)/verilog/dv/caravel/mgmt_soc/ && \
Expand Down
4 changes: 2 additions & 2 deletions manifest
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ b9d6114a5067a04dd59cdd46fb988591c16743ce verilog/rtl/spare_logic_block.v
036dc8e9066082b2e133dc7b72fd3ad5a52f254b verilog/rtl/toplevel_cocotb.v
8f0bec01c914efe790a09ffe62bbfe0781069e35 verilog/rtl/xres_buf.v
256190717faa72005cf7656d8443c4c0693b3f78 scripts/set_user_id.py
98168b1fb6f80b196f9a05e725ec6ad99bc57ac6 scripts/generate_fill.py
9e31b1bbbb03024d02d54f9da8d42b3837abc5e5 scripts/compositor.py
731116709a44d13225170acc83cd34ff9e00fa39 scripts/generate_fill.py
dff8adfb05bedf96f86e16a18ce3cd5818d6fb78 scripts/compositor.py
7 changes: 4 additions & 3 deletions scripts/compositor.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,10 @@ def usage():
keepmode = True

magpath = mag_dir_path
rcfile = magpath + '/.magicrc'
# pdk_root = os.getenv("PDK_ROOT")
# rcfile = pdk_root + '/sky130A/libs.tech/magic/sky130A.magicrc'
# rcfile = magpath + '/.magicrc'
pdk_root = os.getenv("PDK_ROOT")
pdk = os.getenv("PDK")
rcfile = pdk_root + '/' + pdk + '/libs.tech/magic/' + pdk + '.magicrc'

gdspath = gds_dir_path

Expand Down
11 changes: 7 additions & 4 deletions scripts/generate_fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,10 @@ def makegds(file):
distmode = True

magpath = user_project_path + '/mag'
rcfile = magpath + '/.magicrc'
# pdk_root = os.getenv("PDK_ROOT")
# rcfile = pdk_root + '/sky130A/libs.tech/magic/sky130A.magicrc'
# rcfile = magpath + '/.magicrc'
pdk_root = os.getenv("PDK_ROOT")
pdk = os.getenv("PDK")
rcfile = pdk_root + '/' + pdk + '/libs.tech/magic/' + pdk + '.magicrc'

if not os.path.isfile(rcfile):
rcfile = None
Expand Down Expand Up @@ -187,12 +188,14 @@ def makegds(file):
print('gds readonly true', file=ofile)
print('gds rescale false', file=ofile)
print('gds read ../gds/' + project, file=ofile)
print('load ' + project, file=ofile)
print('select top cell', file=ofile)
print('expand', file=ofile)
if not distmode:
print('cif ostyle wafflefill(tiled)', file=ofile)
print('', file=ofile)
print('set fullbox [box values]', file=ofile)
# print('set fullbox [box values]', file=ofile)
print('set fullbox { 0 0 717600 1037600 }', file=ofile)
print('set xmax [lindex $fullbox 2]', file=ofile)
print('set xmin [lindex $fullbox 0]', file=ofile)
print('set fullwidth [expr {$xmax - $xmin}]', file=ofile)
Expand Down

0 comments on commit 7f820d8

Please sign in to comment.