Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix targets for memory wrappers; change shell script permissions; fix sram.v generation for ASIC; improve asic.mk; cleanup datasheet files from ASIC memories; transfer ASIC reports from server to local machine; use CASE variable to filter libraries to use on synthesis for ASIC; update CACHE submodule; update sources according new submodule; rename XMSIM_SERVER and XMSIM_USER variables to CADENCE_SERVER and CADENCE_USER #203

Merged
merged 4 commits into from
Oct 17, 2021
23 changes: 13 additions & 10 deletions hardware/asic/asic.mk
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#DEFINES
ASIC=1

CASE=TC

#ddr controller address width
DEFINE+=$(defmacro)DDR_ADDR_W=24
DDR_ADDR_W=24

include $(ROOT_DIR)/hardware/hardware.mk

CASE=TC

# Memory sizes in log2
BOOTROM_W:=$(shell echo '$(BOOTROM_ADDR_W)-2' | bc)
SRAM_W:=$(shell echo '$(SRAM_ADDR_W)-2' | bc)
Expand Down Expand Up @@ -37,17 +38,20 @@ bootrom: sw gen-bootrom

sram: gen-sram

rom.v: *$(CASE).lib
$(MEM_DIR)/software/python/memwrapper_make.py fsc0l_d sp $(BOOTROM_W) 32 1 > rom.v
bootrom.v:
$(MEM_DIR)/software/python/memakerwrap.py fsc0l_d iob_sp_rom sp $(BOOTROM_W) 32 1 > $@

