mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-24 22:27:10 -04:00
85 lines
3.6 KiB
Tcl
85 lines
3.6 KiB
Tcl
# Copyright 2018 ETH Zurich and University of Bologna.
|
|
#
|
|
# 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.
|
|
|
|
# Author: Florian Zaruba <zarubaf@iis.ee.ethz.ch>
|
|
|
|
# hard-coded to Genesys 2 for the moment
|
|
add_files -fileset constrs_1 -norecurse constraints/genesys-2.xdc
|
|
|
|
read_ip xilinx/xlnx_mig_7_ddr3/ip/xlnx_mig_7_ddr3.xci
|
|
read_ip xilinx/xlnx_axi_clock_converter/ip/xlnx_axi_clock_converter.xci
|
|
read_ip xilinx/xlnx_axi_dwidth_converter/ip/xlnx_axi_dwidth_converter.xci
|
|
read_ip xilinx/xlnx_axi_ethernetlite/ip/xlnx_axi_ethernetlite.xci
|
|
read_ip xilinx/xlnx_axi_gpio/ip/xlnx_axi_gpio.xci
|
|
read_ip xilinx/xlnx_axi_quad_spi/ip/xlnx_axi_quad_spi.xci
|
|
read_ip xilinx/xlnx_clk_gen/ip/xlnx_clk_gen.xci
|
|
|
|
source scripts/add_sources.tcl
|
|
|
|
set_property top ${project}_xilinx [current_fileset]
|
|
|
|
if {$::env(BOARD) eq "genesys2"} {
|
|
read_verilog -sv {src/genesysii.svh}
|
|
set file "src/genesysii.svh"
|
|
} else {
|
|
exit 1
|
|
}
|
|
|
|
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
|
set_property -dict { file_type {Verilog Header} is_global_include 1} -objects $file_obj
|
|
|
|
update_compile_order -fileset sources_1
|
|
update_compile_order -fileset sim_1
|
|
|
|
add_files -fileset constrs_1 -norecurse constraints/$project.xdc
|
|
|
|
# synth_design -retiming -rtl -name rtl_1 -verilog_define SYNTHESIS -verilog_define
|
|
synth_design -rtl -name rtl_1
|
|
|
|
launch_runs synth_1
|
|
wait_on_run synth_1
|
|
open_run synth_1
|
|
|
|
exec mkdir -p reports/
|
|
exec rm -rf reports/*
|
|
|
|
check_timing -verbose -file reports/$project.check_timing.rpt
|
|
report_timing -max_paths 100 -nworst 100 -delay_type max -sort_by slack -file reports/$project.timing_WORST_100.rpt
|
|
report_timing -nworst 1 -delay_type max -sort_by group -file reports/$project.timing.rpt
|
|
report_utilization -hierarchical -file reports/$project.utilization.rpt
|
|
report_cdc -file reports/$project.cdc.rpt
|
|
report_clock_interaction -file reports/$project.clock_interaction.rpt
|
|
|
|
# set for RuntimeOptimized implementation
|
|
set_property "steps.place_design.args.directive" "RuntimeOptimized" [get_runs impl_1]
|
|
set_property "steps.route_design.args.directive" "RuntimeOptimized" [get_runs impl_1]
|
|
|
|
launch_runs impl_1
|
|
wait_on_run impl_1
|
|
launch_runs impl_1 -to_step write_bitstream
|
|
wait_on_run impl_1
|
|
open_run impl_1
|
|
|
|
# output Verilog netlist + SDC for timing simulation
|
|
write_verilog -force -mode funcsim work-fpga/${project}_funcsim.v
|
|
write_verilog -force -mode timesim work-fpga/${project}_timesim.v
|
|
write_sdf -force work-fpga/${project}_timesim.sdf
|
|
|
|
# reports
|
|
exec mkdir -p reports/
|
|
exec rm -rf reports/*
|
|
check_timing -file reports/${project}.check_timing.rpt
|
|
report_timing -max_paths 100 -nworst 100 -delay_type max -sort_by slack -file reports/${project}.timing_WORST_100.rpt
|
|
report_timing -nworst 1 -delay_type max -sort_by group -file reports/${project}.timing.rpt
|
|
report_utilization -hierarchical -file reports/${project}.utilization.rpt
|