mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-23 21:39:10 -04:00
minor updates
This commit is contained in:
parent
7d0c141129
commit
01fedb066c
5 changed files with 67 additions and 18 deletions
|
@ -3,6 +3,8 @@ include $(ROOT_DIR)/config.mk
|
|||
|
||||
DEVICE ?= xcu55c-fsvh2892-2L-e
|
||||
|
||||
MAX_JOBS ?= 8
|
||||
|
||||
VIVADO := $(XILINX_VIVADO)/bin/vivado
|
||||
|
||||
SRC_DIR := $(VORTEX_HOME)/hw/syn/xilinx/dut
|
||||
|
@ -11,6 +13,9 @@ RTL_DIR := $(VORTEX_HOME)/hw/rtl
|
|||
AFU_DIR := $(RTL_DIR)/afu/xrt
|
||||
SCRIPT_DIR := $(VORTEX_HOME)/hw/scripts
|
||||
|
||||
NCPUS := $(shell lscpu | grep "^Core(s) per socket:" | awk '{print $$4}')
|
||||
JOBS ?= $(shell echo $$(( $(NCPUS) > $(MAX_JOBS) ? $(MAX_JOBS) : $(NCPUS) )))
|
||||
|
||||
CONFIGS += -DNDEBUG
|
||||
CONFIGS += -DVIVADO
|
||||
CONFIGS += -DSYNTHESIS
|
||||
|
@ -26,9 +31,9 @@ project_1/sources.txt:
|
|||
build: $(PROJECT).xpr
|
||||
$(PROJECT).xpr: project_1/sources.txt
|
||||
ifdef FPU_IP
|
||||
FPU_IP=project_1/ip $(VIVADO) -mode batch -source $(SRC_DIR)/project.tcl -tclargs $(TOP_LEVEL_ENTITY) $(DEVICE) project_1/sources.txt $(SRC_DIR)/project.xdc $(SCRIPT_DIR) $(SRC_DIR)/../scripts
|
||||
MAX_JOBS=$(JOBS) FPU_IP=project_1/ip $(VIVADO) -mode batch -source $(SRC_DIR)/project.tcl -tclargs $(TOP_LEVEL_ENTITY) $(DEVICE) project_1/sources.txt $(SRC_DIR)/project.xdc $(SCRIPT_DIR) $(SRC_DIR)/../scripts
|
||||
else
|
||||
$(VIVADO) -mode batch -source $(SRC_DIR)/project.tcl -tclargs $(TOP_LEVEL_ENTITY) $(DEVICE) project_1/sources.txt $(SRC_DIR)/project.xdc $(SCRIPT_DIR) $(SRC_DIR)/../scripts
|
||||
MAX_JOBS=$(JOBS) $(VIVADO) -mode batch -source $(SRC_DIR)/project.tcl -tclargs $(TOP_LEVEL_ENTITY) $(DEVICE) project_1/sources.txt $(SRC_DIR)/project.xdc $(SCRIPT_DIR) $(SRC_DIR)/../scripts
|
||||
endif
|
||||
|
||||
clean:
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
set start_time [clock seconds]
|
||||
|
||||
if { $::argc != 6 } {
|
||||
puts "ERROR: Program \"$::argv0\" requires 5 arguments!\n"
|
||||
puts "Usage: $::argv0 <top_module> <device_part> <vcs_file> <xdc_file> <tool_dir> <script_dir>\n"
|
||||
exit
|
||||
puts "ERROR: Program \"$::argv0\" requires 5 arguments!\n"
|
||||
puts "Usage: $::argv0 <top_module> <device_part> <vcs_file> <xdc_file> <tool_dir> <script_dir>\n"
|
||||
exit
|
||||
}
|
||||
|
||||
# Set the project name
|
||||
|
@ -30,11 +30,20 @@ set xdc_file [lindex $::argv 3]
|
|||
set tool_dir [lindex $::argv 4]
|
||||
set script_dir [lindex $::argv 5]
|
||||
|
||||
#puts top_module
|
||||
#puts $device_part
|
||||
#puts $vcs_file
|
||||
#puts xdc_file
|
||||
#puts $tool_dir
|
||||
puts "Using top_module=$top_module"
|
||||
puts "Using device_part=$device_part"
|
||||
puts "Using vcs_file=$vcs_file"
|
||||
puts "Using xdc_file=$xdc_file"
|
||||
puts "Using tool_dir=$tool_dir"
|
||||
puts "Using script_dir=$script_dir"
|
||||
|
||||
# Set the number of jobs based on MAX_JOBS environment variable
|
||||
if {[info exists ::env(MAX_JOBS)]} {
|
||||
set num_jobs $::env(MAX_JOBS)
|
||||
puts "using num_jobs=$num_jobs"
|
||||
} else {
|
||||
set num_jobs 0
|
||||
}
|
||||
|
||||
# create fpu ip
|
||||
if {[info exists ::env(FPU_IP)]} {
|
||||
|
@ -84,14 +93,22 @@ set_property \
|
|||
-objects [get_runs synth_1]
|
||||
|
||||
# Synthesis
|
||||
launch_runs synth_1
|
||||
if {$num_jobs != 0} {
|
||||
launch_runs synth_1 -jobs $num_jobs
|
||||
} else {
|
||||
launch_runs synth_1
|
||||
}
|
||||
wait_on_run synth_1
|
||||
open_run synth_1
|
||||
write_checkpoint -force post_synth.dcp
|
||||
report_utilization -file utilization.rpt -hierarchical -hierarchical_percentages
|
||||
|
||||
# Implementation
|
||||
launch_runs impl_1
|
||||
if {$num_jobs != 0} {
|
||||
launch_runs impl_1 -jobs $num_jobs
|
||||
} else {
|
||||
launch_runs impl_1
|
||||
}
|
||||
wait_on_run impl_1
|
||||
open_run impl_1
|
||||
write_checkpoint -force post_impl.dcp
|
||||
|
|
|
@ -3,6 +3,8 @@ include $(ROOT_DIR)/config.mk
|
|||
|
||||
DEVICE ?= xcu55c-fsvh2892-2L-e
|
||||
|
||||
MAX_JOBS ?= 8
|
||||
|
||||
VIVADO := $(XILINX_VIVADO)/bin/vivado
|
||||
|
||||
SRC_DIR := $(VORTEX_HOME)/hw/syn/xilinx/sandbox
|
||||
|
@ -14,6 +16,9 @@ SCRIPT_DIR := $(VORTEX_HOME)/hw/scripts
|
|||
|
||||
KERNEL ?= fibonacci
|
||||
|
||||
NCPUS := $(shell lscpu | grep "^Core(s) per socket:" | awk '{print $$4}')
|
||||
JOBS ?= $(shell echo $$(( $(NCPUS) > $(MAX_JOBS) ? $(MAX_JOBS) : $(NCPUS) )))
|
||||
|
||||
COE_FILE := $(shell realpath kernel.bin.coe)
|
||||
ESCAPED_COE_FILE := $(shell echo "$(COE_FILE)" | sed -e 's/[\/&]/\\&/g')
|
||||
|
||||
|
@ -58,7 +63,7 @@ project_1/sources.txt:
|
|||
|
||||
build: project_1/project_1.xpr
|
||||
project_1/project_1.xpr: project_1/sources.txt kernel.bin.coe project2.tcl
|
||||
$(VIVADO) -mode batch -source project2.tcl -tclargs $(DEVICE) project_1/sources.txt $(SCRIPT_DIR)
|
||||
MAX_JOBS=$(JOBS) $(VIVADO) -mode batch -source project2.tcl -tclargs $(DEVICE) project_1/sources.txt $(SCRIPT_DIR)
|
||||
|
||||
run: project_1/project_1.xpr
|
||||
$(VIVADO) project_1/project_1.xpr &
|
||||
|
|
|
@ -24,9 +24,18 @@ set device_part [lindex $::argv 0]
|
|||
set vcs_file [lindex $::argv 1]
|
||||
set tool_dir [lindex $::argv 2]
|
||||
|
||||
#puts $device_part
|
||||
#puts $vcs_file
|
||||
#puts $tool_dir
|
||||
uuts "Using device_part=$device_part"
|
||||
puts "Using vcs_file=$vcs_file"
|
||||
puts "Using tool_dir=$tool_dir"
|
||||
|
||||
# Set the number of jobs based on MAX_JOBS environment variable
|
||||
if {[info exists ::env(MAX_JOBS)]} {
|
||||
set num_jobs $::env(MAX_JOBS)
|
||||
puts "using num_jobs=$num_jobs"
|
||||
#puts $num_jobs
|
||||
} else {
|
||||
set num_jobs 0
|
||||
}
|
||||
|
||||
set origin_dir [file normalize "."]
|
||||
|
||||
|
@ -394,14 +403,22 @@ add_files -norecurse -fileset sources_1 $wrapper_path
|
|||
update_compile_order -fileset sources_1
|
||||
|
||||
# Synthesis
|
||||
launch_runs synth_1
|
||||
if {$num_jobs != 0} {
|
||||
launch_runs synth_1 -jobs $num_jobs
|
||||
} else {
|
||||
launch_runs synth_1
|
||||
}
|
||||
wait_on_run synth_1
|
||||
open_run synth_1
|
||||
write_checkpoint -force post_synth.dcp
|
||||
report_utilization -file utilization.rpt -hierarchical -hierarchical_percentages
|
||||
|
||||
# Implementation
|
||||
launch_runs impl_1
|
||||
if {$num_jobs != 0} {
|
||||
launch_runs impl_1 -jobs $num_jobs
|
||||
} else {
|
||||
launch_runs impl_1
|
||||
}
|
||||
wait_on_run impl_1
|
||||
open_run impl_1
|
||||
write_checkpoint -force post_impl.dcp
|
||||
|
|
|
@ -22,6 +22,11 @@ set vcs_file [lindex $::argv 1]
|
|||
set tool_dir [lindex $::argv 2]
|
||||
set build_dir [lindex $::argv 3]
|
||||
|
||||
puts "Using krnl_name=$krnl_name"
|
||||
puts "Using vcs_file=$vcs_file"
|
||||
puts "Using tool_dir=$tool_dir"
|
||||
puts "Using build_dir=$build_dir"
|
||||
|
||||
set path_to_packaged "${build_dir}/xo/packaged_kernel"
|
||||
set path_to_tmp_project "${build_dir}/xo/project"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue