Revision 326
Added by markw over 10 years ago
| papilioduo/pll/pll.gise | ||
|---|---|---|
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||
|
<generated_project xmlns="http://www.xilinx.com/XMLSchema" xmlns:xil_pn="http://www.xilinx.com/XMLSchema">
|
||
|
|
||
|
<!-- -->
|
||
|
|
||
|
<!-- For tool use only. Do not edit. -->
|
||
|
|
||
|
<!-- -->
|
||
|
|
||
|
<!-- ProjectNavigator created generated project file. -->
|
||
|
|
||
|
<!-- For use in tracking generated file and other information -->
|
||
|
|
||
|
<!-- allowing preservation of process status. -->
|
||
|
|
||
|
<!-- -->
|
||
|
|
||
|
<!-- Copyright (c) 1995-2013 Xilinx, Inc. All rights reserved. -->
|
||
|
|
||
|
<version xmlns="http://www.xilinx.com/XMLSchema">11.1</version>
|
||
|
|
||
|
<sourceproject xmlns="http://www.xilinx.com/XMLSchema" xil_pn:fileType="FILE_XISE" xil_pn:name="pll.xise"/>
|
||
|
|
||
|
<files xmlns="http://www.xilinx.com/XMLSchema">
|
||
|
<file xil_pn:fileType="FILE_ASY" xil_pn:name="pll.asy" xil_pn:origination="imported"/>
|
||
|
<file xil_pn:fileType="FILE_VHO" xil_pn:name="pll.vho" xil_pn:origination="imported"/>
|
||
|
</files>
|
||
|
|
||
|
<transforms xmlns="http://www.xilinx.com/XMLSchema"/>
|
||
|
|
||
|
</generated_project>
|
||
| papilioduo/pll/edit_pll.tcl | ||
|---|---|---|
|
##
|
||
|
## Core Generator Run Script, generator for Project Navigator edit command
|
||
|
##
|
||
|
|
||
|
proc findRtfPath { relativePath } {
|
||
|
set xilenv ""
|
||
|
if { [info exists ::env(XILINX) ] } {
|
||
|
if { [info exists ::env(MYXILINX)] } {
|
||
|
set xilenv [join [list $::env(MYXILINX) $::env(XILINX)] $::xilinx::path_sep ]
|
||
|
} else {
|
||
|
set xilenv $::env(XILINX)
|
||
|
}
|
||
|
}
|
||
|
foreach path [ split $xilenv $::xilinx::path_sep ] {
|
||
|
set fullPath [ file join $path $relativePath ]
|
||
|
if { [ file exists $fullPath ] } {
|
||
|
return $fullPath
|
||
|
}
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
source [ findRtfPath "data/projnav/scripts/dpm_cgUtils.tcl" ]
|
||
|
|
||
|
set result [ run_cg_edit "pll" xc6slx9-3tqg144 VHDL ]
|
||
|
|
||
|
if { $result == 0 } {
|
||
|
puts "Core Generator edit command completed successfully."
|
||
|
} elseif { $result == 1 } {
|
||
|
puts "Core Generator edit command failed."
|
||
|
} elseif { $result == 3 || $result == 4 } {
|
||
|
# convert 'version check' result to real return range, bypassing any messages.
|
||
|
set result [ expr $result - 3 ]
|
||
|
} else {
|
||
|
puts "Core Generator edit cancelled."
|
||
|
}
|
||
|
exit $result
|
||
| papilioduo/pll/pll.xco | ||
|---|---|---|
|
##############################################################
|
||
|
#
|
||
|
# Xilinx Core Generator version 14.7
|
||
|
# Date: Wed Jul 23 19:13:47 2014
|
||
|
#
|
||
|
##############################################################
|
||
|
#
|
||
|
# This file contains the customisation parameters for a
|
||
|
# Xilinx CORE Generator IP GUI. It is strongly recommended
|
||
|
# that you do not manually alter this file as it may cause
|
||
|
# unexpected and unsupported behavior.
|
||
|
#
|
||
|
##############################################################
|
||
|
#
|
||
|
# Generated from component: xilinx.com:ip:clk_wiz:3.6
|
||
|
#
|
||
|
##############################################################
|
||
|
#
|
||
|
# BEGIN Project Options
|
||
|
SET addpads = false
|
||
|
SET asysymbol = true
|
||
|
SET busformat = BusFormatAngleBracketNotRipped
|
||
|
SET createndf = false
|
||
|
SET designentry = VHDL
|
||
|
SET device = xc6slx9
|
||
|
SET devicefamily = spartan6
|
||
|
SET flowvendor = Other
|
||
|
SET formalverification = false
|
||
|
SET foundationsym = false
|
||
|
SET implementationfiletype = Ngc
|
||
|
SET package = tqg144
|
||
|
SET removerpms = false
|
||
|
SET simulationfiles = Behavioral
|
||
|
SET speedgrade = -3
|
||
|
SET verilogsim = false
|
||
|
SET vhdlsim = true
|
||
|
# END Project Options
|
||
|
# BEGIN Select
|
||
|
SELECT Clocking_Wizard xilinx.com:ip:clk_wiz:3.6
|
||
|
# END Select
|
||
|
# BEGIN Parameters
|
||
|
CSET calc_done=DONE
|
||
|
CSET clk_in_sel_port=CLK_IN_SEL
|
||
|
CSET clk_out1_port=CLKOUT
|
||
|
CSET clk_out1_use_fine_ps_gui=false
|
||
|
CSET clk_out2_port=CLKOUT2
|
||
|
CSET clk_out2_use_fine_ps_gui=false
|
||
|
CSET clk_out3_port=CLK_OUT3
|
||
|
CSET clk_out3_use_fine_ps_gui=false
|
||
|
CSET clk_out4_port=CLK_OUT4
|
||
|
CSET clk_out4_use_fine_ps_gui=false
|
||
|
CSET clk_out5_port=CLK_OUT5
|
||
|
CSET clk_out5_use_fine_ps_gui=false
|
||
|
CSET clk_out6_port=CLK_OUT6
|
||
|
CSET clk_out6_use_fine_ps_gui=false
|
||
|
CSET clk_out7_port=CLK_OUT7
|
||
|
CSET clk_out7_use_fine_ps_gui=false
|
||
|
CSET clk_valid_port=CLK_VALID
|
||
|
CSET clkfb_in_n_port=CLKFB_IN_N
|
||
|
CSET clkfb_in_p_port=CLKFB_IN_P
|
||
|
CSET clkfb_in_port=CLKFB_IN
|
||
|
CSET clkfb_in_signaling=SINGLE
|
||
|
CSET clkfb_out_n_port=CLKFB_OUT_N
|
||
|
CSET clkfb_out_p_port=CLKFB_OUT_P
|
||
|
CSET clkfb_out_port=CLKFB_OUT
|
||
|
CSET clkfb_stopped_port=CLKFB_STOPPED
|
||
|
CSET clkin1_jitter_ps=200.0
|
||
|
CSET clkin1_ui_jitter=0.010
|
||
|
CSET clkin2_jitter_ps=100.0
|
||
|
CSET clkin2_ui_jitter=0.010
|
||
|
CSET clkout1_drives=BUFG
|
||
|
CSET clkout1_requested_duty_cycle=50.000
|
||
|
CSET clkout1_requested_out_freq=28.64
|
||
|
CSET clkout1_requested_phase=0.000
|
||
|
CSET clkout2_drives=BUFG
|
||
|
CSET clkout2_requested_duty_cycle=50.000
|
||
|
CSET clkout2_requested_out_freq=57.28
|
||
|
CSET clkout2_requested_phase=0.000
|
||
|
CSET clkout2_used=true
|
||
|
CSET clkout3_drives=BUFG
|
||
|
CSET clkout3_requested_duty_cycle=50.000
|
||
|
CSET clkout3_requested_out_freq=100.000
|
||
|
CSET clkout3_requested_phase=0.000
|
||
|
CSET clkout3_used=false
|
||
|
CSET clkout4_drives=BUFG
|
||
|
CSET clkout4_requested_duty_cycle=50.000
|
||
|
CSET clkout4_requested_out_freq=100.000
|
||
|
CSET clkout4_requested_phase=0.000
|
||
|
CSET clkout4_used=false
|
||
|
CSET clkout5_drives=BUFG
|
||
|
CSET clkout5_requested_duty_cycle=50.000
|
||
|
CSET clkout5_requested_out_freq=100.000
|
||
|
CSET clkout5_requested_phase=0.000
|
||
|
CSET clkout5_used=false
|
||
|
CSET clkout6_drives=BUFG
|
||
|
CSET clkout6_requested_duty_cycle=50.000
|
||
|
CSET clkout6_requested_out_freq=100.000
|
||
|
CSET clkout6_requested_phase=0.000
|
||
|
CSET clkout6_used=false
|
||
|
CSET clkout7_drives=BUFG
|
||
|
CSET clkout7_requested_duty_cycle=50.000
|
||
|
CSET clkout7_requested_out_freq=100.000
|
||
|
CSET clkout7_requested_phase=0.000
|
||
|
CSET clkout7_used=false
|
||
|
CSET clock_mgr_type=AUTO
|
||
|
CSET component_name=pll
|
||
|
CSET daddr_port=DADDR
|
||
|
CSET dclk_port=DCLK
|
||
|
CSET dcm_clk_feedback=1X
|
||
|
CSET dcm_clk_out1_port=CLKFX
|
||
|
CSET dcm_clk_out2_port=CLK0
|
||
|
CSET dcm_clk_out3_port=CLK0
|
||
|
CSET dcm_clk_out4_port=CLK0
|
||
|
CSET dcm_clk_out5_port=CLK0
|
||
|
CSET dcm_clk_out6_port=CLK0
|
||
|
CSET dcm_clkdv_divide=2.0
|
||
|
CSET dcm_clkfx_divide=25
|
||
|
CSET dcm_clkfx_multiply=14
|
||
|
CSET dcm_clkgen_clk_out1_port=CLKFX
|
||
|
CSET dcm_clkgen_clk_out2_port=CLKFX
|
||
|
CSET dcm_clkgen_clk_out3_port=CLKFX
|
||
|
CSET dcm_clkgen_clkfx_divide=1
|
||
|
CSET dcm_clkgen_clkfx_md_max=0.000
|
||
|
CSET dcm_clkgen_clkfx_multiply=4
|
||
|
CSET dcm_clkgen_clkfxdv_divide=2
|
||
|
CSET dcm_clkgen_clkin_period=10.000
|
||
|
CSET dcm_clkgen_notes=None
|
||
|
CSET dcm_clkgen_spread_spectrum=NONE
|
||
|
CSET dcm_clkgen_startup_wait=false
|
||
|
CSET dcm_clkin_divide_by_2=false
|
||
|
CSET dcm_clkin_period=20.000
|
||
|
CSET dcm_clkout_phase_shift=NONE
|
||
|
CSET dcm_deskew_adjust=SYSTEM_SYNCHRONOUS
|
||
|
CSET dcm_notes=None
|
||
|
CSET dcm_phase_shift=0
|
||
|
CSET dcm_pll_cascade=NONE
|
||
|
CSET dcm_startup_wait=false
|
||
|
CSET den_port=DEN
|
||
|
CSET din_port=DIN
|
||
|
CSET dout_port=DOUT
|
||
|
CSET drdy_port=DRDY
|
||
|
CSET dwe_port=DWE
|
||
|
CSET feedback_source=FDBK_AUTO
|
||
|
CSET in_freq_units=Units_MHz
|
||
|
CSET in_jitter_units=Units_UI
|
||
|
CSET input_clk_stopped_port=INPUT_CLK_STOPPED
|
||
|
CSET jitter_options=UI
|
||
|
CSET jitter_sel=No_Jitter
|
||
|
CSET locked_port=LOCKED
|
||
|
CSET mmcm_bandwidth=OPTIMIZED
|
||
|
CSET mmcm_clkfbout_mult_f=4.000
|
||
|
CSET mmcm_clkfbout_phase=0.000
|
||
|
CSET mmcm_clkfbout_use_fine_ps=false
|
||
|
CSET mmcm_clkin1_period=10.000
|
||
|
CSET mmcm_clkin2_period=10.000
|
||
|
CSET mmcm_clkout0_divide_f=4.000
|
||
|
CSET mmcm_clkout0_duty_cycle=0.500
|
||
|
CSET mmcm_clkout0_phase=0.000
|
||
|
CSET mmcm_clkout0_use_fine_ps=false
|
||
|
CSET mmcm_clkout1_divide=1
|
||
|
CSET mmcm_clkout1_duty_cycle=0.500
|
||
|
CSET mmcm_clkout1_phase=0.000
|
||
|
CSET mmcm_clkout1_use_fine_ps=false
|
||
|
CSET mmcm_clkout2_divide=1
|
||
|
CSET mmcm_clkout2_duty_cycle=0.500
|
||
|
CSET mmcm_clkout2_phase=0.000
|
||
|
CSET mmcm_clkout2_use_fine_ps=false
|
||
|
CSET mmcm_clkout3_divide=1
|
||
|
CSET mmcm_clkout3_duty_cycle=0.500
|
||
|
CSET mmcm_clkout3_phase=0.000
|
||
|
CSET mmcm_clkout3_use_fine_ps=false
|
||
|
CSET mmcm_clkout4_cascade=false
|
||
|
CSET mmcm_clkout4_divide=1
|
||
|
CSET mmcm_clkout4_duty_cycle=0.500
|
||
|
CSET mmcm_clkout4_phase=0.000
|
||
|
CSET mmcm_clkout4_use_fine_ps=false
|
||
|
CSET mmcm_clkout5_divide=1
|
||
|
CSET mmcm_clkout5_duty_cycle=0.500
|
||
|
CSET mmcm_clkout5_phase=0.000
|
||
|
CSET mmcm_clkout5_use_fine_ps=false
|
||
|
CSET mmcm_clkout6_divide=1
|
||
|
CSET mmcm_clkout6_duty_cycle=0.500
|
||
|
CSET mmcm_clkout6_phase=0.000
|
||
|
CSET mmcm_clkout6_use_fine_ps=false
|
||
|
CSET mmcm_clock_hold=false
|
||
|
CSET mmcm_compensation=ZHOLD
|
||
|
CSET mmcm_divclk_divide=1
|
||
|
CSET mmcm_notes=None
|
||
|
CSET mmcm_ref_jitter1=0.010
|
||
|
CSET mmcm_ref_jitter2=0.010
|
||
|
CSET mmcm_startup_wait=false
|
||
|
CSET num_out_clks=2
|
||
|
CSET override_dcm=false
|
||
|
CSET override_dcm_clkgen=false
|
||
|
CSET override_mmcm=false
|
||
|
CSET override_pll=false
|
||
|
CSET platform=nt64
|
||
|
CSET pll_bandwidth=OPTIMIZED
|
||
|
CSET pll_clk_feedback=CLKFBOUT
|
||
|
CSET pll_clkfbout_mult=39
|
||
|
CSET pll_clkfbout_phase=0.000
|
||
|
CSET pll_clkin_period=20.000
|
||
|
CSET pll_clkout0_divide=34
|
||
|
CSET pll_clkout0_duty_cycle=0.500
|
||
|
CSET pll_clkout0_phase=0.000
|
||
|
CSET pll_clkout1_divide=17
|
||
|
CSET pll_clkout1_duty_cycle=0.500
|
||
|
CSET pll_clkout1_phase=0.000
|
||
|
CSET pll_clkout2_divide=1
|
||
|
CSET pll_clkout2_duty_cycle=0.500
|
||
|
CSET pll_clkout2_phase=0.000
|
||
|
CSET pll_clkout3_divide=1
|
||
|
CSET pll_clkout3_duty_cycle=0.500
|
||
|
CSET pll_clkout3_phase=0.000
|
||
|
CSET pll_clkout4_divide=1
|
||
|
CSET pll_clkout4_duty_cycle=0.500
|
||
|
CSET pll_clkout4_phase=0.000
|
||
|
CSET pll_clkout5_divide=1
|
||
|
CSET pll_clkout5_duty_cycle=0.500
|
||
|
CSET pll_clkout5_phase=0.000
|
||
|
CSET pll_compensation=SYSTEM_SYNCHRONOUS
|
||
|
CSET pll_divclk_divide=2
|
||
|
CSET pll_notes=None
|
||
|
CSET pll_ref_jitter=0.010
|
||
|
CSET power_down_port=POWER_DOWN
|
||
|
CSET prim_in_freq=50
|
||
|
CSET prim_in_jitter=0.010
|
||
|
CSET prim_source=Single_ended_clock_capable_pin
|
||
|
CSET primary_port=CLKIN
|
||
|
CSET primitive=MMCM
|
||
|
CSET primtype_sel=PLL_BASE
|
||
|
CSET psclk_port=PSCLK
|
||
|
CSET psdone_port=PSDONE
|
||
|
CSET psen_port=PSEN
|
||
|
CSET psincdec_port=PSINCDEC
|
||
|
CSET relative_inclk=REL_PRIMARY
|
||
|
CSET reset_port=RESET
|
||
|
CSET secondary_in_freq=100.000
|
||
|
CSET secondary_in_jitter=0.010
|
||
|
CSET secondary_port=CLK_IN2
|
||
|
CSET secondary_source=Single_ended_clock_capable_pin
|
||
|
CSET ss_mod_freq=250
|
||
|
CSET ss_mode=CENTER_HIGH
|
||
|
CSET status_port=STATUS
|
||
|
CSET summary_strings=empty
|
||
|
CSET use_clk_valid=false
|
||
|
CSET use_clkfb_stopped=false
|
||
|
CSET use_dyn_phase_shift=false
|
||
|
CSET use_dyn_reconfig=false
|
||
|
CSET use_freeze=false
|
||
|
CSET use_freq_synth=true
|
||
|
CSET use_inclk_stopped=false
|
||
|
CSET use_inclk_switchover=false
|
||
|
CSET use_locked=true
|
||
|
CSET use_max_i_jitter=false
|
||
|
CSET use_min_o_jitter=false
|
||
|
CSET use_min_power=false
|
||
|
CSET use_phase_alignment=true
|
||
|
CSET use_power_down=false
|
||
|
CSET use_reset=false
|
||
|
CSET use_spread_spectrum=false
|
||
|
CSET use_spread_spectrum_1=false
|
||
|
CSET use_status=false
|
||
|
# END Parameters
|
||
|
# BEGIN Extra information
|
||
|
MISC pkg_timestamp=2012-05-10T12:44:55Z
|
||
|
# END Extra information
|
||
|
GENERATE
|
||
|
# CRC: 51445c78
|
||
| papilioduo/pll/pll.asy | ||
|---|---|---|
|
Version 4
|
||
|
SymbolType BLOCK
|
||
|
TEXT 32 32 LEFT 4 pll
|
||
|
RECTANGLE Normal 32 32 576 1088
|
||
|
LINE Normal 0 80 32 80
|
||
|
PIN 0 80 LEFT 36
|
||
|
PINATTR PinName clk_in1
|
||
|
PINATTR Polarity IN
|
||
|
LINE Normal 608 80 576 80
|
||
|
PIN 608 80 RIGHT 36
|
||
|
PINATTR PinName clk_out1
|
||
|
PINATTR Polarity OUT
|
||
|
LINE Normal 608 176 576 176
|
||
|
PIN 608 176 RIGHT 36
|
||
|
PINATTR PinName clk_out2
|
||
|
PINATTR Polarity OUT
|
||
|
LINE Normal 608 976 576 976
|
||
|
PIN 608 976 RIGHT 36
|
||
|
PINATTR PinName locked
|
||
|
PINATTR Polarity OUT
|
||
|
|
||
| papilioduo/pll/pll.vho | ||
|---|---|---|
|
--
|
||
|
-- (c) Copyright 2008 - 2011 Xilinx, Inc. All rights reserved.
|
||
|
--
|
||
|
-- This file contains confidential and proprietary information
|
||
|
-- of Xilinx, Inc. and is protected under U.S. and
|
||
|
-- international copyright and other intellectual property
|
||
|
-- laws.
|
||
|
--
|
||
|
-- DISCLAIMER
|
||
|
-- This disclaimer is not a license and does not grant any
|
||
|
-- rights to the materials distributed herewith. Except as
|
||
|
-- otherwise provided in a valid license issued to you by
|
||
|
-- Xilinx, and to the maximum extent permitted by applicable
|
||
|
-- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
|
||
|
-- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
|
||
|
-- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
|
||
|
-- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
|
||
|
-- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
|
||
|
-- (2) Xilinx shall not be liable (whether in contract or tort,
|
||
|
-- including negligence, or under any other theory of
|
||
|
-- liability) for any loss or damage of any kind or nature
|
||
|
-- related to, arising under or in connection with these
|
||
|
-- materials, including for any direct, or any indirect,
|
||
|
-- special, incidental, or consequential loss or damage
|
||
|
-- (including loss of data, profits, goodwill, or any type of
|
||
|
-- loss or damage suffered as a result of any action brought
|
||
|
-- by a third party) even if such damage or loss was
|
||
|
-- reasonably foreseeable or Xilinx had been advised of the
|
||
|
-- possibility of the same.
|
||
|
--
|
||
|
-- CRITICAL APPLICATIONS
|
||
|
-- Xilinx products are not designed or intended to be fail-
|
||
|
-- safe, or for use in any application requiring fail-safe
|
||
|
-- performance, such as life-support or safety devices or
|
||
|
-- systems, Class III medical devices, nuclear facilities,
|
||
|
-- applications related to the deployment of airbags, or any
|
||
|
-- other applications that could lead to death, personal
|
||
|
-- injury, or severe property or environmental damage
|
||
|
-- (individually and collectively, "Critical
|
||
|
-- Applications"). Customer assumes the sole risk and
|
||
|
-- liability of any use of Xilinx products in Critical
|
||
|
-- Applications, subject only to applicable laws and
|
||
|
-- regulations governing limitations on product liability.
|
||
|
--
|
||
|
-- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
|
||
|
-- PART OF THIS FILE AT ALL TIMES.
|
||
|
--
|
||
|
------------------------------------------------------------------------------
|
||
|
-- User entered comments
|
||
|
------------------------------------------------------------------------------
|
||
|
-- None
|
||
|
--
|
||
|
------------------------------------------------------------------------------
|
||
|
-- "Output Output Phase Duty Pk-to-Pk Phase"
|
||
|
-- "Clock Freq (MHz) (degrees) Cycle (%) Jitter (ps) Error (ps)"
|
||
|
------------------------------------------------------------------------------
|
||
|
-- CLK_OUT1____28.676______0.000______50.0______292.034____257.452
|
||
|
-- CLK_OUT2____57.353______0.000______50.0______239.345____257.452
|
||
|
--
|
||
|
------------------------------------------------------------------------------
|
||
|
-- "Input Clock Freq (MHz) Input Jitter (UI)"
|
||
|
------------------------------------------------------------------------------
|
||
|
-- __primary______________50____________0.010
|
||
|
|
||
|
|
||
|
-- The following code must appear in the VHDL architecture header:
|
||
|
------------- Begin Cut here for COMPONENT Declaration ------ COMP_TAG
|
||
|
component pll
|
||
|
port
|
||
|
(-- Clock in ports
|
||
|
CLKIN : in std_logic;
|
||
|
-- Clock out ports
|
||
|
CLKOUT : out std_logic;
|
||
|
CLKOUT2 : out std_logic;
|
||
|
-- Status and control signals
|
||
|
LOCKED : out std_logic
|
||
|
);
|
||
|
end component;
|
||
|
|
||
|
-- COMP_TAG_END ------ End COMPONENT Declaration ------------
|
||
|
-- The following code must appear in the VHDL architecture
|
||
|
-- body. Substitute your own instance name and net names.
|
||
|
------------- Begin Cut here for INSTANTIATION Template ----- INST_TAG
|
||
|
your_instance_name : pll
|
||
|
port map
|
||
|
(-- Clock in ports
|
||
|
CLKIN => CLKIN,
|
||
|
-- Clock out ports
|
||
|
CLKOUT => CLKOUT,
|
||
|
CLKOUT2 => CLKOUT2,
|
||
|
-- Status and control signals
|
||
|
LOCKED => LOCKED);
|
||
|
-- INST_TAG_END ------ End INSTANTIATION Template ------------
|
||
| papilioduo/pll/pll_xmdf.tcl | ||
|---|---|---|
|
# The package naming convention is <core_name>_xmdf
|
||
|
package provide pll_xmdf 1.0
|
||
|
|
||
|
# This includes some utilities that support common XMDF operations
|
||
|
package require utilities_xmdf
|
||
|
|
||
|
# Define a namespace for this package. The name of the name space
|
||
|
# is <core_name>_xmdf
|
||
|
namespace eval ::pll_xmdf {
|
||
|
# Use this to define any statics
|
||
|
}
|
||
|
|
||
|
# Function called by client to rebuild the params and port arrays
|
||
|
# Optional when the use context does not require the param or ports
|
||
|
# arrays to be available.
|
||
|
proc ::pll_xmdf::xmdfInit { instance } {
|
||
|
# Variable containg name of library into which module is compiled
|
||
|
# Recommendation: <module_name>
|
||
|
# Required
|
||
|
utilities_xmdf::xmdfSetData $instance Module Attributes Name pll
|
||
|
}
|
||
|
# ::pll_xmdf::xmdfInit
|
||
|
|
||
|
# Function called by client to fill in all the xmdf* data variables
|
||
|
# based on the current settings of the parameters
|
||
|
proc ::pll_xmdf::xmdfApplyParams { instance } {
|
||
|
|
||
|
set fcount 0
|
||
|
# Array containing libraries that are assumed to exist
|
||
|
# Examples include unisim and xilinxcorelib
|
||
|
# Optional
|
||
|
# In this example, we assume that the unisim library will
|
||
|
# be magically
|
||
|
# available to the simulation and synthesis tool
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type logical_library
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount logical_library unisim
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll/clk_wiz_readme.txt
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type Ignore
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll/doc/clk_wiz_ds709.pdf
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type Ignore
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll/doc/clk_wiz_gsg521.pdf
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type Ignore
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll/implement/implement.bat
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type Ignore
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll/implement/implement.sh
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type Ignore
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll/implement/xst.prj
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type Ignore
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll/implement/xst.scr
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type Ignore
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll/simulation/pll_tb.vhd
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type Ignore
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll/simulation/functional/simcmds.tcl
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type Ignore
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll/simulation/functional/simulate_isim.sh
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type Ignore
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll/simulation/functional/simulate_mti.do
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type Ignore
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll/simulation/functional/simulate_ncsim.sh
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type Ignore
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll/simulation/functional/wave.do
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type Ignore
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll/simulation/functional/wave.sv
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type Ignore
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll.asy
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type asy
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll.ejp
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type AnyView
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll.ucf
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type ucf
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll.vhd
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type vhdl
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll.vho
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type vhdl_template
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll.xco
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type coregen_ip
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount relative_path pll_xmdf.tcl
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount type AnyView
|
||
|
incr fcount
|
||
|
|
||
|
utilities_xmdf::xmdfSetData $instance FileSet $fcount associated_module pll
|
||
|
incr fcount
|
||
|
|
||
|
}
|
||
|
|
||
|
# ::gen_comp_name_xmdf::xmdfApplyParams
|
||
| papilioduo/pll/pll/example_design/pll_exdes.vhd | ||
|---|---|---|
|
-- file: pll_exdes.vhd
|
||
|
--
|
||
|
-- (c) Copyright 2008 - 2011 Xilinx, Inc. All rights reserved.
|
||
|
--
|
||
|
-- This file contains confidential and proprietary information
|
||
|
-- of Xilinx, Inc. and is protected under U.S. and
|
||
|
-- international copyright and other intellectual property
|
||
|
-- laws.
|
||
|
--
|
||
|
-- DISCLAIMER
|
||
|
-- This disclaimer is not a license and does not grant any
|
||
|
-- rights to the materials distributed herewith. Except as
|
||
|
-- otherwise provided in a valid license issued to you by
|
||
|
-- Xilinx, and to the maximum extent permitted by applicable
|
||
|
-- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
|
||
|
-- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
|
||
|
-- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
|
||
|
-- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
|
||
|
-- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
|
||
|
-- (2) Xilinx shall not be liable (whether in contract or tort,
|
||
|
-- including negligence, or under any other theory of
|
||
|
-- liability) for any loss or damage of any kind or nature
|
||
|
-- related to, arising under or in connection with these
|
||
|
-- materials, including for any direct, or any indirect,
|
||
|
-- special, incidental, or consequential loss or damage
|
||
|
-- (including loss of data, profits, goodwill, or any type of
|
||
|
-- loss or damage suffered as a result of any action brought
|
||
|
-- by a third party) even if such damage or loss was
|
||
|
-- reasonably foreseeable or Xilinx had been advised of the
|
||
|
-- possibility of the same.
|
||
|
--
|
||
|
-- CRITICAL APPLICATIONS
|
||
|
-- Xilinx products are not designed or intended to be fail-
|
||
|
-- safe, or for use in any application requiring fail-safe
|
||
|
-- performance, such as life-support or safety devices or
|
||
|
-- systems, Class III medical devices, nuclear facilities,
|
||
|
-- applications related to the deployment of airbags, or any
|
||
|
-- other applications that could lead to death, personal
|
||
|
-- injury, or severe property or environmental damage
|
||
|
-- (individually and collectively, "Critical
|
||
|
-- Applications"). Customer assumes the sole risk and
|
||
|
-- liability of any use of Xilinx products in Critical
|
||
|
-- Applications, subject only to applicable laws and
|
||
|
-- regulations governing limitations on product liability.
|
||
|
--
|
||
|
-- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
|
||
|
-- PART OF THIS FILE AT ALL TIMES.
|
||
|
--
|
||
|
|
||
|
------------------------------------------------------------------------------
|
||
|
-- Clocking wizard example design
|
||
|
------------------------------------------------------------------------------
|
||
|
-- This example design instantiates the created clocking network, where each
|
||
|
-- output clock drives a counter. The high bit of each counter is ported.
|
||
|
------------------------------------------------------------------------------
|
||
|
|
||
|
library ieee;
|
||
|
use ieee.std_logic_1164.all;
|
||
|
use ieee.std_logic_unsigned.all;
|
||
|
use ieee.std_logic_arith.all;
|
||
|
use ieee.numeric_std.all;
|
||
|
|
||
|
library unisim;
|
||
|
use unisim.vcomponents.all;
|
||
|
|
||
|
entity pll_exdes is
|
||
|
generic (
|
||
|
TCQ : in time := 100 ps);
|
||
|
port
|
||
|
(-- Clock in ports
|
||
|
CLK_IN1 : in std_logic;
|
||
|
-- Reset that only drives logic in example design
|
||
|
COUNTER_RESET : in std_logic;
|
||
|
CLK_OUT : out std_logic_vector(2 downto 1) ;
|
||
|
-- High bits of counters driven by clocks
|
||
|
COUNT : out std_logic_vector(2 downto 1);
|
||
|
-- Status and control signals
|
||
|
LOCKED : out std_logic
|
||
|
);
|
||
|
end pll_exdes;
|
||
|
|
||
|
architecture xilinx of pll_exdes is
|
||
|
|
||
|
-- Parameters for the counters
|
||
|
---------------------------------
|
||
|
-- Counter width
|
||
|
constant C_W : integer := 16;
|
||
|
|
||
|
-- Number of counters
|
||
|
constant NUM_C : integer := 2;
|
||
|
-- Array typedef
|
||
|
type ctrarr is array (1 to NUM_C) of std_logic_vector(C_W-1 downto 0);
|
||
|
|
||
|
-- When the clock goes out of lock, reset the counters
|
||
|
signal locked_int : std_logic;
|
||
|
signal reset_int : std_logic := '0';
|
||
|
-- Declare the clocks and counters
|
||
|
signal clk : std_logic_vector(NUM_C downto 1);
|
||
|
|
||
|
signal clk_int : std_logic_vector(NUM_C downto 1);
|
||
|
signal clk_n : std_logic_vector(NUM_C downto 1);
|
||
|
signal counter : ctrarr := (( others => (others => '0')));
|
||
|
signal rst_sync : std_logic_vector(NUM_C downto 1);
|
||
|
signal rst_sync_int : std_logic_vector(NUM_C downto 1);
|
||
|
signal rst_sync_int1 : std_logic_vector(NUM_C downto 1);
|
||
|
signal rst_sync_int2 : std_logic_vector(NUM_C downto 1);
|
||
|
|
||
|
|
||
|
component pll is
|
||
|
port
|
||
|
(-- Clock in ports
|
||
|
CLKIN : in std_logic;
|
||
|
-- Clock out ports
|
||
|
CLKOUT : out std_logic;
|
||
|
CLKOUT2 : out std_logic;
|
||
|
-- Status and control signals
|
||
|
LOCKED : out std_logic
|
||
|
);
|
||
|
end component;
|
||
|
|
||
|
begin
|
||
|
-- Alias output to internally used signal
|
||
|
LOCKED <= locked_int;
|
||
|
|
||
|
-- When the clock goes out of lock, reset the counters
|
||
|
reset_int <= (not locked_int) or COUNTER_RESET;
|
||
|
|
||
|
|
||
|
counters_1: for count_gen in 1 to NUM_C generate begin
|
||
|
process (clk(count_gen), reset_int) begin
|
||
|
if (reset_int = '1') then
|
||
|
rst_sync(count_gen) <= '1';
|
||
|
rst_sync_int(count_gen) <= '1';
|
||
|
rst_sync_int1(count_gen) <= '1';
|
||
|
rst_sync_int2(count_gen) <= '1';
|
||
|
elsif (clk(count_gen) 'event and clk(count_gen)='1') then
|
||
|
rst_sync(count_gen) <= '0';
|
||
|
rst_sync_int(count_gen) <= rst_sync(count_gen);
|
||
|
rst_sync_int1(count_gen) <= rst_sync_int(count_gen);
|
||
|
rst_sync_int2(count_gen) <= rst_sync_int1(count_gen);
|
||
|
end if;
|
||
|
end process;
|
||
|
end generate counters_1;
|
||
|
|
||
|
|
||
|
-- Instantiation of the clocking network
|
||
|
----------------------------------------
|
||
|
clknetwork : pll
|
||
|
port map
|
||
|
(-- Clock in ports
|
||
|
CLKIN => CLK_IN1,
|
||
|
-- Clock out ports
|
||
|
CLKOUT => clk_int(1),
|
||
|
CLKOUT2 => clk_int(2),
|
||
|
-- Status and control signals
|
||
|
LOCKED => locked_int);
|
||
|
|
||
|
gen_outclk_oddr:
|
||
|
for clk_out_pins in 1 to NUM_C generate
|
||
|
begin
|
||
|
clk_n(clk_out_pins) <= not clk(clk_out_pins);
|
||
|
clkout_oddr : ODDR2
|
||
|
port map
|
||
|
(Q => CLK_OUT(clk_out_pins),
|
||
|
C0 => clk(clk_out_pins),
|
||
|
C1 => clk_n(clk_out_pins),
|
||
|
CE => '1',
|
||
|
D0 => '1',
|
||
|
D1 => '0',
|
||
|
R => '0',
|
||
|
S => '0');
|
||
|
end generate;
|
||
|
|
||
|
-- Connect the output clocks to the design
|
||
|
-------------------------------------------
|
||
|
clk(1) <= clk_int(1);
|
||
|
clk(2) <= clk_int(2);
|
||
|
|
||
|
-- Output clock sampling
|
||
|
-------------------------------------
|
||
|
counters: for count_gen in 1 to NUM_C generate begin
|
||
|
process (clk(count_gen), rst_sync_int2(count_gen)) begin
|
||
|
if (rst_sync_int2(count_gen) = '1') then
|
||
|
counter(count_gen) <= (others => '0') after TCQ;
|
||
|
elsif (rising_edge (clk(count_gen))) then
|
||
|
counter(count_gen) <= counter(count_gen) + 1 after TCQ;
|
||
|
end if;
|
||
|
end process;
|
||
|
|
||
|
-- alias the high bit of each counter to the corresponding
|
||
|
-- bit in the output bus
|
||
|
COUNT(count_gen) <= counter(count_gen)(C_W-1);
|
||
|
|
||
|
end generate counters;
|
||
|
|
||
|
|
||
|
|
||
|
end xilinx;
|
||
| papilioduo/pll/pll/example_design/pll_exdes.ucf | ||
|---|---|---|
|
# file: pll_exdes.ucf
|
||
|
#
|
||
|
# (c) Copyright 2008 - 2011 Xilinx, Inc. All rights reserved.
|
||
|
#
|
||
|
# This file contains confidential and proprietary information
|
||
|
# of Xilinx, Inc. and is protected under U.S. and
|
||
|
# international copyright and other intellectual property
|
||
|
# laws.
|
||
|
#
|
||
|
# DISCLAIMER
|
||
|
# This disclaimer is not a license and does not grant any
|
||
|
# rights to the materials distributed herewith. Except as
|
||
|
# otherwise provided in a valid license issued to you by
|
||
|
# Xilinx, and to the maximum extent permitted by applicable
|
||
|
# law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
|
||
|
# WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
|
||
|
# AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
|
||
|
# BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
|
||
|
# INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
|
||
|
# (2) Xilinx shall not be liable (whether in contract or tort,
|
||
|
# including negligence, or under any other theory of
|
||
|
# liability) for any loss or damage of any kind or nature
|
||
|
# related to, arising under or in connection with these
|
||
|
# materials, including for any direct, or any indirect,
|
||
|
# special, incidental, or consequential loss or damage
|
||
|
# (including loss of data, profits, goodwill, or any type of
|
||
|
# loss or damage suffered as a result of any action brought
|
||
|
# by a third party) even if such damage or loss was
|
||
|
# reasonably foreseeable or Xilinx had been advised of the
|
||
|
# possibility of the same.
|
||
|
#
|
||
|
# CRITICAL APPLICATIONS
|
||
|
# Xilinx products are not designed or intended to be fail-
|
||
|
# safe, or for use in any application requiring fail-safe
|
||
|
# performance, such as life-support or safety devices or
|
||
|
# systems, Class III medical devices, nuclear facilities,
|
||
|
# applications related to the deployment of airbags, or any
|
||
|
# other applications that could lead to death, personal
|
||
|
# injury, or severe property or environmental damage
|
||
|
# (individually and collectively, "Critical
|
||
|
# Applications"). Customer assumes the sole risk and
|
||
|
# liability of any use of Xilinx products in Critical
|
||
|
# Applications, subject only to applicable laws and
|
||
|
# regulations governing limitations on product liability.
|
||
|
#
|
||
|
# THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
|
||
|
# PART OF THIS FILE AT ALL TIMES.
|
||
|
#
|
||
|
|
||
|
# Input clock periods. These duplicate the values entered for the
|
||
|
# input clocks. You can use these to time your system
|
||
|
#----------------------------------------------------------------
|
||
|
NET "CLK_IN1" TNM_NET = "CLK_IN1";
|
||
|
TIMESPEC "TS_CLK_IN1" = PERIOD "CLK_IN1" 20.000 ns HIGH 50% INPUT_JITTER 200.0ps;
|
||
|
|
||
|
|
||
|
# FALSE PATH constraints
|
||
|
PIN "COUNTER_RESET" TIG;
|
||
|
|
||
| papilioduo/pll/pll/example_design/pll_exdes.xdc | ||
|---|---|---|
|
# file: pll_exdes.xdc
|
||
|
#
|
||
|
# (c) Copyright 2008 - 2011 Xilinx, Inc. All rights reserved.
|
||
|
#
|
||
|
# This file contains confidential and proprietary information
|
||
|
# of Xilinx, Inc. and is protected under U.S. and
|
||
|
# international copyright and other intellectual property
|
||
|
# laws.
|
||
|
#
|
||
|
# DISCLAIMER
|
||
|
# This disclaimer is not a license and does not grant any
|
||
|
# rights to the materials distributed herewith. Except as
|
||
|
# otherwise provided in a valid license issued to you by
|
||
|
# Xilinx, and to the maximum extent permitted by applicable
|
||
|
# law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
|
||
|
# WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
|
||
|
# AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
|
||
|
# BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
|
||
|
# INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
|
||
|
# (2) Xilinx shall not be liable (whether in contract or tort,
|
||
|
# including negligence, or under any other theory of
|
||
|
# liability) for any loss or damage of any kind or nature
|
||
|
# related to, arising under or in connection with these
|
||
|
# materials, including for any direct, or any indirect,
|
||
|
# special, incidental, or consequential loss or damage
|
||
|
# (including loss of data, profits, goodwill, or any type of
|
||
|
# loss or damage suffered as a result of any action brought
|
||
|
# by a third party) even if such damage or loss was
|
||
|
# reasonably foreseeable or Xilinx had been advised of the
|
||
|
# possibility of the same.
|
||
|
#
|
||
|
# CRITICAL APPLICATIONS
|
||
|
# Xilinx products are not designed or intended to be fail-
|
||
|
# safe, or for use in any application requiring fail-safe
|
||
|
# performance, such as life-support or safety devices or
|
||
|
# systems, Class III medical devices, nuclear facilities,
|
||
|
# applications related to the deployment of airbags, or any
|
||
|
# other applications that could lead to death, personal
|
||
|
# injury, or severe property or environmental damage
|
||
|
# (individually and collectively, "Critical
|
||
|
# Applications"). Customer assumes the sole risk and
|
||
|
# liability of any use of Xilinx products in Critical
|
||
|
# Applications, subject only to applicable laws and
|
||
|
# regulations governing limitations on product liability.
|
||
|
#
|
||
|
# THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
|
||
|
# PART OF THIS FILE AT ALL TIMES.
|
||
|
#
|
||
|
|
||
|
# Input clock periods. These duplicate the values entered for the
|
||
|
# input clocks. You can use these to time your system
|
||
|
#----------------------------------------------------------------
|
||
|
create_clock -name CLK_IN1 -period 20.000 [get_ports CLK_IN1]
|
||
|
set_propagated_clock CLK_IN1
|
||
|
set_input_jitter CLK_IN1 0.2
|
||
|
|
||
|
# FALSE PATH constraint added on COUNTER_RESET
|
||
|
set_false_path -from [get_ports "COUNTER_RESET"]
|
||
|
|
||
|
# Derived clock periods. These are commented out because they are
|
||
|
# automatically propogated by the tools
|
||
|
# However, if you'd like to use them for module level testing, you
|
||
|
# can copy them into your module level timing checks
|
||
|
#-----------------------------------------------------------------
|
||
|
|
||
|
#-----------------------------------------------------------------
|
||
|
|
||
|
#-----------------------------------------------------------------
|
||
| papilioduo/pll/pll/simulation/timing/vcs_session.tcl | ||
|---|---|---|
|
gui_open_window Wave
|
||
| papilioduo/pll/pll/simulation/timing/simcmds.tcl | ||
|---|---|---|
|
# file: simcmds.tcl
|
||
|
|
||
|
# create the simulation script
|
||
|
vcd dumpfile isim.vcd
|
||
|
vcd dumpvars -m /pll_tb -l 0
|
||
|
wave add /
|
||
|
run 50000ns
|
||
|
quit
|
||
|
|
||
| papilioduo/pll/pll/simulation/timing/simulate_mti.bat | ||
|---|---|---|
|
REM file: simulate_mti.bat
|
||
|
REM
|
||
|
REM (c) Copyright 2008 - 2011 Xilinx, Inc. All rights reserved.
|
||
|
REM
|
||
|
REM This file contains confidential and proprietary information
|
||
|
REM of Xilinx, Inc. and is protected under U.S. and
|
||
|
REM international copyright and other intellectual property
|
||
|
REM laws.
|
||
|
REM
|
||
|
REM DISCLAIMER
|
||
|
REM This disclaimer is not a license and does not grant any
|
||
|
REM rights to the materials distributed herewith. Except as
|
||
|
REM otherwise provided in a valid license issued to you by
|
||
|
REM Xilinx, and to the maximum extent permitted by applicable
|
||
|
REM law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
|
||
|
REM WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
|
||
|
REM AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
|
||
|
REM BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
|
||
|
REM INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
|
||
|
REM (2) Xilinx shall not be liable (whether in contract or tort,
|
||
|
REM including negligence, or under any other theory of
|
||
|
REM liability) for any loss or damage of any kind or nature
|
||
|
REM related to, arising under or in connection with these
|
||
|
REM materials, including for any direct, or any indirect,
|
||
|
REM special, incidental, or consequential loss or damage
|
||
|
REM (including loss of data, profits, goodwill, or any type of
|
||
|
REM loss or damage suffered as a result of any action brought
|
||
|
REM by a third party) even if such damage or loss was
|
||
|
REM reasonably foreseeable or Xilinx had been advised of the
|
||
|
REM possibility of the same.
|
||
|
REM
|
||
|
REM CRITICAL APPLICATIONS
|
||
|
REM Xilinx products are not designed or intended to be fail-
|
||
|
REM safe, or for use in any application requiring fail-safe
|
||
|
REM performance, such as life-support or safety devices or
|
||
|
REM systems, Class III medical devices, nuclear facilities,
|
||
|
REM applications related to the deployment of airbags, or any
|
||
|
REM other applications that could lead to death, personal
|
||
|
REM injury, or severe property or environmental damage
|
||
|
REM (individually and collectively, "Critical
|
||
|
REM Applications"). Customer assumes the sole risk and
|
||
|
REM liability of any use of Xilinx products in Critical
|
||
|
REM Applications, subject only to applicable laws and
|
||
|
REM regulations governing limitations on product liability.
|
||
|
REM
|
||
|
REM THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
|
||
|
REM PART OF THIS FILE AT ALL TIMES.
|
||
|
REM
|
||
|
# set up the working directory
|
||
|
set work work
|
||
|
vlib work
|
||
|
|
||
|
REM compile all of the files
|
||
|
vcom -work work ..\..\implement\results\routed.vhd
|
||
|
vcom -work work pll_tb.vhd
|
||
|
|
||
|
REM run the simulation
|
||
|
vsim -c -t ps +transport_int_delays -voptargs="+acc" -L secureip -L simprim -sdfmax pll_tb\dut=..\..\implement\results\routed.sdf +no_notifier work.pll_tb
|
||
| papilioduo/pll/pll/simulation/timing/wave.do | ||
|---|---|---|
|
# file: wave.do
|
||
|
#
|
||
|
# (c) Copyright 2008 - 2011 Xilinx, Inc. All rights reserved.
|
||
|
#
|
||
|
# This file contains confidential and proprietary information
|
||
|
# of Xilinx, Inc. and is protected under U.S. and
|
||
|
# international copyright and other intellectual property
|
||
|
# laws.
|
||
|
#
|
||
|
# DISCLAIMER
|
||
|
# This disclaimer is not a license and does not grant any
|
||
|
# rights to the materials distributed herewith. Except as
|
||
|
# otherwise provided in a valid license issued to you by
|
||
|
# Xilinx, and to the maximum extent permitted by applicable
|
||
|
# law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
|
||
|
# WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
|
||
|
# AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
|
||
|
# BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
|
||
|
# INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
|
||
|
# (2) Xilinx shall not be liable (whether in contract or tort,
|
||
|
# including negligence, or under any other theory of
|
||
|
# liability) for any loss or damage of any kind or nature
|
||
|
# related to, arising under or in connection with these
|
||
|
# materials, including for any direct, or any indirect,
|
||
|
# special, incidental, or consequential loss or damage
|
||
|
# (including loss of data, profits, goodwill, or any type of
|
||
|
# loss or damage suffered as a result of any action brought
|
||
|
# by a third party) even if such damage or loss was
|
||
|
# reasonably foreseeable or Xilinx had been advised of the
|
||
|
# possibility of the same.
|
||
|
#
|
||
|
# CRITICAL APPLICATIONS
|
||
|
# Xilinx products are not designed or intended to be fail-
|
||
|
# safe, or for use in any application requiring fail-safe
|
||
|
# performance, such as life-support or safety devices or
|
||
|
# systems, Class III medical devices, nuclear facilities,
|
||
|
# applications related to the deployment of airbags, or any
|
||
|
# other applications that could lead to death, personal
|
||
|
# injury, or severe property or environmental damage
|
||
|
# (individually and collectively, "Critical
|
||
|
# Applications"). Customer assumes the sole risk and
|
||
|
# liability of any use of Xilinx products in Critical
|
||
|
# Applications, subject only to applicable laws and
|
||
|
# regulations governing limitations on product liability.
|
||
|
#
|
||
|
# THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
|
||
|
# PART OF THIS FILE AT ALL TIMES.
|
||
|
#
|
||
|
|
||
|
onerror {resume}
|
||
|
quietly WaveActivateNextPane {} 0
|
||
|
add wave -noupdate -divider {Input clocks}
|
||
|
add wave -noupdate /pll_tb/clk_in1
|
||
|
add wave -noupdate -divider {Output clocks}
|
||
|
add wave -noupdate /pll_tb/clk_in1
|
||
|
add wave -noupdate /pll_tb/count
|
||
|
add wave -noupdate /pll_tb/counter_reset
|
||
|
add wave -noupdate /pll_tb/locked
|
||
|
TreeUpdate [SetDefaultTree]
|
||
|
WaveRestoreCursors {{Cursor 1} {3223025 ps} 0}
|
||
|
configure wave -namecolwidth 238
|
||
|
configure wave -valuecolwidth 107
|
||
|
configure wave -justifyvalue left
|
||
|
configure wave -signalnamewidth 0
|
||
|
configure wave -snapdistance 10
|
||
|
configure wave -datasetprefix 0
|
||
|
configure wave -rowmargin 4
|
||
|
configure wave -childrowmargin 2
|
||
|
configure wave -gridoffset 0
|
||
|
configure wave -gridperiod 1
|
||
|
configure wave -griddelta 40
|
||
|
configure wave -timeline 0
|
||
|
configure wave -timelineunits ps
|
||
|
update
|
||
| papilioduo/pll/pll/simulation/timing/ucli_commands.key | ||
|---|---|---|
|
|
||
|
run 50000ns
|
||
|
quit
|
||
| papilioduo/pll/pll/simulation/timing/simulate_mti.sh | ||
|---|---|---|
|
#/bin/sh
|
||
|
# file: simulate_mti.sh
|
||
|
#
|
||
|
# (c) Copyright 2008 - 2011 Xilinx, Inc. All rights reserved.
|
||
|
#
|
||
|
# This file contains confidential and proprietary information
|
||
|
# of Xilinx, Inc. and is protected under U.S. and
|
||
|
# international copyright and other intellectual property
|
||
|
# laws.
|
||
|
#
|
||
|
# DISCLAIMER
|
||
|
# This disclaimer is not a license and does not grant any
|
||
|
# rights to the materials distributed herewith. Except as
|
||
|
# otherwise provided in a valid license issued to you by
|
||
|
# Xilinx, and to the maximum extent permitted by applicable
|
||
|
# law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
|
||
|
# WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
|
||
|
# AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
|
||
|
# BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
|
||
|
# INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
|
||
|
# (2) Xilinx shall not be liable (whether in contract or tort,
|
||
|
# including negligence, or under any other theory of
|
||
|
# liability) for any loss or damage of any kind or nature
|
||
|
# related to, arising under or in connection with these
|
||
|
# materials, including for any direct, or any indirect,
|
||
|
# special, incidental, or consequential loss or damage
|
||
|
# (including loss of data, profits, goodwill, or any type of
|
||
|
# loss or damage suffered as a result of any action brought
|
||
|
# by a third party) even if such damage or loss was
|
||
|
# reasonably foreseeable or Xilinx had been advised of the
|
||
|
# possibility of the same.
|
||
|
#
|
||
|
# CRITICAL APPLICATIONS
|
||
|
# Xilinx products are not designed or intended to be fail-
|
||
|
# safe, or for use in any application requiring fail-safe
|
||
|
# performance, such as life-support or safety devices or
|
||
|
# systems, Class III medical devices, nuclear facilities,
|
||
|
# applications related to the deployment of airbags, or any
|
||
|
# other applications that could lead to death, personal
|
||
|
# injury, or severe property or environmental damage
|
||
|
# (individually and collectively, "Critical
|
||
|
# Applications"). Customer assumes the sole risk and
|
||
|
# liability of any use of Xilinx products in Critical
|
||
|
# Applications, subject only to applicable laws and
|
||
|
# regulations governing limitations on product liability.
|
||
|
#
|
||
|
# THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
|
||
|
# PART OF THIS FILE AT ALL TIMES.
|
||
|
#
|
||
|
|
||
|
# set up the working directory
|
||
|
set work work
|
||
|
vlib work
|
||
|
|
||
|
# compile all of the files
|
||
|
vcom -work work ../../implement/results/routed.vhd
|
||
|
vcom -work work pll_tb.vhd
|
||
|
|
||
|
# run the simulation
|
||
|
vsim -c -t ps +transport_int_delays -voptargs="+acc" -L secureip -L simprim -sdfmax pll_tb/dut=../../implement/results/routed.sdf +no_notifier work.pll_tb
|
||
| papilioduo/pll/pll/simulation/timing/simulate_ncsim.sh | ||
|---|---|---|
|
#!/bin/sh
|
||
|
# file: simulate_ncsim.sh
|
||
|
#
|
||
|
# (c) Copyright 2008 - 2011 Xilinx, Inc. All rights reserved.
|
||
|
#
|
||
|
# This file contains confidential and proprietary information
|
||
|
# of Xilinx, Inc. and is protected under U.S. and
|
||
|
# international copyright and other intellectual property
|
||
|
# laws.
|
||
|
#
|
||
|
# DISCLAIMER
|
||
|
# This disclaimer is not a license and does not grant any
|
||
|
# rights to the materials distributed herewith. Except as
|
||
|
# otherwise provided in a valid license issued to you by
|
||
|
# Xilinx, and to the maximum extent permitted by applicable
|
||
|
# law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
|
||
|
# WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
|
||
|
# AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
|
||
|
# BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
|
||
|
# INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
|
||
|
# (2) Xilinx shall not be liable (whether in contract or tort,
|
||
|
# including negligence, or under any other theory of
|
||
|
# liability) for any loss or damage of any kind or nature
|
||
|
# related to, arising under or in connection with these
|
||
|
# materials, including for any direct, or any indirect,
|
||
|
# special, incidental, or consequential loss or damage
|
||
|
# (including loss of data, profits, goodwill, or any type of
|
||
|
# loss or damage suffered as a result of any action brought
|
||
|
# by a third party) even if such damage or loss was
|
||
|
# reasonably foreseeable or Xilinx had been advised of the
|
||
|
# possibility of the same.
|
||
|
#
|
||
|
# CRITICAL APPLICATIONS
|
||
|
# Xilinx products are not designed or intended to be fail-
|
||
|
# safe, or for use in any application requiring fail-safe
|
||
|
# performance, such as life-support or safety devices or
|
||
|
# systems, Class III medical devices, nuclear facilities,
|
||
|
# applications related to the deployment of airbags, or any
|
||
|
# other applications that could lead to death, personal
|
||
|
# injury, or severe property or environmental damage
|
||
|
# (individually and collectively, "Critical
|
||
|
# Applications"). Customer assumes the sole risk and
|
||
|
# liability of any use of Xilinx products in Critical
|
||
|
# Applications, subject only to applicable laws and
|
||
|
# regulations governing limitations on product liability.
|
||
|
#
|
||
|
# THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
|
||
|
# PART OF THIS FILE AT ALL TIMES.
|
||
|
#
|
||
|
|
||
|
# set up the working directory
|
||
|
mkdir work
|
||
|
|
||
|
# compile all of the files
|
||
|
ncvhdl -v93 -work work ../../implement/results/routed.vhd
|
||
|
ncvhdl -v93 -work work pll_tb.vhd
|
||
|
|
||
|
# elaborate and run the simulation
|
||
|
ncsdfc ../../implement/results/routed.sdf
|
||
|
|
||
|
ncelab -work work -access +wc -pulse_r 10 -nonotifier work.pll_tb -sdf_cmd_file sdf_cmd_file
|
||
|
ncsim -input "@database -open -shm nc; probe -create -database nc -all -depth all; run 50000ns; exit" work.pll_tb
|
||
|
|
||
| papilioduo/pll/pll/simulation/timing/simulate_vcs.sh | ||
|---|---|---|
|
#!/bin/sh
|
||
|
# file: simulate_vcs.sh
|
||
|
#
|
||
|
# (c) Copyright 2008 - 2011 Xilinx, Inc. All rights reserved.
|
||
|
#
|
||
|
# This file contains confidential and proprietary information
|
||
|
# of Xilinx, Inc. and is protected under U.S. and
|
||
|
# international copyright and other intellectual property
|
||
|
# laws.
|
||
|
#
|
||
|
# DISCLAIMER
|
||
|
# This disclaimer is not a license and does not grant any
|
||
|
# rights to the materials distributed herewith. Except as
|
||
|
# otherwise provided in a valid license issued to you by
|
||
|
# Xilinx, and to the maximum extent permitted by applicable
|
||
|
# law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
|
||
|
# WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
|
||
|
# AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
|
||
|
# BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
|
||
|
# INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
|
||
|
# (2) Xilinx shall not be liable (whether in contract or tort,
|
||
|
# including negligence, or under any other theory of
|
||
|
# liability) for any loss or damage of any kind or nature
|
||
|
# related to, arising under or in connection with these
|
||
|
# materials, including for any direct, or any indirect,
|
||
|
# special, incidental, or consequential loss or damage
|
||
|
# (including loss of data, profits, goodwill, or any type of
|
||
|
# loss or damage suffered as a result of any action brought
|
||
|
# by a third party) even if such damage or loss was
|
||
|
# reasonably foreseeable or Xilinx had been advised of the
|
||
|
# possibility of the same.
|
||
|
#
|
||
|
# CRITICAL APPLICATIONS
|
||
|
# Xilinx products are not designed or intended to be fail-
|
||
|
# safe, or for use in any application requiring fail-safe
|
||
|
# performance, such as life-support or safety devices or
|
||
|
# systems, Class III medical devices, nuclear facilities,
|
||
|
# applications related to the deployment of airbags, or any
|
||
|
# other applications that could lead to death, personal
|
||
|
# injury, or severe property or environmental damage
|
||
|
# (individually and collectively, "Critical
|
||
|
# Applications"). Customer assumes the sole risk and
|
||
|
# liability of any use of Xilinx products in Critical
|
||
|
# Applications, subject only to applicable laws and
|
||
|
# regulations governing limitations on product liability.
|
||
|
#
|
||
|
# THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
|
||
|
# PART OF THIS FILE AT ALL TIMES.
|
||
|
#
|
||
|
|
||
|
|
||
|
# remove old files
|
||
|
rm -rf simv* csrc DVEfiles AN.DB
|
||
|
|
||
|
# compile all of the files
|
||
|
# Note that -sverilog is not strictly required- You can
|
||
|
# remove the -sverilog if you change the type of the
|
||
|
# localparam for the periods in the testbench file to
|
||
|
# [63:0] from time
|
||
|
vhdlan -xlrm ../../implement/results/routed.vhd \
|
||
|
pll_tb.vhd
|
||
|
|
||
|
# prepare the simulation
|
||
|
vcs +vcs+lic+wait -xlrm -sdf max:pll_exdes:../../implement/results/routed.sdf -debug pll_tb.vhd ../../implement/results/routed.vhd
|
||
|
|
||
|
# run the simulation
|
||
|
./simv -xlrm -ucli -i ucli_commands.key
|
||
|
|
||
|
# launch the viewer
|
||
|
#dve -vpd vcdplus.vpd -session vcs_session.tcl
|
||
| papilioduo/pll/pll/simulation/timing/pll_tb.vhd | ||
|---|---|---|
|
-- file: pll_tb.vhd
|
||
|
--
|
||
|
-- (c) Copyright 2008 - 2011 Xilinx, Inc. All rights reserved.
|
||
|
--
|
||
|
-- This file contains confidential and proprietary information
|
||
|
-- of Xilinx, Inc. and is protected under U.S. and
|
||
|
-- international copyright and other intellectual property
|
||
|
-- laws.
|
||
|
--
|
||
|
-- DISCLAIMER
|
||
|
-- This disclaimer is not a license and does not grant any
|
||
|
-- rights to the materials distributed herewith. Except as
|
||
|
-- otherwise provided in a valid license issued to you by
|
||
|
-- Xilinx, and to the maximum extent permitted by applicable
|
||
|
-- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
|
||
|
-- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
|
||
|
-- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
|
||
|
-- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
|
||
|
-- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
|
||
|
-- (2) Xilinx shall not be liable (whether in contract or tort,
|
||
|
-- including negligence, or under any other theory of
|
||
|
-- liability) for any loss or damage of any kind or nature
|
||
|
-- related to, arising under or in connection with these
|
||
|
-- materials, including for any direct, or any indirect,
|
||
|
-- special, incidental, or consequential loss or damage
|
||
|
-- (including loss of data, profits, goodwill, or any type of
|
||
|
-- loss or damage suffered as a result of any action brought
|
||
|
-- by a third party) even if such damage or loss was
|
||
|
-- reasonably foreseeable or Xilinx had been advised of the
|
||
|
-- possibility of the same.
|
||
|
--
|
||
|
-- CRITICAL APPLICATIONS
|
||
|
-- Xilinx products are not designed or intended to be fail-
|
||
|
-- safe, or for use in any application requiring fail-safe
|
||
|
-- performance, such as life-support or safety devices or
|
||
|
-- systems, Class III medical devices, nuclear facilities,
|
||
|
-- applications related to the deployment of airbags, or any
|
||
|
-- other applications that could lead to death, personal
|
||
|
-- injury, or severe property or environmental damage
|
||
|
-- (individually and collectively, "Critical
|
||
|
-- Applications"). Customer assumes the sole risk and
|
||
|
-- liability of any use of Xilinx products in Critical
|
||
|
-- Applications, subject only to applicable laws and
|
||
|
-- regulations governing limitations on product liability.
|
||
|
--
|
||
|
-- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
|
||
|
-- PART OF THIS FILE AT ALL TIMES.
|
||
|
--
|
||
|
|
||
|
------------------------------------------------------------------------------
|
||
|
-- Clocking wizard demonstration testbench
|
||
|
------------------------------------------------------------------------------
|
||
|
-- This demonstration testbench instantiates the example design for the
|
||
|
-- clocking wizard. Input clocks are toggled, which cause the clocking
|
||
|
-- network to lock and the counters to increment.
|
||
|
------------------------------------------------------------------------------
|
||
|
|
||
|
library ieee;
|
||
|
use ieee.std_logic_1164.all;
|
||
|
use ieee.std_logic_unsigned.all;
|
||
|
use ieee.std_logic_arith.all;
|
||
|
use ieee.numeric_std.all;
|
||
|
use ieee.std_logic_textio.all;
|
||
|
|
||
|
library std;
|
||
|
use std.textio.all;
|
||
|
|
||
|
library work;
|
||
|
use work.all;
|
||
|
|
||
|
entity pll_tb is
|
||
|
end pll_tb;
|
||
|
|
||
|
architecture test of pll_tb is
|
||
|
|
||
|
-- Clock to Q delay of 100 ps
|
||
|
constant TCQ : time := 100 ps;
|
||
|
-- timescale is 1ps
|
||
|
constant ONE_NS : time := 1 ns;
|
||
|
-- how many cycles to run
|
||
|
constant COUNT_PHASE : integer := 1024 + 1;
|
||
|
|
||
|
|
||
|
-- we'll be using the period in many locations
|
||
|
constant PER1 : time := 20.000 ns;
|
||
|
|
||
|
|
||
|
-- Declare the input clock signals
|
||
|
signal CLK_IN1 : std_logic := '1';
|
||
|
-- The high bits of the sampling counters
|
||
|
signal COUNT : std_logic_vector(2 downto 1);
|
||
|
-- Status and control signals
|
||
|
signal LOCKED : std_logic;
|
||
|
signal COUNTER_RESET : std_logic := '0';
|
||
|
signal timeout_counter : std_logic_vector (13 downto 0) := (others => '0');
|
||
|
-- signal defined to stop mti simulation without severity failure in the report
|
||
|
signal end_of_sim : std_logic := '0';
|
||
|
signal CLK_OUT : std_logic_vector(2 downto 1);
|
||
|
--Freq Check using the M & D values setting and actual Frequency generated
|
||
|
|
||
|
component pll_exdes
|
||
|
port
|
||
|
(-- Clock in ports
|
||
|
CLK_IN1 : in std_logic;
|
||
|
-- Reset that only drives logic in example design
|
||
|
COUNTER_RESET : in std_logic;
|
||
|
CLK_OUT : out std_logic_vector(2 downto 1) ;
|
||
|
-- High bits of counters driven by clocks
|
||
|
COUNT : out std_logic_vector(2 downto 1);
|
||
|
-- Status and control signals
|
||
|
LOCKED : out std_logic
|
||
|
);
|
||
|
end component;
|
||
|
|
||
|
begin
|
||
|
|
||
|
-- Input clock generation
|
||
|
--------------------------------------
|
||
|
process begin
|
||
|
CLK_IN1 <= not CLK_IN1; wait for (PER1/2);
|
||
|
end process;
|
||
|
|
||
|
-- Test sequence
|
||
|
process
|
||
|
|
||
|
procedure simtimeprint is
|
||
|
variable outline : line;
|
||
|
begin
|
||
|
write(outline, string'("## SYSTEM_CYCLE_COUNTER "));
|
||
|
write(outline, NOW/PER1);
|
||
|
write(outline, string'(" ns"));
|
||
|
writeline(output,outline);
|
||
|
end simtimeprint;
|
||
|
|
||
|
procedure simfreqprint (period : time; clk_num : integer) is
|
||
|
variable outputline : LINE;
|
||
|
variable str1 : string(1 to 16);
|
||
|
variable str2 : integer;
|
||
|
variable str3 : string(1 to 2);
|
||
|
variable str4 : integer;
|
||
|
variable str5 : string(1 to 4);
|
||
|
begin
|
||
|
str1 := "Freq of CLK_OUT(";
|
||
|
str2 := clk_num;
|
||
|
str3 := ") ";
|
||
|
str4 := 1000000 ps/period ;
|
||
|
str5 := " MHz" ;
|
||
|
write(outputline, str1 );
|
||
|
write(outputline, str2);
|
||
|
write(outputline, str3);
|
||
|
write(outputline, str4);
|
||
|
write(outputline, str5);
|
||
|
writeline(output, outputline);
|
||
|
end simfreqprint;
|
||
|
|
||
|
begin
|
||
|
report "Timing checks are not valid" severity note;
|
||
|
wait until LOCKED = '1';
|
||
|
wait for (PER1*20);
|
||
|
COUNTER_RESET <= '1';
|
||
|
wait for (PER1*19.5);
|
||
|
COUNTER_RESET <= '0';
|
||
|
wait for (PER1*1);
|
||
|
report "Timing checks are valid" severity note;
|
||
|
wait for (PER1*COUNT_PHASE);
|
||
|
|
||
|
|
||
|
simtimeprint;
|
||
|
end_of_sim <= '1';
|
||
replacing with pal/ntsc plls of correct input frequency