sram.v: $(SRAM_DIR)/*$(CASE).lib
$(MEM_DIR)/software/python/memwrapper_make.py fsc0l_d sj 0 1 $(SRAM_W) 8 4 1 > sram.v
sram.v:
$(MEM_DIR)/software/python/memakerwrap.py fsc0l_d iob_dp_ram_be sj 0 1 $(SRAM_W) 8 4 16 > $@

#
# Synthesis
#

synth: system_synth.v
ifneq ($(ASIC_SERVER),)
scp $(ASIC_USER)@$(ASIC_SERVER):$(REMOTE_ROOT_DIR)/hardware/asic/$(ASIC_NODE)/$(ASIC_REPORTS) .
endif

#
# Testing
Expand All @@ -64,11 +68,10 @@ test1: clean
#

clean-remote: hw-clean
@rm -f $(ASIC_MEM_LEFS) $(ASIC_MEM_LIBS) $(ASIC_MEM_SIM_MODELS)
ifneq ($(ASIC_SERVER),)
ssh $(ASIC_USER)@$(ASIC_SERVER) 'if [ ! -d $(REMOTE_ROOT_DIR) ]; then mkdir -p $(REMOTE_ROOT_DIR); fi'
rsync -avz --exclude .git $(ROOT_DIR) $(ASIC_USER)@$(ASIC_SERVER):$(REMOTE_ROOT_DIR)
ssh $(ASIC_USER)@$(ASIC_SERVER) 'cd $(REMOTE_ROOT_DIR)/hardware/asic/$(ASIC_NODE); make $@ ASIC_NODE=$(ASIC_NODE)'
ssh $(ASIC_USER)@$(ASIC_SERVER) 'cd $(REMOTE_ROOT_DIR)/hardware/asic/$(ASIC_NODE); make clean'
endif

#clean test log only when asic testing begins
Expand All @@ -77,7 +80,7 @@ clean-testlog:
ifneq ($(ASIC_SERVER),)
ssh $(ASIC_USER)@$(ASIC_SERVER) 'if [ ! -d $(REMOTE_ROOT_DIR) ]; then mkdir -p $(REMOTE_ROOT_DIR); fi'
rsync -avz --exclude .git $(ROOT_DIR) $(ASIC_USER)@$(ASIC_SERVER):$(REMOTE_ROOT_DIR)
ssh $(ASIC_USER)@$(ASIC_SERVER) 'cd $(REMOTE_ROOT_DIR)/hardware/asic/$(ASIC_NODE); make $@ ASIC_NODE=$(ASIC_NODE)'
ssh $(ASIC_USER)@$(ASIC_SERVER) 'cd $(REMOTE_ROOT_DIR)/hardware/asic/$(ASIC_NODE); make $@'
endif

.PHONY: all \
Expand Down
4 changes: 3 additions & 1 deletion hardware/asic/umc130/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ROOT_DIR:=../../..
ASIC_MEM_LEFS=*.lef
ASIC_MEM_LIBS=*$(CASE).lib
ASIC_MEM_SIM_MODELS=*LD130*.v
ASIC_REPORTS=*.txt

ASIC_SERVER=$(CADENCE_SERVER)
ASIC_USER=$(CADENCE_USER)
Expand Down Expand Up @@ -54,6 +55,7 @@ ifeq ($(ASIC_SERVER),)
echo "set INCLUDE [list $(INCLUDE)]" > inc.tcl
echo "set DEFINE [list $(DEFINE)]" > defs.tcl
echo "set VSRC [glob $(VSRC)]" > vsrc.tcl
echo "set CASE $(CASE)" > case.tcl
./synth.sh
else
ssh $(ASIC_USER)@$(ASIC_SERVER) 'if [ ! -d $(REMOTE_ROOT_DIR) ]; then mkdir -p $(REMOTE_ROOT_DIR); fi'
Expand All @@ -66,7 +68,7 @@ endif
#

clean: clean-remote
rm -rf *.txt rc.cmd* rc.* fv libscore_work *.sdc *.lib *.lef *.db
rm -rf *.txt rc.cmd* rc.* fv libscore_work *.sdc *.lib *.lef *.ds
find *.tcl -type f -not -name synscript.tcl -not -name powscript.tcl -delete

.PHONY: gen-bootrom gen-sram \
Expand Down
2 changes: 1 addition & 1 deletion hardware/asic/umc130/synscript.tcl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# library and hdl search paths
set_attribute lib_search_path [list /opt/ic_tools/pdk/faraday/umc130/LL/fsc0l_d/2009Q2v3.0/GENERIC_CORE/FrontEnd/synopsys .]
set libs [glob *.lib]
set libs [glob *$CASE.lib]
set_attribute library [list fsc0l_d_generic_core_tt1p2v25c.lib $libs]
set_attribute hdl_search_path $INCLUDE
#
Expand Down
2 changes: 1 addition & 1 deletion hardware/asic/umc130/synth.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
source /opt/ic_tools/init/init-rc14_25_hf000
echo "quit" | rc -files inc.tcl -files defs.tcl -files vsrc.tcl -files synscript.tcl
echo "quit" | rc -files inc.tcl -files defs.tcl -files vsrc.tcl -files case.tcl -files synscript.tcl
echo "quit"
16 changes: 10 additions & 6 deletions hardware/hardware.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,26 @@ ifeq ($(USE_DDR),1)
include $(CACHE_DIR)/hardware/hardware.mk
endif

ifneq ($(ASIC_MEM),1)
ifneq ($(ASIC),1)
#rom
ifneq (SPROM,$(filter SPROM, $(SUBMODULES)))
SUBMODULES+=SPROM
SPROM_DIR:=$(MEM_DIR)/sp_rom
VSRC+=$(SPROM_DIR)/sp_rom.v
VSRC+=$(SPROM_DIR)/iob_sp_rom.v
endif

#ram
ifneq (DPRAM,$(filter DPRAM, $(SUBMODULES)))
SUBMODULES+=DPRAM
DPRAM_DIR:=$(MEM_DIR)/dp_ram
VSRC+=$(DPRAM_DIR)/iob_dp_ram.v
endif
ifneq (DPRAM_BE,$(filter DPRAM_BE, $(SUBMODULES)))
SUBMODULES+=DPRAM_BE
DPRAM_BE_DIR:=$(MEM_DIR)/dp_ram_be
VSRC+=$(DPRAM_BE_DIR)/iob_dp_ram_be.v
endif
endif

#peripherals
$(foreach p, $(PERIPHERALS), $(eval include $(SUBMODULES_DIR)/$p/hardware/hardware.mk))
Expand Down Expand Up @@ -56,10 +63,7 @@ VSRC+=$(SRC_DIR)/ext_mem.v
endif

#system
VSRC+=$(SRC_DIR)/boot_ctr.v $(SRC_DIR)/int_mem.v
ifneq ($(ASIC_MEM),1)
VSRC+=$(SRC_DIR)/sram.v
endif
VSRC+=$(SRC_DIR)/boot_ctr.v $(SRC_DIR)/int_mem.v $(SRC_DIR)/sram.v
VSRC+=system.v

IMAGES=boot.hex firmware.hex
Expand Down
4 changes: 2 additions & 2 deletions hardware/simulation/xcelium/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ defmacro:=-define
incdir:=-incdir

SIMULATOR=xcelium
SIM_SERVER ?=$(XMSIM_SERVER)
SIM_USER ?=$(XMSIM_USER)
SIM_SERVER=$(CADENCE_SERVER)
SIM_USER=$(CADENCE_USER)
SIM_PROC=xmsim

include ../simulation.mk
Expand Down
2 changes: 1 addition & 1 deletion hardware/src/boot_ctr.v
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ module boot_ctr
//
//INSTANTIATE ROM
//
sp_rom
iob_sp_rom
#(
.DATA_W(`DATA_W),
.ADDR_W(`BOOTROM_ADDR_W-2),
Expand Down
4 changes: 2 additions & 2 deletions hardware/src/sram.v
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ module sram #(
iob_dp_ram_be
#(
.FILE(FILE),
.ADDR_WIDTH(`SRAM_ADDR_W-2),
.DATA_WIDTH(`DATA_W)
.ADDR_W(`SRAM_ADDR_W-2),
.DATA_W(`DATA_W)
)
main_mem_byte
(
Expand Down