Commit b8c9f759 authored by Peter Jansweijer's avatar Peter Jansweijer

add export hardware xsa file generation to scripts

parent cba3ebb3
Pipeline #1914 failed with stage
in 2 minutes and 18 seconds
......@@ -31,4 +31,5 @@ SPEC7_REF_DESIGN build:
- hdl/syn/spec7_ref_design/work/*.bit
- hdl/syn/spec7_ref_design/work/*.mmi
- hdl/syn/spec7_ref_design/work/*.log
- hdl/syn/spec7_ref_design/work/*.xsa
......@@ -91,6 +91,7 @@ set file_data [read $fp]
close $fp
set content [split $file_data "\n"]
set use_bd false
set use_bmm false
foreach line $content {
......@@ -125,6 +126,7 @@ foreach line $content {
read_xdc -verbose $line
} elseif {[string range $line $line_length-3 $line_length] == ".bd"} {
# puts "xilinx bd"
set use_bd true
read_bd $line
make_wrapper -files [get_files $line] -top -import
} elseif {[string range $line $line_length-4 $line_length] == ".bmm"} {
......@@ -164,9 +166,13 @@ if {$use_bmm} {
source $script_dir/viv_generate_bd_bmm.tcl
source $script_dir/viv_generate_bd_mmi.tcl
}
if {$use_bd} {
write_hw_platform -fixed -force -file ${proj_name}.xsa
}
close_design
# Generate a new name for .bit and .mmi file and copy to project directory.
# Generate a new name for .bit, .mmi and xsa file and copy to project directory.
# Also create a copy of these files in the work directory that can be picked up by .gitlab-ci.yml
# Create a senible name including date and time
set bitfile_name ${spec7_design}_[string range $device 3 6]_[clock format [clock seconds] -format %y%m%d_%H%M]
......@@ -178,6 +184,10 @@ if [file exists ./${proj_name}.mmi] {
exec updatemem -meminfo ./${proj_name}.mmi -data ${lm32_wrpc_elf} -bit ./work/${proj_name}.runs/impl_1/${proj_name}.bit -proc ${lm32_wrpc_instpath} -out ../${bitfile_name}_elf.bit -force
file copy ../${bitfile_name}_elf.bit ./work/${bitfile_name}_elf.bit
}
if [file exists ./${proj_name}.xsa] {
file copy ./${proj_name}.xsa ../${bitfile_name}.xsa
file copy ./${proj_name}.xsa ./work/${bitfile_name}.xsa
}
set syn_dir [pwd]
# Get SHA codes for spec7, wr-cores and general-cores repositories
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment