Skip to content

Instantly share code, notes, and snippets.

@FrancescoConti
Created March 8, 2019 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FrancescoConti/cb5858168fb1bbd4df49a254c4d6b3eb to your computer and use it in GitHub Desktop.
Save FrancescoConti/cb5858168fb1bbd4df49a254c4d6b3eb to your computer and use it in GitHub Desktop.
Postsynth makefile example
#
# Copyright (C) 2019 ETH Zurich, University of Bologna
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the BSD license. See the LICENSE file for details.
#
mkfile_path := $(dir $(abspath $(firstword $(MAKEFILE_LIST))))
IP=postsynth
IP_PATH=$(mkfile_path)/path/to/synth/netlist/dir/
NETLIST_NAME=netlist.v
LIB_NAME=postsynth_lib
include vcompile/build.mk
.PHONY: vcompile-$(IP)
vcompile-$(IP): $(LIB_PATH)/postsynth_netlist.vmake \
$(LIB_PATH)/postsynth_tb.vmake
SRC_SVLOG_POSTSYNTH_NETLIST=\
$(IP_PATH)/$(NETLIST_NAME)
SRC_VHDL_POSTSYNTH_NETLIST=
$(LIB_PATH)/postsynth_netlist.vmake: $(SRC_SVLOG_POSTSYNTH_NETLIST)
$(call subip_echo,postsynth_netlist)
$(VLOG_CC) -work $(LIB_PATH) $(IP_PATH)/$(NETLIST_NAME)
@touch $(LIB_PATH)/postsynth_netlist.vmake
$(LIB_PATH)/postsynth_tb.vmake: $(SRC_SVLOG_POSTSYNTH_TB)
$(call subip_echo,postsynth_tb)
$(VLOG_CC) -work $(LIB_PATH) +define+POSTSYNTH +incdir+../rtl ../tb/tb_postsynth.sv
@touch $(LIB_PATH)/postsynth_tb.vmake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment