xrt sandbox simulation
Some checks failed
CI / setup (push) Has been cancelled
CI / build (32) (push) Has been cancelled
CI / build (64) (push) Has been cancelled
CI / tests (cache, 32) (push) Has been cancelled
CI / tests (cache, 64) (push) Has been cancelled
CI / tests (config1, 32) (push) Has been cancelled
CI / tests (config1, 64) (push) Has been cancelled
CI / tests (config2, 32) (push) Has been cancelled
CI / tests (config2, 64) (push) Has been cancelled
CI / tests (debug, 32) (push) Has been cancelled
CI / tests (debug, 64) (push) Has been cancelled
CI / tests (opencl, 32) (push) Has been cancelled
CI / tests (opencl, 64) (push) Has been cancelled
CI / tests (regression, 32) (push) Has been cancelled
CI / tests (regression, 64) (push) Has been cancelled
CI / tests (scope, 32) (push) Has been cancelled
CI / tests (scope, 64) (push) Has been cancelled
CI / tests (stress, 32) (push) Has been cancelled
CI / tests (stress, 64) (push) Has been cancelled
CI / tests (synthesis, 32) (push) Has been cancelled
CI / tests (synthesis, 64) (push) Has been cancelled
CI / tests (vector, 32) (push) Has been cancelled
CI / tests (vector, 64) (push) Has been cancelled
CI / tests (vm, 32) (push) Has been cancelled
CI / tests (vm, 64) (push) Has been cancelled
CI / complete (push) Has been cancelled

This commit is contained in:
tinebp 2025-02-12 00:24:36 -08:00
parent cc7fdf2fbd
commit 63b41f21c6
2 changed files with 41 additions and 1 deletions

View file

@ -53,6 +53,9 @@ kernel.bin.coe: $(KERNEL).bin
pre_opt_hook.tcl: $(SRC_DIR)/pre_opt_hook.tcl
cp $< $@
simulate.tcl: $(SRC_DIR)/simulate.tcl
cp $< $@
gen-sources: project_1/sources.txt
project_1/sources.txt:
mkdir -p project_1
@ -63,7 +66,10 @@ done.dcp: project_1/sources.txt kernel.bin.coe project.tcl pre_opt_hook.tcl
MAX_JOBS=$(JOBS) TOOL_DIR=$(SCRIPT_DIR) $(VIVADO) -mode batch -source project.tcl -tclargs $(DEVICE) project_1/sources.txt
echo done > done.dcp
run: project_1/project_1.xpr
run: simulate.tcl done.dcp
MAX_JOBS=$(JOBS) TOOL_DIR=$(SCRIPT_DIR) $(VIVADO) -mode batch -source simulate.tcl -tclargs project_1/project_1.xpr 50000ns
open: done.dcp
$(VIVADO) project_1/project_1.xpr &
clean:

View file

@ -0,0 +1,34 @@
# Copyright © 2019-2023
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
if { $::argc != 2 } {
puts "ERROR: Program \"$::argv0\" requires 2 arguments!\n"
puts "Usage: $::argv0 <project> <simtime>\n"
exit
}
set project_file [lindex $::argv 0]
set sim_time [lindex $::argv 1]
set tb_name testbench ;# Replace with actual testbench module
open_project $project_file ;# Ensure correct project is loaded
# Ensure testbench is set as simulation top
set_property top $tb_name [get_filesets sim_1]
# Launch the simulation
launch_simulation -mode behavioral
# Run for the specified number of cycles
run $sim_time