From 2326ee4ef0209edb2e3f51a0921bfdb505c321da Mon Sep 17 00:00:00 2001 From: Erik Kooistra <kooistra@astron.nl> Date: Fri, 22 May 2015 15:57:26 +0000 Subject: [PATCH] Added fractional PLL IP with similar c0, c1 and c2 as the pll_clk200 IO PLL. --- .../fractional_pll_clk200/compile_ip.tcl | 49 ++++ .../fractional_pll_clk200/generate_ip.sh | 44 ++++ .../fractional_pll_clk200/hdllib.cfg | 16 ++ .../ip_arria10_fractional_pll_clk200.qsys | 210 ++++++++++++++++++ 4 files changed, 319 insertions(+) create mode 100644 libraries/technology/ip_arria10/fractional_pll_clk200/compile_ip.tcl create mode 100755 libraries/technology/ip_arria10/fractional_pll_clk200/generate_ip.sh create mode 100644 libraries/technology/ip_arria10/fractional_pll_clk200/hdllib.cfg create mode 100644 libraries/technology/ip_arria10/fractional_pll_clk200/ip_arria10_fractional_pll_clk200.qsys diff --git a/libraries/technology/ip_arria10/fractional_pll_clk200/compile_ip.tcl b/libraries/technology/ip_arria10/fractional_pll_clk200/compile_ip.tcl new file mode 100644 index 0000000000..032b1953a9 --- /dev/null +++ b/libraries/technology/ip_arria10/fractional_pll_clk200/compile_ip.tcl @@ -0,0 +1,49 @@ +#------------------------------------------------------------------------------ +# +# Copyright (C) 2014 +# ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/> +# JIVE (Joint Institute for VLBI in Europe) <http://www.jive.nl/> +# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program 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. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +#------------------------------------------------------------------------------ + +# This file is based on generated file mentor/msim_setup.tcl. +# - the values for modelsim_search_libraries key in the hdllib.cfg follow from altera libraries vmap section in the msim_setup.tcl +# - vmap for the IP specific libraries and compile all IP source files into those libraries similar as in the msim_setup.tcl +# - replace QSYS_SIMDIR by IP_DIR +# - if the testbench is also generated with QSYS then only the IP_TBDIR files are needed, because these also contain the source files. + +set IP_DIR "$env(RADIOHDL)/libraries/technology/ip_arria10/fractional_pll_clk200/generated/sim" + +#vlib ./work/ ;# Assume library work already exists + +vmap ip_arria10_fractional_pll_clk200_altera_xcvr_fpll_a10_150 ./work/ + + vlog -sv "$IP_DIR/../altera_xcvr_fpll_a10_150/sim/twentynm_xcvr_avmm.sv" -work ip_arria10_fractional_pll_clk200_altera_xcvr_fpll_a10_150 + vlog -sv "$IP_DIR/../altera_xcvr_fpll_a10_150/sim/mentor/twentynm_xcvr_avmm.sv" -work ip_arria10_fractional_pll_clk200_altera_xcvr_fpll_a10_150 + vlog -sv "$IP_DIR/../altera_xcvr_fpll_a10_150/sim/alt_xcvr_resync.sv" -work ip_arria10_fractional_pll_clk200_altera_xcvr_fpll_a10_150 + vlog -sv "$IP_DIR/../altera_xcvr_fpll_a10_150/sim/mentor/alt_xcvr_resync.sv" -work ip_arria10_fractional_pll_clk200_altera_xcvr_fpll_a10_150 + vlog -sv "$IP_DIR/../altera_xcvr_fpll_a10_150/sim/altera_xcvr_fpll_a10.sv" -work ip_arria10_fractional_pll_clk200_altera_xcvr_fpll_a10_150 + vlog -sv "$IP_DIR/../altera_xcvr_fpll_a10_150/sim/mentor/altera_xcvr_fpll_a10.sv" -work ip_arria10_fractional_pll_clk200_altera_xcvr_fpll_a10_150 + vlog -sv "$IP_DIR/../altera_xcvr_fpll_a10_150/sim/a10_avmm_h.sv" -work ip_arria10_fractional_pll_clk200_altera_xcvr_fpll_a10_150 + vlog -sv "$IP_DIR/../altera_xcvr_fpll_a10_150/sim/alt_xcvr_native_avmm_nf.sv" -work ip_arria10_fractional_pll_clk200_altera_xcvr_fpll_a10_150 + vlog -sv "$IP_DIR/../altera_xcvr_fpll_a10_150/sim/alt_xcvr_pll_embedded_debug.sv" -work ip_arria10_fractional_pll_clk200_altera_xcvr_fpll_a10_150 + vlog -sv "$IP_DIR/../altera_xcvr_fpll_a10_150/sim/alt_xcvr_pll_avmm_csr.sv" -work ip_arria10_fractional_pll_clk200_altera_xcvr_fpll_a10_150 + vlog -sv "$IP_DIR/../altera_xcvr_fpll_a10_150/sim/mentor/alt_xcvr_pll_embedded_debug.sv" -work ip_arria10_fractional_pll_clk200_altera_xcvr_fpll_a10_150 + vlog -sv "$IP_DIR/../altera_xcvr_fpll_a10_150/sim/mentor/alt_xcvr_pll_avmm_csr.sv" -work ip_arria10_fractional_pll_clk200_altera_xcvr_fpll_a10_150 + vcom "$IP_DIR/ip_arria10_fractional_pll_clk200.vhd" + + diff --git a/libraries/technology/ip_arria10/fractional_pll_clk200/generate_ip.sh b/libraries/technology/ip_arria10/fractional_pll_clk200/generate_ip.sh new file mode 100755 index 0000000000..f13fa2ffe3 --- /dev/null +++ b/libraries/technology/ip_arria10/fractional_pll_clk200/generate_ip.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# -------------------------------------------------------------------------- # +# +# Copyright (C) 2014 +# ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/> +# JIVE (Joint Institute for VLBI in Europe) <http://www.jive.nl/> +# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program 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. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +# -------------------------------------------------------------------------- # +# +# Purpose: Generate IP with Qsys +# Description: +# Generate the IP in a separate generated/ subdirectory. +# +# Usage: +# +# ./generate_ip.sh +# + +# Tool settings for selected target "unb2" with arria10 +. ${RADIOHDL}/tools/quartus/set_quartus unb2 + +#qsys-generate --help + +# Only generate the source IP +# - use --synthesis=VHDL to have top level in VHDL similar as with MegaWizard +qsys-generate ip_arria10_fractional_pll_clk200.qsys \ + --synthesis=VHDL \ + --simulation=VHDL \ + --output-directory=generated \ + --allow-mixed-language-simulation diff --git a/libraries/technology/ip_arria10/fractional_pll_clk200/hdllib.cfg b/libraries/technology/ip_arria10/fractional_pll_clk200/hdllib.cfg new file mode 100644 index 0000000000..5ff81486b4 --- /dev/null +++ b/libraries/technology/ip_arria10/fractional_pll_clk200/hdllib.cfg @@ -0,0 +1,16 @@ +hdl_lib_name = ip_arria10_fractional_pll_clk200 +hdl_library_clause_name = ip_arria10_fractional_pll_clk200_altera_xcvr_fpll_a10_150 +hdl_lib_uses_synth = +hdl_lib_uses_sim = + +hdl_lib_technology = ip_arria10 + +modelsim_compile_ip_files = + $RADIOHDL/libraries/technology/ip_arria10/fractional_pll_clk200/compile_ip.tcl + +synth_files = + +test_bench_files = + +quartus_qip_files = + generated/ip_arria10_fractional_pll_clk200.qip diff --git a/libraries/technology/ip_arria10/fractional_pll_clk200/ip_arria10_fractional_pll_clk200.qsys b/libraries/technology/ip_arria10/fractional_pll_clk200/ip_arria10_fractional_pll_clk200.qsys new file mode 100644 index 0000000000..5917cad035 --- /dev/null +++ b/libraries/technology/ip_arria10/fractional_pll_clk200/ip_arria10_fractional_pll_clk200.qsys @@ -0,0 +1,210 @@ +<?xml version="1.0" encoding="UTF-8"?> +<system name="$${FILENAME}"> + <component + name="$${FILENAME}" + displayName="$${FILENAME}" + version="1.0" + description="" + tags="INTERNAL_COMPONENT=true" + categories="System" /> + <parameter name="bonusData"><![CDATA[bonusData +{ + element $${FILENAME} + { + datum _originalDeviceFamily + { + value = "Arria 10"; + type = "String"; + } + } + element xcvr_fpll_a10_0 + { + datum _sortIndex + { + value = "0"; + type = "int"; + } + } +} +]]></parameter> + <parameter name="clockCrossingAdapter" value="HANDSHAKE" /> + <parameter name="device" value="10AX115U4F45I3SGES" /> + <parameter name="deviceFamily" value="Arria 10" /> + <parameter name="deviceSpeedGrade" value="3" /> + <parameter name="fabricMode" value="QSYS" /> + <parameter name="generateLegacySim" value="false" /> + <parameter name="generationId" value="0" /> + <parameter name="globalResetBus" value="false" /> + <parameter name="hdlLanguage" value="VERILOG" /> + <parameter name="hideFromIPCatalog" value="true" /> + <parameter name="lockedInterfaceDefinition" value="" /> + <parameter name="maxAdditionalLatency" value="1" /> + <parameter name="projectName" value="" /> + <parameter name="sopcBorderPoints" value="false" /> + <parameter name="systemHash" value="0" /> + <parameter name="testBenchDutName" value="" /> + <parameter name="timeStamp" value="0" /> + <parameter name="useTestBenchNamingPattern" value="false" /> + <instanceScript></instanceScript> + <interface + name="hssi_pll_cascade_clk" + internal="xcvr_fpll_a10_0.hssi_pll_cascade_clk" /> + <interface + name="outclk0" + internal="xcvr_fpll_a10_0.outclk0" + type="clock" + dir="start"> + <port name="outclk0" internal="outclk0" /> + </interface> + <interface + name="outclk1" + internal="xcvr_fpll_a10_0.outclk1" + type="clock" + dir="start"> + <port name="outclk1" internal="outclk1" /> + </interface> + <interface + name="outclk2" + internal="xcvr_fpll_a10_0.outclk2" + type="clock" + dir="start"> + <port name="outclk2" internal="outclk2" /> + </interface> + <interface + name="pll_cal_busy" + internal="xcvr_fpll_a10_0.pll_cal_busy" + type="conduit" + dir="end"> + <port name="pll_cal_busy" internal="pll_cal_busy" /> + </interface> + <interface + name="pll_locked" + internal="xcvr_fpll_a10_0.pll_locked" + type="conduit" + dir="end"> + <port name="pll_locked" internal="pll_locked" /> + </interface> + <interface + name="pll_powerdown" + internal="xcvr_fpll_a10_0.pll_powerdown" + type="conduit" + dir="end"> + <port name="pll_powerdown" internal="pll_powerdown" /> + </interface> + <interface + name="pll_refclk0" + internal="xcvr_fpll_a10_0.pll_refclk0" + type="clock" + dir="end"> + <port name="pll_refclk0" internal="pll_refclk0" /> + </interface> + <interface name="tx_serial_clk" internal="xcvr_fpll_a10_0.tx_serial_clk" /> + <module + name="xcvr_fpll_a10_0" + kind="altera_xcvr_fpll_a10" + version="15.0" + enabled="1" + autoexport="1"> + <parameter name="base_device" value="NIGHTFURY5ES" /> + <parameter name="enable_bonding_clks" value="0" /> + <parameter name="enable_cascade_in" value="0" /> + <parameter name="enable_fb_comp_bonding" value="0" /> + <parameter name="enable_hfreq_clk" value="0" /> + <parameter name="enable_mcgb" value="0" /> + <parameter name="enable_mcgb_pcie_clksw" value="0" /> + <parameter name="enable_pld_mcgb_cal_busy_port" value="0" /> + <parameter name="enable_pll_reconfig" value="0" /> + <parameter name="generate_add_hdl_instance_example" value="0" /> + <parameter name="generate_docs" value="1" /> + <parameter name="gui_actual_outclk0_frequency" value="100.0" /> + <parameter name="gui_actual_outclk1_frequency" value="100.0" /> + <parameter name="gui_actual_outclk2_frequency" value="100.0" /> + <parameter name="gui_actual_outclk3_frequency" value="100.0" /> + <parameter name="gui_actual_refclk_frequency" value="100.0" /> + <parameter name="gui_bw_sel" value="low" /> + <parameter name="gui_cascade_outclk_index" value="0" /> + <parameter name="gui_desired_hssi_cascade_frequency" value="100.0" /> + <parameter name="gui_desired_outclk0_frequency" value="200.0" /> + <parameter name="gui_desired_outclk1_frequency" value="200.0" /> + <parameter name="gui_desired_outclk2_frequency" value="400.0" /> + <parameter name="gui_desired_outclk3_frequency" value="100.0" /> + <parameter name="gui_desired_refclk_frequency" value="200.0" /> + <parameter name="gui_enable_active_clk" value="false" /> + <parameter name="gui_enable_cascade_out" value="false" /> + <parameter name="gui_enable_clk_bad" value="false" /> + <parameter name="gui_enable_dps" value="false" /> + <parameter name="gui_enable_fractional" value="false" /> + <parameter name="gui_enable_hip_cal_done_port" value="0" /> + <parameter name="gui_enable_manual_config" value="false" /> + <parameter name="gui_enable_manual_hssi_counters" value="false" /> + <parameter name="gui_enable_pld_cal_busy_port" value="1" /> + <parameter name="gui_fpll_mode" value="0" /> + <parameter name="gui_fractional_x" value="32" /> + <parameter name="gui_hip_cal_en" value="0" /> + <parameter name="gui_hssi_output_clock_frequency" value="1250.0" /> + <parameter name="gui_hssi_prot_mode" value="0" /> + <parameter name="gui_iqtxrxclk_outclk_index" value="0" /> + <parameter name="gui_number_of_output_clocks" value="3" /> + <parameter name="gui_operation_mode" value="0" /> + <parameter name="gui_outclk0_actual_phase_shift" value="0.0" /> + <parameter name="gui_outclk0_actual_phase_shift_deg" value="0.0" /> + <parameter name="gui_outclk0_desired_phase_shift" value="0.0" /> + <parameter name="gui_outclk0_phase_shift_unit" value="0" /> + <parameter name="gui_outclk1_actual_phase_shift" value="0.0" /> + <parameter name="gui_outclk1_actual_phase_shift_deg" value="0.0" /> + <parameter name="gui_outclk1_desired_phase_shift" value="90" /> + <parameter name="gui_outclk1_phase_shift_unit" value="1" /> + <parameter name="gui_outclk2_actual_phase_shift" value="0 ps" /> + <parameter name="gui_outclk2_actual_phase_shift_deg" value="0 deg" /> + <parameter name="gui_outclk2_desired_phase_shift" value="0" /> + <parameter name="gui_outclk2_phase_shift_unit" value="0" /> + <parameter name="gui_outclk3_actual_phase_shift" value="0.0" /> + <parameter name="gui_outclk3_actual_phase_shift_deg" value="0.0" /> + <parameter name="gui_outclk3_desired_phase_shift" value="0" /> + <parameter name="gui_outclk3_phase_shift_unit" value="0" /> + <parameter name="gui_pll_c_counter_0" value="1" /> + <parameter name="gui_pll_c_counter_1" value="1" /> + <parameter name="gui_pll_c_counter_2" value="1" /> + <parameter name="gui_pll_c_counter_3" value="1" /> + <parameter name="gui_pll_dsm_fractional_division" value="1" /> + <parameter name="gui_pll_m_counter" value="1" /> + <parameter name="gui_pll_n_counter" value="1" /> + <parameter name="gui_pll_set_hssi_k_counter" value="1" /> + <parameter name="gui_pll_set_hssi_l_counter" value="1" /> + <parameter name="gui_pll_set_hssi_m_counter" value="1" /> + <parameter name="gui_pll_set_hssi_n_counter" value="1" /> + <parameter name="gui_refclk1_frequency" value="100.0" /> + <parameter name="gui_refclk_cnt" value="1" /> + <parameter name="gui_refclk_index" value="0" /> + <parameter name="gui_refclk_switch" value="false" /> + <parameter name="gui_reference_clock_frequency" value="200.0" /> + <parameter name="gui_self_reset_enabled" value="false" /> + <parameter name="gui_switchover_delay" value="0" /> + <parameter name="gui_switchover_mode">Automatic Switchover</parameter> + <parameter name="mcgb_aux_clkin_cnt" value="0" /> + <parameter name="mcgb_div" value="1" /> + <parameter name="pma_width" value="64" /> + <parameter name="rcfg_debug" value="0" /> + <parameter name="rcfg_file_prefix">altera_xcvr_fpll_a10</parameter> + <parameter name="rcfg_h_file_enable" value="0" /> + <parameter name="rcfg_jtag_enable" value="0" /> + <parameter name="rcfg_mif_file_enable" value="0" /> + <parameter name="rcfg_multi_enable" value="0" /> + <parameter name="rcfg_param_vals1" value="" /> + <parameter name="rcfg_param_vals2" value="" /> + <parameter name="rcfg_profile_cnt" value="2" /> + <parameter name="rcfg_profile_select" value="1" /> + <parameter name="rcfg_sv_file_enable" value="0" /> + <parameter name="rcfg_txt_file_enable" value="0" /> + <parameter name="set_altera_xcvr_fpll_a10_calibration_en" value="1" /> + <parameter name="set_capability_reg_enable" value="0" /> + <parameter name="set_csr_soft_logic_enable" value="0" /> + <parameter name="set_user_identifier" value="0" /> + <parameter name="silicon_rev" value="false" /> + <parameter name="support_mode" value="user_mode" /> + </module> + <interconnectRequirement for="$system" name="qsys_mm.clockCrossingAdapter" value="HANDSHAKE" /> + <interconnectRequirement for="$system" name="qsys_mm.enableEccProtection" value="FALSE" /> + <interconnectRequirement for="$system" name="qsys_mm.insertDefaultSlave" value="FALSE" /> + <interconnectRequirement for="$system" name="qsys_mm.maxAdditionalLatency" value="1" /> +</system> -- GitLab