forked from pulp-platform/dram_rtl_sim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (31 loc) · 1.37 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Copyright 2023 ETH Zurich and University of Bologna.
# Solderpad Hardware License, Version 0.51, see LICENSE for details.
# SPDX-License-Identifier: SHL-0.51
#
# Chi Zhang <chizhang@iis.ee.ethz.ch>
BENDER ?= bender
VLOG_ARGS = -svinputport=compat -override_timescale 1ns/1ps -suppress 2583 -suppress 13314
library ?= work
top_level ?= axi_to_dram_tb
DRAM_RTL_SIM_ROOT = $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
# Recipes to build DRAMSys
include dram_rtl_sim.mk
# Path to DRAMsyslib
dramsys_resouces_path ?= ../dramsys_lib/DRAMSys/configs
dramsys_lib_path ?= ../dramsys_lib/DRAMSys/build/lib
# QuestaSim arguments
questa_args ?=
questa_args += +DRAMSYS_RES=$(dramsys_resouces_path)
questa_args += -sv_lib $(dramsys_lib_path)/libsystemc
questa_args += -sv_lib $(dramsys_lib_path)/libDRAMSys_Simulator
all: compile
cd vsim && questa vsim -c $(library).$(top_level) -t 1ps -voptargs=+acc $(questa_args) -do start.tcl
gui: compile
cd vsim && questa vsim $(library).$(top_level) -t 1ps -voptargs=+acc $(questa_args) -do start.tcl
compile: vsim/compile.tcl
echo "exit" >> vsim/compile.tcl
cd vsim && questa vsim -c -do compile.tcl
vsim/compile.tcl: Bender.yml Makefile $(shell find src -type f) $(shell find test -type f)
$(BENDER) script vsim -t test -t rtl --vlog-arg="$(VLOG_ARGS)" > $@
clean:
cd vsim && rm -rf work/ vsim* transcript modelsim.ini compile.tcl .nfs* DRAM*