|
| 1 | +# *************************************************************************** |
| 2 | +# *************************************************************************** |
| 3 | +# Copyright 2022 (c) Analog Devices, Inc. All rights reserved. |
| 4 | +# |
| 5 | +# In this HDL repository, there are many different and unique modules, consisting |
| 6 | +# of various HDL (Verilog or VHDL) components. The individual modules are |
| 7 | +# developed independently, and may be accompanied by separate and unique license |
| 8 | +# terms. |
| 9 | +# |
| 10 | +# The user should read each of these license terms, and understand the |
| 11 | +# freedoms and responsibilities that he or she has by using this source/core. |
| 12 | +# |
| 13 | +# This core is distributed in the hope that it will be useful, but WITHOUT ANY |
| 14 | +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
| 15 | +# A PARTICULAR PURPOSE. |
| 16 | +# |
| 17 | +# Redistribution and use of source or resulting binaries, with or without modification |
| 18 | +# of this file, are permitted under one of the following two license terms: |
| 19 | +# |
| 20 | +# 1. The GNU General Public License version 2 as published by the |
| 21 | +# Free Software Foundation, which can be found in the top level directory |
| 22 | +# of this repository (LICENSE_GPL2), and also online at: |
| 23 | +# <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html> |
| 24 | +# |
| 25 | +# OR |
| 26 | +# |
| 27 | +# 2. An ADI specific BSD license, which can be found in the top level directory |
| 28 | +# of this repository (LICENSE_ADIBSD), and also on-line at: |
| 29 | +# https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD |
| 30 | +# This will allow to generate bit files and not release the source code, |
| 31 | +# as long as it attaches to an ADI device. |
| 32 | +# |
| 33 | +# *************************************************************************** |
| 34 | +# *************************************************************************** |
| 35 | + |
| 36 | +source ../../scripts/adi_env.tcl |
| 37 | + |
| 38 | +# Device clk |
| 39 | +ad_ip_instance clk_vip device_clk_vip [ list \ |
| 40 | + INTERFACE_MODE {MASTER} \ |
| 41 | + FREQ_HZ 250000000 \ |
| 42 | +] |
| 43 | +adi_sim_add_define "DEVICE_CLK=device_clk_vip" |
| 44 | + |
| 45 | +set device_clk device_clk_vip/clk_out |
| 46 | + |
| 47 | +# ------------------ |
| 48 | +# |
| 49 | +# Blocks under test |
| 50 | +# |
| 51 | +# ------------------ |
| 52 | + |
| 53 | +global tdd_cfg |
| 54 | +ad_ip_instance axi_tdd dut_tdd $tdd_cfg |
| 55 | + |
| 56 | +ad_connect $device_clk dut_tdd/clk |
| 57 | +ad_connect $sys_cpu_resetn dut_tdd/resetn |
| 58 | + |
| 59 | +create_bd_port -dir I sync_in |
| 60 | +create_bd_port -dir O sync_out |
| 61 | +ad_connect sync_in dut_tdd/sync_in |
| 62 | +ad_connect sync_out dut_tdd/sync_out |
| 63 | + |
| 64 | +set num_ch [lindex $tdd_cfg 3] |
| 65 | +create_bd_port -from 0 -to [expr $num_ch-1] -dir O tdd_channel |
| 66 | +ad_connect tdd_channel dut_tdd/tdd_channel |
| 67 | + |
| 68 | +ad_cpu_interconnect 0x7c420000 dut_tdd |
| 69 | + |
0 commit comments