initial commit, add dds_par module

This commit is contained in:
2024-01-15 09:36:08 +08:00
commit 315a673005
1374 changed files with 465956 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
####################################################################################
## Copyright (c) 2018 - 2023 Analog Devices, Inc.
### SPDX short identifier: BSD-1-Clause
## Auto-generated, do not modify!
####################################################################################
LIBRARY_NAME := axi_tdd
GENERIC_DEPS += ../common/up_axi.v
GENERIC_DEPS += ../util_cdc/sync_bits.v
GENERIC_DEPS += ../util_cdc/sync_data.v
GENERIC_DEPS += ../util_cdc/sync_event.v
GENERIC_DEPS += axi_tdd.sv
GENERIC_DEPS += axi_tdd_channel.sv
GENERIC_DEPS += axi_tdd_counter.sv
GENERIC_DEPS += axi_tdd_pkg.sv
GENERIC_DEPS += axi_tdd_regmap.sv
GENERIC_DEPS += axi_tdd_sync_gen.sv
XILINX_DEPS += axi_tdd_constr.ttcl
XILINX_DEPS += axi_tdd_ip.tcl
INTEL_DEPS += axi_tdd_constr.sdc
INTEL_DEPS += axi_tdd_hw.tcl
include ../scripts/library.mk
+293
View File
@@ -0,0 +1,293 @@
// ***************************************************************************
// ***************************************************************************
// Copyright (C) 2022-2023 Analog Devices, Inc. All rights reserved.
//
// In this HDL repository, there are many different and unique modules, consisting
// of various HDL (Verilog or VHDL) components. The individual modules are
// developed independently, and may be accompanied by separate and unique license
// terms.
//
// The user should read each of these license terms, and understand the
// freedoms and responsibilities that he or she has by using this source/core.
//
// This core is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
// A PARTICULAR PURPOSE.
//
// Redistribution and use of source or resulting binaries, with or without modification
// of this file, are permitted under one of the following two license terms:
//
// 1. The GNU General Public License version 2 as published by the
// Free Software Foundation, which can be found in the top level directory
// of this repository (LICENSE_GPL2), and also online at:
// <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
//
// OR
//
// 2. An ADI specific BSD license, which can be found in the top level directory
// of this repository (LICENSE_ADIBSD), and also on-line at:
// https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD
// This will allow to generate bit files and not release the source code,
// as long as it attaches to an ADI device.
//
// ***************************************************************************
// ***************************************************************************
`timescale 1ns/1ps
module axi_tdd #(
// Peripheral ID
parameter ID = 0,
// Number of active channels
parameter CHANNEL_COUNT = 8,
// Default polarity per channel
parameter DEFAULT_POLARITY = 8'h00,
// Timing register width, determines how long a single frame can be.
// T_max = (2^REGISTER_WIDTH) / f_clk
parameter REGISTER_WIDTH = 32,
// Burst count register width. Determines the maximum amount of repetitions
// of a frame.
parameter BURST_COUNT_WIDTH = 32,
// Synchronization / triggering options. These are not mutually exclusive, and
// both internal and external triggering can be available and selected at
// runtime.
parameter SYNC_INTERNAL = 1,
parameter SYNC_EXTERNAL = 0,
// Whether to insert a CDC stage with false path constraint for the external
// synchronization input.
parameter SYNC_EXTERNAL_CDC = 0,
parameter SYNC_COUNT_WIDTH = 64
) (
input logic clk,
input logic resetn,
// Sync signal
input logic sync_in,
output logic sync_out,
// Output channels
output logic [CHANNEL_COUNT-1:0] tdd_channel,
// AXI BUS
input logic s_axi_aresetn,
input logic s_axi_aclk,
input logic s_axi_awvalid,
input logic [ 9:0] s_axi_awaddr,
input logic [ 2:0] s_axi_awprot,
output logic s_axi_awready,
input logic s_axi_wvalid,
input logic [31:0] s_axi_wdata,
input logic [ 3:0] s_axi_wstrb,
output logic s_axi_wready,
output logic s_axi_bvalid,
output logic [ 1:0] s_axi_bresp,
input logic s_axi_bready,
input logic s_axi_arvalid,
input logic [ 9:0] s_axi_araddr,
input logic [ 2:0] s_axi_arprot,
output logic s_axi_arready,
output logic s_axi_rvalid,
output logic [ 1:0] s_axi_rresp,
output logic [31:0] s_axi_rdata,
input logic s_axi_rready
);
// Package import
import axi_tdd_pkg::*;
// Internal up bus, translated by up_axi
logic up_rstn;
logic up_clk;
logic up_wreq;
logic [ 7:0] up_waddr;
logic [31:0] up_wdata;
logic up_wack;
logic up_rreq;
logic [ 7:0] up_raddr;
logic [31:0] up_rdata;
logic up_rack;
assign up_clk = s_axi_aclk;
assign up_rstn = s_axi_aresetn;
// Control signals
logic tdd_enable;
logic tdd_sync_rst;
logic tdd_sync_int;
logic tdd_sync_ext;
logic tdd_sync_soft;
// Config wires
logic [BURST_COUNT_WIDTH-1:0] asy_tdd_burst_count;
logic [REGISTER_WIDTH-1:0] asy_tdd_startup_delay;
logic [REGISTER_WIDTH-1:0] asy_tdd_frame_length;
// Synchronization config
logic [SYNC_COUNT_WIDTH-1:0] asy_tdd_sync_period;
// Channel config
logic [CHANNEL_COUNT-1:0] tdd_channel_en;
logic [CHANNEL_COUNT-1:0] asy_tdd_channel_pol;
logic [REGISTER_WIDTH-1:0] asy_tdd_channel_on [0:CHANNEL_COUNT-1];
logic [REGISTER_WIDTH-1:0] asy_tdd_channel_off [0:CHANNEL_COUNT-1];
// Current counter value
logic [REGISTER_WIDTH-1:0] tdd_counter;
// Current FSM state
state_t tdd_cstate;
// Asserted to indicate the end of a tdd frame. This allows the channels to
// reset outputs which are still open due to a potential misconfiguration.
logic tdd_endof_frame;
axi_tdd_regmap #(
.ID (ID),
.CHANNEL_COUNT (CHANNEL_COUNT),
.DEFAULT_POLARITY (DEFAULT_POLARITY),
.REGISTER_WIDTH (REGISTER_WIDTH),
.BURST_COUNT_WIDTH (BURST_COUNT_WIDTH),
.SYNC_INTERNAL (SYNC_INTERNAL),
.SYNC_EXTERNAL (SYNC_EXTERNAL),
.SYNC_EXTERNAL_CDC (SYNC_EXTERNAL_CDC),
.SYNC_COUNT_WIDTH (SYNC_COUNT_WIDTH)
) i_regmap (
.up_rstn (up_rstn),
.up_clk (up_clk),
.up_wreq (up_wreq),
.up_waddr (up_waddr),
.up_wdata (up_wdata),
.up_wack (up_wack),
.up_rreq (up_rreq),
.up_raddr (up_raddr),
.up_rdata (up_rdata),
.up_rack (up_rack),
.tdd_clk (clk),
.tdd_resetn (resetn),
.tdd_cstate (tdd_cstate),
.tdd_enable (tdd_enable),
.tdd_channel_en (tdd_channel_en),
.asy_tdd_channel_pol (asy_tdd_channel_pol),
.asy_tdd_burst_count (asy_tdd_burst_count),
.asy_tdd_startup_delay (asy_tdd_startup_delay),
.asy_tdd_frame_length (asy_tdd_frame_length),
.asy_tdd_channel_on (asy_tdd_channel_on),
.asy_tdd_channel_off (asy_tdd_channel_off),
.asy_tdd_sync_period (asy_tdd_sync_period),
.tdd_sync_rst (tdd_sync_rst),
.tdd_sync_int (tdd_sync_int),
.tdd_sync_ext (tdd_sync_ext),
.tdd_sync_soft (tdd_sync_soft));
axi_tdd_counter #(
.REGISTER_WIDTH (REGISTER_WIDTH),
.BURST_COUNT_WIDTH (BURST_COUNT_WIDTH)
) i_counter (
.clk (clk),
.resetn (resetn),
.tdd_enable (tdd_enable),
.tdd_sync_rst (tdd_sync_rst),
.tdd_sync (sync_out),
.asy_tdd_burst_count (asy_tdd_burst_count),
.asy_tdd_startup_delay (asy_tdd_startup_delay),
.asy_tdd_frame_length (asy_tdd_frame_length),
.tdd_counter (tdd_counter),
.tdd_cstate (tdd_cstate),
.tdd_endof_frame (tdd_endof_frame));
axi_tdd_sync_gen #(
.SYNC_INTERNAL (SYNC_INTERNAL),
.SYNC_EXTERNAL (SYNC_EXTERNAL),
.SYNC_EXTERNAL_CDC (SYNC_EXTERNAL_CDC),
.SYNC_COUNT_WIDTH (SYNC_COUNT_WIDTH)
) i_sync_gen (
.clk (clk),
.resetn (resetn),
.sync_in (sync_in),
.sync_out (sync_out),
.tdd_enable (tdd_enable),
.tdd_sync_int (tdd_sync_int),
.tdd_sync_ext (tdd_sync_ext),
.tdd_sync_soft (tdd_sync_soft),
.asy_tdd_sync_period (asy_tdd_sync_period));
genvar i;
generate
for (i = 0; i < CHANNEL_COUNT; i=i+1) begin
axi_tdd_channel #(
.DEFAULT_POLARITY (DEFAULT_POLARITY[i]),
.REGISTER_WIDTH (REGISTER_WIDTH)
) i_channel (
.clk (clk),
.resetn (resetn),
.tdd_counter (tdd_counter),
.tdd_cstate (tdd_cstate),
.tdd_enable (tdd_enable),
.tdd_endof_frame (tdd_endof_frame),
.ch_en (tdd_channel_en[i]),
.asy_ch_pol (asy_tdd_channel_pol[i]),
.asy_t_high (asy_tdd_channel_on[i]),
.asy_t_low (asy_tdd_channel_off[i]),
.out (tdd_channel[i]));
end
endgenerate
up_axi #(
.AXI_ADDRESS_WIDTH(10)
) i_up_axi (
.up_rstn(s_axi_aresetn),
.up_clk(s_axi_aclk),
.up_axi_awvalid(s_axi_awvalid),
.up_axi_awaddr(s_axi_awaddr),
.up_axi_awready(s_axi_awready),
.up_axi_wvalid(s_axi_wvalid),
.up_axi_wdata(s_axi_wdata),
.up_axi_wstrb(s_axi_wstrb),
.up_axi_wready(s_axi_wready),
.up_axi_bvalid(s_axi_bvalid),
.up_axi_bresp(s_axi_bresp),
.up_axi_bready(s_axi_bready),
.up_axi_arvalid(s_axi_arvalid),
.up_axi_araddr(s_axi_araddr),
.up_axi_arready(s_axi_arready),
.up_axi_rvalid(s_axi_rvalid),
.up_axi_rresp(s_axi_rresp),
.up_axi_rdata(s_axi_rdata),
.up_axi_rready(s_axi_rready),
.up_wreq(up_wreq),
.up_waddr(up_waddr),
.up_wdata(up_wdata),
.up_wack(up_wack),
.up_rreq(up_rreq),
.up_raddr(up_raddr),
.up_rdata(up_rdata),
.up_rack(up_rack));
endmodule
+469
View File
@@ -0,0 +1,469 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Product Version: Vivado v2023.2.1 (64-bit) -->
<!-- -->
<!-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved. -->
<!-- Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved. -->
<Project Product="Vivado" Version="7" Minor="65" Path="/home/josh/tmp/hdl/library/axi_tdd/axi_tdd.xpr">
<DefaultLaunch Dir="$PRUNDIR"/>
<Configuration>
<Option Name="Id" Val="49c57fb784c94eeb9b9555063479e25d"/>
<Option Name="Part" Val="xc7vx485tffg1157-1"/>
<Option Name="CompiledLibDir" Val="$PCACHEDIR/compile_simlib"/>
<Option Name="CompiledLibDirXSim" Val=""/>
<Option Name="CompiledLibDirModelSim" Val="$PCACHEDIR/compile_simlib/modelsim"/>
<Option Name="CompiledLibDirQuesta" Val="$PCACHEDIR/compile_simlib/questa"/>
<Option Name="CompiledLibDirXcelium" Val="$PCACHEDIR/compile_simlib/xcelium"/>
<Option Name="CompiledLibDirVCS" Val="$PCACHEDIR/compile_simlib/vcs"/>
<Option Name="CompiledLibDirRiviera" Val="$PCACHEDIR/compile_simlib/riviera"/>
<Option Name="CompiledLibDirActivehdl" Val="$PCACHEDIR/compile_simlib/activehdl"/>
<Option Name="SimulatorInstallDirModelSim" Val=""/>
<Option Name="SimulatorInstallDirQuesta" Val=""/>
<Option Name="SimulatorInstallDirXcelium" Val=""/>
<Option Name="SimulatorInstallDirVCS" Val=""/>
<Option Name="SimulatorInstallDirRiviera" Val=""/>
<Option Name="SimulatorInstallDirActiveHdl" Val=""/>
<Option Name="SimulatorGccInstallDirModelSim" Val=""/>
<Option Name="SimulatorGccInstallDirQuesta" Val=""/>
<Option Name="SimulatorGccInstallDirXcelium" Val=""/>
<Option Name="SimulatorGccInstallDirVCS" Val=""/>
<Option Name="SimulatorGccInstallDirRiviera" Val=""/>
<Option Name="SimulatorGccInstallDirActiveHdl" Val=""/>
<Option Name="SimulatorVersionXsim" Val="2023.2"/>
<Option Name="SimulatorVersionModelSim" Val="2023.2"/>
<Option Name="SimulatorVersionQuesta" Val="2023.2"/>
<Option Name="SimulatorVersionXcelium" Val="23.03.002"/>
<Option Name="SimulatorVersionVCS" Val="U-2023.03-1"/>
<Option Name="SimulatorVersionRiviera" Val="2022.10"/>
<Option Name="SimulatorVersionActiveHdl" Val="14.1"/>
<Option Name="SimulatorGccVersionXsim" Val="9.3.0"/>
<Option Name="SimulatorGccVersionModelSim" Val="7.4.0"/>
<Option Name="SimulatorGccVersionQuesta" Val="7.4.0"/>
<Option Name="SimulatorGccVersionXcelium" Val="9.3.0"/>
<Option Name="SimulatorGccVersionVCS" Val="9.2.0"/>
<Option Name="SimulatorGccVersionRiviera" Val="9.3.0"/>
<Option Name="SimulatorGccVersionActiveHdl" Val="9.3.0"/>
<Option Name="BoardPart" Val=""/>
<Option Name="ActiveSimSet" Val="sim_1"/>
<Option Name="DefaultLib" Val="xil_defaultlib"/>
<Option Name="ProjectType" Val="Default"/>
<Option Name="IPRepoPath" Val="$PPRDIR/../../library"/>
<Option Name="IPOutputRepo" Val="$PCACHEDIR/ip"/>
<Option Name="IPDefaultOutputPath" Val="$PGENDIR/sources_1"/>
<Option Name="IPCachePermission" Val="read"/>
<Option Name="IPCachePermission" Val="write"/>
<Option Name="EnableCoreContainer" Val="FALSE"/>
<Option Name="EnableResourceEstimation" Val="FALSE"/>
<Option Name="SimCompileState" Val="TRUE"/>
<Option Name="CreateRefXciForCoreContainers" Val="FALSE"/>
<Option Name="IPUserFilesDir" Val="$PIPUSERFILESDIR"/>
<Option Name="IPStaticSourceDir" Val="$PIPUSERFILESDIR/ipstatic"/>
<Option Name="EnableBDX" Val="FALSE"/>
<Option Name="FeatureSet" Val="FeatureSet_Classic"/>
<Option Name="WTXSimLaunchSim" Val="0"/>
<Option Name="WTModelSimLaunchSim" Val="0"/>
<Option Name="WTQuestaLaunchSim" Val="0"/>
<Option Name="WTIesLaunchSim" Val="0"/>
<Option Name="WTVcsLaunchSim" Val="0"/>
<Option Name="WTRivieraLaunchSim" Val="0"/>
<Option Name="WTActivehdlLaunchSim" Val="0"/>
<Option Name="WTXSimExportSim" Val="0"/>
<Option Name="WTModelSimExportSim" Val="0"/>
<Option Name="WTQuestaExportSim" Val="0"/>
<Option Name="WTIesExportSim" Val="0"/>
<Option Name="WTVcsExportSim" Val="0"/>
<Option Name="WTRivieraExportSim" Val="0"/>
<Option Name="WTActivehdlExportSim" Val="0"/>
<Option Name="GenerateIPUpgradeLog" Val="TRUE"/>
<Option Name="XSimRadix" Val="hex"/>
<Option Name="XSimTimeUnit" Val="ns"/>
<Option Name="XSimArrayDisplayLimit" Val="1024"/>
<Option Name="XSimTraceLimit" Val="65536"/>
<Option Name="SimTypes" Val="rtl"/>
<Option Name="SimTypes" Val="bfm"/>
<Option Name="SimTypes" Val="tlm"/>
<Option Name="SimTypes" Val="tlm_dpi"/>
<Option Name="MEMEnableMemoryMapGeneration" Val="TRUE"/>
<Option Name="DcpsUptoDate" Val="TRUE"/>
<Option Name="ClassicSocBoot" Val="FALSE"/>
<Option Name="LocalIPRepoLeafDirName" Val="ip_repo"/>
</Configuration>
<FileSets Version="1" Minor="32">
<FileSet Name="sources_1" Type="DesignSrcs" RelSrcDir="$PSRCDIR/sources_1" RelGenDir="$PGENDIR/sources_1">
<Filter Type="Srcs"/>
<File Path="$PPRDIR/../util_cdc/sync_bits.v">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PPRDIR/../util_cdc/sync_data.v">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PPRDIR/../util_cdc/sync_event.v">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PPRDIR/../common/up_axi.v">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PPRDIR/axi_tdd_pkg.sv">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PPRDIR/axi_tdd_channel.sv">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PPRDIR/axi_tdd_counter.sv">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PPRDIR/axi_tdd_regmap.sv">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PPRDIR/axi_tdd_sync_gen.sv">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PPRDIR/axi_tdd.sv">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PPRDIR/component.xml">
<FileInfo SFType="IPXACT"/>
</File>
<File Path="$PPRDIR/bd/bd.tcl">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<Config>
<Option Name="DesignMode" Val="RTL"/>
<Option Name="TopModule" Val="axi_tdd"/>
</Config>
</FileSet>
<FileSet Name="constrs_1" Type="Constrs" RelSrcDir="$PSRCDIR/constrs_1" RelGenDir="$PGENDIR/constrs_1">
<Filter Type="Constrs"/>
<Config>
<Option Name="ConstrsType" Val="XDC"/>
</Config>
</FileSet>
<FileSet Name="sim_1" Type="SimulationSrcs" RelSrcDir="$PSRCDIR/sim_1" RelGenDir="$PGENDIR/sim_1">
<Config>
<Option Name="DesignMode" Val="RTL"/>
<Option Name="TopAutoSet" Val="TRUE"/>
<Option Name="TransportPathDelay" Val="0"/>
<Option Name="TransportIntDelay" Val="0"/>
<Option Name="SelectedSimModel" Val="rtl"/>
<Option Name="PamDesignTestbench" Val=""/>
<Option Name="PamDutBypassFile" Val="xil_dut_bypass"/>
<Option Name="PamSignalDriverFile" Val="xil_bypass_driver"/>
<Option Name="PamPseudoTop" Val="pseudo_tb"/>
<Option Name="SrcSet" Val="sources_1"/>
</Config>
</FileSet>
<FileSet Name="utils_1" Type="Utils" RelSrcDir="$PSRCDIR/utils_1" RelGenDir="$PGENDIR/utils_1">
<Filter Type="Utils"/>
<Config>
<Option Name="TopAutoSet" Val="TRUE"/>
</Config>
</FileSet>
</FileSets>
<Simulators>
<Simulator Name="XSim">
<Option Name="Description" Val="Vivado Simulator"/>
<Option Name="CompiledLib" Val="0"/>
</Simulator>
<Simulator Name="ModelSim">
<Option Name="Description" Val="ModelSim Simulator"/>
</Simulator>
<Simulator Name="Questa">
<Option Name="Description" Val="Questa Advanced Simulator"/>
</Simulator>
<Simulator Name="Xcelium">
<Option Name="Description" Val="Xcelium Parallel Simulator"/>
</Simulator>
<Simulator Name="VCS">
<Option Name="Description" Val="Verilog Compiler Simulator (VCS)"/>
</Simulator>
<Simulator Name="Riviera">
<Option Name="Description" Val="Riviera-PRO Simulator"/>
</Simulator>
</Simulators>
<Runs Version="1" Minor="21">
<Run Id="synth_1" Type="Ft3:Synth" SrcSet="sources_1" Part="xc7vx485tffg1157-1" ConstrsSet="constrs_1" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="true" WriteIncrSynthDcp="false" State="current" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/synth_1">
<Strategy Version="1" Minor="2">
<StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2023">
<Desc>Vivado Synthesis Defaults</Desc>
</StratHandle>
<Step Id="synth_design"/>
</Strategy>
<ReportStrategy Name="Vivado Synthesis Default Reports" Flow="Vivado Synthesis 2023"/>
<Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
<RQSFiles/>
</Run>
<Run Id="impl_1" Type="Ft2:EntireDesign" Part="xc7vx485tffg1157-1" ConstrsSet="constrs_1" Description="Default settings for Implementation." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" SynthRun="synth_1" IncludeInArchive="true" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/impl_1" AutoRQSDir="$PSRCDIR/utils_1/imports/impl_1">
<Strategy Version="1" Minor="2">
<StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2023">
<Desc>Default settings for Implementation.</Desc>
</StratHandle>
<Step Id="init_design"/>
<Step Id="opt_design"/>
<Step Id="power_opt_design"/>
<Step Id="place_design"/>
<Step Id="post_place_power_opt_design"/>
<Step Id="phys_opt_design"/>
<Step Id="route_design"/>
<Step Id="post_route_phys_opt_design"/>
<Step Id="write_bitstream"/>
</Strategy>
<ReportStrategy Name="Vivado Implementation Default Reports" Flow="Vivado Implementation 2023"/>
<Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
<RQSFiles/>
</Run>
</Runs>
<MsgRule>
<MsgAttr Name="RuleType" Val="1"/>
<MsgAttr Name="Limit" Val="-1"/>
<MsgAttr Name="NewSeverity" Val="WARNING"/>
<MsgAttr Name="Id" Val="Vivado 12-1790"/>
<MsgAttr Name="Severity" Val="ANY"/>
<MsgAttr Name="ShowRule" Val="1"/>
<MsgAttr Name="RuleSource" Val="2"/>
<MsgAttr Name="StringIsRegExp" Val="0"/>
<MsgAttr Name="RuleId" Val="1"/>
<MsgAttr Name="Note" Val=""/>
<MsgAttr Name="Author" Val=""/>
<MsgAttr Name="CreatedTimestamp" Val=""/>
<MsgAttr Name="StringsToMatch" Val="Evaluation"/>
<MsgAttr Name="StringsToMatch" Val="features"/>
<MsgAttr Name="StringsToMatch" Val="should"/>
<MsgAttr Name="StringsToMatch" Val="NOT"/>
<MsgAttr Name="StringsToMatch" Val="be"/>
<MsgAttr Name="StringsToMatch" Val="used"/>
<MsgAttr Name="StringsToMatch" Val="in"/>
<MsgAttr Name="StringsToMatch" Val="production"/>
<MsgAttr Name="StringsToMatch" Val="systems."/>
</MsgRule>
<MsgRule>
<MsgAttr Name="RuleType" Val="1"/>
<MsgAttr Name="Limit" Val="-1"/>
<MsgAttr Name="NewSeverity" Val="INFO"/>
<MsgAttr Name="Id" Val="Designutils 20-3303"/>
<MsgAttr Name="Severity" Val="ANY"/>
<MsgAttr Name="ShowRule" Val="1"/>
<MsgAttr Name="RuleSource" Val="2"/>
<MsgAttr Name="StringIsRegExp" Val="0"/>
<MsgAttr Name="RuleId" Val="10"/>
<MsgAttr Name="Note" Val=""/>
<MsgAttr Name="Author" Val=""/>
<MsgAttr Name="CreatedTimestamp" Val=""/>
<MsgAttr Name="StringsToMatch" Val="HDPYFinalizeIO"/>
</MsgRule>
<MsgRule>
<MsgAttr Name="RuleType" Val="1"/>
<MsgAttr Name="Limit" Val="-1"/>
<MsgAttr Name="NewSeverity" Val="WARNING"/>
<MsgAttr Name="Id" Val="Place 30-73"/>
<MsgAttr Name="Severity" Val="ANY"/>
<MsgAttr Name="ShowRule" Val="1"/>
<MsgAttr Name="RuleSource" Val="2"/>
<MsgAttr Name="StringIsRegExp" Val="0"/>
<MsgAttr Name="RuleId" Val="11"/>
<MsgAttr Name="Note" Val=""/>
<MsgAttr Name="Author" Val=""/>
<MsgAttr Name="CreatedTimestamp" Val=""/>
<MsgAttr Name="StringsToMatch" Val="axi_spi"/>
</MsgRule>
<MsgRule>
<MsgAttr Name="RuleType" Val="1"/>
<MsgAttr Name="Limit" Val="-1"/>
<MsgAttr Name="NewSeverity" Val="WARNING"/>
<MsgAttr Name="Id" Val=""/>
<MsgAttr Name="Severity" Val="ANY"/>
<MsgAttr Name="ShowRule" Val="1"/>
<MsgAttr Name="RuleSource" Val="2"/>
<MsgAttr Name="StringIsRegExp" Val="0"/>
<MsgAttr Name="RuleId" Val="12"/>
<MsgAttr Name="Note" Val=""/>
<MsgAttr Name="Author" Val=""/>
<MsgAttr Name="CreatedTimestamp" Val=""/>
<MsgAttr Name="StringsToMatch" Val="PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY"/>
</MsgRule>
<MsgRule>
<MsgAttr Name="RuleType" Val="1"/>
<MsgAttr Name="Limit" Val="-1"/>
<MsgAttr Name="NewSeverity" Val="WARNING"/>
<MsgAttr Name="Id" Val="BD 41-1343"/>
<MsgAttr Name="Severity" Val="ANY"/>
<MsgAttr Name="ShowRule" Val="1"/>
<MsgAttr Name="RuleSource" Val="2"/>
<MsgAttr Name="StringIsRegExp" Val="0"/>
<MsgAttr Name="RuleId" Val="2"/>
<MsgAttr Name="Note" Val=""/>
<MsgAttr Name="Author" Val=""/>
<MsgAttr Name="CreatedTimestamp" Val=""/>
</MsgRule>
<MsgRule>
<MsgAttr Name="RuleType" Val="1"/>
<MsgAttr Name="Limit" Val="-1"/>
<MsgAttr Name="NewSeverity" Val="WARNING"/>
<MsgAttr Name="Id" Val="BD 41-1306"/>
<MsgAttr Name="Severity" Val="ANY"/>
<MsgAttr Name="ShowRule" Val="1"/>
<MsgAttr Name="RuleSource" Val="2"/>
<MsgAttr Name="StringIsRegExp" Val="0"/>
<MsgAttr Name="RuleId" Val="3"/>
<MsgAttr Name="Note" Val=""/>
<MsgAttr Name="Author" Val=""/>
<MsgAttr Name="CreatedTimestamp" Val=""/>
</MsgRule>
<MsgRule>
<MsgAttr Name="RuleType" Val="1"/>
<MsgAttr Name="Limit" Val="-1"/>
<MsgAttr Name="NewSeverity" Val="ERROR"/>
<MsgAttr Name="Id" Val="BD 41-1276"/>
<MsgAttr Name="Severity" Val="CRITICAL WARNING"/>
<MsgAttr Name="ShowRule" Val="1"/>
<MsgAttr Name="RuleSource" Val="2"/>
<MsgAttr Name="StringIsRegExp" Val="0"/>
<MsgAttr Name="RuleId" Val="4"/>
<MsgAttr Name="Note" Val=""/>
<MsgAttr Name="Author" Val=""/>
<MsgAttr Name="CreatedTimestamp" Val=""/>
</MsgRule>
<MsgRule>
<MsgAttr Name="RuleType" Val="1"/>
<MsgAttr Name="Limit" Val="-1"/>
<MsgAttr Name="NewSeverity" Val="INFO"/>
<MsgAttr Name="Id" Val="IP_Flow 19-3656"/>
<MsgAttr Name="Severity" Val="ANY"/>
<MsgAttr Name="ShowRule" Val="1"/>
<MsgAttr Name="RuleSource" Val="2"/>
<MsgAttr Name="StringIsRegExp" Val="0"/>
<MsgAttr Name="RuleId" Val="5"/>
<MsgAttr Name="Note" Val=""/>
<MsgAttr Name="Author" Val=""/>
<MsgAttr Name="CreatedTimestamp" Val=""/>
</MsgRule>
<MsgRule>
<MsgAttr Name="RuleType" Val="1"/>
<MsgAttr Name="Limit" Val="-1"/>
<MsgAttr Name="NewSeverity" Val="INFO"/>
<MsgAttr Name="Id" Val="IP_Flow 19-4623"/>
<MsgAttr Name="Severity" Val="ANY"/>
<MsgAttr Name="ShowRule" Val="1"/>
<MsgAttr Name="RuleSource" Val="2"/>
<MsgAttr Name="StringIsRegExp" Val="0"/>
<MsgAttr Name="RuleId" Val="6"/>
<MsgAttr Name="Note" Val=""/>
<MsgAttr Name="Author" Val=""/>
<MsgAttr Name="CreatedTimestamp" Val=""/>
</MsgRule>
<MsgRule>
<MsgAttr Name="RuleType" Val="1"/>
<MsgAttr Name="Limit" Val="-1"/>
<MsgAttr Name="NewSeverity" Val="INFO"/>
<MsgAttr Name="Id" Val="IP_Flow 19-459"/>
<MsgAttr Name="Severity" Val="ANY"/>
<MsgAttr Name="ShowRule" Val="1"/>
<MsgAttr Name="RuleSource" Val="2"/>
<MsgAttr Name="StringIsRegExp" Val="0"/>
<MsgAttr Name="RuleId" Val="7"/>
<MsgAttr Name="Note" Val=""/>
<MsgAttr Name="Author" Val=""/>
<MsgAttr Name="CreatedTimestamp" Val=""/>
</MsgRule>
<MsgRule>
<MsgAttr Name="RuleType" Val="1"/>
<MsgAttr Name="Limit" Val="-1"/>
<MsgAttr Name="NewSeverity" Val="INFO"/>
<MsgAttr Name="Id" Val="Synth 8-3331"/>
<MsgAttr Name="Severity" Val="ANY"/>
<MsgAttr Name="ShowRule" Val="1"/>
<MsgAttr Name="RuleSource" Val="2"/>
<MsgAttr Name="StringIsRegExp" Val="0"/>
<MsgAttr Name="RuleId" Val="8"/>
<MsgAttr Name="Note" Val=""/>
<MsgAttr Name="Author" Val=""/>
<MsgAttr Name="CreatedTimestamp" Val=""/>
</MsgRule>
<MsgRule>
<MsgAttr Name="RuleType" Val="1"/>
<MsgAttr Name="Limit" Val="-1"/>
<MsgAttr Name="NewSeverity" Val="WARNING"/>
<MsgAttr Name="Id" Val="Synth 8-2490"/>
<MsgAttr Name="Severity" Val="ANY"/>
<MsgAttr Name="ShowRule" Val="1"/>
<MsgAttr Name="RuleSource" Val="2"/>
<MsgAttr Name="StringIsRegExp" Val="0"/>
<MsgAttr Name="RuleId" Val="9"/>
<MsgAttr Name="Note" Val=""/>
<MsgAttr Name="Author" Val=""/>
<MsgAttr Name="CreatedTimestamp" Val=""/>
</MsgRule>
<Board/>
<DashboardSummary Version="1" Minor="0">
<Dashboards>
<Dashboard Name="default_dashboard">
<Gadgets>
<Gadget Name="drc_1" Type="drc" Version="1" Row="2" Column="0">
<GadgetParam Name="REPORTS" Type="string_list" Value="impl_1#impl_1_route_report_drc_0 "/>
</Gadget>
<Gadget Name="methodology_1" Type="methodology" Version="1" Row="2" Column="1">
<GadgetParam Name="REPORTS" Type="string_list" Value="impl_1#impl_1_route_report_methodology_0 "/>
</Gadget>
<Gadget Name="power_1" Type="power" Version="1" Row="1" Column="0">
<GadgetParam Name="REPORTS" Type="string_list" Value="impl_1#impl_1_route_report_power_0 "/>
</Gadget>
<Gadget Name="timing_1" Type="timing" Version="1" Row="0" Column="1">
<GadgetParam Name="REPORTS" Type="string_list" Value="impl_1#impl_1_route_report_timing_summary_0 "/>
</Gadget>
<Gadget Name="utilization_1" Type="utilization" Version="1" Row="0" Column="0">
<GadgetParam Name="REPORTS" Type="string_list" Value="synth_1#synth_1_synth_report_utilization_0 "/>
<GadgetParam Name="RUN.STEP" Type="string" Value="synth_design"/>
<GadgetParam Name="RUN.TYPE" Type="string" Value="synthesis"/>
</Gadget>
<Gadget Name="utilization_2" Type="utilization" Version="1" Row="1" Column="1">
<GadgetParam Name="REPORTS" Type="string_list" Value="impl_1#impl_1_place_report_utilization_0 "/>
</Gadget>
</Gadgets>
</Dashboard>
<CurrentDashboard>default_dashboard</CurrentDashboard>
</Dashboards>
</DashboardSummary>
</Project>
+168
View File
@@ -0,0 +1,168 @@
// ***************************************************************************
// ***************************************************************************
// Copyright (C) 2022-2023 Analog Devices, Inc. All rights reserved.
//
// In this HDL repository, there are many different and unique modules, consisting
// of various HDL (Verilog or VHDL) components. The individual modules are
// developed independently, and may be accompanied by separate and unique license
// terms.
//
// The user should read each of these license terms, and understand the
// freedoms and responsibilities that he or she has by using this source/core.
//
// This core is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
// A PARTICULAR PURPOSE.
//
// Redistribution and use of source or resulting binaries, with or without modification
// of this file, are permitted under one of the following two license terms:
//
// 1. The GNU General Public License version 2 as published by the
// Free Software Foundation, which can be found in the top level directory
// of this repository (LICENSE_GPL2), and also online at:
// <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
//
// OR
//
// 2. An ADI specific BSD license, which can be found in the top level directory
// of this repository (LICENSE_ADIBSD), and also on-line at:
// https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD
// This will allow to generate bit files and not release the source code,
// as long as it attaches to an ADI device.
//
// ***************************************************************************
// ***************************************************************************
`timescale 1ns/1ps
module axi_tdd_channel #(
parameter DEFAULT_POLARITY = 0,
parameter REGISTER_WIDTH = 32
) (
input logic clk,
input logic resetn,
input logic [REGISTER_WIDTH-1:0] tdd_counter,
input axi_tdd_pkg::state_t tdd_cstate,
input logic tdd_enable,
input logic tdd_endof_frame,
input logic ch_en,
input logic asy_ch_pol,
input logic [REGISTER_WIDTH-1:0] asy_t_high,
input logic [REGISTER_WIDTH-1:0] asy_t_low,
output logic out
);
// package import
import axi_tdd_pkg::*;
// internal registers
logic ch_pol;
logic [REGISTER_WIDTH-1:0] t_high;
logic [REGISTER_WIDTH-1:0] t_low;
logic tdd_ch_en;
logic tdd_ch_set;
logic tdd_ch_rst;
// initial values
initial begin
tdd_ch_en = 1'b0;
tdd_ch_set = 1'b0;
tdd_ch_rst = 1'b0;
out = 1'b0;
end
// Connect the enable signal to the enable flop lines
(* direct_enable = "yes" *) logic enable;
assign enable = tdd_enable;
// Save the async register values only when the module is enabled
always @(posedge clk) begin
if (resetn == 1'b0) begin
ch_pol <= DEFAULT_POLARITY;
end else begin
if (enable) begin
ch_pol <= asy_ch_pol;
end
end
end
always @(posedge clk) begin
if (resetn == 1'b0) begin
t_high <= '0;
end else begin
if (enable) begin
t_high <= asy_t_high;
end
end
end
always @(posedge clk) begin
if (resetn == 1'b0) begin
t_low <= '0;
end else begin
if (enable) begin
t_low <= asy_t_low;
end
end
end
// TDD channel control signals
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_ch_en <= 1'b0;
end else begin
if (tdd_cstate == IDLE) begin
tdd_ch_en <= 1'b0;
end else begin
if ((tdd_cstate == ARMED) || (tdd_endof_frame == 1'b1)) begin
tdd_ch_en <= ch_en;
end
end
end
end
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_ch_set <= 1'b0;
end else begin
if ((tdd_cstate == RUNNING) && (tdd_counter == t_high)) begin
tdd_ch_set <= 1'b1;
end else begin
tdd_ch_set <= 1'b0;
end
end
end
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_ch_rst <= 1'b0;
end else begin
if (((tdd_cstate == RUNNING) && (tdd_counter == t_low)) || (tdd_endof_frame == 1'b1)) begin
tdd_ch_rst <= 1'b1;
end else begin
tdd_ch_rst <= 1'b0;
end
end
end
// TDD channel output
always @(posedge clk) begin
if (resetn == 1'b0) begin
out <= DEFAULT_POLARITY;
end else begin
if ((tdd_ch_en == 1'b0) || (tdd_ch_rst == 1'b1)) begin
out <= ch_pol;
end else begin
if (tdd_ch_set == 1'b1) begin
out <= ~ch_pol;
end else begin
out <= out;
end
end
end
end
endmodule
+48
View File
@@ -0,0 +1,48 @@
###############################################################################
## Copyright (C) 2022-2023 Analog Devices, Inc. All rights reserved.
### SPDX short identifier: ADIBSD
###############################################################################
set_false_path \
-from [get_registers {*|i_regmap|up_tdd_burst_count[*]}] \
-to [get_registers {*|i_counter|tdd_burst_count[*]}]
set_false_path \
-from [get_registers {*|i_regmap|up_tdd_startup_delay[*]}] \
-to [get_registers {*|i_counter|tdd_startup_delay[*]}]
set_false_path \
-from [get_registers {*|i_regmap|up_tdd_frame_length[*]}] \
-to [get_registers {*|i_counter|tdd_frame_length[*]}]
set_false_path \
-to [get_registers {*|i_sync_gen|tdd_sync_m1}]
set_false_path \
-from [get_registers {*|i_regmap|up_tdd_sync_period_low[*]}] \
-to [get_registers {*|i_sync_gen|tdd_sync_period[*]}]
set_false_path \
-from [get_registers {*|i_regmap|up_tdd_sync_period_high[*]}] \
-to [get_registers {*|i_sync_gen|tdd_sync_period[*]}]
set_false_path \
-from [get_registers {*|i_regmap|up_tdd_channel_pol[*]}] \
-to [get_registers {*|[*].i_channel|ch_pol}]
set_false_path \
-from [get_registers {*|i_regmap|*up_tdd_channel_on[*][*]}] \
-to [get_registers {*|[*].i_channel|t_high[*]}]
set_false_path \
-from [get_registers {*|i_regmap|*up_tdd_channel_off[*][*]}] \
-to [get_registers {*|[*].i_channel|t_low[*]}]
util_cdc_sync_bits_constr {*|axi_tdd_regmap:i_regmap|sync_bits:i_tdd_control_sync}
util_cdc_sync_bits_constr {*|axi_tdd_regmap:i_regmap|sync_bits:i_tdd_ch_en_sync}
util_cdc_sync_data_constr {*|axi_tdd_regmap:i_regmap|sync_data:i_tdd_cstate_sync}
util_cdc_sync_event_constr {*|axi_tdd_regmap:i_regmap|sync_event:i_tdd_soft_sync}
+107
View File
@@ -0,0 +1,107 @@
###############################################################################
## Copyright (C) 2022-2023 Analog Devices, Inc. All rights reserved.
### SPDX short identifier: ADIBSD
###############################################################################
<: set ComponentName [getComponentNameString] :>
<: setOutputDirectory "./" :>
<: setFileName [ttcl_add $ComponentName "_constr"] :>
<: setFileExtension ".xdc" :>
<: setFileProcessingOrder late :>
<: set tdd_sync_int [get_property MODELPARAM_VALUE.SYNC_INTERNAL] :>
<: set tdd_sync_ext [get_property MODELPARAM_VALUE.SYNC_EXTERNAL] :>
<: set tdd_sync_cdc [get_property MODELPARAM_VALUE.SYNC_EXTERNAL_CDC] :>
<: set tdd_sync_width [get_property MODELPARAM_VALUE.SYNC_COUNT_WIDTH] :>
set_property ASYNC_REG TRUE \
[get_cells -hier {*cdc_sync_stage1_reg*}] \
[get_cells -hier {*cdc_sync_stage2_reg*}]
<: if { $tdd_sync_cdc == 1 } { :>
set_property ASYNC_REG TRUE \
[get_cells -hier {*tdd_sync_m1_reg*}] \
[get_cells -hier {*tdd_sync_m2_reg*}] \
[get_cells -hier {*tdd_sync_m3_reg*}]
set_false_path -to [get_cells -hierarchical * -filter {NAME=~*i_sync_gen/tdd_sync_m1_reg}]
<: } :>
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/up_tdd_burst_count_reg[*]}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_counter/tdd_burst_count_reg[*]}]
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/up_tdd_startup_delay_reg[*]}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_counter/tdd_startup_delay_reg[*]}]
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/up_tdd_frame_length_reg[*]}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_counter/tdd_frame_length_reg[*]}]
<: if { $tdd_sync_width > 0 } { :>
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/up_tdd_sync_period_low_reg[*]}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_sync_gen/tdd_sync_period_reg[*]}]
<: } :>
<: if { $tdd_sync_width > 32 } { :>
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/up_tdd_sync_period_high_reg[*]}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_sync_gen/tdd_sync_period_reg[*]}]
<: } :>
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/up_tdd_channel_pol_reg[*]}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_channel/ch_pol_reg}]
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/*up_tdd_channel_on_reg[*][*]}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_channel/t_high_reg[*]}]
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/*up_tdd_channel_off_reg[*][*]}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_channel/t_low_reg[*]}]
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/up_tdd_enable_reg}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_regmap/i_tdd_control_sync/cdc_sync_stage1_reg[0]}]
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/up_tdd_sync_rst_reg}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_regmap/i_tdd_control_sync/cdc_sync_stage1_reg[1]}]
<: if { $tdd_sync_int == 1 } { :>
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/up_tdd_sync_int_reg}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_regmap/i_tdd_control_sync/cdc_sync_stage1_reg[2]}]
<: } :>
<: if { $tdd_sync_ext == 1 } { :>
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/up_tdd_sync_ext_reg}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_regmap/i_tdd_control_sync/cdc_sync_stage1_reg[3]}]
<: } :>
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/up_tdd_channel_en_reg[*]}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_regmap/i_tdd_ch_en_sync/cdc_sync_stage1_reg[*]}]
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/i_tdd_cstate_sync/cdc_hold_reg*}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_regmap/i_tdd_cstate_sync/out_data_reg*}]
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/i_tdd_cstate_sync/in_toggle_d1_reg}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_regmap/i_tdd_cstate_sync/i_sync_out/cdc_sync_stage1_reg[*]}]
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/i_tdd_cstate_sync/out_toggle_d1_reg}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_regmap/i_tdd_cstate_sync/i_sync_in/cdc_sync_stage1_reg[*]}]
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/i_tdd_soft_sync/in_toggle_d1_reg}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_regmap/i_tdd_soft_sync/i_sync_out/cdc_sync_stage1_reg[*]}]
set_false_path \
-from [get_cells -hierarchical * -filter {NAME=~*i_regmap/i_tdd_soft_sync/out_toggle_d1_reg}] \
-to [get_cells -hierarchical * -filter {NAME=~*i_regmap/i_tdd_soft_sync/i_sync_in/cdc_sync_stage1_reg[*]}]
+243
View File
@@ -0,0 +1,243 @@
// ***************************************************************************
// ***************************************************************************
// Copyright (C) 2022-2023 Analog Devices, Inc. All rights reserved.
//
// In this HDL repository, there are many different and unique modules, consisting
// of various HDL (Verilog or VHDL) components. The individual modules are
// developed independently, and may be accompanied by separate and unique license
// terms.
//
// The user should read each of these license terms, and understand the
// freedoms and responsibilities that he or she has by using this source/core.
//
// This core is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
// A PARTICULAR PURPOSE.
//
// Redistribution and use of source or resulting binaries, with or without modification
// of this file, are permitted under one of the following two license terms:
//
// 1. The GNU General Public License version 2 as published by the
// Free Software Foundation, which can be found in the top level directory
// of this repository (LICENSE_GPL2), and also online at:
// <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
//
// OR
//
// 2. An ADI specific BSD license, which can be found in the top level directory
// of this repository (LICENSE_ADIBSD), and also on-line at:
// https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD
// This will allow to generate bit files and not release the source code,
// as long as it attaches to an ADI device.
//
// ***************************************************************************
// ***************************************************************************
`timescale 1ns/1ps
module axi_tdd_counter #(
parameter REGISTER_WIDTH = 32,
parameter BURST_COUNT_WIDTH = 32
) (
input logic clk,
input logic resetn,
input logic tdd_enable,
input logic tdd_sync_rst,
input logic tdd_sync,
input logic [BURST_COUNT_WIDTH-1:0] asy_tdd_burst_count,
input logic [REGISTER_WIDTH-1:0] asy_tdd_startup_delay,
input logic [REGISTER_WIDTH-1:0] asy_tdd_frame_length,
output logic [REGISTER_WIDTH-1:0] tdd_counter,
output axi_tdd_pkg::state_t tdd_cstate,
output logic tdd_endof_frame
);
// package import
import axi_tdd_pkg::*;
// internal registers/wires
logic [BURST_COUNT_WIDTH-1:0] tdd_burst_count;
logic [REGISTER_WIDTH-1:0] tdd_startup_delay;
logic [REGISTER_WIDTH-1:0] tdd_frame_length;
logic [BURST_COUNT_WIDTH-1:0] tdd_burst_counter;
logic tdd_delay_done;
logic tdd_delay_skip;
logic tdd_endof_burst;
logic tdd_last_burst;
state_t tdd_cstate_ns;
// initial values
initial begin
tdd_burst_counter = '0;
tdd_counter = '0;
tdd_cstate = IDLE;
tdd_cstate_ns = IDLE;
tdd_delay_done = 1'b0;
tdd_delay_skip = 1'b0;
tdd_endof_frame = 1'b0;
tdd_last_burst = 1'b0;
end
// Connect the enable signal to the enable flop lines
(* direct_enable = "yes" *) logic enable;
assign enable = tdd_enable;
// Save the async register values only when the module is enabled
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_burst_count <= '0;
end else begin
if (enable) begin
tdd_burst_count <= asy_tdd_burst_count;
end
end
end
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_startup_delay <= '0;
end else begin
if (enable) begin
tdd_startup_delay <= asy_tdd_startup_delay;
end
end
end
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_frame_length <= '0;
end else begin
if (enable) begin
tdd_frame_length <= asy_tdd_frame_length;
end
end
end
// TDD counter FSM
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_cstate <= IDLE;
end else begin
tdd_cstate <= tdd_cstate_ns;
end
end
always @* begin
tdd_cstate_ns = tdd_cstate;
case (tdd_cstate)
IDLE : begin
if (tdd_enable == 1'b1) begin
tdd_cstate_ns = ARMED;
end
end
ARMED : begin
if (tdd_enable == 1'b0) begin
tdd_cstate_ns = IDLE;
end else if (tdd_sync == 1'b1) begin
tdd_cstate_ns = (tdd_delay_skip == 1'b1) ? RUNNING : WAITING;
end
end
WAITING : begin
if (tdd_delay_done == 1'b1) begin
tdd_cstate_ns = RUNNING;
end
end
RUNNING : begin
if (tdd_endof_frame == 1'b1) begin
tdd_cstate_ns = (tdd_endof_burst == 1'b1) ? (tdd_enable ? ARMED : IDLE) :
(((tdd_burst_counter == 0) && !tdd_enable) ? IDLE : RUNNING);
end
end
endcase
end
// TDD control signals
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_delay_done <= 1'b0;
end else begin
if (tdd_counter == (tdd_startup_delay - 1'b1)) begin
tdd_delay_done <= 1'b1;
end else begin
tdd_delay_done <= 1'b0;
end
end
end
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_delay_skip <= 1'b0;
end else begin
if (tdd_startup_delay == 0) begin
tdd_delay_skip <= 1'b1;
end else begin
tdd_delay_skip <= 1'b0;
end
end
end
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_endof_frame <= 1'b0;
end else begin
if (tdd_counter == (tdd_frame_length - 1'b1)) begin
tdd_endof_frame <= 1'b1;
end else begin
tdd_endof_frame <= 1'b0;
end
end
end
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_last_burst <= 1'b0;
end else begin
tdd_last_burst <= (tdd_burst_counter == 1) ? 1'b1 : 1'b0;
end
end
assign tdd_endof_burst = ((tdd_last_burst == 1'b1) && (tdd_endof_frame == 1'b1)) ? 1'b1 : 1'b0;
// TDD free running counter
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_counter <= '0;
end else begin
if ((tdd_sync && tdd_sync_rst) == 1'b1) begin
tdd_counter <= '0;
end else begin
if (tdd_cstate == WAITING) begin
tdd_counter <= (tdd_delay_done == 1'b1) ? '0 : tdd_counter + 1'b1;
end else begin
if (tdd_cstate == RUNNING) begin
tdd_counter <= (tdd_endof_frame == 1'b1) ? '0 : tdd_counter + 1'b1;
end else begin
tdd_counter <= '0;
end
end
end
end
end
// TDD burst counter
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_burst_counter <= '0;
end else begin
if (tdd_cstate == ARMED) begin
tdd_burst_counter <= tdd_burst_count;
end else begin
if ((tdd_cstate == RUNNING) && (tdd_burst_counter != 0) && (tdd_endof_frame == 1'b1)) begin
tdd_burst_counter <= tdd_burst_counter - 1'b1;
end
end
end
end
endmodule
+99
View File
@@ -0,0 +1,99 @@
###############################################################################
## Copyright (C) 2022-2023 Analog Devices, Inc. All rights reserved.
### SPDX short identifier: ADIBSD
###############################################################################
package require qsys 14.0
source ../../scripts/adi_env.tcl
source ../scripts/adi_ip_intel.tcl
set_module_property NAME axi_tdd
set_module_property DESCRIPTION "AXI TDD Interface"
set_module_property VERSION 1.0
set_module_property GROUP "Analog Devices"
set_module_property DISPLAY_NAME axi_tdd
ad_ip_files axi_tdd [list\
$ad_hdl_dir/library/common/up_axi.v \
$ad_hdl_dir/library/util_cdc/sync_bits.v \
$ad_hdl_dir/library/util_cdc/sync_data.v \
$ad_hdl_dir/library/util_cdc/sync_event.v \
axi_tdd_pkg.sv \
axi_tdd_channel.sv \
axi_tdd_counter.sv \
axi_tdd_regmap.sv \
axi_tdd_sync_gen.sv \
axi_tdd.sv \
axi_tdd_constr.sdc]
# parameters
set group "General Configuration"
add_parameter ID INTEGER 0
set_parameter_property ID DISPLAY_NAME "Core ID"
set_parameter_property ID HDL_PARAMETER true
set_parameter_property ID GROUP $group
add_parameter CHANNEL_COUNT INTEGER 8
set_parameter_property CHANNEL_COUNT DISPLAY_NAME "Number of TDD Channels"
set_parameter_property CHANNEL_COUNT HDL_PARAMETER true
set_parameter_property CHANNEL_COUNT ALLOWED_RANGES {1:32}
set_parameter_property CHANNEL_COUNT GROUP $group
add_parameter DEFAULT_POLARITY INTEGER 0
set_parameter_property DEFAULT_POLARITY DISPLAY_NAME "Default Channel output Polarity"
set_parameter_property DEFAULT_POLARITY HDL_PARAMETER true
set_parameter_property DEFAULT_POLARITY GROUP $group
add_parameter REGISTER_WIDTH INTEGER 32
set_parameter_property REGISTER_WIDTH DISPLAY_NAME "TDD Register Width"
set_parameter_property REGISTER_WIDTH HDL_PARAMETER true
set_parameter_property REGISTER_WIDTH ALLOWED_RANGES {8:32}
set_parameter_property REGISTER_WIDTH GROUP $group
add_parameter BURST_COUNT_WIDTH INTEGER 32
set_parameter_property BURST_COUNT_WIDTH DISPLAY_NAME "TDD Burst Counter Width"
set_parameter_property BURST_COUNT_WIDTH HDL_PARAMETER true
set_parameter_property BURST_COUNT_WIDTH ALLOWED_RANGES {8:32}
set_parameter_property BURST_COUNT_WIDTH GROUP $group
add_parameter SYNC_INTERNAL INTEGER 1
set_parameter_property SYNC_INTERNAL DISPLAY_NAME "Sync Internal enable"
set_parameter_property SYNC_INTERNAL HDL_PARAMETER true
set_parameter_property SYNC_INTERNAL ALLOWED_RANGES {0:1}
set_parameter_property SYNC_INTERNAL GROUP $group
add_parameter SYNC_EXTERNAL INTEGER 0
set_parameter_property SYNC_EXTERNAL DISPLAY_NAME "Sync External enable"
set_parameter_property SYNC_EXTERNAL HDL_PARAMETER true
set_parameter_property SYNC_EXTERNAL ALLOWED_RANGES {0:1}
set_parameter_property SYNC_EXTERNAL GROUP $group
add_parameter SYNC_EXTERNAL_CDC INTEGER 0
set_parameter_property SYNC_EXTERNAL_CDC DISPLAY_NAME "Sync External CDC enable"
set_parameter_property SYNC_EXTERNAL_CDC HDL_PARAMETER true
set_parameter_property SYNC_EXTERNAL_CDC ALLOWED_RANGES {0:1}
set_parameter_property SYNC_EXTERNAL_CDC GROUP $group
add_parameter SYNC_COUNT_WIDTH INTEGER 64
set_parameter_property SYNC_COUNT_WIDTH DISPLAY_NAME "TDD Sync Counter Width"
set_parameter_property SYNC_COUNT_WIDTH HDL_PARAMETER true
set_parameter_property SYNC_COUNT_WIDTH ALLOWED_RANGES {0:64}
set_parameter_property SYNC_COUNT_WIDTH GROUP $group
# interfaces
ad_ip_intf_s_axi s_axi_aclk s_axi_aresetn
add_interface tdd_clock clock end
add_interface_port tdd_clock clk clk Input 1
add_interface tdd_reset reset end
set_interface_property tdd_reset associatedClock tdd_clock
add_interface_port tdd_reset resetn reset_n Input 1
ad_interface signal sync_in input 1
ad_interface signal sync_out output 1
ad_interface signal tdd_channel output 32
+98
View File
@@ -0,0 +1,98 @@
###############################################################################
## Copyright (C) 2021-2023 Analog Devices, Inc. All rights reserved.
### SPDX short identifier: ADIBSD
###############################################################################
# ip
source ../../scripts/adi_env.tcl
source $ad_hdl_dir/library/scripts/adi_ip_xilinx.tcl
adi_ip_create axi_tdd
adi_ip_files axi_tdd [list \
"$ad_hdl_dir/library/common/up_axi.v" \
"$ad_hdl_dir/library/util_cdc/sync_bits.v" \
"$ad_hdl_dir/library/util_cdc/sync_data.v" \
"$ad_hdl_dir/library/util_cdc/sync_event.v" \
"axi_tdd_pkg.sv" \
"axi_tdd_channel.sv" \
"axi_tdd_counter.sv" \
"axi_tdd_regmap.sv" \
"axi_tdd_sync_gen.sv" \
"axi_tdd.sv" ]
adi_ip_properties axi_tdd
adi_ip_ttcl axi_tdd "axi_tdd_constr.ttcl"
set_property display_name "ADI AXI TDD Controller" [ipx::current_core]
set_property description "ADI AXI TDD Controller" [ipx::current_core]
set_property company_url {https://wiki.analog.com/resources/fpga/docs/axi_tdd} [ipx::current_core]
adi_init_bd_tcl
proc add_reset {name polarity} {
set reset_intf [ipx::infer_bus_interface $name xilinx.com:signal:reset_rtl:1.0 [ipx::current_core]]
set reset_polarity [ipx::add_bus_parameter "POLARITY" $reset_intf]
set_property value $polarity $reset_polarity
}
ipx::infer_bus_interface clk xilinx.com:signal:clock_rtl:1.0 [ipx::current_core]
ipx::infer_bus_interface s_axi_aclk xilinx.com:signal:clock_rtl:1.0 [ipx::current_core]
add_reset rst ACTIVE_HIGH
add_reset s_axi_aresetn ACTIVE_LOW
ipx::add_bus_parameter ASSOCIATED_BUSIF [ipx::get_bus_interfaces s_axi_aclk -of_objects [ipx::current_core]]
set_property value s_axi [ipx::get_bus_parameters ASSOCIATED_BUSIF -of_objects [ipx::get_bus_interfaces s_axi_aclk -of_objects [ipx::current_core]]]
set_property -dict [list \
"value_validation_type" "range_long" \
"value_validation_range_minimum" "1" \
"value_validation_range_maximum" "32" \
] \
[ipx::get_user_parameters CHANNEL_COUNT -of_objects [ipx::current_core]]
set_property -dict [list \
"value_validation_type" "range_long" \
"value_validation_range_minimum" "8" \
"value_validation_range_maximum" "32" \
] \
[ipx::get_user_parameters REGISTER_WIDTH -of_objects [ipx::current_core]]
set_property -dict [list \
"value_validation_type" "range_long" \
"value_validation_range_minimum" "8" \
"value_validation_range_maximum" "32" \
] \
[ipx::get_user_parameters BURST_COUNT_WIDTH -of_objects [ipx::current_core]]
set_property -dict [list \
"value_validation_type" "range_long" \
"value_validation_range_minimum" "0" \
"value_validation_range_maximum" "64" \
] \
[ipx::get_user_parameters SYNC_COUNT_WIDTH -of_objects [ipx::current_core]]
set_property -dict [list \
"value_validation_type" "range_long" \
"value_validation_range_minimum" "0" \
"value_validation_range_maximum" "1" \
] \
[ipx::get_user_parameters SYNC_INTERNAL -of_objects [ipx::current_core]]
set_property -dict [list \
"value_validation_type" "range_long" \
"value_validation_range_minimum" "0" \
"value_validation_range_maximum" "1" \
] \
[ipx::get_user_parameters SYNC_EXTERNAL -of_objects [ipx::current_core]]
set_property -dict [list \
"value_validation_type" "range_long" \
"value_validation_range_minimum" "0" \
"value_validation_range_maximum" "1" \
] \
[ipx::get_user_parameters SYNC_EXTERNAL_CDC -of_objects [ipx::current_core]]
ipx::create_xgui_files [ipx::current_core]
ipx::save_core [ipx::current_core]
+103
View File
@@ -0,0 +1,103 @@
// ***************************************************************************
// ***************************************************************************
// Copyright (C) 2022-2023 Analog Devices, Inc. All rights reserved.
//
// In this HDL repository, there are many different and unique modules, consisting
// of various HDL (Verilog or VHDL) components. The individual modules are
// developed independently, and may be accompanied by separate and unique license
// terms.
//
// The user should read each of these license terms, and understand the
// freedoms and responsibilities that he or she has by using this source/core.
//
// This core is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
// A PARTICULAR PURPOSE.
//
// Redistribution and use of source or resulting binaries, with or without modification
// of this file, are permitted under one of the following two license terms:
//
// 1. The GNU General Public License version 2 as published by the
// Free Software Foundation, which can be found in the top level directory
// of this repository (LICENSE_GPL2), and also online at:
// <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
//
// OR
//
// 2. An ADI specific BSD license, which can be found in the top level directory
// of this repository (LICENSE_ADIBSD), and also on-line at:
// https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD
// This will allow to generate bit files and not release the source code,
// as long as it attaches to an ADI device.
//
// ***************************************************************************
// ***************************************************************************
package axi_tdd_pkg;
typedef enum logic [1:0] {
IDLE = 2'b00,
ARMED = 2'b01,
WAITING = 2'b10,
RUNNING = 2'b11} state_t;
localparam
PCORE_VERSION = 32'h00020061,
PCORE_MAGIC = 32'h5444444E; // "TDDN", big endian
// register address offset
localparam
ADDR_TDD_VERSION = 8'h00,
ADDR_TDD_ID = 8'h01,
ADDR_TDD_SCRATCH = 8'h02,
ADDR_TDD_IDENTIFICATION = 8'h03,
ADDR_TDD_INTERFACE = 8'h04,
ADDR_TDD_DEF_POLARITY = 8'h05,
ADDR_TDD_CONTROL = 8'h10,
ADDR_TDD_CH_ENABLE = 8'h11,
ADDR_TDD_CH_POLARITY = 8'h12,
ADDR_TDD_BURST_COUNT = 8'h13,
ADDR_TDD_STARTUP_DELAY = 8'h14,
ADDR_TDD_FRAME_LENGTH = 8'h15,
ADDR_TDD_SYNC_CNT_LOW = 8'h16,
ADDR_TDD_SYNC_CNT_HIGH = 8'h17,
ADDR_TDD_STATUS = 8'h18,
ADDR_TDD_CH_ON = 8'h20,
ADDR_TDD_CH_OFF = 8'h21;
// channel offset values
localparam
CH0 = 0,
CH1 = 1,
CH2 = 2,
CH3 = 3,
CH4 = 4,
CH5 = 5,
CH6 = 6,
CH7 = 7,
CH8 = 8,
CH9 = 9,
CH10 = 10,
CH11 = 11,
CH12 = 12,
CH13 = 13,
CH14 = 14,
CH15 = 15,
CH16 = 16,
CH17 = 17,
CH18 = 18,
CH19 = 19,
CH20 = 20,
CH21 = 21,
CH22 = 22,
CH23 = 23,
CH24 = 24,
CH25 = 25,
CH26 = 26,
CH27 = 27,
CH28 = 28,
CH29 = 29,
CH30 = 30,
CH31 = 31;
endpackage
+445
View File
@@ -0,0 +1,445 @@
// ***************************************************************************
// ***************************************************************************
// Copyright (C) 2022-2023 Analog Devices, Inc. All rights reserved.
//
// In this HDL repository, there are many different and unique modules, consisting
// of various HDL (Verilog or VHDL) components. The individual modules are
// developed independently, and may be accompanied by separate and unique license
// terms.
//
// The user should read each of these license terms, and understand the
// freedoms and responsibilities that he or she has by using this source/core.
//
// This core is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
// A PARTICULAR PURPOSE.
//
// Redistribution and use of source or resulting binaries, with or without modification
// of this file, are permitted under one of the following two license terms:
//
// 1. The GNU General Public License version 2 as published by the
// Free Software Foundation, which can be found in the top level directory
// of this repository (LICENSE_GPL2), and also online at:
// <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
//
// OR
//
// 2. An ADI specific BSD license, which can be found in the top level directory
// of this repository (LICENSE_ADIBSD), and also on-line at:
// https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD
// This will allow to generate bit files and not release the source code,
// as long as it attaches to an ADI device.
//
// ***************************************************************************
// ***************************************************************************
`timescale 1ns/1ps
module axi_tdd_regmap #(
parameter ID = 0,
parameter CHANNEL_COUNT = 8,
parameter DEFAULT_POLARITY = 8'h00,
parameter REGISTER_WIDTH = 32,
parameter BURST_COUNT_WIDTH = 32,
parameter SYNC_INTERNAL = 1,
parameter SYNC_EXTERNAL = 0,
parameter SYNC_EXTERNAL_CDC = 0,
parameter SYNC_COUNT_WIDTH = 64
) (
// tdd clock
input logic tdd_clk,
input logic tdd_resetn,
// tdd interface control
input axi_tdd_pkg::state_t tdd_cstate,
output logic tdd_enable,
output logic [CHANNEL_COUNT-1:0] tdd_channel_en,
output logic [CHANNEL_COUNT-1:0] asy_tdd_channel_pol,
output logic [BURST_COUNT_WIDTH-1:0] asy_tdd_burst_count,
output logic [REGISTER_WIDTH-1:0] asy_tdd_startup_delay,
output logic [REGISTER_WIDTH-1:0] asy_tdd_frame_length,
output logic [REGISTER_WIDTH-1:0] asy_tdd_channel_on [0:CHANNEL_COUNT-1],
output logic [REGISTER_WIDTH-1:0] asy_tdd_channel_off [0:CHANNEL_COUNT-1],
output logic [SYNC_COUNT_WIDTH-1:0] asy_tdd_sync_period,
output logic tdd_sync_rst,
output logic tdd_sync_int,
output logic tdd_sync_ext,
output logic tdd_sync_soft,
// bus interface
input logic up_rstn,
input logic up_clk,
input logic up_wreq,
input logic [ 7:0] up_waddr,
input logic [31:0] up_wdata,
output logic up_wack,
input logic up_rreq,
input logic [ 7:0] up_raddr,
output logic [31:0] up_rdata,
output logic up_rack
);
// package import
import axi_tdd_pkg::*;
// local params
localparam CHANNEL_COUNT_EXTRA = CHANNEL_COUNT - 1;
// internal registers
logic [31:0] up_scratch;
logic [ 1:0] up_tdd_cstate;
logic up_tdd_enable;
logic up_tdd_sync_rst;
logic up_tdd_sync_int;
logic up_tdd_sync_ext;
logic up_tdd_sync_soft;
logic [CHANNEL_COUNT-1:0] up_tdd_channel_en;
logic [CHANNEL_COUNT-1:0] up_tdd_channel_pol;
logic [BURST_COUNT_WIDTH-1:0] up_tdd_burst_count;
logic [REGISTER_WIDTH-1:0] up_tdd_startup_delay;
logic [REGISTER_WIDTH-1:0] up_tdd_frame_length;
logic [REGISTER_WIDTH-1:0] up_tdd_channel_on [0:CHANNEL_COUNT-1];
logic [REGISTER_WIDTH-1:0] up_tdd_channel_off [0:CHANNEL_COUNT-1];
//internal wires
logic [31:0] status_synth_params_s;
logic [31:0] status_def_polarity_s;
logic [31:0] up_tdd_channel_en_s;
logic [31:0] up_tdd_channel_pol_s;
logic [31:0] up_tdd_burst_count_s;
logic [31:0] up_tdd_startup_delay_s;
logic [31:0] up_tdd_frame_length_s;
logic [63:0] up_tdd_sync_period_s;
logic [31:0] up_tdd_channel_on_s [0:31];
logic [31:0] up_tdd_channel_off_s [0:31];
//initial values
initial begin
up_rdata = 32'b0;
up_wack = 1'b0;
up_rack = 1'b0;
up_scratch = 32'b0;
up_tdd_enable = 1'b0;
up_tdd_sync_rst = 1'b0;
up_tdd_sync_int = 1'b0;
up_tdd_sync_ext = 1'b0;
up_tdd_sync_soft = 1'b0;
up_tdd_channel_en = '0;
up_tdd_channel_pol = '0;
up_tdd_burst_count = '0;
up_tdd_startup_delay = '0;
up_tdd_frame_length = '0;
up_tdd_channel_on = '{default:0};
up_tdd_channel_off = '{default:0};
end
//read-only synthesis parameters
assign status_synth_params_s = {
/*31:24 */ 1'b0, 7'(SYNC_COUNT_WIDTH),
/*23:16 */ 2'b0, 6'(BURST_COUNT_WIDTH),
/*15: 8 */ 2'b0, 6'(REGISTER_WIDTH),
/* 7: 0 */ 1'(SYNC_EXTERNAL_CDC),
1'(SYNC_EXTERNAL),
1'(SYNC_INTERNAL),
5'(CHANNEL_COUNT_EXTRA)};
assign status_def_polarity_s = {{(32-CHANNEL_COUNT){1'b0}}, DEFAULT_POLARITY};
// processor write interface
always @(posedge up_clk) begin
if (up_rstn == 0) begin
up_wack <= 1'b0;
up_scratch <= 32'b0;
up_tdd_enable <= 1'b0;
up_tdd_sync_rst <= 1'b0;
up_tdd_sync_int <= 1'b0;
up_tdd_sync_ext <= 1'b0;
up_tdd_sync_soft <= 1'b0;
up_tdd_channel_en <= '0;
up_tdd_channel_pol <= '0;
up_tdd_startup_delay <= '0;
up_tdd_frame_length <= '0;
up_tdd_burst_count <= '0;
end else begin
up_wack <= up_wreq;
if ((up_wreq == 1'b1) && (up_waddr == ADDR_TDD_SCRATCH)) begin
up_scratch <= up_wdata;
end
if ((up_wreq == 1'b1) && (up_waddr == ADDR_TDD_CONTROL)) begin
up_tdd_sync_soft <= up_wdata[4];
up_tdd_sync_ext <= up_wdata[3] & SYNC_EXTERNAL;
up_tdd_sync_int <= up_wdata[2] & SYNC_INTERNAL;
up_tdd_sync_rst <= up_wdata[1];
up_tdd_enable <= up_wdata[0];
end else begin
up_tdd_sync_soft <= 1'b0;
up_tdd_sync_ext <= up_tdd_sync_ext;
up_tdd_sync_int <= up_tdd_sync_int;
up_tdd_sync_rst <= up_tdd_sync_rst;
up_tdd_enable <= up_tdd_enable;
end
if ((up_wreq == 1'b1) && (up_waddr == ADDR_TDD_CH_ENABLE)) begin
up_tdd_channel_en <= up_wdata[CHANNEL_COUNT-1:0];
end
if ((up_wreq == 1'b1) && (up_waddr == ADDR_TDD_CH_POLARITY) && !up_tdd_enable) begin
up_tdd_channel_pol <= up_wdata[CHANNEL_COUNT-1:0];
end
if ((up_wreq == 1'b1) && (up_waddr == ADDR_TDD_BURST_COUNT) && !up_tdd_enable) begin
up_tdd_burst_count <= up_wdata[BURST_COUNT_WIDTH-1:0];
end
if ((up_wreq == 1'b1) && (up_waddr == ADDR_TDD_STARTUP_DELAY) && !up_tdd_enable) begin
up_tdd_startup_delay <= up_wdata[REGISTER_WIDTH-1:0];
end
if ((up_wreq == 1'b1) && (up_waddr == ADDR_TDD_FRAME_LENGTH) && !up_tdd_enable) begin
up_tdd_frame_length <= up_wdata[REGISTER_WIDTH-1:0];
end
end
end
assign up_tdd_channel_en_s = {{(32-CHANNEL_COUNT){1'b0}}, up_tdd_channel_en};
assign up_tdd_channel_pol_s = {{(32-CHANNEL_COUNT){1'b0}}, up_tdd_channel_pol};
assign up_tdd_burst_count_s = {{(32-BURST_COUNT_WIDTH){1'b0}}, up_tdd_burst_count};
assign up_tdd_startup_delay_s = {{(32-REGISTER_WIDTH){1'b0}}, up_tdd_startup_delay};
assign up_tdd_frame_length_s = {{(32-REGISTER_WIDTH){1'b0}}, up_tdd_frame_length};
// internal sync counter generation (low and high)
generate
if (SYNC_COUNT_WIDTH>32) begin
logic [31:0] up_tdd_sync_period_low;
logic [(SYNC_COUNT_WIDTH-32-1):0] up_tdd_sync_period_high;
always @(posedge up_clk) begin
if (up_rstn == 0) begin
up_tdd_sync_period_low <= 32'b0;
up_tdd_sync_period_high <= '0;
end else begin
if ((up_wreq == 1'b1) && (up_waddr == ADDR_TDD_SYNC_CNT_LOW) && !up_tdd_enable) begin
up_tdd_sync_period_low <= up_wdata[31:0];
end
if ((up_wreq == 1'b1) && (up_waddr == ADDR_TDD_SYNC_CNT_HIGH) && !up_tdd_enable) begin
up_tdd_sync_period_high <= up_wdata[(SYNC_COUNT_WIDTH-32-1):0];
end
end
end
assign up_tdd_sync_period_s[31:0] = up_tdd_sync_period_low;
assign up_tdd_sync_period_s[63:32] = {{(64-SYNC_COUNT_WIDTH){1'b0}}, up_tdd_sync_period_high};
assign asy_tdd_sync_period = {up_tdd_sync_period_high, up_tdd_sync_period_low}; //skipping CDC
end else begin
if (SYNC_COUNT_WIDTH>0) begin
logic [SYNC_COUNT_WIDTH-1:0] up_tdd_sync_period_low;
always @(posedge up_clk) begin
if (up_rstn == 0) begin
up_tdd_sync_period_low <= '0;
end else begin
if ((up_wreq == 1'b1) && (up_waddr == ADDR_TDD_SYNC_CNT_LOW) && !up_tdd_enable) begin
up_tdd_sync_period_low <= up_wdata[(SYNC_COUNT_WIDTH-1):0];
end
end
end
assign up_tdd_sync_period_s[31:0] = {{(32-SYNC_COUNT_WIDTH){1'b0}}, up_tdd_sync_period_low};
assign up_tdd_sync_period_s[63:32] = 32'b0;
assign asy_tdd_sync_period = up_tdd_sync_period_low; //skipping CDC
end else begin
assign up_tdd_sync_period_s[31:0] = 32'b0;
assign up_tdd_sync_period_s[63:32] = 32'b0;
assign asy_tdd_sync_period = '0;
end
end
endgenerate
// channel register generation
genvar i;
generate
for (i=0; i<CHANNEL_COUNT; i=i+1) begin
always @(posedge up_clk) begin
if (up_rstn == 0) begin
up_tdd_channel_on[i] <= '0;
up_tdd_channel_off[i] <= '0;
end else begin
if ((up_wreq == 1'b1) && (up_waddr == (ADDR_TDD_CH_ON + i*2)) && !up_tdd_enable) begin
up_tdd_channel_on[i] <= up_wdata[REGISTER_WIDTH-1:0];
end
if ((up_wreq == 1'b1) && (up_waddr == (ADDR_TDD_CH_OFF + i*2)) && !up_tdd_enable) begin
up_tdd_channel_off[i] <= up_wdata[REGISTER_WIDTH-1:0];
end
end
end
assign up_tdd_channel_on_s[i] = {{(32-REGISTER_WIDTH){1'b0}}, up_tdd_channel_on[i]};
assign up_tdd_channel_off_s[i] = {{(32-REGISTER_WIDTH){1'b0}}, up_tdd_channel_off[i]};
end
if (CHANNEL_COUNT<32) begin
assign up_tdd_channel_on_s[CHANNEL_COUNT:31] = '{default:0};
assign up_tdd_channel_off_s[CHANNEL_COUNT:31] = '{default:0};
end
endgenerate
// processor read interface
always @(posedge up_clk) begin
if (up_rstn == 0) begin
up_rack <= 1'b0;
up_rdata <= 32'b0;
end else begin
up_rack <= up_rreq;
if (up_rreq == 1'b1) begin
case (up_raddr)
ADDR_TDD_VERSION : up_rdata <= PCORE_VERSION;
ADDR_TDD_ID : up_rdata <= ID[31:0];
ADDR_TDD_SCRATCH : up_rdata <= up_scratch;
ADDR_TDD_IDENTIFICATION : up_rdata <= PCORE_MAGIC;
ADDR_TDD_INTERFACE : up_rdata <= status_synth_params_s;
ADDR_TDD_DEF_POLARITY : up_rdata <= status_def_polarity_s;
ADDR_TDD_CONTROL : up_rdata <= {27'b0, up_tdd_sync_soft,
up_tdd_sync_ext,
up_tdd_sync_int,
up_tdd_sync_rst,
up_tdd_enable};
ADDR_TDD_CH_ENABLE : up_rdata <= up_tdd_channel_en_s;
ADDR_TDD_CH_POLARITY : up_rdata <= up_tdd_channel_pol_s;
ADDR_TDD_BURST_COUNT : up_rdata <= up_tdd_burst_count_s;
ADDR_TDD_STARTUP_DELAY : up_rdata <= up_tdd_startup_delay_s;
ADDR_TDD_FRAME_LENGTH : up_rdata <= up_tdd_frame_length_s;
ADDR_TDD_SYNC_CNT_LOW : up_rdata <= up_tdd_sync_period_s[31:0];
ADDR_TDD_SYNC_CNT_HIGH : up_rdata <= up_tdd_sync_period_s[63:32];
ADDR_TDD_STATUS : up_rdata <= {30'b0, up_tdd_cstate};
ADDR_TDD_CH_ON + 2*CH0 : up_rdata <= up_tdd_channel_on_s[CH0];
ADDR_TDD_CH_OFF + 2*CH0 : up_rdata <= up_tdd_channel_off_s[CH0];
ADDR_TDD_CH_ON + 2*CH1 : up_rdata <= up_tdd_channel_on_s[CH1];
ADDR_TDD_CH_OFF + 2*CH1 : up_rdata <= up_tdd_channel_off_s[CH1];
ADDR_TDD_CH_ON + 2*CH2 : up_rdata <= up_tdd_channel_on_s[CH2];
ADDR_TDD_CH_OFF + 2*CH2 : up_rdata <= up_tdd_channel_off_s[CH2];
ADDR_TDD_CH_ON + 2*CH3 : up_rdata <= up_tdd_channel_on_s[CH3];
ADDR_TDD_CH_OFF + 2*CH3 : up_rdata <= up_tdd_channel_off_s[CH3];
ADDR_TDD_CH_ON + 2*CH4 : up_rdata <= up_tdd_channel_on_s[CH4];
ADDR_TDD_CH_OFF + 2*CH4 : up_rdata <= up_tdd_channel_off_s[CH4];
ADDR_TDD_CH_ON + 2*CH5 : up_rdata <= up_tdd_channel_on_s[CH5];
ADDR_TDD_CH_OFF + 2*CH5 : up_rdata <= up_tdd_channel_off_s[CH5];
ADDR_TDD_CH_ON + 2*CH6 : up_rdata <= up_tdd_channel_on_s[CH6];
ADDR_TDD_CH_OFF + 2*CH6 : up_rdata <= up_tdd_channel_off_s[CH6];
ADDR_TDD_CH_ON + 2*CH7 : up_rdata <= up_tdd_channel_on_s[CH7];
ADDR_TDD_CH_OFF + 2*CH7 : up_rdata <= up_tdd_channel_off_s[CH7];
ADDR_TDD_CH_ON + 2*CH8 : up_rdata <= up_tdd_channel_on_s[CH8];
ADDR_TDD_CH_OFF + 2*CH8 : up_rdata <= up_tdd_channel_off_s[CH8];
ADDR_TDD_CH_ON + 2*CH9 : up_rdata <= up_tdd_channel_on_s[CH9];
ADDR_TDD_CH_OFF + 2*CH9 : up_rdata <= up_tdd_channel_off_s[CH9];
ADDR_TDD_CH_ON + 2*CH10 : up_rdata <= up_tdd_channel_on_s[CH10];
ADDR_TDD_CH_OFF + 2*CH10 : up_rdata <= up_tdd_channel_off_s[CH10];
ADDR_TDD_CH_ON + 2*CH11 : up_rdata <= up_tdd_channel_on_s[CH11];
ADDR_TDD_CH_OFF + 2*CH11 : up_rdata <= up_tdd_channel_off_s[CH11];
ADDR_TDD_CH_ON + 2*CH12 : up_rdata <= up_tdd_channel_on_s[CH12];
ADDR_TDD_CH_OFF + 2*CH12 : up_rdata <= up_tdd_channel_off_s[CH12];
ADDR_TDD_CH_ON + 2*CH13 : up_rdata <= up_tdd_channel_on_s[CH13];
ADDR_TDD_CH_OFF + 2*CH13 : up_rdata <= up_tdd_channel_off_s[CH13];
ADDR_TDD_CH_ON + 2*CH14 : up_rdata <= up_tdd_channel_on_s[CH14];
ADDR_TDD_CH_OFF + 2*CH14 : up_rdata <= up_tdd_channel_off_s[CH14];
ADDR_TDD_CH_ON + 2*CH15 : up_rdata <= up_tdd_channel_on_s[CH15];
ADDR_TDD_CH_OFF + 2*CH15 : up_rdata <= up_tdd_channel_off_s[CH15];
ADDR_TDD_CH_ON + 2*CH16 : up_rdata <= up_tdd_channel_on_s[CH16];
ADDR_TDD_CH_OFF + 2*CH16 : up_rdata <= up_tdd_channel_off_s[CH16];
ADDR_TDD_CH_ON + 2*CH17 : up_rdata <= up_tdd_channel_on_s[CH17];
ADDR_TDD_CH_OFF + 2*CH17 : up_rdata <= up_tdd_channel_off_s[CH17];
ADDR_TDD_CH_ON + 2*CH18 : up_rdata <= up_tdd_channel_on_s[CH18];
ADDR_TDD_CH_OFF + 2*CH18 : up_rdata <= up_tdd_channel_off_s[CH18];
ADDR_TDD_CH_ON + 2*CH19 : up_rdata <= up_tdd_channel_on_s[CH19];
ADDR_TDD_CH_OFF + 2*CH19 : up_rdata <= up_tdd_channel_off_s[CH19];
ADDR_TDD_CH_ON + 2*CH20 : up_rdata <= up_tdd_channel_on_s[CH20];
ADDR_TDD_CH_OFF + 2*CH20 : up_rdata <= up_tdd_channel_off_s[CH20];
ADDR_TDD_CH_ON + 2*CH21 : up_rdata <= up_tdd_channel_on_s[CH21];
ADDR_TDD_CH_OFF + 2*CH21 : up_rdata <= up_tdd_channel_off_s[CH21];
ADDR_TDD_CH_ON + 2*CH22 : up_rdata <= up_tdd_channel_on_s[CH22];
ADDR_TDD_CH_OFF + 2*CH22 : up_rdata <= up_tdd_channel_off_s[CH22];
ADDR_TDD_CH_ON + 2*CH23 : up_rdata <= up_tdd_channel_on_s[CH23];
ADDR_TDD_CH_OFF + 2*CH23 : up_rdata <= up_tdd_channel_off_s[CH23];
ADDR_TDD_CH_ON + 2*CH24 : up_rdata <= up_tdd_channel_on_s[CH24];
ADDR_TDD_CH_OFF + 2*CH24 : up_rdata <= up_tdd_channel_off_s[CH24];
ADDR_TDD_CH_ON + 2*CH25 : up_rdata <= up_tdd_channel_on_s[CH25];
ADDR_TDD_CH_OFF + 2*CH25 : up_rdata <= up_tdd_channel_off_s[CH25];
ADDR_TDD_CH_ON + 2*CH26 : up_rdata <= up_tdd_channel_on_s[CH26];
ADDR_TDD_CH_OFF + 2*CH26 : up_rdata <= up_tdd_channel_off_s[CH26];
ADDR_TDD_CH_ON + 2*CH27 : up_rdata <= up_tdd_channel_on_s[CH27];
ADDR_TDD_CH_OFF + 2*CH27 : up_rdata <= up_tdd_channel_off_s[CH27];
ADDR_TDD_CH_ON + 2*CH28 : up_rdata <= up_tdd_channel_on_s[CH28];
ADDR_TDD_CH_OFF + 2*CH28 : up_rdata <= up_tdd_channel_off_s[CH28];
ADDR_TDD_CH_ON + 2*CH29 : up_rdata <= up_tdd_channel_on_s[CH29];
ADDR_TDD_CH_OFF + 2*CH29 : up_rdata <= up_tdd_channel_off_s[CH29];
ADDR_TDD_CH_ON + 2*CH30 : up_rdata <= up_tdd_channel_on_s[CH30];
ADDR_TDD_CH_OFF + 2*CH30 : up_rdata <= up_tdd_channel_off_s[CH30];
ADDR_TDD_CH_ON + 2*CH31 : up_rdata <= up_tdd_channel_on_s[CH31];
ADDR_TDD_CH_OFF + 2*CH31 : up_rdata <= up_tdd_channel_off_s[CH31];
default: up_rdata <= 32'b0;
endcase
end else begin
up_rdata <= 32'b0;
end
end
end
// control signals CDC
sync_bits #(
.NUM_OF_BITS (4),
.ASYNC_CLK (1)
) i_tdd_control_sync (
.in_bits ({up_tdd_sync_ext,
up_tdd_sync_int,
up_tdd_sync_rst,
up_tdd_enable}),
.out_resetn (tdd_resetn),
.out_clk (tdd_clk),
.out_bits ({tdd_sync_ext,
tdd_sync_int,
tdd_sync_rst,
tdd_enable}));
sync_event #(
.NUM_OF_EVENTS (1),
.ASYNC_CLK (1)
) i_tdd_soft_sync (
.in_clk (up_clk),
.in_event (up_tdd_sync_soft),
.out_clk (tdd_clk),
.out_event (tdd_sync_soft));
sync_bits #(
.NUM_OF_BITS (CHANNEL_COUNT),
.ASYNC_CLK (1)
) i_tdd_ch_en_sync (
.in_bits (up_tdd_channel_en),
.out_resetn (tdd_resetn),
.out_clk (tdd_clk),
.out_bits (tdd_channel_en));
sync_data #(
.NUM_OF_BITS (2),
.ASYNC_CLK (1)
) i_tdd_cstate_sync (
.in_clk (tdd_clk),
.in_data (tdd_cstate),
.out_clk (up_clk),
.out_data (up_tdd_cstate));
// skipping CDC for the rest of the registers since the register writes are gated with module enable
// furthermore, updating the async domain registers is also conditioned by the synchronized module enable
assign asy_tdd_burst_count = up_tdd_burst_count;
assign asy_tdd_startup_delay = up_tdd_startup_delay;
assign asy_tdd_frame_length = up_tdd_frame_length;
assign asy_tdd_channel_pol = up_tdd_channel_pol;
assign asy_tdd_channel_on = up_tdd_channel_on;
assign asy_tdd_channel_off = up_tdd_channel_off;
endmodule
+150
View File
@@ -0,0 +1,150 @@
// ***************************************************************************
// ***************************************************************************
// Copyright (C) 2022-2023 Analog Devices, Inc. All rights reserved.
//
// In this HDL repository, there are many different and unique modules, consisting
// of various HDL (Verilog or VHDL) components. The individual modules are
// developed independently, and may be accompanied by separate and unique license
// terms.
//
// The user should read each of these license terms, and understand the
// freedoms and responsibilities that he or she has by using this source/core.
//
// This core is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
// A PARTICULAR PURPOSE.
//
// Redistribution and use of source or resulting binaries, with or without modification
// of this file, are permitted under one of the following two license terms:
//
// 1. The GNU General Public License version 2 as published by the
// Free Software Foundation, which can be found in the top level directory
// of this repository (LICENSE_GPL2), and also online at:
// <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
//
// OR
//
// 2. An ADI specific BSD license, which can be found in the top level directory
// of this repository (LICENSE_ADIBSD), and also on-line at:
// https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD
// This will allow to generate bit files and not release the source code,
// as long as it attaches to an ADI device.
//
// ***************************************************************************
// ***************************************************************************
`timescale 1ns/1ps
module axi_tdd_sync_gen #(
parameter SYNC_INTERNAL = 1,
parameter SYNC_EXTERNAL = 0,
parameter SYNC_EXTERNAL_CDC = 0,
parameter SYNC_COUNT_WIDTH = 64
) (
input logic clk,
input logic resetn,
input logic sync_in,
output logic sync_out,
input logic tdd_enable,
input logic tdd_sync_ext,
input logic tdd_sync_int,
input logic tdd_sync_soft,
input logic [SYNC_COUNT_WIDTH-1:0] asy_tdd_sync_period
);
// internal signals
logic [1:0] sync_source;
// Connect the enable signal to the enable flop lines
(* direct_enable = "yes" *) logic enable;
assign enable = tdd_enable;
// first sync source (external)
generate
if (SYNC_EXTERNAL == 1) begin
if (SYNC_EXTERNAL_CDC == 1) begin
logic tdd_sync_m1 = 1'b0;
logic tdd_sync_m2 = 1'b0;
logic tdd_sync_m3 = 1'b0;
// synchronization of sync_in
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_sync_m1 <= 1'b0;
tdd_sync_m2 <= 1'b0;
tdd_sync_m3 <= 1'b0;
end else begin
tdd_sync_m1 <= sync_in;
tdd_sync_m2 <= tdd_sync_m1;
tdd_sync_m3 <= tdd_sync_m2;
end
end
assign sync_source[0] = ~tdd_sync_m3 & tdd_sync_m2;
end else begin
assign sync_source[0] = sync_in;
end
end else begin
assign sync_source[0] = 1'b0;
end
endgenerate
// second sync source (internal)
generate
if (SYNC_INTERNAL == 1) begin
logic tdd_sync_trigger = 1'b0;
logic [SYNC_COUNT_WIDTH-1:0] tdd_sync_counter = '0;
logic [SYNC_COUNT_WIDTH-1:0] tdd_sync_period = '0;
// Save the async register values only when the module is enabled
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_sync_period <= '0;
end else begin
if (enable) begin
tdd_sync_period <= asy_tdd_sync_period;
end
end
end
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_sync_trigger <= 1'b0;
end else begin
if (tdd_sync_counter == (tdd_sync_period - 1'b1)) begin
tdd_sync_trigger <= 1'b1;
end else begin
tdd_sync_trigger <= 1'b0;
end
end
end
// sync counter
always @(posedge clk) begin
if (resetn == 1'b0) begin
tdd_sync_counter <= '0;
end else begin
if (tdd_enable) begin
tdd_sync_counter <= (tdd_sync_trigger == 1'b1) ? '0 : tdd_sync_counter + 1'b1;
end else begin
tdd_sync_counter <= '0;
end
end
end
assign sync_source[1] = tdd_sync_trigger;
end else begin
assign sync_source[1] = 1'b0;
end
endgenerate
// creating the output sync signal
assign sync_out = (tdd_sync_ext & sync_source[0]) | (tdd_sync_int & sync_source[1]) | tdd_sync_soft;
endmodule
+41
View File
@@ -0,0 +1,41 @@
# SCRIPT AUTO-GENERATED AT BUILD, DO NOT MODIFY!
proc init {cellpath otherInfo} {
set ip [get_bd_cells $cellpath]
adi_auto_assign_device_spec $cellpath
}
# auto set parameters defined in auto_set_param_list (adi_xilinx_device_info_enc.tcl)
proc adi_auto_assign_device_spec {cellpath} {
set ip [get_bd_cells $cellpath]
set ip_param_list [list_property $ip]
set ip_path [bd::get_vlnv_dir [get_property VLNV $ip]]
set parent_dir "../"
for {set x 1} {$x<=4} {incr x} {
set linkname ${ip_path}${parent_dir}scripts/adi_xilinx_device_info_enc.tcl
if { [file exists $linkname] } {
source ${ip_path}${parent_dir}/scripts/adi_xilinx_device_info_enc.tcl
break
}
append parent_dir "../"
}
# Find predefindes auto assignable parameters
foreach i $auto_set_param_list {
if { [lsearch $ip_param_list "CONFIG.$i"] > 0 } {
set val [adi_device_spec $cellpath $i]
set_property CONFIG.$i $val $ip
}
}
# Find predefindes auto assignable/overwritable parameters
foreach i $auto_set_param_list_overwritable {
if { [lsearch $ip_param_list "CONFIG.$i"] > 0 } {
set val [adi_device_spec $cellpath $i]
set_property CONFIG.$i $val $ip
}
}
}
+993
View File
@@ -0,0 +1,993 @@
<?xml version="1.0" encoding="UTF-8"?>
<spirit:component xmlns:xilinx="http://www.xilinx.com" xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<spirit:vendor>analog.com</spirit:vendor>
<spirit:library>user</spirit:library>
<spirit:name>axi_tdd</spirit:name>
<spirit:version>1.0</spirit:version>
<spirit:busInterfaces>
<spirit:busInterface>
<spirit:name>s_axi</spirit:name>
<spirit:busType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="aximm" spirit:version="1.0"/>
<spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="aximm_rtl" spirit:version="1.0"/>
<spirit:slave>
<spirit:memoryMapRef spirit:memoryMapRef="s_axi"/>
</spirit:slave>
<spirit:portMaps>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWADDR</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awaddr</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWPROT</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awprot</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWVALID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awvalid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWREADY</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awready</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WDATA</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_wdata</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WSTRB</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_wstrb</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WVALID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_wvalid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WREADY</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_wready</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>BRESP</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_bresp</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>BVALID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_bvalid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>BREADY</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_bready</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARADDR</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_araddr</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARPROT</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_arprot</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARVALID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_arvalid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARREADY</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_arready</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RDATA</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rdata</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RRESP</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rresp</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RVALID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rvalid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RREADY</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rready</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
</spirit:portMaps>
</spirit:busInterface>
<spirit:busInterface>
<spirit:name>s_axi_aclk</spirit:name>
<spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="clock" spirit:version="1.0"/>
<spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="clock_rtl" spirit:version="1.0"/>
<spirit:slave/>
<spirit:portMaps>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>CLK</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_aclk</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
</spirit:portMaps>
<spirit:parameters>
<spirit:parameter>
<spirit:name>ASSOCIATED_BUSIF</spirit:name>
<spirit:value spirit:id="BUSIFPARAM_VALUE.S_AXI_ACLK.ASSOCIATED_BUSIF">s_axi</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>ASSOCIATED_RESET</spirit:name>
<spirit:value spirit:id="BUSIFPARAM_VALUE.S_AXI_ACLK.ASSOCIATED_RESET">s_axi_aresetn</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:busInterface>
<spirit:busInterface>
<spirit:name>s_axi_aresetn</spirit:name>
<spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset" spirit:version="1.0"/>
<spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset_rtl" spirit:version="1.0"/>
<spirit:slave/>
<spirit:portMaps>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_aresetn</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
</spirit:portMaps>
<spirit:parameters>
<spirit:parameter>
<spirit:name>POLARITY</spirit:name>
<spirit:value spirit:id="BUSIFPARAM_VALUE.S_AXI_ARESETN.POLARITY" spirit:choiceRef="choice_list_74b5137e">ACTIVE_LOW</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:busInterface>
<spirit:busInterface>
<spirit:name>clk</spirit:name>
<spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="clock" spirit:version="1.0"/>
<spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="clock_rtl" spirit:version="1.0"/>
<spirit:slave/>
<spirit:portMaps>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>CLK</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>clk</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
</spirit:portMaps>
<spirit:parameters>
<spirit:parameter>
<spirit:name>ASSOCIATED_RESET</spirit:name>
<spirit:value spirit:id="BUSIFPARAM_VALUE.CLK.ASSOCIATED_RESET">rst</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:busInterface>
<spirit:busInterface>
<spirit:name>rst</spirit:name>
<spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset" spirit:version="1.0"/>
<spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset_rtl" spirit:version="1.0"/>
<spirit:slave/>
<spirit:portMaps>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>rst</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
</spirit:portMaps>
<spirit:parameters>
<spirit:parameter>
<spirit:name>POLARITY</spirit:name>
<spirit:value spirit:id="BUSIFPARAM_VALUE.RST.POLARITY">ACTIVE_HIGH</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:busInterface>
</spirit:busInterfaces>
<spirit:memoryMaps>
<spirit:memoryMap>
<spirit:name>s_axi</spirit:name>
<spirit:addressBlock>
<spirit:name>axi_lite</spirit:name>
<spirit:baseAddress spirit:format="long">0</spirit:baseAddress>
<spirit:range spirit:format="long">1024</spirit:range>
<spirit:width spirit:format="long">0</spirit:width>
</spirit:addressBlock>
</spirit:memoryMap>
</spirit:memoryMaps>
<spirit:model>
<spirit:views>
<spirit:view>
<spirit:name>xilinx_anylanguagesynthesis</spirit:name>
<spirit:displayName>Synthesis</spirit:displayName>
<spirit:envIdentifier>:vivado.xilinx.com:synthesis</spirit:envIdentifier>
<spirit:language>SystemVerilog</spirit:language>
<spirit:modelName>axi_tdd</spirit:modelName>
<spirit:fileSetRef>
<spirit:localName>xilinx_anylanguagesynthesis_view_fileset</spirit:localName>
</spirit:fileSetRef>
<spirit:parameters>
<spirit:parameter>
<spirit:name>viewChecksum</spirit:name>
<spirit:value>11c1d0ef</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:view>
<spirit:view>
<spirit:name>xilinx_anylanguagebehavioralsimulation</spirit:name>
<spirit:displayName>Simulation</spirit:displayName>
<spirit:envIdentifier>:vivado.xilinx.com:simulation</spirit:envIdentifier>
<spirit:language>SystemVerilog</spirit:language>
<spirit:modelName>axi_tdd</spirit:modelName>
<spirit:fileSetRef>
<spirit:localName>xilinx_anylanguagebehavioralsimulation_view_fileset</spirit:localName>
</spirit:fileSetRef>
<spirit:parameters>
<spirit:parameter>
<spirit:name>viewChecksum</spirit:name>
<spirit:value>11c1d0ef</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:view>
<spirit:view>
<spirit:name>xilinx_xpgui</spirit:name>
<spirit:displayName>UI Layout</spirit:displayName>
<spirit:envIdentifier>:vivado.xilinx.com:xgui.ui</spirit:envIdentifier>
<spirit:fileSetRef>
<spirit:localName>xilinx_xpgui_view_fileset</spirit:localName>
</spirit:fileSetRef>
<spirit:parameters>
<spirit:parameter>
<spirit:name>viewChecksum</spirit:name>
<spirit:value>931062b4</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:view>
</spirit:views>
<spirit:ports>
<spirit:port>
<spirit:name>clk</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>resetn</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>sync_in</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>sync_out</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>tdd_channel</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="(spirit:decode(id(&apos;MODELPARAM_VALUE.CHANNEL_COUNT&apos;)) - 1)">7</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_aresetn</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_aclk</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_awvalid</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_awaddr</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">9</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_awprot</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">2</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_awready</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_wvalid</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_wdata</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_wstrb</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">3</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">1</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_wready</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_bvalid</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_bresp</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">1</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_bready</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_arvalid</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_araddr</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">9</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_arprot</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">2</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_arready</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_rvalid</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_rresp</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">1</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_rdata</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_rready</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>logic</spirit:typeName>
<spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
</spirit:ports>
<spirit:modelParameters>
<spirit:modelParameter xsi:type="spirit:nameValueTypeType" spirit:dataType="integer">
<spirit:name>ID</spirit:name>
<spirit:displayName>Id</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.ID">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="integer">
<spirit:name>CHANNEL_COUNT</spirit:name>
<spirit:displayName>Channel Count</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.CHANNEL_COUNT">8</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="integer">
<spirit:name>DEFAULT_POLARITY</spirit:name>
<spirit:displayName>Default Polarity</spirit:displayName>
<spirit:value spirit:format="bitString" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.DEFAULT_POLARITY" spirit:bitStringLength="8">&quot;00000000&quot;</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="integer">
<spirit:name>REGISTER_WIDTH</spirit:name>
<spirit:displayName>Register Width</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.REGISTER_WIDTH">32</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="integer">
<spirit:name>BURST_COUNT_WIDTH</spirit:name>
<spirit:displayName>Burst Count Width</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.BURST_COUNT_WIDTH">32</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="integer">
<spirit:name>SYNC_INTERNAL</spirit:name>
<spirit:displayName>Sync Internal</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.SYNC_INTERNAL">1</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="integer">
<spirit:name>SYNC_EXTERNAL</spirit:name>
<spirit:displayName>Sync External</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.SYNC_EXTERNAL">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="integer">
<spirit:name>SYNC_EXTERNAL_CDC</spirit:name>
<spirit:displayName>Sync External Cdc</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.SYNC_EXTERNAL_CDC">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="integer">
<spirit:name>SYNC_COUNT_WIDTH</spirit:name>
<spirit:displayName>Sync Count Width</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.SYNC_COUNT_WIDTH">64</spirit:value>
</spirit:modelParameter>
</spirit:modelParameters>
</spirit:model>
<spirit:choices>
<spirit:choice>
<spirit:name>choice_list_74b5137e</spirit:name>
<spirit:enumeration>ACTIVE_HIGH</spirit:enumeration>
<spirit:enumeration>ACTIVE_LOW</spirit:enumeration>
</spirit:choice>
</spirit:choices>
<spirit:fileSets>
<spirit:fileSet>
<spirit:name>xilinx_anylanguagesynthesis_view_fileset</spirit:name>
<spirit:file>
<spirit:name>axi_tdd_constr.ttcl</spirit:name>
<spirit:userFileType>ttcl</spirit:userFileType>
</spirit:file>
<spirit:file>
<spirit:name>../util_cdc/sync_bits.v</spirit:name>
<spirit:fileType>verilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>../util_cdc/sync_data.v</spirit:name>
<spirit:fileType>verilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>../util_cdc/sync_event.v</spirit:name>
<spirit:fileType>verilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>../common/up_axi.v</spirit:name>
<spirit:fileType>verilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>axi_tdd_pkg.sv</spirit:name>
<spirit:fileType>systemVerilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>axi_tdd_channel.sv</spirit:name>
<spirit:fileType>systemVerilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>axi_tdd_counter.sv</spirit:name>
<spirit:fileType>systemVerilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>axi_tdd_regmap.sv</spirit:name>
<spirit:fileType>systemVerilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>axi_tdd_sync_gen.sv</spirit:name>
<spirit:fileType>systemVerilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>axi_tdd.sv</spirit:name>
<spirit:fileType>systemVerilogSource</spirit:fileType>
<spirit:userFileType>CHECKSUM_f31068f0</spirit:userFileType>
</spirit:file>
</spirit:fileSet>
<spirit:fileSet>
<spirit:name>xilinx_anylanguagebehavioralsimulation_view_fileset</spirit:name>
<spirit:file>
<spirit:name>../util_cdc/sync_bits.v</spirit:name>
<spirit:fileType>verilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>../util_cdc/sync_data.v</spirit:name>
<spirit:fileType>verilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>../util_cdc/sync_event.v</spirit:name>
<spirit:fileType>verilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>../common/up_axi.v</spirit:name>
<spirit:fileType>verilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>axi_tdd_pkg.sv</spirit:name>
<spirit:fileType>systemVerilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>axi_tdd_channel.sv</spirit:name>
<spirit:fileType>systemVerilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>axi_tdd_counter.sv</spirit:name>
<spirit:fileType>systemVerilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>axi_tdd_regmap.sv</spirit:name>
<spirit:fileType>systemVerilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>axi_tdd_sync_gen.sv</spirit:name>
<spirit:fileType>systemVerilogSource</spirit:fileType>
</spirit:file>
<spirit:file>
<spirit:name>axi_tdd.sv</spirit:name>
<spirit:fileType>systemVerilogSource</spirit:fileType>
</spirit:file>
</spirit:fileSet>
<spirit:fileSet>
<spirit:name>xilinx_xpgui_view_fileset</spirit:name>
<spirit:file>
<spirit:name>xgui/axi_tdd_v1_0.tcl</spirit:name>
<spirit:fileType>tclSource</spirit:fileType>
<spirit:userFileType>CHECKSUM_931062b4</spirit:userFileType>
<spirit:userFileType>XGUI_VERSION_2</spirit:userFileType>
</spirit:file>
</spirit:fileSet>
</spirit:fileSets>
<spirit:description>ADI AXI TDD Controller</spirit:description>
<spirit:parameters>
<spirit:parameter>
<spirit:name>ID</spirit:name>
<spirit:displayName>Id</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.ID">0</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>CHANNEL_COUNT</spirit:name>
<spirit:displayName>Channel Count</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.CHANNEL_COUNT" spirit:minimum="1" spirit:maximum="32" spirit:rangeType="long">8</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>DEFAULT_POLARITY</spirit:name>
<spirit:displayName>Default Polarity</spirit:displayName>
<spirit:value spirit:format="bitString" spirit:resolve="user" spirit:id="PARAM_VALUE.DEFAULT_POLARITY" spirit:bitStringLength="8">&quot;00000000&quot;</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>REGISTER_WIDTH</spirit:name>
<spirit:displayName>Register Width</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.REGISTER_WIDTH" spirit:minimum="8" spirit:maximum="32" spirit:rangeType="long">32</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>BURST_COUNT_WIDTH</spirit:name>
<spirit:displayName>Burst Count Width</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.BURST_COUNT_WIDTH" spirit:minimum="8" spirit:maximum="32" spirit:rangeType="long">32</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>SYNC_INTERNAL</spirit:name>
<spirit:displayName>Sync Internal</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.SYNC_INTERNAL" spirit:minimum="0" spirit:maximum="1" spirit:rangeType="long">1</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>SYNC_EXTERNAL</spirit:name>
<spirit:displayName>Sync External</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.SYNC_EXTERNAL" spirit:minimum="0" spirit:maximum="1" spirit:rangeType="long">0</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>SYNC_EXTERNAL_CDC</spirit:name>
<spirit:displayName>Sync External Cdc</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.SYNC_EXTERNAL_CDC" spirit:minimum="0" spirit:maximum="1" spirit:rangeType="long">0</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>SYNC_COUNT_WIDTH</spirit:name>
<spirit:displayName>Sync Count Width</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.SYNC_COUNT_WIDTH" spirit:minimum="0" spirit:maximum="64" spirit:rangeType="long">64</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Component_Name</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Component_Name" spirit:order="1">axi_tdd_v1_0</spirit:value>
</spirit:parameter>
</spirit:parameters>
<spirit:vendorExtensions>
<xilinx:coreExtensions>
<xilinx:supportedFamilies>
<xilinx:family xilinx:lifeCycle="Production">virtex7</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">qvirtex7</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">versal</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">kintex7</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">kintex7l</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">qkintex7</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">qkintex7l</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">akintex7</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">artix7</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">artix7l</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">aartix7</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">qartix7</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">zynq</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">qzynq</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">azynq</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">spartan7</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">aspartan7</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">virtexu</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">zynquplus</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">virtexuplus</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">virtexuplusHBM</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">virtexuplus58g</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">kintexuplus</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">artixuplus</xilinx:family>
<xilinx:family xilinx:lifeCycle="Production">kintexu</xilinx:family>
</xilinx:supportedFamilies>
<xilinx:taxonomies>
<xilinx:taxonomy>/Analog_Devices</xilinx:taxonomy>
</xilinx:taxonomies>
<xilinx:displayName>ADI AXI TDD Controller</xilinx:displayName>
<xilinx:autoFamilySupportLevel>level_2</xilinx:autoFamilySupportLevel>
<xilinx:definitionSource>package_project</xilinx:definitionSource>
<xilinx:vendorDisplayName>Analog Devices</xilinx:vendorDisplayName>
<xilinx:vendorURL>https://wiki.analog.com/resources/fpga/docs/axi_tdd</xilinx:vendorURL>
<xilinx:coreRevision>1</xilinx:coreRevision>
<xilinx:coreCreationDateTime>2024-01-14T03:49:32Z</xilinx:coreCreationDateTime>
</xilinx:coreExtensions>
<xilinx:packagingInfo>
<xilinx:xilinxVersion>2023.2.1</xilinx:xilinxVersion>
<xilinx:checksum xilinx:scope="fileGroups" xilinx:value="e650ae53"/>
<xilinx:checksum xilinx:scope="ports" xilinx:value="4486eeef"/>
<xilinx:checksum xilinx:scope="hdlParameters" xilinx:value="469eb6c3"/>
<xilinx:checksum xilinx:scope="parameters" xilinx:value="7e7c1c9e"/>
</xilinx:packagingInfo>
</spirit:vendorExtensions>
</spirit:component>
+67
View File
@@ -0,0 +1,67 @@
###############################################################################
## Copyright (C) 2022-2023 Analog Devices, Inc. All rights reserved.
### SPDX short identifier: ADIBSD
###############################################################################
proc ad_tdd_gen_create {ip_name
num_of_channels
{default_polarity 0}
{reg_counter_width 32}
{burst_counter_width 32}
{sync_counter_width 64}
{sync_internal 1}
{sync_external 0}
{sync_external_cdc 0}} {
create_bd_cell -type hier $ip_name
# Control interface
create_bd_pin -dir I -type clk "${ip_name}/s_axi_aclk"
create_bd_pin -dir I -type rst "${ip_name}/s_axi_aresetn"
create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:aximm_rtl:1.0 "${ip_name}/s_axi"
# Device interface
create_bd_pin -dir I -type clk "${ip_name}/clk"
create_bd_pin -dir I -type rst "${ip_name}/resetn"
create_bd_pin -dir I "${ip_name}/sync_in"
create_bd_pin -dir O "${ip_name}/sync_out"
for {set i 0} {$i < $num_of_channels} {incr i} {
create_bd_pin -dir O "${ip_name}/tdd_channel_${i}"
}
# Generic TDD core
ad_ip_instance axi_tdd "${ip_name}/tdd_core" [list \
CHANNEL_COUNT $num_of_channels \
DEFAULT_POLARITY $default_polarity \
REGISTER_WIDTH $reg_counter_width \
BURST_COUNT_WIDTH $burst_counter_width \
SYNC_COUNT_WIDTH $sync_counter_width \
SYNC_INTERNAL $sync_internal \
SYNC_EXTERNAL $sync_external \
SYNC_EXTERNAL_CDC $sync_external_cdc
]
for {set i 0} {$i < $num_of_channels} {incr i} {
ad_ip_instance xlslice "${ip_name}/tdd_ch_slice_${i}" [list \
DIN_WIDTH $num_of_channels \
DIN_FROM $i \
DIN_TO $i \
]
}
# Create connections
ad_connect "${ip_name}/s_axi_aclk" "${ip_name}/tdd_core/s_axi_aclk"
ad_connect "${ip_name}/s_axi_aresetn" "${ip_name}/tdd_core/s_axi_aresetn"
ad_connect "${ip_name}/s_axi" "${ip_name}/tdd_core/s_axi"
ad_connect ${ip_name}/tdd_core/clk ${ip_name}/clk
ad_connect ${ip_name}/tdd_core/resetn ${ip_name}/resetn
ad_connect ${ip_name}/tdd_core/sync_in ${ip_name}/sync_in
ad_connect ${ip_name}/tdd_core/sync_out ${ip_name}/sync_out
for {set i 0} {$i < $num_of_channels} {incr i} {
ad_connect ${ip_name}/tdd_core/tdd_channel ${ip_name}/tdd_ch_slice_$i/Din
ad_connect ${ip_name}/tdd_ch_slice_$i/Dout ${ip_name}/tdd_channel_$i
}
}
@@ -0,0 +1,2 @@
CLEAN_TARGET += bd
CLEAN_TARGET += temporary_case_dependencies.mk
+145
View File
@@ -0,0 +1,145 @@
# Definitional proc to organize widgets for parameters.
proc init_gui { IPINST } {
ipgui::add_param $IPINST -name "Component_Name"
#Adding Page
set Page_0 [ipgui::add_page $IPINST -name "Page 0"]
ipgui::add_param $IPINST -name "BURST_COUNT_WIDTH" -parent ${Page_0}
ipgui::add_param $IPINST -name "CHANNEL_COUNT" -parent ${Page_0}
ipgui::add_param $IPINST -name "DEFAULT_POLARITY" -parent ${Page_0}
ipgui::add_param $IPINST -name "ID" -parent ${Page_0}
ipgui::add_param $IPINST -name "REGISTER_WIDTH" -parent ${Page_0}
ipgui::add_param $IPINST -name "SYNC_COUNT_WIDTH" -parent ${Page_0}
ipgui::add_param $IPINST -name "SYNC_EXTERNAL" -parent ${Page_0}
ipgui::add_param $IPINST -name "SYNC_EXTERNAL_CDC" -parent ${Page_0}
ipgui::add_param $IPINST -name "SYNC_INTERNAL" -parent ${Page_0}
}
proc update_PARAM_VALUE.BURST_COUNT_WIDTH { PARAM_VALUE.BURST_COUNT_WIDTH } {
# Procedure called to update BURST_COUNT_WIDTH when any of the dependent parameters in the arguments change
}
proc validate_PARAM_VALUE.BURST_COUNT_WIDTH { PARAM_VALUE.BURST_COUNT_WIDTH } {
# Procedure called to validate BURST_COUNT_WIDTH
return true
}
proc update_PARAM_VALUE.CHANNEL_COUNT { PARAM_VALUE.CHANNEL_COUNT } {
# Procedure called to update CHANNEL_COUNT when any of the dependent parameters in the arguments change
}
proc validate_PARAM_VALUE.CHANNEL_COUNT { PARAM_VALUE.CHANNEL_COUNT } {
# Procedure called to validate CHANNEL_COUNT
return true
}
proc update_PARAM_VALUE.DEFAULT_POLARITY { PARAM_VALUE.DEFAULT_POLARITY } {
# Procedure called to update DEFAULT_POLARITY when any of the dependent parameters in the arguments change
}
proc validate_PARAM_VALUE.DEFAULT_POLARITY { PARAM_VALUE.DEFAULT_POLARITY } {
# Procedure called to validate DEFAULT_POLARITY
return true
}
proc update_PARAM_VALUE.ID { PARAM_VALUE.ID } {
# Procedure called to update ID when any of the dependent parameters in the arguments change
}
proc validate_PARAM_VALUE.ID { PARAM_VALUE.ID } {
# Procedure called to validate ID
return true
}
proc update_PARAM_VALUE.REGISTER_WIDTH { PARAM_VALUE.REGISTER_WIDTH } {
# Procedure called to update REGISTER_WIDTH when any of the dependent parameters in the arguments change
}
proc validate_PARAM_VALUE.REGISTER_WIDTH { PARAM_VALUE.REGISTER_WIDTH } {
# Procedure called to validate REGISTER_WIDTH
return true
}
proc update_PARAM_VALUE.SYNC_COUNT_WIDTH { PARAM_VALUE.SYNC_COUNT_WIDTH } {
# Procedure called to update SYNC_COUNT_WIDTH when any of the dependent parameters in the arguments change
}
proc validate_PARAM_VALUE.SYNC_COUNT_WIDTH { PARAM_VALUE.SYNC_COUNT_WIDTH } {
# Procedure called to validate SYNC_COUNT_WIDTH
return true
}
proc update_PARAM_VALUE.SYNC_EXTERNAL { PARAM_VALUE.SYNC_EXTERNAL } {
# Procedure called to update SYNC_EXTERNAL when any of the dependent parameters in the arguments change
}
proc validate_PARAM_VALUE.SYNC_EXTERNAL { PARAM_VALUE.SYNC_EXTERNAL } {
# Procedure called to validate SYNC_EXTERNAL
return true
}
proc update_PARAM_VALUE.SYNC_EXTERNAL_CDC { PARAM_VALUE.SYNC_EXTERNAL_CDC } {
# Procedure called to update SYNC_EXTERNAL_CDC when any of the dependent parameters in the arguments change
}
proc validate_PARAM_VALUE.SYNC_EXTERNAL_CDC { PARAM_VALUE.SYNC_EXTERNAL_CDC } {
# Procedure called to validate SYNC_EXTERNAL_CDC
return true
}
proc update_PARAM_VALUE.SYNC_INTERNAL { PARAM_VALUE.SYNC_INTERNAL } {
# Procedure called to update SYNC_INTERNAL when any of the dependent parameters in the arguments change
}
proc validate_PARAM_VALUE.SYNC_INTERNAL { PARAM_VALUE.SYNC_INTERNAL } {
# Procedure called to validate SYNC_INTERNAL
return true
}
proc update_MODELPARAM_VALUE.ID { MODELPARAM_VALUE.ID PARAM_VALUE.ID } {
# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
set_property value [get_property value ${PARAM_VALUE.ID}] ${MODELPARAM_VALUE.ID}
}
proc update_MODELPARAM_VALUE.CHANNEL_COUNT { MODELPARAM_VALUE.CHANNEL_COUNT PARAM_VALUE.CHANNEL_COUNT } {
# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
set_property value [get_property value ${PARAM_VALUE.CHANNEL_COUNT}] ${MODELPARAM_VALUE.CHANNEL_COUNT}
}
proc update_MODELPARAM_VALUE.DEFAULT_POLARITY { MODELPARAM_VALUE.DEFAULT_POLARITY PARAM_VALUE.DEFAULT_POLARITY } {
# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
set_property value [get_property value ${PARAM_VALUE.DEFAULT_POLARITY}] ${MODELPARAM_VALUE.DEFAULT_POLARITY}
}
proc update_MODELPARAM_VALUE.REGISTER_WIDTH { MODELPARAM_VALUE.REGISTER_WIDTH PARAM_VALUE.REGISTER_WIDTH } {
# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
set_property value [get_property value ${PARAM_VALUE.REGISTER_WIDTH}] ${MODELPARAM_VALUE.REGISTER_WIDTH}
}
proc update_MODELPARAM_VALUE.BURST_COUNT_WIDTH { MODELPARAM_VALUE.BURST_COUNT_WIDTH PARAM_VALUE.BURST_COUNT_WIDTH } {
# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
set_property value [get_property value ${PARAM_VALUE.BURST_COUNT_WIDTH}] ${MODELPARAM_VALUE.BURST_COUNT_WIDTH}
}
proc update_MODELPARAM_VALUE.SYNC_INTERNAL { MODELPARAM_VALUE.SYNC_INTERNAL PARAM_VALUE.SYNC_INTERNAL } {
# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
set_property value [get_property value ${PARAM_VALUE.SYNC_INTERNAL}] ${MODELPARAM_VALUE.SYNC_INTERNAL}
}
proc update_MODELPARAM_VALUE.SYNC_EXTERNAL { MODELPARAM_VALUE.SYNC_EXTERNAL PARAM_VALUE.SYNC_EXTERNAL } {
# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
set_property value [get_property value ${PARAM_VALUE.SYNC_EXTERNAL}] ${MODELPARAM_VALUE.SYNC_EXTERNAL}
}
proc update_MODELPARAM_VALUE.SYNC_EXTERNAL_CDC { MODELPARAM_VALUE.SYNC_EXTERNAL_CDC PARAM_VALUE.SYNC_EXTERNAL_CDC } {
# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
set_property value [get_property value ${PARAM_VALUE.SYNC_EXTERNAL_CDC}] ${MODELPARAM_VALUE.SYNC_EXTERNAL_CDC}
}
proc update_MODELPARAM_VALUE.SYNC_COUNT_WIDTH { MODELPARAM_VALUE.SYNC_COUNT_WIDTH PARAM_VALUE.SYNC_COUNT_WIDTH } {
# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
set_property value [get_property value ${PARAM_VALUE.SYNC_COUNT_WIDTH}] ${MODELPARAM_VALUE.SYNC_COUNT_WIDTH}
}