From c14985f3a78aa0f19f4e4c3eae42a3e8e512910c Mon Sep 17 00:00:00 2001 From: Richard Xia Date: Wed, 30 Nov 2016 14:30:05 -0800 Subject: [PATCH] Remove verilog header files built from Chisel .prm file. --- common.mk | 13 +++---------- fpga/e300artydevkit/Makefile | 2 +- fpga/e300artydevkit/script/prologue.tcl | 7 +------ fpga/e300artydevkit/src/system.v | 3 --- fpga/u500vc707devkit/Makefile | 2 +- fpga/u500vc707devkit/script/prologue.tcl | 7 +------ fpga/u500vc707devkit/src/system.v | 3 --- 7 files changed, 7 insertions(+), 30 deletions(-) diff --git a/common.mk b/common.mk index e09cc29..74f74de 100644 --- a/common.mk +++ b/common.mk @@ -47,20 +47,13 @@ ifneq ($(PATCHVERILOG),"") endif -verilog_consts_vh := $(BUILD_DIR)/$(CONFIG_PROJECT).$(CONFIG).vh -$(verilog_consts_vh): $(firrtl_prm) - echo "\`ifndef CONST_VH" > $@ - echo "\`define CONST_VH" >> $@ - sed -r 's/\(([A-Za-z0-9_]+),([A-Za-z0-9_]+)\)/`define \1 \2/' $< >> $@ - echo "\`endif // CONST_VH" >> $@ - .PHONY: verilog -verilog: $(verilog) $(verilog_consts_vh) +verilog: $(verilog) # Build .mcs mcs := $(BUILD_DIR)/$(CONFIG_PROJECT).$(CONFIG).mcs -$(mcs): $(verilog) $(verilog_consts_vh) - VSRC_TOP=$(verilog) VSRC_CONSTS=$(verilog_consts_vh) EXTRA_VSRCS="$(EXTRA_FPGA_VSRCS)" $(MAKE) -C $(FPGA_DIR) mcs +$(mcs): $(verilog) + VSRC_TOP=$(verilog) EXTRA_VSRCS="$(EXTRA_FPGA_VSRCS)" $(MAKE) -C $(FPGA_DIR) mcs cp $(FPGA_DIR)/obj/system.mcs $@ .PHONY: mcs diff --git a/fpga/e300artydevkit/Makefile b/fpga/e300artydevkit/Makefile index b4e9bd4..a815f6f 100644 --- a/fpga/e300artydevkit/Makefile +++ b/fpga/e300artydevkit/Makefile @@ -6,7 +6,7 @@ VIVADOFLAGS := \ bit := obj/system.bit $(bit): script/impl.tcl script/init.tcl - VSRC_TOP=$(VSRC_TOP) VSRC_CONSTS=$(VSRC_CONSTS) EXTRA_VSRCS="$(EXTRA_VSRCS)" $(VIVADO) $(VIVADOFLAGS) -source script/init.tcl -source script/impl.tcl + VSRC_TOP=$(VSRC_TOP) EXTRA_VSRCS="$(EXTRA_VSRCS)" $(VIVADO) $(VIVADOFLAGS) -source script/init.tcl -source script/impl.tcl .PHONY: bit bit: $(bit) diff --git a/fpga/e300artydevkit/script/prologue.tcl b/fpga/e300artydevkit/script/prologue.tcl index 91fdf97..0fca228 100644 --- a/fpga/e300artydevkit/script/prologue.tcl +++ b/fpga/e300artydevkit/script/prologue.tcl @@ -50,15 +50,10 @@ if {[info exists ::env(EXTRA_VSRCS)]} { #} set vsrc_top $::env(VSRC_TOP) -set vsrc_consts $::env(VSRC_CONSTS) -set_property verilog_define [list \ - "VSRC_CONSTS=${vsrc_consts}" \ - "VSRC_TOP=${vsrc_top}" \ - ] $obj +set_property verilog_define [list "VSRC_TOP=${vsrc_top}"] $obj add_files -norecurse -fileset $obj $vsrc_top -add_files -norecurse -fileset $obj $vsrc_consts if {[get_filesets -quiet sim_1] eq ""} { create_fileset -simset sim_1 diff --git a/fpga/e300artydevkit/src/system.v b/fpga/e300artydevkit/src/system.v index 1c45c43..afb40d5 100644 --- a/fpga/e300artydevkit/src/system.v +++ b/fpga/e300artydevkit/src/system.v @@ -1,8 +1,5 @@ `timescale 1ns/1ps -`define STRINGIFY(x) `"x`" -`include `STRINGIFY(`VSRC_CONSTS) - module system ( input wire CLK100MHZ, diff --git a/fpga/u500vc707devkit/Makefile b/fpga/u500vc707devkit/Makefile index b4e9bd4..a815f6f 100644 --- a/fpga/u500vc707devkit/Makefile +++ b/fpga/u500vc707devkit/Makefile @@ -6,7 +6,7 @@ VIVADOFLAGS := \ bit := obj/system.bit $(bit): script/impl.tcl script/init.tcl - VSRC_TOP=$(VSRC_TOP) VSRC_CONSTS=$(VSRC_CONSTS) EXTRA_VSRCS="$(EXTRA_VSRCS)" $(VIVADO) $(VIVADOFLAGS) -source script/init.tcl -source script/impl.tcl + VSRC_TOP=$(VSRC_TOP) EXTRA_VSRCS="$(EXTRA_VSRCS)" $(VIVADO) $(VIVADOFLAGS) -source script/init.tcl -source script/impl.tcl .PHONY: bit bit: $(bit) diff --git a/fpga/u500vc707devkit/script/prologue.tcl b/fpga/u500vc707devkit/script/prologue.tcl index 91fdf97..0fca228 100644 --- a/fpga/u500vc707devkit/script/prologue.tcl +++ b/fpga/u500vc707devkit/script/prologue.tcl @@ -50,15 +50,10 @@ if {[info exists ::env(EXTRA_VSRCS)]} { #} set vsrc_top $::env(VSRC_TOP) -set vsrc_consts $::env(VSRC_CONSTS) -set_property verilog_define [list \ - "VSRC_CONSTS=${vsrc_consts}" \ - "VSRC_TOP=${vsrc_top}" \ - ] $obj +set_property verilog_define [list "VSRC_TOP=${vsrc_top}"] $obj add_files -norecurse -fileset $obj $vsrc_top -add_files -norecurse -fileset $obj $vsrc_consts if {[get_filesets -quiet sim_1] eq ""} { create_fileset -simset sim_1 diff --git a/fpga/u500vc707devkit/src/system.v b/fpga/u500vc707devkit/src/system.v index e81edcb..fb6ae5b 100644 --- a/fpga/u500vc707devkit/src/system.v +++ b/fpga/u500vc707devkit/src/system.v @@ -2,9 +2,6 @@ `timescale 1ns/1ps `default_nettype none -`define STRINGIFY(x) `"x`" -`include `STRINGIFY(`VSRC_CONSTS) - module system ( //200Mhz differential sysclk -- 2.30.2