43 lines
1.4 KiB
Tcl
43 lines
1.4 KiB
Tcl
#
|
|
# Copyright (C) 2020 Xilinx, Inc
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"). You may
|
|
# not use this file except in compliance with the License. A copy of the
|
|
# License is located 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.
|
|
#
|
|
|
|
set expected_arg_count 6
|
|
if { $::argc != $expected_arg_count } {
|
|
puts "ERROR: Program \"$::argv0\" requires $expected_arg_count arguments!\n"
|
|
puts "Usage: $::argv0 <xoname> <krnl_name> <target> <xpfm_path> <device> <frequency>\n"
|
|
exit
|
|
}
|
|
|
|
set xoname [lindex $::argv 0]
|
|
set krnl_name [lindex $::argv 1]
|
|
set target [lindex $::argv 2]
|
|
set xpfm_path [lindex $::argv 3]
|
|
set device [lindex $::argv 4]
|
|
# This is the frequency of the simulator's main clock
|
|
set frequency [lindex $::argv 5]
|
|
|
|
set suffix "${krnl_name}_${target}_${device}"
|
|
set script_path [file dirname [file normalize [info script]]]
|
|
|
|
#source -notrace ./scripts/package_kernel.tcl
|
|
source ${script_path}/package_kernel.tcl
|
|
|
|
if {[file exists "${xoname}"]} {
|
|
file delete -force "${xoname}"
|
|
}
|
|
|
|
package_xo -ctrl_protocol user_managed -xo_path ${xoname} -kernel_name ${krnl_name} -ip_directory ./packaged_kernel_${suffix} -verbose
|