mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-04 14:07:30 +00:00
WIP: device synchronization
This commit is contained in:
parent
047f6ce981
commit
58918f81c1
90 changed files with 8970 additions and 310 deletions
53
FPGA/Generator/ipcore_dir/AMMult.gise
Normal file
53
FPGA/Generator/ipcore_dir/AMMult.gise
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?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="AMMult.xise"/>
|
||||
|
||||
<files xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<file xil_pn:fileType="FILE_ASY" xil_pn:name="AMMult.asy" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_SYMBOL" xil_pn:name="AMMult.sym" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_VHO" xil_pn:name="AMMult.vho" xil_pn:origination="imported"/>
|
||||
</files>
|
||||
|
||||
<transforms xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<transform xil_pn:end_ts="1654646662" xil_pn:name="TRAN_copyInitialToXSTAbstractSynthesis" xil_pn:start_ts="1654646662">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_schematicsToHdl" xil_pn:prop_ck="-4873039598653988690" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_regenerateCores" xil_pn:prop_ck="1388655879939993469" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_SubProjectAbstractToPreProxy" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_xawsTohdl" xil_pn:prop_ck="-8697384035118631440" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
</transforms>
|
||||
|
||||
</generated_project>
|
||||
102
FPGA/Generator/ipcore_dir/AMMult.vhd
Normal file
102
FPGA/Generator/ipcore_dir/AMMult.vhd
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
--------------------------------------------------------------------------------
|
||||
-- This file is owned and controlled by Xilinx and must be used solely --
|
||||
-- for design, simulation, implementation and creation of design files --
|
||||
-- limited to Xilinx devices or technologies. Use with non-Xilinx --
|
||||
-- devices or technologies is expressly prohibited and immediately --
|
||||
-- terminates your license. --
|
||||
-- --
|
||||
-- XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" SOLELY --
|
||||
-- FOR USE IN DEVELOPING PROGRAMS AND SOLUTIONS FOR XILINX DEVICES. BY --
|
||||
-- PROVIDING THIS DESIGN, CODE, OR INFORMATION AS ONE POSSIBLE --
|
||||
-- IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD, XILINX IS --
|
||||
-- MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE FROM ANY --
|
||||
-- CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING ANY --
|
||||
-- RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY --
|
||||
-- DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE --
|
||||
-- IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR --
|
||||
-- REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF --
|
||||
-- INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
|
||||
-- PARTICULAR PURPOSE. --
|
||||
-- --
|
||||
-- Xilinx products are not intended for use in life support appliances, --
|
||||
-- devices, or systems. Use in such applications are expressly --
|
||||
-- prohibited. --
|
||||
-- --
|
||||
-- (c) Copyright 1995-2022 Xilinx, Inc. --
|
||||
-- All rights reserved. --
|
||||
--------------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
-- You must compile the wrapper file AMMult.vhd when simulating
|
||||
-- the core, AMMult. When compiling the wrapper file, be sure to
|
||||
-- reference the XilinxCoreLib VHDL simulation library. For detailed
|
||||
-- instructions, please refer to the "CORE Generator Help".
|
||||
|
||||
-- The synthesis directives "translate_off/translate_on" specified
|
||||
-- below are supported by Xilinx, Mentor Graphics and Synplicity
|
||||
-- synthesis tools. Ensure they are correct for your synthesis tool(s).
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.ALL;
|
||||
-- synthesis translate_off
|
||||
LIBRARY XilinxCoreLib;
|
||||
-- synthesis translate_on
|
||||
ENTITY AMMult IS
|
||||
PORT (
|
||||
clk : IN STD_LOGIC;
|
||||
a : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
b : IN STD_LOGIC_VECTOR(6 DOWNTO 0);
|
||||
ce : IN STD_LOGIC;
|
||||
p : OUT STD_LOGIC_VECTOR(14 DOWNTO 0)
|
||||
);
|
||||
END AMMult;
|
||||
|
||||
ARCHITECTURE AMMult_a OF AMMult IS
|
||||
-- synthesis translate_off
|
||||
COMPONENT wrapped_AMMult
|
||||
PORT (
|
||||
clk : IN STD_LOGIC;
|
||||
a : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
b : IN STD_LOGIC_VECTOR(6 DOWNTO 0);
|
||||
ce : IN STD_LOGIC;
|
||||
p : OUT STD_LOGIC_VECTOR(14 DOWNTO 0)
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
-- Configuration specification
|
||||
FOR ALL : wrapped_AMMult USE ENTITY XilinxCoreLib.mult_gen_v11_2(behavioral)
|
||||
GENERIC MAP (
|
||||
c_a_type => 1,
|
||||
c_a_width => 8,
|
||||
c_b_type => 1,
|
||||
c_b_value => "10000001",
|
||||
c_b_width => 7,
|
||||
c_ccm_imp => 0,
|
||||
c_ce_overrides_sclr => 0,
|
||||
c_has_ce => 1,
|
||||
c_has_sclr => 0,
|
||||
c_has_zero_detect => 0,
|
||||
c_latency => 1,
|
||||
c_model_type => 0,
|
||||
c_mult_type => 1,
|
||||
c_optimize_goal => 1,
|
||||
c_out_high => 14,
|
||||
c_out_low => 0,
|
||||
c_round_output => 0,
|
||||
c_round_pt => 0,
|
||||
c_verbosity => 0,
|
||||
c_xdevicefamily => "spartan6"
|
||||
);
|
||||
-- synthesis translate_on
|
||||
BEGIN
|
||||
-- synthesis translate_off
|
||||
U0 : wrapped_AMMult
|
||||
PORT MAP (
|
||||
clk => clk,
|
||||
a => a,
|
||||
b => b,
|
||||
ce => ce,
|
||||
p => p
|
||||
);
|
||||
-- synthesis translate_on
|
||||
|
||||
END AMMult_a;
|
||||
31
FPGA/Generator/ipcore_dir/DFT_CLK.gise
Normal file
31
FPGA/Generator/ipcore_dir/DFT_CLK.gise
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?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="DFT_CLK.xise"/>
|
||||
|
||||
<files xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<file xil_pn:fileType="FILE_ASY" xil_pn:name="DFT_CLK.asy" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_VHO" xil_pn:name="DFT_CLK.vho" xil_pn:origination="imported"/>
|
||||
</files>
|
||||
|
||||
<transforms xmlns="http://www.xilinx.com/XMLSchema"/>
|
||||
|
||||
</generated_project>
|
||||
59
FPGA/Generator/ipcore_dir/DFT_CLK.ucf
Executable file
59
FPGA/Generator/ipcore_dir/DFT_CLK.ucf
Executable file
|
|
@ -0,0 +1,59 @@
|
|||
# file: DFT_CLK.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" 62.5 ns HIGH 50% INPUT_JITTER 625.0ps;
|
||||
|
||||
|
||||
# FALSE PATH constraints
|
||||
PIN "RESET" TIG;
|
||||
|
||||
169
FPGA/Generator/ipcore_dir/DFT_CLK.vhd
Executable file
169
FPGA/Generator/ipcore_dir/DFT_CLK.vhd
Executable file
|
|
@ -0,0 +1,169 @@
|
|||
-- file: DFT_CLK.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.
|
||||
--
|
||||
------------------------------------------------------------------------------
|
||||
-- User entered comments
|
||||
------------------------------------------------------------------------------
|
||||
-- None
|
||||
--
|
||||
------------------------------------------------------------------------------
|
||||
-- "Output Output Phase Duty Pk-to-Pk Phase"
|
||||
-- "Clock Freq (MHz) (degrees) Cycle (%) Jitter (ps) Error (ps)"
|
||||
------------------------------------------------------------------------------
|
||||
-- CLK_OUT1___160.000______0.000______50.0______336.927____150.000
|
||||
--
|
||||
------------------------------------------------------------------------------
|
||||
-- "Input Clock Freq (MHz) Input Jitter (UI)"
|
||||
------------------------------------------------------------------------------
|
||||
-- __primary______________16____________0.010
|
||||
|
||||
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 DFT_CLK is
|
||||
port
|
||||
(-- Clock in ports
|
||||
CLK_IN1 : in std_logic;
|
||||
-- Clock out ports
|
||||
CLK_OUT1 : out std_logic;
|
||||
-- Status and control signals
|
||||
RESET : in std_logic;
|
||||
LOCKED : out std_logic
|
||||
);
|
||||
end DFT_CLK;
|
||||
|
||||
architecture xilinx of DFT_CLK is
|
||||
attribute CORE_GENERATION_INFO : string;
|
||||
attribute CORE_GENERATION_INFO of xilinx : architecture is "DFT_CLK,clk_wiz_v3_6,{component_name=DFT_CLK,use_phase_alignment=true,use_min_o_jitter=false,use_max_i_jitter=false,use_dyn_phase_shift=false,use_inclk_switchover=false,use_dyn_reconfig=false,feedback_source=FDBK_AUTO,primtype_sel=DCM_SP,num_out_clk=1,clkin1_period=62.5,clkin2_period=62.5,use_power_down=false,use_reset=true,use_locked=true,use_inclk_stopped=false,use_status=false,use_freeze=false,use_clk_valid=false,feedback_type=SINGLE,clock_mgr_type=AUTO,manual_override=false}";
|
||||
-- Input clock buffering / unused connectors
|
||||
signal clkin1 : std_logic;
|
||||
-- Output clock buffering
|
||||
signal clkfb : std_logic;
|
||||
signal clk0 : std_logic;
|
||||
signal clkfx : std_logic;
|
||||
signal clkfbout : std_logic;
|
||||
signal locked_internal : std_logic;
|
||||
signal status_internal : std_logic_vector(7 downto 0);
|
||||
begin
|
||||
|
||||
|
||||
-- Input buffering
|
||||
--------------------------------------
|
||||
clkin1 <= CLK_IN1;
|
||||
|
||||
|
||||
-- Clocking primitive
|
||||
--------------------------------------
|
||||
|
||||
-- Instantiation of the DCM primitive
|
||||
-- * Unused inputs are tied off
|
||||
-- * Unused outputs are labeled unused
|
||||
dcm_sp_inst: DCM_SP
|
||||
generic map
|
||||
(CLKDV_DIVIDE => 2.000,
|
||||
CLKFX_DIVIDE => 1,
|
||||
CLKFX_MULTIPLY => 10,
|
||||
CLKIN_DIVIDE_BY_2 => FALSE,
|
||||
CLKIN_PERIOD => 62.5,
|
||||
CLKOUT_PHASE_SHIFT => "NONE",
|
||||
CLK_FEEDBACK => "1X",
|
||||
DESKEW_ADJUST => "SYSTEM_SYNCHRONOUS",
|
||||
PHASE_SHIFT => 0,
|
||||
STARTUP_WAIT => FALSE)
|
||||
port map
|
||||
-- Input clock
|
||||
(CLKIN => clkin1,
|
||||
CLKFB => clkfb,
|
||||
-- Output clocks
|
||||
CLK0 => clk0,
|
||||
CLK90 => open,
|
||||
CLK180 => open,
|
||||
CLK270 => open,
|
||||
CLK2X => open,
|
||||
CLK2X180 => open,
|
||||
CLKFX => clkfx,
|
||||
CLKFX180 => open,
|
||||
CLKDV => open,
|
||||
-- Ports for dynamic phase shift
|
||||
PSCLK => '0',
|
||||
PSEN => '0',
|
||||
PSINCDEC => '0',
|
||||
PSDONE => open,
|
||||
-- Other control and status signals
|
||||
LOCKED => locked_internal,
|
||||
STATUS => status_internal,
|
||||
RST => RESET,
|
||||
-- Unused pin, tie low
|
||||
DSSEN => '0');
|
||||
|
||||
LOCKED <= locked_internal;
|
||||
|
||||
|
||||
|
||||
-- Output buffering
|
||||
-------------------------------------
|
||||
clkf_buf : BUFG
|
||||
port map
|
||||
(O => clkfb,
|
||||
I => clk0);
|
||||
|
||||
|
||||
clkout1_buf : BUFG
|
||||
port map
|
||||
(O => CLK_OUT1,
|
||||
I => clkfx);
|
||||
|
||||
|
||||
|
||||
end xilinx;
|
||||
60
FPGA/Generator/ipcore_dir/DFT_CLK/example_design/DFT_CLK_exdes.ucf
Executable file
60
FPGA/Generator/ipcore_dir/DFT_CLK/example_design/DFT_CLK_exdes.ucf
Executable file
|
|
@ -0,0 +1,60 @@
|
|||
# file: DFT_CLK_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" 62.5 ns HIGH 50% INPUT_JITTER 625.0ps;
|
||||
|
||||
|
||||
# FALSE PATH constraints
|
||||
PIN "COUNTER_RESET" TIG;
|
||||
PIN "RESET" TIG;
|
||||
|
||||
192
FPGA/Generator/ipcore_dir/DFT_CLK/example_design/DFT_CLK_exdes.vhd
Executable file
192
FPGA/Generator/ipcore_dir/DFT_CLK/example_design/DFT_CLK_exdes.vhd
Executable file
|
|
@ -0,0 +1,192 @@
|
|||
-- file: DFT_CLK_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 DFT_CLK_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(1 downto 1) ;
|
||||
-- High bits of counters driven by clocks
|
||||
COUNT : out std_logic;
|
||||
-- Status and control signals
|
||||
RESET : in std_logic;
|
||||
LOCKED : out std_logic
|
||||
);
|
||||
end DFT_CLK_exdes;
|
||||
|
||||
architecture xilinx of DFT_CLK_exdes is
|
||||
|
||||
-- Parameters for the counters
|
||||
---------------------------------
|
||||
-- Counter width
|
||||
constant C_W : integer := 16;
|
||||
|
||||
|
||||
-- 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 counter
|
||||
signal clk : std_logic;
|
||||
signal clk_int : std_logic;
|
||||
signal clk_n : std_logic;
|
||||
signal counter : std_logic_vector(C_W-1 downto 0) := (others => '0');
|
||||
|
||||
-- Need to buffer input clocks that aren't already buffered
|
||||
signal clk_in1_buf : std_logic;
|
||||
signal rst_sync : std_logic;
|
||||
signal rst_sync_int : std_logic;
|
||||
signal rst_sync_int1 : std_logic;
|
||||
signal rst_sync_int2 : std_logic;
|
||||
|
||||
|
||||
component DFT_CLK is
|
||||
port
|
||||
(-- Clock in ports
|
||||
CLK_IN1 : in std_logic;
|
||||
-- Clock out ports
|
||||
CLK_OUT1 : out std_logic;
|
||||
-- Status and control signals
|
||||
RESET : in std_logic;
|
||||
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 RESET or COUNTER_RESET;
|
||||
|
||||
|
||||
process (clk, reset_int) begin
|
||||
if (reset_int = '1') then
|
||||
rst_sync <= '1';
|
||||
rst_sync_int <= '1';
|
||||
rst_sync_int1 <= '1';
|
||||
rst_sync_int2 <= '1';
|
||||
elsif (clk 'event and clk='1') then
|
||||
rst_sync <= '0';
|
||||
rst_sync_int <= rst_sync;
|
||||
rst_sync_int1 <= rst_sync_int;
|
||||
rst_sync_int2 <= rst_sync_int1;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
|
||||
-- Insert BUFGs on all input clocks that don't already have them
|
||||
----------------------------------------------------------------
|
||||
clkin1_buf : BUFG
|
||||
port map
|
||||
(O => clk_in1_buf,
|
||||
I => CLK_IN1);
|
||||
|
||||
-- Instantiation of the clocking network
|
||||
----------------------------------------
|
||||
clknetwork : DFT_CLK
|
||||
port map
|
||||
(-- Clock in ports
|
||||
CLK_IN1 => clk_in1_buf,
|
||||
-- Clock out ports
|
||||
CLK_OUT1 => clk_int,
|
||||
-- Status and control signals
|
||||
RESET => RESET,
|
||||
LOCKED => locked_int);
|
||||
|
||||
clk_n <= not clk;
|
||||
clkout_oddr : ODDR2
|
||||
port map
|
||||
(Q => CLK_OUT(1),
|
||||
C0 => clk,
|
||||
C1 => clk_n,
|
||||
CE => '1',
|
||||
D0 => '1',
|
||||
D1 => '0',
|
||||
R => '0',
|
||||
S => '0');
|
||||
|
||||
-- Connect the output clocks to the design
|
||||
-------------------------------------------
|
||||
clk <= clk_int;
|
||||
|
||||
-- Output clock sampling
|
||||
-------------------------------------
|
||||
process (clk, rst_sync_int2) begin
|
||||
if (rst_sync_int2 = '1') then
|
||||
counter <= (others => '0') after TCQ;
|
||||
elsif (rising_edge(clk)) then
|
||||
counter <= counter + 1 after TCQ;
|
||||
end if;
|
||||
end process;
|
||||
-- alias the high bit to the output
|
||||
COUNT <= counter(C_W-1);
|
||||
|
||||
|
||||
end xilinx;
|
||||
197
FPGA/Generator/ipcore_dir/DFT_CLK/simulation/DFT_CLK_tb.vhd
Executable file
197
FPGA/Generator/ipcore_dir/DFT_CLK/simulation/DFT_CLK_tb.vhd
Executable file
|
|
@ -0,0 +1,197 @@
|
|||
-- file: DFT_CLK_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 DFT_CLK_tb is
|
||||
end DFT_CLK_tb;
|
||||
|
||||
architecture test of DFT_CLK_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 := 62.5 ns;
|
||||
|
||||
|
||||
-- Declare the input clock signals
|
||||
signal CLK_IN1 : std_logic := '1';
|
||||
-- The high bit of the sampling counter
|
||||
signal COUNT : std_logic;
|
||||
-- Status and control signals
|
||||
signal RESET : std_logic := '0';
|
||||
signal LOCKED : std_logic;
|
||||
signal COUNTER_RESET : std_logic := '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(1 downto 1);
|
||||
--Freq Check using the M & D values setting and actual Frequency generated
|
||||
|
||||
component DFT_CLK_exdes
|
||||
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(1 downto 1) ;
|
||||
-- High bits of counters driven by clocks
|
||||
COUNT : out std_logic;
|
||||
-- Status and control signals
|
||||
RESET : in std_logic;
|
||||
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
|
||||
RESET <= '1';
|
||||
wait for (PER1*6);
|
||||
RESET <= '0';
|
||||
wait until LOCKED = '1';
|
||||
COUNTER_RESET <= '1';
|
||||
wait for (PER1*20);
|
||||
COUNTER_RESET <= '0';
|
||||
wait for (PER1*COUNT_PHASE);
|
||||
|
||||
|
||||
simtimeprint;
|
||||
end_of_sim <= '1';
|
||||
wait for 1 ps;
|
||||
report "Simulation Stopped." severity failure;
|
||||
wait;
|
||||
end process;
|
||||
|
||||
-- Instantiation of the example design containing the clock
|
||||
-- network and sampling counters
|
||||
-----------------------------------------------------------
|
||||
dut : DFT_CLK_exdes
|
||||
generic map (
|
||||
TCQ => TCQ)
|
||||
port map
|
||||
(-- Clock in ports
|
||||
CLK_IN1 => CLK_IN1,
|
||||
-- Reset for logic in example design
|
||||
COUNTER_RESET => COUNTER_RESET,
|
||||
CLK_OUT => CLK_OUT,
|
||||
-- High bits of the counters
|
||||
COUNT => COUNT,
|
||||
-- Status and control signals
|
||||
RESET => RESET,
|
||||
LOCKED => LOCKED);
|
||||
|
||||
-- Freq Check
|
||||
|
||||
end test;
|
||||
220
FPGA/Generator/ipcore_dir/DFT_CLK/simulation/timing/DFT_CLK_tb.vhd
Executable file
220
FPGA/Generator/ipcore_dir/DFT_CLK/simulation/timing/DFT_CLK_tb.vhd
Executable file
|
|
@ -0,0 +1,220 @@
|
|||
-- file: DFT_CLK_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 DFT_CLK_tb is
|
||||
end DFT_CLK_tb;
|
||||
|
||||
architecture test of DFT_CLK_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 := 62.5 ns;
|
||||
|
||||
|
||||
-- Declare the input clock signals
|
||||
signal CLK_IN1 : std_logic := '1';
|
||||
-- The high bit of the sampling counter
|
||||
signal COUNT : std_logic;
|
||||
-- Status and control signals
|
||||
signal RESET : std_logic := '0';
|
||||
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(1 downto 1);
|
||||
--Freq Check using the M & D values setting and actual Frequency generated
|
||||
|
||||
component DFT_CLK_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(1 downto 1) ;
|
||||
-- High bits of counters driven by clocks
|
||||
COUNT : out std_logic;
|
||||
-- Status and control signals
|
||||
RESET : in std_logic;
|
||||
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;
|
||||
RESET <= '1';
|
||||
wait for (PER1*6);
|
||||
RESET <= '0';
|
||||
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';
|
||||
wait for 1 ps;
|
||||
report "Simulation Stopped." severity failure;
|
||||
wait;
|
||||
end process;
|
||||
|
||||
process (CLK_IN1)
|
||||
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;
|
||||
begin
|
||||
if (CLK_IN1'event and CLK_IN1='1') then
|
||||
timeout_counter <= timeout_counter + '1';
|
||||
if (timeout_counter = "10000000000000") then
|
||||
if (LOCKED /= '1') then
|
||||
simtimeprint;
|
||||
report "NO LOCK signal" severity failure;
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
|
||||
-- Instantiation of the example design containing the clock
|
||||
-- network and sampling counters
|
||||
-----------------------------------------------------------
|
||||
dut : DFT_CLK_exdes
|
||||
port map
|
||||
(-- Clock in ports
|
||||
CLK_IN1 => CLK_IN1,
|
||||
-- Reset for logic in example design
|
||||
COUNTER_RESET => COUNTER_RESET,
|
||||
CLK_OUT => CLK_OUT,
|
||||
-- High bits of the counters
|
||||
COUNT => COUNT,
|
||||
-- Status and control signals
|
||||
RESET => RESET,
|
||||
LOCKED => LOCKED);
|
||||
|
||||
-- Freq Check
|
||||
|
||||
end test;
|
||||
32
FPGA/Generator/ipcore_dir/DSP48.gise
Normal file
32
FPGA/Generator/ipcore_dir/DSP48.gise
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?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="DSP48.xise"/>
|
||||
|
||||
<files xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<file xil_pn:fileType="FILE_ASY" xil_pn:name="DSP48.asy" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_SYMBOL" xil_pn:name="DSP48.sym" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_VHO" xil_pn:name="DSP48.vho" xil_pn:origination="imported"/>
|
||||
</files>
|
||||
|
||||
<transforms xmlns="http://www.xilinx.com/XMLSchema"/>
|
||||
|
||||
</generated_project>
|
||||
139
FPGA/Generator/ipcore_dir/DSP48.vhd
Normal file
139
FPGA/Generator/ipcore_dir/DSP48.vhd
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
--------------------------------------------------------------------------------
|
||||
-- This file is owned and controlled by Xilinx and must be used solely --
|
||||
-- for design, simulation, implementation and creation of design files --
|
||||
-- limited to Xilinx devices or technologies. Use with non-Xilinx --
|
||||
-- devices or technologies is expressly prohibited and immediately --
|
||||
-- terminates your license. --
|
||||
-- --
|
||||
-- XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" SOLELY --
|
||||
-- FOR USE IN DEVELOPING PROGRAMS AND SOLUTIONS FOR XILINX DEVICES. BY --
|
||||
-- PROVIDING THIS DESIGN, CODE, OR INFORMATION AS ONE POSSIBLE --
|
||||
-- IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD, XILINX IS --
|
||||
-- MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE FROM ANY --
|
||||
-- CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING ANY --
|
||||
-- RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY --
|
||||
-- DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE --
|
||||
-- IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR --
|
||||
-- REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF --
|
||||
-- INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
|
||||
-- PARTICULAR PURPOSE. --
|
||||
-- --
|
||||
-- Xilinx products are not intended for use in life support appliances, --
|
||||
-- devices, or systems. Use in such applications are expressly --
|
||||
-- prohibited. --
|
||||
-- --
|
||||
-- (c) Copyright 1995-2020 Xilinx, Inc. --
|
||||
-- All rights reserved. --
|
||||
--------------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
-- You must compile the wrapper file DSP48.vhd when simulating
|
||||
-- the core, DSP48. When compiling the wrapper file, be sure to
|
||||
-- reference the XilinxCoreLib VHDL simulation library. For detailed
|
||||
-- instructions, please refer to the "CORE Generator Help".
|
||||
|
||||
-- The synthesis directives "translate_off/translate_on" specified
|
||||
-- below are supported by Xilinx, Mentor Graphics and Synplicity
|
||||
-- synthesis tools. Ensure they are correct for your synthesis tool(s).
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.ALL;
|
||||
-- synthesis translate_off
|
||||
LIBRARY XilinxCoreLib;
|
||||
-- synthesis translate_on
|
||||
ENTITY DSP48 IS
|
||||
PORT (
|
||||
clk : IN STD_LOGIC;
|
||||
ce : IN STD_LOGIC;
|
||||
sel : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
a : IN STD_LOGIC_VECTOR(17 DOWNTO 0);
|
||||
b : IN STD_LOGIC_VECTOR(17 DOWNTO 0);
|
||||
c : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
|
||||
p : OUT STD_LOGIC_VECTOR(47 DOWNTO 0)
|
||||
);
|
||||
END DSP48;
|
||||
|
||||
ARCHITECTURE DSP48_a OF DSP48 IS
|
||||
-- synthesis translate_off
|
||||
COMPONENT wrapped_DSP48
|
||||
PORT (
|
||||
clk : IN STD_LOGIC;
|
||||
ce : IN STD_LOGIC;
|
||||
sel : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
a : IN STD_LOGIC_VECTOR(17 DOWNTO 0);
|
||||
b : IN STD_LOGIC_VECTOR(17 DOWNTO 0);
|
||||
c : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
|
||||
p : OUT STD_LOGIC_VECTOR(47 DOWNTO 0)
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
-- Configuration specification
|
||||
FOR ALL : wrapped_DSP48 USE ENTITY XilinxCoreLib.xbip_dsp48_macro_v2_1(behavioral)
|
||||
GENERIC MAP (
|
||||
c_a_width => 18,
|
||||
c_b_width => 18,
|
||||
c_c_width => 48,
|
||||
c_concat_width => 48,
|
||||
c_constant_1 => 1,
|
||||
c_d_width => 18,
|
||||
c_has_a => 1,
|
||||
c_has_acin => 0,
|
||||
c_has_acout => 0,
|
||||
c_has_b => 1,
|
||||
c_has_bcin => 0,
|
||||
c_has_bcout => 0,
|
||||
c_has_c => 1,
|
||||
c_has_carrycascin => 0,
|
||||
c_has_carrycascout => 0,
|
||||
c_has_carryin => 0,
|
||||
c_has_carryout => 0,
|
||||
c_has_ce => 1,
|
||||
c_has_cea => 0,
|
||||
c_has_ceb => 0,
|
||||
c_has_cec => 0,
|
||||
c_has_ceconcat => 0,
|
||||
c_has_ced => 0,
|
||||
c_has_cem => 0,
|
||||
c_has_cep => 0,
|
||||
c_has_cesel => 0,
|
||||
c_has_concat => 0,
|
||||
c_has_d => 0,
|
||||
c_has_indep_ce => 0,
|
||||
c_has_indep_sclr => 0,
|
||||
c_has_pcin => 0,
|
||||
c_has_pcout => 0,
|
||||
c_has_sclr => 0,
|
||||
c_has_sclra => 0,
|
||||
c_has_sclrb => 0,
|
||||
c_has_sclrc => 0,
|
||||
c_has_sclrconcat => 0,
|
||||
c_has_sclrd => 0,
|
||||
c_has_sclrm => 0,
|
||||
c_has_sclrp => 0,
|
||||
c_has_sclrsel => 0,
|
||||
c_latency => -1,
|
||||
c_model_type => 0,
|
||||
c_opmodes => "0000000000010000000,0000001100010000000",
|
||||
c_p_lsb => 0,
|
||||
c_p_msb => 47,
|
||||
c_reg_config => "00000000000011100111100111100100",
|
||||
c_sel_width => 1,
|
||||
c_test_core => 0,
|
||||
c_verbosity => 0,
|
||||
c_xdevicefamily => "spartan6"
|
||||
);
|
||||
-- synthesis translate_on
|
||||
BEGIN
|
||||
-- synthesis translate_off
|
||||
U0 : wrapped_DSP48
|
||||
PORT MAP (
|
||||
clk => clk,
|
||||
ce => ce,
|
||||
sel => sel,
|
||||
a => a,
|
||||
b => b,
|
||||
c => c,
|
||||
p => p
|
||||
);
|
||||
-- synthesis translate_on
|
||||
|
||||
END DSP48_a;
|
||||
32
FPGA/Generator/ipcore_dir/DSP_SLICE.gise
Normal file
32
FPGA/Generator/ipcore_dir/DSP_SLICE.gise
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?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="DSP_SLICE.xise"/>
|
||||
|
||||
<files xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<file xil_pn:fileType="FILE_ASY" xil_pn:name="DSP_SLICE.asy" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_SYMBOL" xil_pn:name="DSP_SLICE.sym" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_VHO" xil_pn:name="DSP_SLICE.vho" xil_pn:origination="imported"/>
|
||||
</files>
|
||||
|
||||
<transforms xmlns="http://www.xilinx.com/XMLSchema"/>
|
||||
|
||||
</generated_project>
|
||||
139
FPGA/Generator/ipcore_dir/DSP_SLICE.vhd
Normal file
139
FPGA/Generator/ipcore_dir/DSP_SLICE.vhd
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
--------------------------------------------------------------------------------
|
||||
-- This file is owned and controlled by Xilinx and must be used solely --
|
||||
-- for design, simulation, implementation and creation of design files --
|
||||
-- limited to Xilinx devices or technologies. Use with non-Xilinx --
|
||||
-- devices or technologies is expressly prohibited and immediately --
|
||||
-- terminates your license. --
|
||||
-- --
|
||||
-- XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" SOLELY --
|
||||
-- FOR USE IN DEVELOPING PROGRAMS AND SOLUTIONS FOR XILINX DEVICES. BY --
|
||||
-- PROVIDING THIS DESIGN, CODE, OR INFORMATION AS ONE POSSIBLE --
|
||||
-- IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD, XILINX IS --
|
||||
-- MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE FROM ANY --
|
||||
-- CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING ANY --
|
||||
-- RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY --
|
||||
-- DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE --
|
||||
-- IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR --
|
||||
-- REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF --
|
||||
-- INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
|
||||
-- PARTICULAR PURPOSE. --
|
||||
-- --
|
||||
-- Xilinx products are not intended for use in life support appliances, --
|
||||
-- devices, or systems. Use in such applications are expressly --
|
||||
-- prohibited. --
|
||||
-- --
|
||||
-- (c) Copyright 1995-2020 Xilinx, Inc. --
|
||||
-- All rights reserved. --
|
||||
--------------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
-- You must compile the wrapper file DSP_SLICE.vhd when simulating
|
||||
-- the core, DSP_SLICE. When compiling the wrapper file, be sure to
|
||||
-- reference the XilinxCoreLib VHDL simulation library. For detailed
|
||||
-- instructions, please refer to the "CORE Generator Help".
|
||||
|
||||
-- The synthesis directives "translate_off/translate_on" specified
|
||||
-- below are supported by Xilinx, Mentor Graphics and Synplicity
|
||||
-- synthesis tools. Ensure they are correct for your synthesis tool(s).
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.ALL;
|
||||
-- synthesis translate_off
|
||||
LIBRARY XilinxCoreLib;
|
||||
-- synthesis translate_on
|
||||
ENTITY DSP_SLICE IS
|
||||
PORT (
|
||||
clk : IN STD_LOGIC;
|
||||
ce : IN STD_LOGIC;
|
||||
sel : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
a : IN STD_LOGIC_VECTOR(17 DOWNTO 0);
|
||||
b : IN STD_LOGIC_VECTOR(17 DOWNTO 0);
|
||||
c : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
|
||||
p : OUT STD_LOGIC_VECTOR(47 DOWNTO 0)
|
||||
);
|
||||
END DSP_SLICE;
|
||||
|
||||
ARCHITECTURE DSP_SLICE_a OF DSP_SLICE IS
|
||||
-- synthesis translate_off
|
||||
COMPONENT wrapped_DSP_SLICE
|
||||
PORT (
|
||||
clk : IN STD_LOGIC;
|
||||
ce : IN STD_LOGIC;
|
||||
sel : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
a : IN STD_LOGIC_VECTOR(17 DOWNTO 0);
|
||||
b : IN STD_LOGIC_VECTOR(17 DOWNTO 0);
|
||||
c : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
|
||||
p : OUT STD_LOGIC_VECTOR(47 DOWNTO 0)
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
-- Configuration specification
|
||||
FOR ALL : wrapped_DSP_SLICE USE ENTITY XilinxCoreLib.xbip_dsp48_macro_v2_1(behavioral)
|
||||
GENERIC MAP (
|
||||
c_a_width => 18,
|
||||
c_b_width => 18,
|
||||
c_c_width => 48,
|
||||
c_concat_width => 48,
|
||||
c_constant_1 => 1,
|
||||
c_d_width => 18,
|
||||
c_has_a => 1,
|
||||
c_has_acin => 0,
|
||||
c_has_acout => 0,
|
||||
c_has_b => 1,
|
||||
c_has_bcin => 0,
|
||||
c_has_bcout => 0,
|
||||
c_has_c => 1,
|
||||
c_has_carrycascin => 0,
|
||||
c_has_carrycascout => 0,
|
||||
c_has_carryin => 0,
|
||||
c_has_carryout => 0,
|
||||
c_has_ce => 1,
|
||||
c_has_cea => 0,
|
||||
c_has_ceb => 0,
|
||||
c_has_cec => 0,
|
||||
c_has_ceconcat => 0,
|
||||
c_has_ced => 0,
|
||||
c_has_cem => 0,
|
||||
c_has_cep => 0,
|
||||
c_has_cesel => 0,
|
||||
c_has_concat => 0,
|
||||
c_has_d => 0,
|
||||
c_has_indep_ce => 0,
|
||||
c_has_indep_sclr => 0,
|
||||
c_has_pcin => 0,
|
||||
c_has_pcout => 0,
|
||||
c_has_sclr => 0,
|
||||
c_has_sclra => 0,
|
||||
c_has_sclrb => 0,
|
||||
c_has_sclrc => 0,
|
||||
c_has_sclrconcat => 0,
|
||||
c_has_sclrd => 0,
|
||||
c_has_sclrm => 0,
|
||||
c_has_sclrp => 0,
|
||||
c_has_sclrsel => 0,
|
||||
c_latency => -1,
|
||||
c_model_type => 0,
|
||||
c_opmodes => "0000000000010000000,0000001100010000000",
|
||||
c_p_lsb => 0,
|
||||
c_p_msb => 47,
|
||||
c_reg_config => "00000000000011100111100111100100",
|
||||
c_sel_width => 1,
|
||||
c_test_core => 0,
|
||||
c_verbosity => 0,
|
||||
c_xdevicefamily => "spartan6"
|
||||
);
|
||||
-- synthesis translate_on
|
||||
BEGIN
|
||||
-- synthesis translate_off
|
||||
U0 : wrapped_DSP_SLICE
|
||||
PORT MAP (
|
||||
clk => clk,
|
||||
ce => ce,
|
||||
sel => sel,
|
||||
a => a,
|
||||
b => b,
|
||||
c => c,
|
||||
p => p
|
||||
);
|
||||
-- synthesis translate_on
|
||||
|
||||
END DSP_SLICE_a;
|
||||
53
FPGA/Generator/ipcore_dir/ModulationMemory.gise
Normal file
53
FPGA/Generator/ipcore_dir/ModulationMemory.gise
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?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="ModulationMemory.xise"/>
|
||||
|
||||
<files xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<file xil_pn:fileType="FILE_ASY" xil_pn:name="ModulationMemory.asy" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_SYMBOL" xil_pn:name="ModulationMemory.sym" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_VHO" xil_pn:name="ModulationMemory.vho" xil_pn:origination="imported"/>
|
||||
</files>
|
||||
|
||||
<transforms xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_copyInitialToXSTAbstractSynthesis" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_schematicsToHdl" xil_pn:prop_ck="1122694780993201560" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_regenerateCores" xil_pn:prop_ck="5643155787033519143" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_SubProjectAbstractToPreProxy" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_xawsTohdl" xil_pn:prop_ck="-8675282148687179814" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
</transforms>
|
||||
|
||||
</generated_project>
|
||||
149
FPGA/Generator/ipcore_dir/ModulationMemory.vhd
Normal file
149
FPGA/Generator/ipcore_dir/ModulationMemory.vhd
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
--------------------------------------------------------------------------------
|
||||
-- This file is owned and controlled by Xilinx and must be used solely --
|
||||
-- for design, simulation, implementation and creation of design files --
|
||||
-- limited to Xilinx devices or technologies. Use with non-Xilinx --
|
||||
-- devices or technologies is expressly prohibited and immediately --
|
||||
-- terminates your license. --
|
||||
-- --
|
||||
-- XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" SOLELY --
|
||||
-- FOR USE IN DEVELOPING PROGRAMS AND SOLUTIONS FOR XILINX DEVICES. BY --
|
||||
-- PROVIDING THIS DESIGN, CODE, OR INFORMATION AS ONE POSSIBLE --
|
||||
-- IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD, XILINX IS --
|
||||
-- MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE FROM ANY --
|
||||
-- CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING ANY --
|
||||
-- RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY --
|
||||
-- DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE --
|
||||
-- IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR --
|
||||
-- REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF --
|
||||
-- INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
|
||||
-- PARTICULAR PURPOSE. --
|
||||
-- --
|
||||
-- Xilinx products are not intended for use in life support appliances, --
|
||||
-- devices, or systems. Use in such applications are expressly --
|
||||
-- prohibited. --
|
||||
-- --
|
||||
-- (c) Copyright 1995-2022 Xilinx, Inc. --
|
||||
-- All rights reserved. --
|
||||
--------------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
-- You must compile the wrapper file ModulationMemory.vhd when simulating
|
||||
-- the core, ModulationMemory. When compiling the wrapper file, be sure to
|
||||
-- reference the XilinxCoreLib VHDL simulation library. For detailed
|
||||
-- instructions, please refer to the "CORE Generator Help".
|
||||
|
||||
-- The synthesis directives "translate_off/translate_on" specified
|
||||
-- below are supported by Xilinx, Mentor Graphics and Synplicity
|
||||
-- synthesis tools. Ensure they are correct for your synthesis tool(s).
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.ALL;
|
||||
-- synthesis translate_off
|
||||
LIBRARY XilinxCoreLib;
|
||||
-- synthesis translate_on
|
||||
ENTITY ModulationMemory IS
|
||||
PORT (
|
||||
clka : IN STD_LOGIC;
|
||||
wea : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
addra : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
dina : IN STD_LOGIC_VECTOR(143 DOWNTO 0);
|
||||
clkb : IN STD_LOGIC;
|
||||
addrb : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
doutb : OUT STD_LOGIC_VECTOR(143 DOWNTO 0)
|
||||
);
|
||||
END ModulationMemory;
|
||||
|
||||
ARCHITECTURE ModulationMemory_a OF ModulationMemory IS
|
||||
-- synthesis translate_off
|
||||
COMPONENT wrapped_ModulationMemory
|
||||
PORT (
|
||||
clka : IN STD_LOGIC;
|
||||
wea : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
addra : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
dina : IN STD_LOGIC_VECTOR(143 DOWNTO 0);
|
||||
clkb : IN STD_LOGIC;
|
||||
addrb : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
doutb : OUT STD_LOGIC_VECTOR(143 DOWNTO 0)
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
-- Configuration specification
|
||||
FOR ALL : wrapped_ModulationMemory USE ENTITY XilinxCoreLib.blk_mem_gen_v7_3(behavioral)
|
||||
GENERIC MAP (
|
||||
c_addra_width => 8,
|
||||
c_addrb_width => 8,
|
||||
c_algorithm => 1,
|
||||
c_axi_id_width => 4,
|
||||
c_axi_slave_type => 0,
|
||||
c_axi_type => 1,
|
||||
c_byte_size => 9,
|
||||
c_common_clk => 0,
|
||||
c_default_data => "0",
|
||||
c_disable_warn_bhv_coll => 0,
|
||||
c_disable_warn_bhv_range => 0,
|
||||
c_enable_32bit_address => 0,
|
||||
c_family => "spartan6",
|
||||
c_has_axi_id => 0,
|
||||
c_has_ena => 0,
|
||||
c_has_enb => 0,
|
||||
c_has_injecterr => 0,
|
||||
c_has_mem_output_regs_a => 0,
|
||||
c_has_mem_output_regs_b => 0,
|
||||
c_has_mux_output_regs_a => 0,
|
||||
c_has_mux_output_regs_b => 0,
|
||||
c_has_regcea => 0,
|
||||
c_has_regceb => 0,
|
||||
c_has_rsta => 0,
|
||||
c_has_rstb => 0,
|
||||
c_has_softecc_input_regs_a => 0,
|
||||
c_has_softecc_output_regs_b => 0,
|
||||
c_init_file => "BlankString",
|
||||
c_init_file_name => "no_coe_file_loaded",
|
||||
c_inita_val => "0",
|
||||
c_initb_val => "0",
|
||||
c_interface_type => 0,
|
||||
c_load_init_file => 0,
|
||||
c_mem_type => 1,
|
||||
c_mux_pipeline_stages => 0,
|
||||
c_prim_type => 1,
|
||||
c_read_depth_a => 256,
|
||||
c_read_depth_b => 256,
|
||||
c_read_width_a => 144,
|
||||
c_read_width_b => 144,
|
||||
c_rst_priority_a => "CE",
|
||||
c_rst_priority_b => "CE",
|
||||
c_rst_type => "SYNC",
|
||||
c_rstram_a => 0,
|
||||
c_rstram_b => 0,
|
||||
c_sim_collision_check => "ALL",
|
||||
c_use_bram_block => 0,
|
||||
c_use_byte_wea => 0,
|
||||
c_use_byte_web => 0,
|
||||
c_use_default_data => 0,
|
||||
c_use_ecc => 0,
|
||||
c_use_softecc => 0,
|
||||
c_wea_width => 1,
|
||||
c_web_width => 1,
|
||||
c_write_depth_a => 256,
|
||||
c_write_depth_b => 256,
|
||||
c_write_mode_a => "WRITE_FIRST",
|
||||
c_write_mode_b => "WRITE_FIRST",
|
||||
c_write_width_a => 144,
|
||||
c_write_width_b => 144,
|
||||
c_xdevicefamily => "spartan6"
|
||||
);
|
||||
-- synthesis translate_on
|
||||
BEGIN
|
||||
-- synthesis translate_off
|
||||
U0 : wrapped_ModulationMemory
|
||||
PORT MAP (
|
||||
clka => clka,
|
||||
wea => wea,
|
||||
addra => addra,
|
||||
dina => dina,
|
||||
clkb => clkb,
|
||||
addrb => addrb,
|
||||
doutb => doutb
|
||||
);
|
||||
-- synthesis translate_on
|
||||
|
||||
END ModulationMemory_a;
|
||||
52
FPGA/Generator/ipcore_dir/PLL.gise
Normal file
52
FPGA/Generator/ipcore_dir/PLL.gise
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?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">
|
||||
<transform xil_pn:end_ts="1588801396" xil_pn:name="TRAN_copyInitialToXSTAbstractSynthesis" xil_pn:start_ts="1588801396">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_schematicsToHdl" xil_pn:prop_ck="-7485999881756126958" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_regenerateCores" xil_pn:prop_ck="5187593455580750305" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_SubProjectAbstractToPreProxy" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_xawsTohdl" xil_pn:prop_ck="-8519729393005554412" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
</transforms>
|
||||
|
||||
</generated_project>
|
||||
59
FPGA/Generator/ipcore_dir/PLL.ucf
Executable file
59
FPGA/Generator/ipcore_dir/PLL.ucf
Executable file
|
|
@ -0,0 +1,59 @@
|
|||
# file: PLL.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" 62.5 ns HIGH 50% INPUT_JITTER 625.0ps;
|
||||
|
||||
|
||||
# FALSE PATH constraints
|
||||
PIN "RESET" TIG;
|
||||
|
||||
172
FPGA/Generator/ipcore_dir/PLL.vhd
Executable file
172
FPGA/Generator/ipcore_dir/PLL.vhd
Executable file
|
|
@ -0,0 +1,172 @@
|
|||
-- file: PLL.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.
|
||||
--
|
||||
------------------------------------------------------------------------------
|
||||
-- User entered comments
|
||||
------------------------------------------------------------------------------
|
||||
-- None
|
||||
--
|
||||
------------------------------------------------------------------------------
|
||||
-- "Output Output Phase Duty Pk-to-Pk Phase"
|
||||
-- "Clock Freq (MHz) (degrees) Cycle (%) Jitter (ps) Error (ps)"
|
||||
------------------------------------------------------------------------------
|
||||
-- CLK_OUT1___102.400______0.000______50.0_____1274.405____150.000
|
||||
--
|
||||
------------------------------------------------------------------------------
|
||||
-- "Input Clock Freq (MHz) Input Jitter (UI)"
|
||||
------------------------------------------------------------------------------
|
||||
-- __primary______________16____________0.010
|
||||
|
||||
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 is
|
||||
port
|
||||
(-- Clock in ports
|
||||
CLK_IN1 : in std_logic;
|
||||
-- Clock out ports
|
||||
CLK_OUT1 : out std_logic;
|
||||
-- Status and control signals
|
||||
RESET : in std_logic;
|
||||
LOCKED : out std_logic
|
||||
);
|
||||
end PLL;
|
||||
|
||||
architecture xilinx of PLL is
|
||||
attribute CORE_GENERATION_INFO : string;
|
||||
attribute CORE_GENERATION_INFO of xilinx : architecture is "PLL,clk_wiz_v3_6,{component_name=PLL,use_phase_alignment=true,use_min_o_jitter=false,use_max_i_jitter=false,use_dyn_phase_shift=false,use_inclk_switchover=false,use_dyn_reconfig=false,feedback_source=FDBK_AUTO,primtype_sel=DCM_SP,num_out_clk=1,clkin1_period=62.5,clkin2_period=62.5,use_power_down=false,use_reset=true,use_locked=true,use_inclk_stopped=false,use_status=false,use_freeze=false,use_clk_valid=false,feedback_type=SINGLE,clock_mgr_type=AUTO,manual_override=false}";
|
||||
-- Input clock buffering / unused connectors
|
||||
signal clkin1 : std_logic;
|
||||
-- Output clock buffering
|
||||
signal clkfb : std_logic;
|
||||
signal clk0 : std_logic;
|
||||
signal clkfx : std_logic;
|
||||
signal clkfbout : std_logic;
|
||||
signal locked_internal : std_logic;
|
||||
signal status_internal : std_logic_vector(7 downto 0);
|
||||
begin
|
||||
|
||||
|
||||
-- Input buffering
|
||||
--------------------------------------
|
||||
clkin1_buf : IBUFG
|
||||
port map
|
||||
(O => clkin1,
|
||||
I => CLK_IN1);
|
||||
|
||||
|
||||
-- Clocking primitive
|
||||
--------------------------------------
|
||||
|
||||
-- Instantiation of the DCM primitive
|
||||
-- * Unused inputs are tied off
|
||||
-- * Unused outputs are labeled unused
|
||||
dcm_sp_inst: DCM_SP
|
||||
generic map
|
||||
(CLKDV_DIVIDE => 2.000,
|
||||
CLKFX_DIVIDE => 5,
|
||||
CLKFX_MULTIPLY => 32,
|
||||
CLKIN_DIVIDE_BY_2 => FALSE,
|
||||
CLKIN_PERIOD => 62.5,
|
||||
CLKOUT_PHASE_SHIFT => "NONE",
|
||||
CLK_FEEDBACK => "1X",
|
||||
DESKEW_ADJUST => "SYSTEM_SYNCHRONOUS",
|
||||
PHASE_SHIFT => 0,
|
||||
STARTUP_WAIT => FALSE)
|
||||
port map
|
||||
-- Input clock
|
||||
(CLKIN => clkin1,
|
||||
CLKFB => clkfb,
|
||||
-- Output clocks
|
||||
CLK0 => clk0,
|
||||
CLK90 => open,
|
||||
CLK180 => open,
|
||||
CLK270 => open,
|
||||
CLK2X => open,
|
||||
CLK2X180 => open,
|
||||
CLKFX => clkfx,
|
||||
CLKFX180 => open,
|
||||
CLKDV => open,
|
||||
-- Ports for dynamic phase shift
|
||||
PSCLK => '0',
|
||||
PSEN => '0',
|
||||
PSINCDEC => '0',
|
||||
PSDONE => open,
|
||||
-- Other control and status signals
|
||||
LOCKED => locked_internal,
|
||||
STATUS => status_internal,
|
||||
RST => RESET,
|
||||
-- Unused pin, tie low
|
||||
DSSEN => '0');
|
||||
|
||||
LOCKED <= locked_internal;
|
||||
|
||||
|
||||
|
||||
-- Output buffering
|
||||
-------------------------------------
|
||||
clkf_buf : BUFG
|
||||
port map
|
||||
(O => clkfb,
|
||||
I => clk0);
|
||||
|
||||
|
||||
clkout1_buf : BUFG
|
||||
port map
|
||||
(O => CLK_OUT1,
|
||||
I => clkfx);
|
||||
|
||||
|
||||
|
||||
end xilinx;
|
||||
60
FPGA/Generator/ipcore_dir/PLL/example_design/PLL_exdes.ucf
Executable file
60
FPGA/Generator/ipcore_dir/PLL/example_design/PLL_exdes.ucf
Executable file
|
|
@ -0,0 +1,60 @@
|
|||
# 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" 62.5 ns HIGH 50% INPUT_JITTER 625.0ps;
|
||||
|
||||
|
||||
# FALSE PATH constraints
|
||||
PIN "COUNTER_RESET" TIG;
|
||||
PIN "RESET" TIG;
|
||||
|
||||
182
FPGA/Generator/ipcore_dir/PLL/example_design/PLL_exdes.vhd
Executable file
182
FPGA/Generator/ipcore_dir/PLL/example_design/PLL_exdes.vhd
Executable file
|
|
@ -0,0 +1,182 @@
|
|||
-- 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(1 downto 1) ;
|
||||
-- High bits of counters driven by clocks
|
||||
COUNT : out std_logic;
|
||||
-- Status and control signals
|
||||
RESET : in std_logic;
|
||||
LOCKED : out std_logic
|
||||
);
|
||||
end PLL_exdes;
|
||||
|
||||
architecture xilinx of PLL_exdes is
|
||||
|
||||
-- Parameters for the counters
|
||||
---------------------------------
|
||||
-- Counter width
|
||||
constant C_W : integer := 16;
|
||||
|
||||
|
||||
-- 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 counter
|
||||
signal clk : std_logic;
|
||||
signal clk_int : std_logic;
|
||||
signal clk_n : std_logic;
|
||||
signal counter : std_logic_vector(C_W-1 downto 0) := (others => '0');
|
||||
signal rst_sync : std_logic;
|
||||
signal rst_sync_int : std_logic;
|
||||
signal rst_sync_int1 : std_logic;
|
||||
signal rst_sync_int2 : std_logic;
|
||||
|
||||
|
||||
component PLL is
|
||||
port
|
||||
(-- Clock in ports
|
||||
CLK_IN1 : in std_logic;
|
||||
-- Clock out ports
|
||||
CLK_OUT1 : out std_logic;
|
||||
-- Status and control signals
|
||||
RESET : in std_logic;
|
||||
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 RESET or COUNTER_RESET;
|
||||
|
||||
|
||||
process (clk, reset_int) begin
|
||||
if (reset_int = '1') then
|
||||
rst_sync <= '1';
|
||||
rst_sync_int <= '1';
|
||||
rst_sync_int1 <= '1';
|
||||
rst_sync_int2 <= '1';
|
||||
elsif (clk 'event and clk='1') then
|
||||
rst_sync <= '0';
|
||||
rst_sync_int <= rst_sync;
|
||||
rst_sync_int1 <= rst_sync_int;
|
||||
rst_sync_int2 <= rst_sync_int1;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
|
||||
-- Instantiation of the clocking network
|
||||
----------------------------------------
|
||||
clknetwork : PLL
|
||||
port map
|
||||
(-- Clock in ports
|
||||
CLK_IN1 => CLK_IN1,
|
||||
-- Clock out ports
|
||||
CLK_OUT1 => clk_int,
|
||||
-- Status and control signals
|
||||
RESET => RESET,
|
||||
LOCKED => locked_int);
|
||||
|
||||
clk_n <= not clk;
|
||||
clkout_oddr : ODDR2
|
||||
port map
|
||||
(Q => CLK_OUT(1),
|
||||
C0 => clk,
|
||||
C1 => clk_n,
|
||||
CE => '1',
|
||||
D0 => '1',
|
||||
D1 => '0',
|
||||
R => '0',
|
||||
S => '0');
|
||||
|
||||
-- Connect the output clocks to the design
|
||||
-------------------------------------------
|
||||
clk <= clk_int;
|
||||
|
||||
-- Output clock sampling
|
||||
-------------------------------------
|
||||
process (clk, rst_sync_int2) begin
|
||||
if (rst_sync_int2 = '1') then
|
||||
counter <= (others => '0') after TCQ;
|
||||
elsif (rising_edge(clk)) then
|
||||
counter <= counter + 1 after TCQ;
|
||||
end if;
|
||||
end process;
|
||||
-- alias the high bit to the output
|
||||
COUNT <= counter(C_W-1);
|
||||
|
||||
|
||||
end xilinx;
|
||||
197
FPGA/Generator/ipcore_dir/PLL/simulation/PLL_tb.vhd
Executable file
197
FPGA/Generator/ipcore_dir/PLL/simulation/PLL_tb.vhd
Executable file
|
|
@ -0,0 +1,197 @@
|
|||
-- 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 := 62.5 ns;
|
||||
|
||||
|
||||
-- Declare the input clock signals
|
||||
signal CLK_IN1 : std_logic := '1';
|
||||
-- The high bit of the sampling counter
|
||||
signal COUNT : std_logic;
|
||||
-- Status and control signals
|
||||
signal RESET : std_logic := '0';
|
||||
signal LOCKED : std_logic;
|
||||
signal COUNTER_RESET : std_logic := '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(1 downto 1);
|
||||
--Freq Check using the M & D values setting and actual Frequency generated
|
||||
|
||||
component PLL_exdes
|
||||
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(1 downto 1) ;
|
||||
-- High bits of counters driven by clocks
|
||||
COUNT : out std_logic;
|
||||
-- Status and control signals
|
||||
RESET : in std_logic;
|
||||
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
|
||||
RESET <= '1';
|
||||
wait for (PER1*6);
|
||||
RESET <= '0';
|
||||
wait until LOCKED = '1';
|
||||
COUNTER_RESET <= '1';
|
||||
wait for (PER1*20);
|
||||
COUNTER_RESET <= '0';
|
||||
wait for (PER1*COUNT_PHASE);
|
||||
|
||||
|
||||
simtimeprint;
|
||||
end_of_sim <= '1';
|
||||
wait for 1 ps;
|
||||
report "Simulation Stopped." severity failure;
|
||||
wait;
|
||||
end process;
|
||||
|
||||
-- Instantiation of the example design containing the clock
|
||||
-- network and sampling counters
|
||||
-----------------------------------------------------------
|
||||
dut : PLL_exdes
|
||||
generic map (
|
||||
TCQ => TCQ)
|
||||
port map
|
||||
(-- Clock in ports
|
||||
CLK_IN1 => CLK_IN1,
|
||||
-- Reset for logic in example design
|
||||
COUNTER_RESET => COUNTER_RESET,
|
||||
CLK_OUT => CLK_OUT,
|
||||
-- High bits of the counters
|
||||
COUNT => COUNT,
|
||||
-- Status and control signals
|
||||
RESET => RESET,
|
||||
LOCKED => LOCKED);
|
||||
|
||||
-- Freq Check
|
||||
|
||||
end test;
|
||||
220
FPGA/Generator/ipcore_dir/PLL/simulation/timing/PLL_tb.vhd
Executable file
220
FPGA/Generator/ipcore_dir/PLL/simulation/timing/PLL_tb.vhd
Executable file
|
|
@ -0,0 +1,220 @@
|
|||
-- 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 := 62.5 ns;
|
||||
|
||||
|
||||
-- Declare the input clock signals
|
||||
signal CLK_IN1 : std_logic := '1';
|
||||
-- The high bit of the sampling counter
|
||||
signal COUNT : std_logic;
|
||||
-- Status and control signals
|
||||
signal RESET : std_logic := '0';
|
||||
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(1 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(1 downto 1) ;
|
||||
-- High bits of counters driven by clocks
|
||||
COUNT : out std_logic;
|
||||
-- Status and control signals
|
||||
RESET : in std_logic;
|
||||
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;
|
||||
RESET <= '1';
|
||||
wait for (PER1*6);
|
||||
RESET <= '0';
|
||||
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';
|
||||
wait for 1 ps;
|
||||
report "Simulation Stopped." severity failure;
|
||||
wait;
|
||||
end process;
|
||||
|
||||
process (CLK_IN1)
|
||||
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;
|
||||
begin
|
||||
if (CLK_IN1'event and CLK_IN1='1') then
|
||||
timeout_counter <= timeout_counter + '1';
|
||||
if (timeout_counter = "10000000000000") then
|
||||
if (LOCKED /= '1') then
|
||||
simtimeprint;
|
||||
report "NO LOCK signal" severity failure;
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
|
||||
-- Instantiation of the example design containing the clock
|
||||
-- network and sampling counters
|
||||
-----------------------------------------------------------
|
||||
dut : PLL_exdes
|
||||
port map
|
||||
(-- Clock in ports
|
||||
CLK_IN1 => CLK_IN1,
|
||||
-- Reset for logic in example design
|
||||
COUNTER_RESET => COUNTER_RESET,
|
||||
CLK_OUT => CLK_OUT,
|
||||
-- High bits of the counters
|
||||
COUNT => COUNT,
|
||||
-- Status and control signals
|
||||
RESET => RESET,
|
||||
LOCKED => LOCKED);
|
||||
|
||||
-- Freq Check
|
||||
|
||||
end test;
|
||||
53
FPGA/Generator/ipcore_dir/SampleMemory.gise
Normal file
53
FPGA/Generator/ipcore_dir/SampleMemory.gise
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?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="SampleMemory.xise"/>
|
||||
|
||||
<files xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<file xil_pn:fileType="FILE_ASY" xil_pn:name="SampleMemory.asy" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_SYMBOL" xil_pn:name="SampleMemory.sym" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_VHO" xil_pn:name="SampleMemory.vho" xil_pn:origination="imported"/>
|
||||
</files>
|
||||
|
||||
<transforms xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<transform xil_pn:end_ts="1654646662" xil_pn:name="TRAN_copyInitialToXSTAbstractSynthesis" xil_pn:start_ts="1654646662">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_schematicsToHdl" xil_pn:prop_ck="-5346285223313661724" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_regenerateCores" xil_pn:prop_ck="7774384757506685939" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_SubProjectAbstractToPreProxy" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_xawsTohdl" xil_pn:prop_ck="-6611130985775322842" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
</transforms>
|
||||
|
||||
</generated_project>
|
||||
149
FPGA/Generator/ipcore_dir/SampleMemory.vhd
Normal file
149
FPGA/Generator/ipcore_dir/SampleMemory.vhd
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
--------------------------------------------------------------------------------
|
||||
-- This file is owned and controlled by Xilinx and must be used solely --
|
||||
-- for design, simulation, implementation and creation of design files --
|
||||
-- limited to Xilinx devices or technologies. Use with non-Xilinx --
|
||||
-- devices or technologies is expressly prohibited and immediately --
|
||||
-- terminates your license. --
|
||||
-- --
|
||||
-- XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" SOLELY --
|
||||
-- FOR USE IN DEVELOPING PROGRAMS AND SOLUTIONS FOR XILINX DEVICES. BY --
|
||||
-- PROVIDING THIS DESIGN, CODE, OR INFORMATION AS ONE POSSIBLE --
|
||||
-- IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD, XILINX IS --
|
||||
-- MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE FROM ANY --
|
||||
-- CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING ANY --
|
||||
-- RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY --
|
||||
-- DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE --
|
||||
-- IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR --
|
||||
-- REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF --
|
||||
-- INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
|
||||
-- PARTICULAR PURPOSE. --
|
||||
-- --
|
||||
-- Xilinx products are not intended for use in life support appliances, --
|
||||
-- devices, or systems. Use in such applications are expressly --
|
||||
-- prohibited. --
|
||||
-- --
|
||||
-- (c) Copyright 1995-2022 Xilinx, Inc. --
|
||||
-- All rights reserved. --
|
||||
--------------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
-- You must compile the wrapper file SampleMemory.vhd when simulating
|
||||
-- the core, SampleMemory. When compiling the wrapper file, be sure to
|
||||
-- reference the XilinxCoreLib VHDL simulation library. For detailed
|
||||
-- instructions, please refer to the "CORE Generator Help".
|
||||
|
||||
-- The synthesis directives "translate_off/translate_on" specified
|
||||
-- below are supported by Xilinx, Mentor Graphics and Synplicity
|
||||
-- synthesis tools. Ensure they are correct for your synthesis tool(s).
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.ALL;
|
||||
-- synthesis translate_off
|
||||
LIBRARY XilinxCoreLib;
|
||||
-- synthesis translate_on
|
||||
ENTITY SampleMemory IS
|
||||
PORT (
|
||||
clka : IN STD_LOGIC;
|
||||
wea : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
addra : IN STD_LOGIC_VECTOR(10 DOWNTO 0);
|
||||
dina : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
clkb : IN STD_LOGIC;
|
||||
addrb : IN STD_LOGIC_VECTOR(10 DOWNTO 0);
|
||||
doutb : OUT STD_LOGIC_VECTOR(7 DOWNTO 0)
|
||||
);
|
||||
END SampleMemory;
|
||||
|
||||
ARCHITECTURE SampleMemory_a OF SampleMemory IS
|
||||
-- synthesis translate_off
|
||||
COMPONENT wrapped_SampleMemory
|
||||
PORT (
|
||||
clka : IN STD_LOGIC;
|
||||
wea : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
addra : IN STD_LOGIC_VECTOR(10 DOWNTO 0);
|
||||
dina : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
clkb : IN STD_LOGIC;
|
||||
addrb : IN STD_LOGIC_VECTOR(10 DOWNTO 0);
|
||||
doutb : OUT STD_LOGIC_VECTOR(7 DOWNTO 0)
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
-- Configuration specification
|
||||
FOR ALL : wrapped_SampleMemory USE ENTITY XilinxCoreLib.blk_mem_gen_v7_3(behavioral)
|
||||
GENERIC MAP (
|
||||
c_addra_width => 11,
|
||||
c_addrb_width => 11,
|
||||
c_algorithm => 1,
|
||||
c_axi_id_width => 4,
|
||||
c_axi_slave_type => 0,
|
||||
c_axi_type => 1,
|
||||
c_byte_size => 9,
|
||||
c_common_clk => 0,
|
||||
c_default_data => "0",
|
||||
c_disable_warn_bhv_coll => 0,
|
||||
c_disable_warn_bhv_range => 0,
|
||||
c_enable_32bit_address => 0,
|
||||
c_family => "spartan6",
|
||||
c_has_axi_id => 0,
|
||||
c_has_ena => 0,
|
||||
c_has_enb => 0,
|
||||
c_has_injecterr => 0,
|
||||
c_has_mem_output_regs_a => 0,
|
||||
c_has_mem_output_regs_b => 0,
|
||||
c_has_mux_output_regs_a => 0,
|
||||
c_has_mux_output_regs_b => 0,
|
||||
c_has_regcea => 0,
|
||||
c_has_regceb => 0,
|
||||
c_has_rsta => 0,
|
||||
c_has_rstb => 0,
|
||||
c_has_softecc_input_regs_a => 0,
|
||||
c_has_softecc_output_regs_b => 0,
|
||||
c_init_file => "BlankString",
|
||||
c_init_file_name => "no_coe_file_loaded",
|
||||
c_inita_val => "0",
|
||||
c_initb_val => "0",
|
||||
c_interface_type => 0,
|
||||
c_load_init_file => 0,
|
||||
c_mem_type => 1,
|
||||
c_mux_pipeline_stages => 0,
|
||||
c_prim_type => 1,
|
||||
c_read_depth_a => 2048,
|
||||
c_read_depth_b => 2048,
|
||||
c_read_width_a => 8,
|
||||
c_read_width_b => 8,
|
||||
c_rst_priority_a => "CE",
|
||||
c_rst_priority_b => "CE",
|
||||
c_rst_type => "SYNC",
|
||||
c_rstram_a => 0,
|
||||
c_rstram_b => 0,
|
||||
c_sim_collision_check => "ALL",
|
||||
c_use_bram_block => 0,
|
||||
c_use_byte_wea => 0,
|
||||
c_use_byte_web => 0,
|
||||
c_use_default_data => 0,
|
||||
c_use_ecc => 0,
|
||||
c_use_softecc => 0,
|
||||
c_wea_width => 1,
|
||||
c_web_width => 1,
|
||||
c_write_depth_a => 2048,
|
||||
c_write_depth_b => 2048,
|
||||
c_write_mode_a => "WRITE_FIRST",
|
||||
c_write_mode_b => "WRITE_FIRST",
|
||||
c_write_width_a => 8,
|
||||
c_write_width_b => 8,
|
||||
c_xdevicefamily => "spartan6"
|
||||
);
|
||||
-- synthesis translate_on
|
||||
BEGIN
|
||||
-- synthesis translate_off
|
||||
U0 : wrapped_SampleMemory
|
||||
PORT MAP (
|
||||
clka => clka,
|
||||
wea => wea,
|
||||
addra => addra,
|
||||
dina => dina,
|
||||
clkb => clkb,
|
||||
addrb => addrb,
|
||||
doutb => doutb
|
||||
);
|
||||
-- synthesis translate_on
|
||||
|
||||
END SampleMemory_a;
|
||||
53
FPGA/Generator/ipcore_dir/SinCos.gise
Normal file
53
FPGA/Generator/ipcore_dir/SinCos.gise
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?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="SinCos.xise"/>
|
||||
|
||||
<files xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<file xil_pn:fileType="FILE_ASY" xil_pn:name="SinCos.asy" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_SYMBOL" xil_pn:name="SinCos.sym" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_VHO" xil_pn:name="SinCos.vho" xil_pn:origination="imported"/>
|
||||
</files>
|
||||
|
||||
<transforms xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<transform xil_pn:end_ts="1588801396" xil_pn:name="TRAN_copyInitialToXSTAbstractSynthesis" xil_pn:start_ts="1588801396">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1600270761" xil_pn:name="TRAN_schematicsToHdl" xil_pn:prop_ck="6318242672365869964" xil_pn:start_ts="1600270761">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1600270761" xil_pn:name="TRAN_regenerateCores" xil_pn:prop_ck="-6896205234688070757" xil_pn:start_ts="1600270761">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1600270761" xil_pn:name="TRAN_SubProjectAbstractToPreProxy" xil_pn:start_ts="1600270761">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1600270761" xil_pn:name="TRAN_xawsTohdl" xil_pn:prop_ck="2493898235901227214" xil_pn:start_ts="1600270761">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
</transforms>
|
||||
|
||||
</generated_project>
|
||||
106
FPGA/Generator/ipcore_dir/SinCos.vhd
Normal file
106
FPGA/Generator/ipcore_dir/SinCos.vhd
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
--------------------------------------------------------------------------------
|
||||
-- This file is owned and controlled by Xilinx and must be used solely --
|
||||
-- for design, simulation, implementation and creation of design files --
|
||||
-- limited to Xilinx devices or technologies. Use with non-Xilinx --
|
||||
-- devices or technologies is expressly prohibited and immediately --
|
||||
-- terminates your license. --
|
||||
-- --
|
||||
-- XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" SOLELY --
|
||||
-- FOR USE IN DEVELOPING PROGRAMS AND SOLUTIONS FOR XILINX DEVICES. BY --
|
||||
-- PROVIDING THIS DESIGN, CODE, OR INFORMATION AS ONE POSSIBLE --
|
||||
-- IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD, XILINX IS --
|
||||
-- MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE FROM ANY --
|
||||
-- CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING ANY --
|
||||
-- RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY --
|
||||
-- DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE --
|
||||
-- IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR --
|
||||
-- REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF --
|
||||
-- INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
|
||||
-- PARTICULAR PURPOSE. --
|
||||
-- --
|
||||
-- Xilinx products are not intended for use in life support appliances, --
|
||||
-- devices, or systems. Use in such applications are expressly --
|
||||
-- prohibited. --
|
||||
-- --
|
||||
-- (c) Copyright 1995-2020 Xilinx, Inc. --
|
||||
-- All rights reserved. --
|
||||
--------------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
-- You must compile the wrapper file SinCos.vhd when simulating
|
||||
-- the core, SinCos. When compiling the wrapper file, be sure to
|
||||
-- reference the XilinxCoreLib VHDL simulation library. For detailed
|
||||
-- instructions, please refer to the "CORE Generator Help".
|
||||
|
||||
-- The synthesis directives "translate_off/translate_on" specified
|
||||
-- below are supported by Xilinx, Mentor Graphics and Synplicity
|
||||
-- synthesis tools. Ensure they are correct for your synthesis tool(s).
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.ALL;
|
||||
-- synthesis translate_off
|
||||
LIBRARY XilinxCoreLib;
|
||||
-- synthesis translate_on
|
||||
ENTITY SinCos IS
|
||||
PORT (
|
||||
clk : IN STD_LOGIC;
|
||||
phase_in : IN STD_LOGIC_VECTOR(11 DOWNTO 0);
|
||||
cosine : OUT STD_LOGIC_VECTOR(15 DOWNTO 0);
|
||||
sine : OUT STD_LOGIC_VECTOR(15 DOWNTO 0)
|
||||
);
|
||||
END SinCos;
|
||||
|
||||
ARCHITECTURE SinCos_a OF SinCos IS
|
||||
-- synthesis translate_off
|
||||
COMPONENT wrapped_SinCos
|
||||
PORT (
|
||||
clk : IN STD_LOGIC;
|
||||
phase_in : IN STD_LOGIC_VECTOR(11 DOWNTO 0);
|
||||
cosine : OUT STD_LOGIC_VECTOR(15 DOWNTO 0);
|
||||
sine : OUT STD_LOGIC_VECTOR(15 DOWNTO 0)
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
-- Configuration specification
|
||||
FOR ALL : wrapped_SinCos USE ENTITY XilinxCoreLib.dds_compiler_v4_0(behavioral)
|
||||
GENERIC MAP (
|
||||
c_accumulator_width => 12,
|
||||
c_amplitude => 0,
|
||||
c_channels => 1,
|
||||
c_has_ce => 0,
|
||||
c_has_channel_index => 0,
|
||||
c_has_phase_out => 0,
|
||||
c_has_phasegen => 0,
|
||||
c_has_rdy => 0,
|
||||
c_has_rfd => 0,
|
||||
c_has_sclr => 0,
|
||||
c_has_sincos => 1,
|
||||
c_latency => -1,
|
||||
c_mem_type => 1,
|
||||
c_negative_cosine => 0,
|
||||
c_negative_sine => 0,
|
||||
c_noise_shaping => 0,
|
||||
c_optimise_goal => 0,
|
||||
c_output_width => 16,
|
||||
c_outputs_required => 2,
|
||||
c_phase_angle_width => 12,
|
||||
c_phase_increment => 2,
|
||||
c_phase_increment_value => "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0",
|
||||
c_phase_offset => 0,
|
||||
c_phase_offset_value => "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0",
|
||||
c_por_mode => 0,
|
||||
c_use_dsp48 => 0,
|
||||
c_xdevicefamily => "spartan6"
|
||||
);
|
||||
-- synthesis translate_on
|
||||
BEGIN
|
||||
-- synthesis translate_off
|
||||
U0 : wrapped_SinCos
|
||||
PORT MAP (
|
||||
clk => clk,
|
||||
phase_in => phase_in,
|
||||
cosine => cosine,
|
||||
sine => sine
|
||||
);
|
||||
-- synthesis translate_on
|
||||
|
||||
END SinCos_a;
|
||||
53
FPGA/Generator/ipcore_dir/SweepConfigMem.gise
Normal file
53
FPGA/Generator/ipcore_dir/SweepConfigMem.gise
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?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="SweepConfigMem.xise"/>
|
||||
|
||||
<files xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<file xil_pn:fileType="FILE_ASY" xil_pn:name="SweepConfigMem.asy" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_SYMBOL" xil_pn:name="SweepConfigMem.sym" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_VHO" xil_pn:name="SweepConfigMem.vho" xil_pn:origination="imported"/>
|
||||
</files>
|
||||
|
||||
<transforms xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<transform xil_pn:end_ts="1588801396" xil_pn:name="TRAN_copyInitialToXSTAbstractSynthesis" xil_pn:start_ts="1588801396">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1600270761" xil_pn:name="TRAN_schematicsToHdl" xil_pn:prop_ck="-4981023380131313696" xil_pn:start_ts="1600270761">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1600270761" xil_pn:name="TRAN_regenerateCores" xil_pn:prop_ck="7428936449477002095" xil_pn:start_ts="1600270761">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1600270761" xil_pn:name="TRAN_SubProjectAbstractToPreProxy" xil_pn:start_ts="1600270761">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1600270761" xil_pn:name="TRAN_xawsTohdl" xil_pn:prop_ck="3308610090153173282" xil_pn:start_ts="1600270761">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
</transforms>
|
||||
|
||||
</generated_project>
|
||||
152
FPGA/Generator/ipcore_dir/SweepConfigMem.vhd
Normal file
152
FPGA/Generator/ipcore_dir/SweepConfigMem.vhd
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
--------------------------------------------------------------------------------
|
||||
-- This file is owned and controlled by Xilinx and must be used solely --
|
||||
-- for design, simulation, implementation and creation of design files --
|
||||
-- limited to Xilinx devices or technologies. Use with non-Xilinx --
|
||||
-- devices or technologies is expressly prohibited and immediately --
|
||||
-- terminates your license. --
|
||||
-- --
|
||||
-- XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" SOLELY --
|
||||
-- FOR USE IN DEVELOPING PROGRAMS AND SOLUTIONS FOR XILINX DEVICES. BY --
|
||||
-- PROVIDING THIS DESIGN, CODE, OR INFORMATION AS ONE POSSIBLE --
|
||||
-- IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD, XILINX IS --
|
||||
-- MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE FROM ANY --
|
||||
-- CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING ANY --
|
||||
-- RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY --
|
||||
-- DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE --
|
||||
-- IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR --
|
||||
-- REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF --
|
||||
-- INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
|
||||
-- PARTICULAR PURPOSE. --
|
||||
-- --
|
||||
-- Xilinx products are not intended for use in life support appliances, --
|
||||
-- devices, or systems. Use in such applications are expressly --
|
||||
-- prohibited. --
|
||||
-- --
|
||||
-- (c) Copyright 1995-2020 Xilinx, Inc. --
|
||||
-- All rights reserved. --
|
||||
--------------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
-- You must compile the wrapper file SweepConfigMem.vhd when simulating
|
||||
-- the core, SweepConfigMem. When compiling the wrapper file, be sure to
|
||||
-- reference the XilinxCoreLib VHDL simulation library. For detailed
|
||||
-- instructions, please refer to the "CORE Generator Help".
|
||||
|
||||
-- The synthesis directives "translate_off/translate_on" specified
|
||||
-- below are supported by Xilinx, Mentor Graphics and Synplicity
|
||||
-- synthesis tools. Ensure they are correct for your synthesis tool(s).
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.ALL;
|
||||
-- synthesis translate_off
|
||||
LIBRARY XilinxCoreLib;
|
||||
-- synthesis translate_on
|
||||
ENTITY SweepConfigMem IS
|
||||
PORT (
|
||||
clka : IN STD_LOGIC;
|
||||
ena : IN STD_LOGIC;
|
||||
wea : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
addra : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
dina : IN STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
clkb : IN STD_LOGIC;
|
||||
addrb : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
doutb : OUT STD_LOGIC_VECTOR(95 DOWNTO 0)
|
||||
);
|
||||
END SweepConfigMem;
|
||||
|
||||
ARCHITECTURE SweepConfigMem_a OF SweepConfigMem IS
|
||||
-- synthesis translate_off
|
||||
COMPONENT wrapped_SweepConfigMem
|
||||
PORT (
|
||||
clka : IN STD_LOGIC;
|
||||
ena : IN STD_LOGIC;
|
||||
wea : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
addra : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
dina : IN STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
clkb : IN STD_LOGIC;
|
||||
addrb : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
doutb : OUT STD_LOGIC_VECTOR(95 DOWNTO 0)
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
-- Configuration specification
|
||||
FOR ALL : wrapped_SweepConfigMem USE ENTITY XilinxCoreLib.blk_mem_gen_v7_3(behavioral)
|
||||
GENERIC MAP (
|
||||
c_addra_width => 13,
|
||||
c_addrb_width => 13,
|
||||
c_algorithm => 1,
|
||||
c_axi_id_width => 4,
|
||||
c_axi_slave_type => 0,
|
||||
c_axi_type => 1,
|
||||
c_byte_size => 9,
|
||||
c_common_clk => 0,
|
||||
c_default_data => "0",
|
||||
c_disable_warn_bhv_coll => 0,
|
||||
c_disable_warn_bhv_range => 0,
|
||||
c_enable_32bit_address => 0,
|
||||
c_family => "spartan6",
|
||||
c_has_axi_id => 0,
|
||||
c_has_ena => 1,
|
||||
c_has_enb => 0,
|
||||
c_has_injecterr => 0,
|
||||
c_has_mem_output_regs_a => 0,
|
||||
c_has_mem_output_regs_b => 0,
|
||||
c_has_mux_output_regs_a => 0,
|
||||
c_has_mux_output_regs_b => 0,
|
||||
c_has_regcea => 0,
|
||||
c_has_regceb => 0,
|
||||
c_has_rsta => 0,
|
||||
c_has_rstb => 0,
|
||||
c_has_softecc_input_regs_a => 0,
|
||||
c_has_softecc_output_regs_b => 0,
|
||||
c_init_file => "BlankString",
|
||||
c_init_file_name => "no_coe_file_loaded",
|
||||
c_inita_val => "0",
|
||||
c_initb_val => "0",
|
||||
c_interface_type => 0,
|
||||
c_load_init_file => 0,
|
||||
c_mem_type => 1,
|
||||
c_mux_pipeline_stages => 0,
|
||||
c_prim_type => 1,
|
||||
c_read_depth_a => 4501,
|
||||
c_read_depth_b => 4501,
|
||||
c_read_width_a => 96,
|
||||
c_read_width_b => 96,
|
||||
c_rst_priority_a => "CE",
|
||||
c_rst_priority_b => "CE",
|
||||
c_rst_type => "SYNC",
|
||||
c_rstram_a => 0,
|
||||
c_rstram_b => 0,
|
||||
c_sim_collision_check => "ALL",
|
||||
c_use_bram_block => 0,
|
||||
c_use_byte_wea => 0,
|
||||
c_use_byte_web => 0,
|
||||
c_use_default_data => 0,
|
||||
c_use_ecc => 0,
|
||||
c_use_softecc => 0,
|
||||
c_wea_width => 1,
|
||||
c_web_width => 1,
|
||||
c_write_depth_a => 4501,
|
||||
c_write_depth_b => 4501,
|
||||
c_write_mode_a => "WRITE_FIRST",
|
||||
c_write_mode_b => "WRITE_FIRST",
|
||||
c_write_width_a => 96,
|
||||
c_write_width_b => 96,
|
||||
c_xdevicefamily => "spartan6"
|
||||
);
|
||||
-- synthesis translate_on
|
||||
BEGIN
|
||||
-- synthesis translate_off
|
||||
U0 : wrapped_SweepConfigMem
|
||||
PORT MAP (
|
||||
clka => clka,
|
||||
ena => ena,
|
||||
wea => wea,
|
||||
addra => addra,
|
||||
dina => dina,
|
||||
clkb => clkb,
|
||||
addrb => addrb,
|
||||
doutb => doutb
|
||||
);
|
||||
-- synthesis translate_on
|
||||
|
||||
END SweepConfigMem_a;
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
################################################################################
|
||||
#
|
||||
# (c) Copyright 2002 - 2010 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.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Tx Core Period Constraint. This constraint can be modified, and is
|
||||
# valid as long as it is met after place and route.
|
||||
NET "CLKA" TNM_NET = "CLKA";
|
||||
|
||||
NET "CLKB" TNM_NET = "CLKB";
|
||||
|
||||
TIMESPEC "TS_CLKA" = PERIOD "CLKA" 25 MHZ;
|
||||
|
||||
TIMESPEC "TS_CLKB" = PERIOD "CLKB" 25 MHZ;
|
||||
|
||||
################################################################################
|
||||
182
FPGA/Generator/ipcore_dir/SweepConfigMem/example_design/SweepConfigMem_exdes.vhd
Executable file
182
FPGA/Generator/ipcore_dir/SweepConfigMem/example_design/SweepConfigMem_exdes.vhd
Executable file
|
|
@ -0,0 +1,182 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7.1 Core - Top-level core wrapper
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006-2010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: SweepConfigMem_exdes.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- This is the actual BMG core wrapper.
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: August 31, 2005 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
LIBRARY UNISIM;
|
||||
USE UNISIM.VCOMPONENTS.ALL;
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Entity Declaration
|
||||
--------------------------------------------------------------------------------
|
||||
ENTITY SweepConfigMem_exdes IS
|
||||
PORT (
|
||||
--Inputs - Port A
|
||||
ENA : IN STD_LOGIC; --opt port
|
||||
|
||||
WEA : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
ADDRA : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
|
||||
DINA : IN STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
|
||||
CLKA : IN STD_LOGIC;
|
||||
|
||||
|
||||
--Inputs - Port B
|
||||
ADDRB : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
DOUTB : OUT STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
CLKB : IN STD_LOGIC
|
||||
|
||||
);
|
||||
|
||||
END SweepConfigMem_exdes;
|
||||
|
||||
|
||||
ARCHITECTURE xilinx OF SweepConfigMem_exdes IS
|
||||
|
||||
COMPONENT BUFG IS
|
||||
PORT (
|
||||
I : IN STD_ULOGIC;
|
||||
O : OUT STD_ULOGIC
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
COMPONENT SweepConfigMem IS
|
||||
PORT (
|
||||
--Port A
|
||||
ENA : IN STD_LOGIC; --opt port
|
||||
|
||||
WEA : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
ADDRA : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
|
||||
DINA : IN STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
|
||||
|
||||
CLKA : IN STD_LOGIC;
|
||||
|
||||
|
||||
--Port B
|
||||
ADDRB : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
DOUTB : OUT STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
CLKB : IN STD_LOGIC
|
||||
|
||||
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
SIGNAL CLKA_buf : STD_LOGIC;
|
||||
SIGNAL CLKB_buf : STD_LOGIC;
|
||||
SIGNAL S_ACLK_buf : STD_LOGIC;
|
||||
|
||||
BEGIN
|
||||
|
||||
bufg_A : BUFG
|
||||
PORT MAP (
|
||||
I => CLKA,
|
||||
O => CLKA_buf
|
||||
);
|
||||
|
||||
bufg_B : BUFG
|
||||
PORT MAP (
|
||||
I => CLKB,
|
||||
O => CLKB_buf
|
||||
);
|
||||
|
||||
|
||||
bmg0 : SweepConfigMem
|
||||
PORT MAP (
|
||||
--Port A
|
||||
ENA => ENA,
|
||||
|
||||
WEA => WEA,
|
||||
ADDRA => ADDRA,
|
||||
|
||||
DINA => DINA,
|
||||
|
||||
CLKA => CLKA_buf,
|
||||
|
||||
|
||||
--Port B
|
||||
ADDRB => ADDRB,
|
||||
DOUTB => DOUTB,
|
||||
CLKB => CLKB_buf
|
||||
|
||||
);
|
||||
|
||||
END xilinx;
|
||||
277
FPGA/Generator/ipcore_dir/SweepConfigMem/example_design/SweepConfigMem_prod.vhd
Executable file
277
FPGA/Generator/ipcore_dir/SweepConfigMem/example_design/SweepConfigMem_prod.vhd
Executable file
|
|
@ -0,0 +1,277 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7.1 Core - Top-level wrapper
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006-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.
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: SweepConfigMem_prod.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- This is the top-level BMG wrapper (over BMG core).
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: August 31, 2005 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Configured Core Parameter Values:
|
||||
-- (Refer to the SIM Parameters table in the datasheet for more information on
|
||||
-- the these parameters.)
|
||||
-- C_FAMILY : spartan6
|
||||
-- C_XDEVICEFAMILY : spartan6
|
||||
-- C_INTERFACE_TYPE : 0
|
||||
-- C_ENABLE_32BIT_ADDRESS : 0
|
||||
-- C_AXI_TYPE : 1
|
||||
-- C_AXI_SLAVE_TYPE : 0
|
||||
-- C_AXI_ID_WIDTH : 4
|
||||
-- C_MEM_TYPE : 1
|
||||
-- C_BYTE_SIZE : 9
|
||||
-- C_ALGORITHM : 1
|
||||
-- C_PRIM_TYPE : 1
|
||||
-- C_LOAD_INIT_FILE : 0
|
||||
-- C_INIT_FILE_NAME : no_coe_file_loaded
|
||||
-- C_USE_DEFAULT_DATA : 0
|
||||
-- C_DEFAULT_DATA : 0
|
||||
-- C_RST_TYPE : SYNC
|
||||
-- C_HAS_RSTA : 0
|
||||
-- C_RST_PRIORITY_A : CE
|
||||
-- C_RSTRAM_A : 0
|
||||
-- C_INITA_VAL : 0
|
||||
-- C_HAS_ENA : 1
|
||||
-- C_HAS_REGCEA : 0
|
||||
-- C_USE_BYTE_WEA : 0
|
||||
-- C_WEA_WIDTH : 1
|
||||
-- C_WRITE_MODE_A : WRITE_FIRST
|
||||
-- C_WRITE_WIDTH_A : 96
|
||||
-- C_READ_WIDTH_A : 96
|
||||
-- C_WRITE_DEPTH_A : 4501
|
||||
-- C_READ_DEPTH_A : 4501
|
||||
-- C_ADDRA_WIDTH : 13
|
||||
-- C_HAS_RSTB : 0
|
||||
-- C_RST_PRIORITY_B : CE
|
||||
-- C_RSTRAM_B : 0
|
||||
-- C_INITB_VAL : 0
|
||||
-- C_HAS_ENB : 0
|
||||
-- C_HAS_REGCEB : 0
|
||||
-- C_USE_BYTE_WEB : 0
|
||||
-- C_WEB_WIDTH : 1
|
||||
-- C_WRITE_MODE_B : WRITE_FIRST
|
||||
-- C_WRITE_WIDTH_B : 96
|
||||
-- C_READ_WIDTH_B : 96
|
||||
-- C_WRITE_DEPTH_B : 4501
|
||||
-- C_READ_DEPTH_B : 4501
|
||||
-- C_ADDRB_WIDTH : 13
|
||||
-- C_HAS_MEM_OUTPUT_REGS_A : 0
|
||||
-- C_HAS_MEM_OUTPUT_REGS_B : 0
|
||||
-- C_HAS_MUX_OUTPUT_REGS_A : 0
|
||||
-- C_HAS_MUX_OUTPUT_REGS_B : 0
|
||||
-- C_HAS_SOFTECC_INPUT_REGS_A : 0
|
||||
-- C_HAS_SOFTECC_OUTPUT_REGS_B : 0
|
||||
-- C_MUX_PIPELINE_STAGES : 0
|
||||
-- C_USE_ECC : 0
|
||||
-- C_USE_SOFTECC : 0
|
||||
-- C_HAS_INJECTERR : 0
|
||||
-- C_SIM_COLLISION_CHECK : ALL
|
||||
-- C_COMMON_CLK : 0
|
||||
-- C_DISABLE_WARN_BHV_COLL : 0
|
||||
-- C_DISABLE_WARN_BHV_RANGE : 0
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
LIBRARY UNISIM;
|
||||
USE UNISIM.VCOMPONENTS.ALL;
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Entity Declaration
|
||||
--------------------------------------------------------------------------------
|
||||
ENTITY SweepConfigMem_prod IS
|
||||
PORT (
|
||||
--Port A
|
||||
CLKA : IN STD_LOGIC;
|
||||
RSTA : IN STD_LOGIC; --opt port
|
||||
ENA : IN STD_LOGIC; --optional port
|
||||
REGCEA : IN STD_LOGIC; --optional port
|
||||
WEA : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
ADDRA : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
DINA : IN STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
DOUTA : OUT STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
|
||||
--Port B
|
||||
CLKB : IN STD_LOGIC;
|
||||
RSTB : IN STD_LOGIC; --opt port
|
||||
ENB : IN STD_LOGIC; --optional port
|
||||
REGCEB : IN STD_LOGIC; --optional port
|
||||
WEB : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
ADDRB : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
DINB : IN STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
DOUTB : OUT STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
|
||||
--ECC
|
||||
INJECTSBITERR : IN STD_LOGIC; --optional port
|
||||
INJECTDBITERR : IN STD_LOGIC; --optional port
|
||||
SBITERR : OUT STD_LOGIC; --optional port
|
||||
DBITERR : OUT STD_LOGIC; --optional port
|
||||
RDADDRECC : OUT STD_LOGIC_VECTOR(12 DOWNTO 0); --optional port
|
||||
-- AXI BMG Input and Output Port Declarations
|
||||
|
||||
-- AXI Global Signals
|
||||
S_ACLK : IN STD_LOGIC;
|
||||
S_AXI_AWID : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
|
||||
S_AXI_AWADDR : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
|
||||
S_AXI_AWLEN : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
S_AXI_AWSIZE : IN STD_LOGIC_VECTOR(2 DOWNTO 0);
|
||||
S_AXI_AWBURST : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
|
||||
S_AXI_AWVALID : IN STD_LOGIC;
|
||||
S_AXI_AWREADY : OUT STD_LOGIC;
|
||||
S_AXI_WDATA : IN STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
S_AXI_WSTRB : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
S_AXI_WLAST : IN STD_LOGIC;
|
||||
S_AXI_WVALID : IN STD_LOGIC;
|
||||
S_AXI_WREADY : OUT STD_LOGIC;
|
||||
S_AXI_BID : OUT STD_LOGIC_VECTOR(3 DOWNTO 0):= (OTHERS => '0');
|
||||
S_AXI_BRESP : OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
|
||||
S_AXI_BVALID : OUT STD_LOGIC;
|
||||
S_AXI_BREADY : IN STD_LOGIC;
|
||||
|
||||
-- AXI Full/Lite Slave Read (Write side)
|
||||
S_AXI_ARID : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
|
||||
S_AXI_ARADDR : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
|
||||
S_AXI_ARLEN : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
S_AXI_ARSIZE : IN STD_LOGIC_VECTOR(2 DOWNTO 0);
|
||||
S_AXI_ARBURST : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
|
||||
S_AXI_ARVALID : IN STD_LOGIC;
|
||||
S_AXI_ARREADY : OUT STD_LOGIC;
|
||||
S_AXI_RID : OUT STD_LOGIC_VECTOR(3 DOWNTO 0):= (OTHERS => '0');
|
||||
S_AXI_RDATA : OUT STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
S_AXI_RRESP : OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
|
||||
S_AXI_RLAST : OUT STD_LOGIC;
|
||||
S_AXI_RVALID : OUT STD_LOGIC;
|
||||
S_AXI_RREADY : IN STD_LOGIC;
|
||||
|
||||
-- AXI Full/Lite Sideband Signals
|
||||
S_AXI_INJECTSBITERR : IN STD_LOGIC;
|
||||
S_AXI_INJECTDBITERR : IN STD_LOGIC;
|
||||
S_AXI_SBITERR : OUT STD_LOGIC;
|
||||
S_AXI_DBITERR : OUT STD_LOGIC;
|
||||
S_AXI_RDADDRECC : OUT STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
S_ARESETN : IN STD_LOGIC
|
||||
|
||||
|
||||
);
|
||||
|
||||
END SweepConfigMem_prod;
|
||||
|
||||
|
||||
ARCHITECTURE xilinx OF SweepConfigMem_prod IS
|
||||
|
||||
COMPONENT SweepConfigMem_exdes IS
|
||||
PORT (
|
||||
--Port A
|
||||
ENA : IN STD_LOGIC; --opt port
|
||||
|
||||
WEA : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
ADDRA : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
|
||||
DINA : IN STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
|
||||
|
||||
CLKA : IN STD_LOGIC;
|
||||
|
||||
|
||||
--Port B
|
||||
ADDRB : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
DOUTB : OUT STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
CLKB : IN STD_LOGIC
|
||||
|
||||
|
||||
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
BEGIN
|
||||
|
||||
bmg0 : SweepConfigMem_exdes
|
||||
PORT MAP (
|
||||
--Port A
|
||||
ENA => ENA,
|
||||
|
||||
WEA => WEA,
|
||||
ADDRA => ADDRA,
|
||||
|
||||
DINA => DINA,
|
||||
|
||||
CLKA => CLKA,
|
||||
|
||||
--Port B
|
||||
ADDRB => ADDRB,
|
||||
DOUTB => DOUTB,
|
||||
CLKB => CLKB
|
||||
|
||||
|
||||
|
||||
);
|
||||
END xilinx;
|
||||
329
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/SweepConfigMem_synth.vhd
Executable file
329
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/SweepConfigMem_synth.vhd
Executable file
|
|
@ -0,0 +1,329 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Synthesizable Testbench
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: SweepConfigMem_synth.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- Synthesizable Testbench
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
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_MISC.ALL;
|
||||
|
||||
LIBRARY STD;
|
||||
USE STD.TEXTIO.ALL;
|
||||
|
||||
--LIBRARY unisim;
|
||||
--USE unisim.vcomponents.ALL;
|
||||
|
||||
LIBRARY work;
|
||||
USE work.ALL;
|
||||
USE work.BMG_TB_PKG.ALL;
|
||||
|
||||
ENTITY SweepConfigMem_synth IS
|
||||
PORT(
|
||||
CLK_IN : IN STD_LOGIC;
|
||||
CLKB_IN : IN STD_LOGIC;
|
||||
RESET_IN : IN STD_LOGIC;
|
||||
STATUS : OUT STD_LOGIC_VECTOR(8 DOWNTO 0) := (OTHERS => '0') --ERROR STATUS OUT OF FPGA
|
||||
);
|
||||
END ENTITY;
|
||||
|
||||
ARCHITECTURE SweepConfigMem_synth_ARCH OF SweepConfigMem_synth IS
|
||||
|
||||
|
||||
COMPONENT SweepConfigMem_exdes
|
||||
PORT (
|
||||
--Inputs - Port A
|
||||
ENA : IN STD_LOGIC; --opt port
|
||||
WEA : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
ADDRA : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
DINA : IN STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
CLKA : IN STD_LOGIC;
|
||||
|
||||
--Inputs - Port B
|
||||
ADDRB : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
DOUTB : OUT STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
CLKB : IN STD_LOGIC
|
||||
|
||||
);
|
||||
|
||||
END COMPONENT;
|
||||
|
||||
|
||||
SIGNAL CLKA: STD_LOGIC := '0';
|
||||
SIGNAL RSTA: STD_LOGIC := '0';
|
||||
SIGNAL ENA: STD_LOGIC := '0';
|
||||
SIGNAL ENA_R: STD_LOGIC := '0';
|
||||
SIGNAL WEA: STD_LOGIC_VECTOR(0 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL WEA_R: STD_LOGIC_VECTOR(0 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL ADDRA: STD_LOGIC_VECTOR(12 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL ADDRA_R: STD_LOGIC_VECTOR(12 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL DINA: STD_LOGIC_VECTOR(95 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL DINA_R: STD_LOGIC_VECTOR(95 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL CLKB: STD_LOGIC := '0';
|
||||
SIGNAL RSTB: STD_LOGIC := '0';
|
||||
SIGNAL ADDRB: STD_LOGIC_VECTOR(12 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL ADDRB_R: STD_LOGIC_VECTOR(12 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL DOUTB: STD_LOGIC_VECTOR(95 DOWNTO 0);
|
||||
SIGNAL CHECKER_EN : STD_LOGIC:='0';
|
||||
SIGNAL CHECKER_EN_R : STD_LOGIC:='0';
|
||||
SIGNAL STIMULUS_FLOW : STD_LOGIC_VECTOR(22 DOWNTO 0) := (OTHERS =>'0');
|
||||
SIGNAL clk_in_i: STD_LOGIC;
|
||||
|
||||
SIGNAL RESET_SYNC_R1 : STD_LOGIC:='1';
|
||||
SIGNAL RESET_SYNC_R2 : STD_LOGIC:='1';
|
||||
SIGNAL RESET_SYNC_R3 : STD_LOGIC:='1';
|
||||
|
||||
SIGNAL clkb_in_i: STD_LOGIC;
|
||||
SIGNAL RESETB_SYNC_R1 : STD_LOGIC := '1';
|
||||
SIGNAL RESETB_SYNC_R2 : STD_LOGIC := '1';
|
||||
SIGNAL RESETB_SYNC_R3 : STD_LOGIC := '1';
|
||||
SIGNAL ITER_R0 : STD_LOGIC := '0';
|
||||
SIGNAL ITER_R1 : STD_LOGIC := '0';
|
||||
SIGNAL ITER_R2 : STD_LOGIC := '0';
|
||||
|
||||
SIGNAL ISSUE_FLAG : STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL ISSUE_FLAG_STATUS : STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0');
|
||||
|
||||
BEGIN
|
||||
|
||||
-- clk_buf: bufg
|
||||
-- PORT map(
|
||||
-- i => CLK_IN,
|
||||
-- o => clk_in_i
|
||||
-- );
|
||||
clk_in_i <= CLK_IN;
|
||||
CLKA <= clk_in_i;
|
||||
|
||||
-- clkb_buf: bufg
|
||||
-- PORT map(
|
||||
-- i => CLKB_IN,
|
||||
-- o => clkb_in_i
|
||||
-- );
|
||||
clkb_in_i <= CLKB_IN;
|
||||
CLKB <= clkb_in_i;
|
||||
RSTA <= RESET_SYNC_R3 AFTER 50 ns;
|
||||
|
||||
|
||||
PROCESS(clk_in_i)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(clk_in_i)) THEN
|
||||
RESET_SYNC_R1 <= RESET_IN;
|
||||
RESET_SYNC_R2 <= RESET_SYNC_R1;
|
||||
RESET_SYNC_R3 <= RESET_SYNC_R2;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
RSTB <= RESETB_SYNC_R3 AFTER 50 ns;
|
||||
|
||||
PROCESS(clkb_in_i)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(clkb_in_i)) THEN
|
||||
RESETB_SYNC_R1 <= RESET_IN;
|
||||
RESETB_SYNC_R2 <= RESETB_SYNC_R1;
|
||||
RESETB_SYNC_R3 <= RESETB_SYNC_R2;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(RESET_SYNC_R3='1') THEN
|
||||
ISSUE_FLAG_STATUS<= (OTHERS => '0');
|
||||
ELSE
|
||||
ISSUE_FLAG_STATUS <= ISSUE_FLAG_STATUS OR ISSUE_FLAG;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
STATUS(7 DOWNTO 0) <= ISSUE_FLAG_STATUS;
|
||||
|
||||
|
||||
|
||||
|
||||
BMG_DATA_CHECKER_INST: ENTITY work.CHECKER
|
||||
GENERIC MAP (
|
||||
WRITE_WIDTH => 96,
|
||||
READ_WIDTH => 96 )
|
||||
PORT MAP (
|
||||
CLK => clkb_in_i,
|
||||
RST => RSTB,
|
||||
EN => CHECKER_EN_R,
|
||||
DATA_IN => DOUTB,
|
||||
STATUS => ISSUE_FLAG(0)
|
||||
);
|
||||
|
||||
PROCESS(clkb_in_i)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(clkb_in_i)) THEN
|
||||
IF(RSTB='1') THEN
|
||||
CHECKER_EN_R <= '0';
|
||||
ELSE
|
||||
CHECKER_EN_R <= CHECKER_EN AFTER 50 ns;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
|
||||
BMG_STIM_GEN_INST:ENTITY work.BMG_STIM_GEN
|
||||
PORT MAP(
|
||||
CLKA => clk_in_i,
|
||||
CLKB => clkb_in_i,
|
||||
TB_RST => RSTA,
|
||||
ADDRA => ADDRA,
|
||||
DINA => DINA,
|
||||
ENA => ENA,
|
||||
WEA => WEA,
|
||||
ADDRB => ADDRB,
|
||||
CHECK_DATA => CHECKER_EN
|
||||
);
|
||||
PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(RESET_SYNC_R3='1') THEN
|
||||
STATUS(8) <= '0';
|
||||
iter_r2 <= '0';
|
||||
iter_r1 <= '0';
|
||||
iter_r0 <= '0';
|
||||
ELSE
|
||||
STATUS(8) <= iter_r2;
|
||||
iter_r2 <= iter_r1;
|
||||
iter_r1 <= iter_r0;
|
||||
iter_r0 <= STIMULUS_FLOW(8);
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
|
||||
PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(RESET_SYNC_R3='1') THEN
|
||||
STIMULUS_FLOW <= (OTHERS => '0');
|
||||
ELSIF(WEA(0)='1') THEN
|
||||
STIMULUS_FLOW <= STIMULUS_FLOW+1;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
|
||||
|
||||
PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(RESET_SYNC_R3='1') THEN
|
||||
ENA_R <= '0' AFTER 50 ns;
|
||||
WEA_R <= (OTHERS=>'0') AFTER 50 ns;
|
||||
DINA_R <= (OTHERS=>'0') AFTER 50 ns;
|
||||
|
||||
|
||||
ELSE
|
||||
ENA_R <= ENA AFTER 50 ns;
|
||||
WEA_R <= WEA AFTER 50 ns;
|
||||
DINA_R <= DINA AFTER 50 ns;
|
||||
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
|
||||
PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(RESET_SYNC_R3='1') THEN
|
||||
ADDRA_R <= (OTHERS=> '0') AFTER 50 ns;
|
||||
ADDRB_R <= (OTHERS=> '0') AFTER 50 ns;
|
||||
ELSE
|
||||
ADDRA_R <= ADDRA AFTER 50 ns;
|
||||
ADDRB_R <= ADDRB AFTER 50 ns;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
|
||||
BMG_PORT: SweepConfigMem_exdes PORT MAP (
|
||||
--Port A
|
||||
ENA => ENA_R,
|
||||
WEA => WEA_R,
|
||||
ADDRA => ADDRA_R,
|
||||
DINA => DINA_R,
|
||||
CLKA => CLKA,
|
||||
--Port B
|
||||
ADDRB => ADDRB_R,
|
||||
DOUTB => DOUTB,
|
||||
CLKB => CLKB
|
||||
|
||||
);
|
||||
END ARCHITECTURE;
|
||||
142
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/SweepConfigMem_tb.vhd
Executable file
142
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/SweepConfigMem_tb.vhd
Executable file
|
|
@ -0,0 +1,142 @@
|
|||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Top File for the Example Testbench
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Filename: SweepConfigMem_tb.vhd
|
||||
-- Description:
|
||||
-- Testbench Top
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
LIBRARY work;
|
||||
USE work.ALL;
|
||||
|
||||
ENTITY SweepConfigMem_tb IS
|
||||
END ENTITY;
|
||||
|
||||
|
||||
ARCHITECTURE SweepConfigMem_tb_ARCH OF SweepConfigMem_tb IS
|
||||
SIGNAL STATUS : STD_LOGIC_VECTOR(8 DOWNTO 0);
|
||||
SIGNAL CLK : STD_LOGIC := '1';
|
||||
SIGNAL CLKB : STD_LOGIC := '1';
|
||||
SIGNAL RESET : STD_LOGIC;
|
||||
|
||||
BEGIN
|
||||
|
||||
|
||||
CLK_GEN: PROCESS BEGIN
|
||||
CLK <= NOT CLK;
|
||||
WAIT FOR 100 NS;
|
||||
CLK <= NOT CLK;
|
||||
WAIT FOR 100 NS;
|
||||
END PROCESS;
|
||||
CLKB_GEN: PROCESS BEGIN
|
||||
CLKB <= NOT CLKB;
|
||||
WAIT FOR 100 NS;
|
||||
CLKB <= NOT CLKB;
|
||||
WAIT FOR 100 NS;
|
||||
END PROCESS;
|
||||
|
||||
RST_GEN: PROCESS BEGIN
|
||||
RESET <= '1';
|
||||
WAIT FOR 1000 NS;
|
||||
RESET <= '0';
|
||||
WAIT;
|
||||
END PROCESS;
|
||||
|
||||
|
||||
--STOP_SIM: PROCESS BEGIN
|
||||
-- WAIT FOR 200 US; -- STOP SIMULATION AFTER 1 MS
|
||||
-- ASSERT FALSE
|
||||
-- REPORT "END SIMULATION TIME REACHED"
|
||||
-- SEVERITY FAILURE;
|
||||
--END PROCESS;
|
||||
--
|
||||
PROCESS BEGIN
|
||||
WAIT UNTIL STATUS(8)='1';
|
||||
IF( STATUS(7 downto 0)/="0") THEN
|
||||
ASSERT false
|
||||
REPORT "Test Completed Successfully"
|
||||
SEVERITY NOTE;
|
||||
REPORT "Simulation Failed"
|
||||
SEVERITY FAILURE;
|
||||
ELSE
|
||||
ASSERT false
|
||||
REPORT "TEST PASS"
|
||||
SEVERITY NOTE;
|
||||
REPORT "Test Completed Successfully"
|
||||
SEVERITY FAILURE;
|
||||
END IF;
|
||||
|
||||
END PROCESS;
|
||||
|
||||
SweepConfigMem_synth_inst:ENTITY work.SweepConfigMem_synth
|
||||
PORT MAP(
|
||||
CLK_IN => CLK,
|
||||
CLKB_IN => CLK,
|
||||
RESET_IN => RESET,
|
||||
STATUS => STATUS
|
||||
);
|
||||
|
||||
END ARCHITECTURE;
|
||||
117
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/addr_gen.vhd
Executable file
117
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/addr_gen.vhd
Executable file
|
|
@ -0,0 +1,117 @@
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Address Generator
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: addr_gen.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- Address Generator
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
LIBRARY work;
|
||||
USE work.ALL;
|
||||
|
||||
ENTITY ADDR_GEN IS
|
||||
GENERIC ( C_MAX_DEPTH : INTEGER := 1024 ;
|
||||
RST_VALUE : STD_LOGIC_VECTOR(31 DOWNTO 0) := (OTHERS=> '0');
|
||||
RST_INC : INTEGER := 0);
|
||||
PORT (
|
||||
CLK : IN STD_LOGIC;
|
||||
RST : IN STD_LOGIC;
|
||||
EN : IN STD_LOGIC;
|
||||
LOAD :IN STD_LOGIC;
|
||||
LOAD_VALUE : IN STD_LOGIC_VECTOR (31 DOWNTO 0) := (OTHERS => '0');
|
||||
ADDR_OUT : OUT STD_LOGIC_VECTOR (31 DOWNTO 0) --OUTPUT VECTOR
|
||||
);
|
||||
END ADDR_GEN;
|
||||
|
||||
ARCHITECTURE BEHAVIORAL OF ADDR_GEN IS
|
||||
SIGNAL ADDR_TEMP : STD_LOGIC_VECTOR(31 DOWNTO 0) := (OTHERS =>'0');
|
||||
BEGIN
|
||||
ADDR_OUT <= ADDR_TEMP;
|
||||
PROCESS(CLK)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLK)) THEN
|
||||
IF(RST='1') THEN
|
||||
ADDR_TEMP<= RST_VALUE + conv_std_logic_vector(RST_INC,32 );
|
||||
ELSE
|
||||
IF(EN='1') THEN
|
||||
IF(LOAD='1') THEN
|
||||
ADDR_TEMP <=LOAD_VALUE;
|
||||
ELSE
|
||||
IF(ADDR_TEMP = C_MAX_DEPTH-1) THEN
|
||||
ADDR_TEMP<= RST_VALUE + conv_std_logic_vector(RST_INC,32 );
|
||||
ELSE
|
||||
ADDR_TEMP <= ADDR_TEMP + '1';
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
END ARCHITECTURE;
|
||||
436
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/bmg_stim_gen.vhd
Executable file
436
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/bmg_stim_gen.vhd
Executable file
|
|
@ -0,0 +1,436 @@
|
|||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Stimulus Generator For Simple Dual Port RAM
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: bmg_stim_gen.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- Stimulus Generation For SDP Configuration
|
||||
-- 100 Writes and 100 Reads will be performed in a repeatitive loop till the
|
||||
-- simulation ends
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
USE IEEE.STD_LOGIC_MISC.ALL;
|
||||
|
||||
LIBRARY work;
|
||||
USE work.ALL;
|
||||
USE work.BMG_TB_PKG.ALL;
|
||||
|
||||
|
||||
ENTITY REGISTER_LOGIC IS
|
||||
PORT(
|
||||
Q : OUT STD_LOGIC;
|
||||
CLK : IN STD_LOGIC;
|
||||
RST : IN STD_LOGIC;
|
||||
D : IN STD_LOGIC
|
||||
);
|
||||
END REGISTER_LOGIC;
|
||||
|
||||
ARCHITECTURE REGISTER_ARCH OF REGISTER_LOGIC IS
|
||||
SIGNAL Q_O : STD_LOGIC :='0';
|
||||
BEGIN
|
||||
Q <= Q_O;
|
||||
FF_BEH: PROCESS(CLK)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLK)) THEN
|
||||
IF(RST ='1') THEN
|
||||
Q_O <= '0';
|
||||
ELSE
|
||||
Q_O <= D;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
END REGISTER_ARCH;
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
USE IEEE.STD_LOGIC_MISC.ALL;
|
||||
|
||||
LIBRARY work;
|
||||
USE work.ALL;
|
||||
USE work.BMG_TB_PKG.ALL;
|
||||
|
||||
|
||||
ENTITY BMG_STIM_GEN IS
|
||||
PORT (
|
||||
CLKA : IN STD_LOGIC;
|
||||
CLKB : IN STD_LOGIC;
|
||||
TB_RST : IN STD_LOGIC;
|
||||
ADDRA: OUT STD_LOGIC_VECTOR(12 DOWNTO 0) := (OTHERS => '0');
|
||||
DINA : OUT STD_LOGIC_VECTOR(95 DOWNTO 0) := (OTHERS => '0');
|
||||
ENA : OUT STD_LOGIC :='0';
|
||||
WEA : OUT STD_LOGIC_VECTOR (0 DOWNTO 0) := (OTHERS => '0');
|
||||
ADDRB: OUT STD_LOGIC_VECTOR(12 DOWNTO 0) := (OTHERS => '0');
|
||||
CHECK_DATA: OUT STD_LOGIC:='0'
|
||||
);
|
||||
END BMG_STIM_GEN;
|
||||
|
||||
|
||||
ARCHITECTURE BEHAVIORAL OF BMG_STIM_GEN IS
|
||||
|
||||
CONSTANT ZERO : STD_LOGIC_VECTOR(31 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL WRITE_ADDR : STD_LOGIC_VECTOR(31 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL READ_ADDR : STD_LOGIC_VECTOR(31 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL DINA_INT : STD_LOGIC_VECTOR(95 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL DO_WRITE : STD_LOGIC := '0';
|
||||
SIGNAL DO_READ : STD_LOGIC := '0';
|
||||
SIGNAL DO_READ_R : STD_LOGIC := '0';
|
||||
SIGNAL DO_READ_REG : STD_LOGIC_VECTOR(5 DOWNTO 0) :=(OTHERS => '0');
|
||||
SIGNAL PORTA_WR : STD_LOGIC:='0';
|
||||
SIGNAL COUNT : INTEGER :=0;
|
||||
SIGNAL INCR_WR_CNT : STD_LOGIC:='0';
|
||||
SIGNAL PORTA_WR_COMPLETE : STD_LOGIC :='0';
|
||||
SIGNAL PORTB_RD : STD_LOGIC:='0';
|
||||
SIGNAL COUNT_RD : INTEGER :=0;
|
||||
SIGNAL INCR_RD_CNT : STD_LOGIC:='0';
|
||||
SIGNAL PORTB_RD_COMPLETE : STD_LOGIC :='0';
|
||||
SIGNAL LATCH_PORTA_WR_COMPLETE : STD_LOGIC :='0';
|
||||
SIGNAL PORTB_RD_HAPPENED : STD_LOGIC := '0';
|
||||
SIGNAL PORTA_WR_L1 :STD_LOGIC := '0';
|
||||
SIGNAL PORTA_WR_L2 :STD_LOGIC := '0';
|
||||
SIGNAL PORTB_RD_R2 :STD_LOGIC := '0';
|
||||
SIGNAL PORTB_RD_R1 :STD_LOGIC := '0';
|
||||
SIGNAL LATCH_PORTB_RD_COMPLETE : STD_LOGIC :='0';
|
||||
SIGNAL PORTA_WR_HAPPENED : STD_LOGIC := '0';
|
||||
SIGNAL PORTB_RD_L1 : STD_LOGIC := '0';
|
||||
SIGNAL PORTB_RD_L2 : STD_LOGIC := '0';
|
||||
SIGNAL PORTA_WR_R2 : STD_LOGIC := '0';
|
||||
SIGNAL PORTA_WR_R1 : STD_LOGIC := '0';
|
||||
|
||||
CONSTANT WR_RD_DEEP_COUNT :INTEGER :=8;
|
||||
CONSTANT WR_DEEP_COUNT : INTEGER := if_then_else((13 <= 13),WR_RD_DEEP_COUNT,
|
||||
((96/96)*WR_RD_DEEP_COUNT));
|
||||
CONSTANT RD_DEEP_COUNT : INTEGER := if_then_else((13 <= 13),WR_RD_DEEP_COUNT,
|
||||
((96/96)*WR_RD_DEEP_COUNT));
|
||||
|
||||
BEGIN
|
||||
|
||||
ADDRA <= WRITE_ADDR(12 DOWNTO 0) ;
|
||||
DINA <= DINA_INT ;
|
||||
ADDRB <= READ_ADDR(12 DOWNTO 0) when (DO_READ='1') else (OTHERS=>'0');
|
||||
CHECK_DATA <= DO_READ;
|
||||
|
||||
RD_ADDR_GEN_INST:ENTITY work.ADDR_GEN
|
||||
GENERIC MAP(
|
||||
C_MAX_DEPTH => 4501 ,
|
||||
RST_INC => 1 )
|
||||
PORT MAP(
|
||||
CLK => CLKB,
|
||||
RST => TB_RST,
|
||||
EN => DO_READ,
|
||||
LOAD => '0',
|
||||
LOAD_VALUE => ZERO,
|
||||
ADDR_OUT => READ_ADDR
|
||||
);
|
||||
|
||||
WR_ADDR_GEN_INST:ENTITY work.ADDR_GEN
|
||||
GENERIC MAP(
|
||||
C_MAX_DEPTH => 4501,
|
||||
RST_INC => 1 )
|
||||
PORT MAP(
|
||||
CLK => CLKA,
|
||||
RST => TB_RST,
|
||||
EN => DO_WRITE,
|
||||
LOAD => '0',
|
||||
LOAD_VALUE => ZERO,
|
||||
ADDR_OUT => WRITE_ADDR
|
||||
);
|
||||
|
||||
WR_DATA_GEN_INST:ENTITY work.DATA_GEN
|
||||
GENERIC MAP (
|
||||
DATA_GEN_WIDTH => 96,
|
||||
DOUT_WIDTH => 96 ,
|
||||
DATA_PART_CNT => 1,
|
||||
SEED => 2)
|
||||
PORT MAP (
|
||||
CLK => CLKA,
|
||||
RST => TB_RST,
|
||||
EN => DO_WRITE,
|
||||
DATA_OUT => DINA_INT
|
||||
);
|
||||
|
||||
|
||||
PORTA_WR_PROCESS: PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
PORTA_WR<='1';
|
||||
ELSE
|
||||
PORTA_WR<=PORTB_RD_COMPLETE;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PORTB_RD_PROCESS: PROCESS(CLKB)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKB)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
PORTB_RD<='0';
|
||||
ELSE
|
||||
PORTB_RD<=PORTA_WR_L2;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PORTB_RD_COMPLETE_LATCH: PROCESS(CLKB)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKB)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
LATCH_PORTB_RD_COMPLETE<='0';
|
||||
ELSIF(PORTB_RD_COMPLETE='1') THEN
|
||||
LATCH_PORTB_RD_COMPLETE <='1';
|
||||
ELSIF(PORTA_WR_HAPPENED='1') THEN
|
||||
LATCH_PORTB_RD_COMPLETE<='0';
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
PORTB_RD_L1 <='0';
|
||||
PORTB_RD_L2 <='0';
|
||||
ELSE
|
||||
PORTB_RD_L1 <= LATCH_PORTB_RD_COMPLETE;
|
||||
PORTB_RD_L2 <= PORTB_RD_L1;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PROCESS(CLKB)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKB)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
PORTA_WR_R1 <='0';
|
||||
PORTA_WR_R2 <='0';
|
||||
ELSE
|
||||
PORTA_WR_R1 <= PORTA_WR;
|
||||
PORTA_WR_R2 <= PORTA_WR_R1;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PORTA_WR_HAPPENED <= PORTA_WR_R2;
|
||||
|
||||
PORTA_WR_COMPLETE_LATCH: PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
LATCH_PORTA_WR_COMPLETE<='0';
|
||||
ELSIF(PORTA_WR_COMPLETE='1') THEN
|
||||
LATCH_PORTA_WR_COMPLETE <='1';
|
||||
--ELSIF(PORTB_RD_HAPPENED='1') THEN
|
||||
ELSE
|
||||
LATCH_PORTA_WR_COMPLETE<='0';
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PROCESS(CLKB)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKB)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
PORTA_WR_L1 <='0';
|
||||
PORTA_WR_L2 <='0';
|
||||
ELSE
|
||||
PORTA_WR_L1 <= LATCH_PORTA_WR_COMPLETE;
|
||||
PORTA_WR_L2 <= PORTA_WR_L1;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
PORTB_RD_R1 <='0';
|
||||
PORTB_RD_R2 <='0';
|
||||
ELSE
|
||||
PORTB_RD_R1 <= PORTB_RD;
|
||||
PORTB_RD_R2 <= PORTB_RD_R1;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PORTB_RD_HAPPENED <= PORTB_RD_R2;
|
||||
|
||||
PORTB_RD_COMPLETE <= '1' when (count_rd=RD_DEEP_COUNT) else '0';
|
||||
|
||||
start_rd_counter: process(clkb)
|
||||
begin
|
||||
if(rising_edge(clkb)) then
|
||||
if(tb_rst='1') then
|
||||
incr_rd_cnt <= '0';
|
||||
elsif(portb_rd ='1') then
|
||||
incr_rd_cnt <='1';
|
||||
elsif(portb_rd_complete='1') then
|
||||
incr_rd_cnt <='0';
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
RD_COUNTER: process(clkb)
|
||||
begin
|
||||
if(rising_edge(clkb)) then
|
||||
if(tb_rst='1') then
|
||||
count_rd <= 0;
|
||||
elsif(incr_rd_cnt='1') then
|
||||
count_rd<=count_rd+1;
|
||||
end if;
|
||||
--if(count_rd=(wr_rd_deep_count)) then
|
||||
if(count_rd=(RD_DEEP_COUNT)) then
|
||||
count_rd<=0;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
DO_READ<='1' when (count_rd <RD_DEEP_COUNT and incr_rd_cnt='1') else '0';
|
||||
|
||||
PORTA_WR_COMPLETE <= '1' when (count=WR_DEEP_COUNT) else '0';
|
||||
|
||||
start_counter: process(clka)
|
||||
begin
|
||||
if(rising_edge(clka)) then
|
||||
if(tb_rst='1') then
|
||||
incr_wr_cnt <= '0';
|
||||
elsif(porta_wr ='1') then
|
||||
incr_wr_cnt <='1';
|
||||
elsif(porta_wr_complete='1') then
|
||||
incr_wr_cnt <='0';
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
COUNTER: process(clka)
|
||||
begin
|
||||
if(rising_edge(clka)) then
|
||||
if(tb_rst='1') then
|
||||
count <= 0;
|
||||
elsif(incr_wr_cnt='1') then
|
||||
count<=count+1;
|
||||
end if;
|
||||
if(count=(WR_DEEP_COUNT)) then
|
||||
count<=0;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
DO_WRITE<='1' when (count <WR_DEEP_COUNT and incr_wr_cnt='1') else '0';
|
||||
|
||||
|
||||
BEGIN_SHIFT_REG: FOR I IN 0 TO 5 GENERATE
|
||||
BEGIN
|
||||
DFF_RIGHT: IF I=0 GENERATE
|
||||
BEGIN
|
||||
SHIFT_INST_0: ENTITY work.REGISTER_LOGIC
|
||||
PORT MAP(
|
||||
Q => DO_READ_REG(0),
|
||||
CLK => CLKB,
|
||||
RST => TB_RST,
|
||||
D => DO_READ
|
||||
);
|
||||
END GENERATE DFF_RIGHT;
|
||||
|
||||
DFF_OTHERS: IF ((I>0) AND (I<=5)) GENERATE
|
||||
BEGIN
|
||||
SHIFT_INST: ENTITY work.REGISTER_LOGIC
|
||||
PORT MAP(
|
||||
Q => DO_READ_REG(I),
|
||||
CLK =>CLKB,
|
||||
RST =>TB_RST,
|
||||
D =>DO_READ_REG(I-1)
|
||||
);
|
||||
END GENERATE DFF_OTHERS;
|
||||
END GENERATE BEGIN_SHIFT_REG;
|
||||
|
||||
REGCE_PROCESS: PROCESS(CLKB)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKB)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
DO_READ_R <= '0';
|
||||
ELSE
|
||||
DO_READ_R <= DO_READ;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
|
||||
ENA <= DO_WRITE ;
|
||||
|
||||
WEA(0) <= DO_WRITE ;
|
||||
|
||||
|
||||
END ARCHITECTURE;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
200
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/bmg_tb_pkg.vhd
Executable file
200
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/bmg_tb_pkg.vhd
Executable file
|
|
@ -0,0 +1,200 @@
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Testbench Package
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: bmg_tb_pkg.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- BMG Testbench Package files
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
PACKAGE BMG_TB_PKG IS
|
||||
|
||||
FUNCTION DIVROUNDUP (
|
||||
DATA_VALUE : INTEGER;
|
||||
DIVISOR : INTEGER)
|
||||
RETURN INTEGER;
|
||||
------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : STD_LOGIC_VECTOR;
|
||||
FALSE_CASE : STD_LOGIC_VECTOR)
|
||||
RETURN STD_LOGIC_VECTOR;
|
||||
------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : STRING;
|
||||
FALSE_CASE :STRING)
|
||||
RETURN STRING;
|
||||
------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : STD_LOGIC;
|
||||
FALSE_CASE :STD_LOGIC)
|
||||
RETURN STD_LOGIC;
|
||||
------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : INTEGER;
|
||||
FALSE_CASE : INTEGER)
|
||||
RETURN INTEGER;
|
||||
------------------------
|
||||
FUNCTION LOG2ROUNDUP (
|
||||
DATA_VALUE : INTEGER)
|
||||
RETURN INTEGER;
|
||||
|
||||
END BMG_TB_PKG;
|
||||
|
||||
PACKAGE BODY BMG_TB_PKG IS
|
||||
|
||||
FUNCTION DIVROUNDUP (
|
||||
DATA_VALUE : INTEGER;
|
||||
DIVISOR : INTEGER)
|
||||
RETURN INTEGER IS
|
||||
VARIABLE DIV : INTEGER;
|
||||
BEGIN
|
||||
DIV := DATA_VALUE/DIVISOR;
|
||||
IF ( (DATA_VALUE MOD DIVISOR) /= 0) THEN
|
||||
DIV := DIV+1;
|
||||
END IF;
|
||||
RETURN DIV;
|
||||
END DIVROUNDUP;
|
||||
---------------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : STD_LOGIC_VECTOR;
|
||||
FALSE_CASE : STD_LOGIC_VECTOR)
|
||||
RETURN STD_LOGIC_VECTOR IS
|
||||
BEGIN
|
||||
IF NOT CONDITION THEN
|
||||
RETURN FALSE_CASE;
|
||||
ELSE
|
||||
RETURN TRUE_CASE;
|
||||
END IF;
|
||||
END IF_THEN_ELSE;
|
||||
---------------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : STD_LOGIC;
|
||||
FALSE_CASE : STD_LOGIC)
|
||||
RETURN STD_LOGIC IS
|
||||
BEGIN
|
||||
IF NOT CONDITION THEN
|
||||
RETURN FALSE_CASE;
|
||||
ELSE
|
||||
RETURN TRUE_CASE;
|
||||
END IF;
|
||||
END IF_THEN_ELSE;
|
||||
---------------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : INTEGER;
|
||||
FALSE_CASE : INTEGER)
|
||||
RETURN INTEGER IS
|
||||
VARIABLE RETVAL : INTEGER := 0;
|
||||
BEGIN
|
||||
IF CONDITION=FALSE THEN
|
||||
RETVAL:=FALSE_CASE;
|
||||
ELSE
|
||||
RETVAL:=TRUE_CASE;
|
||||
END IF;
|
||||
RETURN RETVAL;
|
||||
END IF_THEN_ELSE;
|
||||
---------------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : STRING;
|
||||
FALSE_CASE : STRING)
|
||||
RETURN STRING IS
|
||||
BEGIN
|
||||
IF NOT CONDITION THEN
|
||||
RETURN FALSE_CASE;
|
||||
ELSE
|
||||
RETURN TRUE_CASE;
|
||||
END IF;
|
||||
END IF_THEN_ELSE;
|
||||
-------------------------------
|
||||
FUNCTION LOG2ROUNDUP (
|
||||
DATA_VALUE : INTEGER)
|
||||
RETURN INTEGER IS
|
||||
VARIABLE WIDTH : INTEGER := 0;
|
||||
VARIABLE CNT : INTEGER := 1;
|
||||
BEGIN
|
||||
IF (DATA_VALUE <= 1) THEN
|
||||
WIDTH := 1;
|
||||
ELSE
|
||||
WHILE (CNT < DATA_VALUE) LOOP
|
||||
WIDTH := WIDTH + 1;
|
||||
CNT := CNT *2;
|
||||
END LOOP;
|
||||
END IF;
|
||||
RETURN WIDTH;
|
||||
END LOG2ROUNDUP;
|
||||
|
||||
END BMG_TB_PKG;
|
||||
161
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/checker.vhd
Executable file
161
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/checker.vhd
Executable file
|
|
@ -0,0 +1,161 @@
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Checker
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: checker.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- Checker
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
LIBRARY work;
|
||||
USE work.BMG_TB_PKG.ALL;
|
||||
|
||||
ENTITY CHECKER IS
|
||||
GENERIC ( WRITE_WIDTH : INTEGER :=32;
|
||||
READ_WIDTH : INTEGER :=32
|
||||
);
|
||||
|
||||
PORT (
|
||||
CLK : IN STD_LOGIC;
|
||||
RST : IN STD_LOGIC;
|
||||
EN : IN STD_LOGIC;
|
||||
DATA_IN : IN STD_LOGIC_VECTOR (READ_WIDTH-1 DOWNTO 0); --OUTPUT VECTOR
|
||||
STATUS : OUT STD_LOGIC:= '0'
|
||||
);
|
||||
END CHECKER;
|
||||
|
||||
ARCHITECTURE CHECKER_ARCH OF CHECKER IS
|
||||
SIGNAL EXPECTED_DATA : STD_LOGIC_VECTOR(READ_WIDTH-1 DOWNTO 0);
|
||||
SIGNAL DATA_IN_R: STD_LOGIC_VECTOR(READ_WIDTH-1 DOWNTO 0);
|
||||
SIGNAL EN_R : STD_LOGIC := '0';
|
||||
SIGNAL EN_2R : STD_LOGIC := '0';
|
||||
--DATA PART CNT DEFINES THE ASPECT RATIO AND GIVES THE INFO TO THE DATA GENERATOR TO PROVIDE THE DATA EITHER IN PARTS OR COMPLETE DATA IN ONE SHOT
|
||||
--IF READ_WIDTH > WRITE_WIDTH DIVROUNDUP RESULTS IN '1' AND DATA GENERATOR GIVES THE DATAOUT EQUALS TO MAX OF (WRITE_WIDTH, READ_WIDTH)
|
||||
--IF READ_WIDTH < WRITE-WIDTH DIVROUNDUP RESULTS IN > '1' AND DATA GENERATOR GIVES THE DATAOUT IN TERMS OF PARTS(EG 4 PARTS WHEN WRITE_WIDTH 32 AND READ WIDTH 8)
|
||||
CONSTANT DATA_PART_CNT: INTEGER:= DIVROUNDUP(WRITE_WIDTH,READ_WIDTH);
|
||||
CONSTANT MAX_WIDTH: INTEGER:= IF_THEN_ELSE((WRITE_WIDTH>READ_WIDTH),WRITE_WIDTH,READ_WIDTH);
|
||||
SIGNAL ERR_HOLD : STD_LOGIC :='0';
|
||||
SIGNAL ERR_DET : STD_LOGIC :='0';
|
||||
BEGIN
|
||||
PROCESS(CLK)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLK)) THEN
|
||||
IF(RST= '1') THEN
|
||||
EN_R <= '0';
|
||||
EN_2R <= '0';
|
||||
DATA_IN_R <= (OTHERS=>'0');
|
||||
ELSE
|
||||
EN_R <= EN;
|
||||
EN_2R <= EN_R;
|
||||
DATA_IN_R <= DATA_IN;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
EXPECTED_DATA_GEN_INST:ENTITY work.DATA_GEN
|
||||
GENERIC MAP ( DATA_GEN_WIDTH =>MAX_WIDTH,
|
||||
DOUT_WIDTH => READ_WIDTH,
|
||||
DATA_PART_CNT => DATA_PART_CNT,
|
||||
SEED => 2
|
||||
)
|
||||
PORT MAP (
|
||||
CLK => CLK,
|
||||
RST => RST,
|
||||
EN => EN_2R,
|
||||
DATA_OUT => EXPECTED_DATA
|
||||
);
|
||||
|
||||
PROCESS(CLK)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLK)) THEN
|
||||
IF(EN_2R='1') THEN
|
||||
IF(EXPECTED_DATA = DATA_IN_R) THEN
|
||||
ERR_DET<='0';
|
||||
ELSE
|
||||
ERR_DET<= '1';
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PROCESS(CLK,RST)
|
||||
BEGIN
|
||||
IF(RST='1') THEN
|
||||
ERR_HOLD <= '0';
|
||||
ELSIF(RISING_EDGE(CLK)) THEN
|
||||
ERR_HOLD <= ERR_HOLD OR ERR_DET ;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
STATUS <= ERR_HOLD;
|
||||
|
||||
END ARCHITECTURE;
|
||||
|
||||
|
||||
|
||||
140
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/data_gen.vhd
Executable file
140
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/data_gen.vhd
Executable file
|
|
@ -0,0 +1,140 @@
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Data Generator
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: data_gen.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- Data Generator
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
LIBRARY work;
|
||||
USE work.BMG_TB_PKG.ALL;
|
||||
|
||||
ENTITY DATA_GEN IS
|
||||
GENERIC ( DATA_GEN_WIDTH : INTEGER := 32;
|
||||
DOUT_WIDTH : INTEGER := 32;
|
||||
DATA_PART_CNT : INTEGER := 1;
|
||||
SEED : INTEGER := 2
|
||||
);
|
||||
|
||||
PORT (
|
||||
CLK : IN STD_LOGIC;
|
||||
RST : IN STD_LOGIC;
|
||||
EN : IN STD_LOGIC;
|
||||
DATA_OUT : OUT STD_LOGIC_VECTOR (DOUT_WIDTH-1 DOWNTO 0) --OUTPUT VECTOR
|
||||
);
|
||||
END DATA_GEN;
|
||||
|
||||
ARCHITECTURE DATA_GEN_ARCH OF DATA_GEN IS
|
||||
CONSTANT LOOP_COUNT : INTEGER := DIVROUNDUP(DATA_GEN_WIDTH,8);
|
||||
SIGNAL RAND_DATA : STD_LOGIC_VECTOR(8*LOOP_COUNT-1 DOWNTO 0);
|
||||
SIGNAL LOCAL_DATA_OUT : STD_LOGIC_VECTOR(DATA_GEN_WIDTH-1 DOWNTO 0);
|
||||
SIGNAL LOCAL_CNT : INTEGER :=1;
|
||||
SIGNAL DATA_GEN_I : STD_LOGIC :='0';
|
||||
BEGIN
|
||||
|
||||
LOCAL_DATA_OUT <= RAND_DATA(DATA_GEN_WIDTH-1 DOWNTO 0);
|
||||
DATA_OUT <= LOCAL_DATA_OUT(((DOUT_WIDTH*LOCAL_CNT)-1) DOWNTO ((DOUT_WIDTH*LOCAL_CNT)-DOUT_WIDTH));
|
||||
DATA_GEN_I <= '0' WHEN (LOCAL_CNT < DATA_PART_CNT) ELSE EN;
|
||||
|
||||
PROCESS(CLK)
|
||||
BEGIN
|
||||
IF(RISING_EDGE (CLK)) THEN
|
||||
IF(EN ='1' AND (DATA_PART_CNT =1)) THEN
|
||||
LOCAL_CNT <=1;
|
||||
ELSIF(EN='1' AND (DATA_PART_CNT>1)) THEN
|
||||
IF(LOCAL_CNT = 1) THEN
|
||||
LOCAL_CNT <= LOCAL_CNT+1;
|
||||
ELSIF(LOCAL_CNT < DATA_PART_CNT) THEN
|
||||
LOCAL_CNT <= LOCAL_CNT+1;
|
||||
ELSE
|
||||
LOCAL_CNT <= 1;
|
||||
END IF;
|
||||
ELSE
|
||||
LOCAL_CNT <= 1;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
RAND_GEN:FOR N IN LOOP_COUNT-1 DOWNTO 0 GENERATE
|
||||
RAND_GEN_INST:ENTITY work.RANDOM
|
||||
GENERIC MAP(
|
||||
WIDTH => 8,
|
||||
SEED => (SEED+N)
|
||||
)
|
||||
PORT MAP(
|
||||
CLK => CLK,
|
||||
RST => RST,
|
||||
EN => DATA_GEN_I,
|
||||
RANDOM_NUM => RAND_DATA(8*(N+1)-1 DOWNTO 8*N)
|
||||
);
|
||||
END GENERATE RAND_GEN;
|
||||
|
||||
END ARCHITECTURE;
|
||||
|
||||
112
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/random.vhd
Executable file
112
FPGA/Generator/ipcore_dir/SweepConfigMem/simulation/random.vhd
Executable file
|
|
@ -0,0 +1,112 @@
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Random Number Generator
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: random.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- Random Generator
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
|
||||
ENTITY RANDOM IS
|
||||
GENERIC ( WIDTH : INTEGER := 32;
|
||||
SEED : INTEGER :=2
|
||||
);
|
||||
|
||||
PORT (
|
||||
CLK : IN STD_LOGIC;
|
||||
RST : IN STD_LOGIC;
|
||||
EN : IN STD_LOGIC;
|
||||
RANDOM_NUM : OUT STD_LOGIC_VECTOR (WIDTH-1 DOWNTO 0) --OUTPUT VECTOR
|
||||
);
|
||||
END RANDOM;
|
||||
|
||||
ARCHITECTURE BEHAVIORAL OF RANDOM IS
|
||||
BEGIN
|
||||
PROCESS(CLK)
|
||||
VARIABLE RAND_TEMP : STD_LOGIC_VECTOR(WIDTH-1 DOWNTO 0):=CONV_STD_LOGIC_VECTOR(SEED,WIDTH);
|
||||
VARIABLE TEMP : STD_LOGIC := '0';
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLK)) THEN
|
||||
IF(RST='1') THEN
|
||||
RAND_TEMP := CONV_STD_LOGIC_VECTOR(SEED,WIDTH);
|
||||
ELSE
|
||||
IF(EN = '1') THEN
|
||||
TEMP := RAND_TEMP(WIDTH-1) XOR RAND_TEMP(WIDTH-2);
|
||||
RAND_TEMP(WIDTH-1 DOWNTO 1) := RAND_TEMP(WIDTH-2 DOWNTO 0);
|
||||
RAND_TEMP(0) := TEMP;
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
RANDOM_NUM <= RAND_TEMP;
|
||||
END PROCESS;
|
||||
END ARCHITECTURE;
|
||||
53
FPGA/Generator/ipcore_dir/VCO_Mem.gise
Normal file
53
FPGA/Generator/ipcore_dir/VCO_Mem.gise
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?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="VCO_Mem.xise"/>
|
||||
|
||||
<files xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<file xil_pn:fileType="FILE_ASY" xil_pn:name="VCO_Mem.asy" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_SYMBOL" xil_pn:name="VCO_Mem.sym" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_VHO" xil_pn:name="VCO_Mem.vho" xil_pn:origination="imported"/>
|
||||
</files>
|
||||
|
||||
<transforms xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<transform xil_pn:end_ts="1654646662" xil_pn:name="TRAN_copyInitialToXSTAbstractSynthesis" xil_pn:start_ts="1654646662">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_schematicsToHdl" xil_pn:prop_ck="9157515098364838426" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_regenerateCores" xil_pn:prop_ck="5794461498655324265" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_SubProjectAbstractToPreProxy" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_xawsTohdl" xil_pn:prop_ck="-5036159626982002724" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
</transforms>
|
||||
|
||||
</generated_project>
|
||||
149
FPGA/Generator/ipcore_dir/VCO_Mem.vhd
Normal file
149
FPGA/Generator/ipcore_dir/VCO_Mem.vhd
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
--------------------------------------------------------------------------------
|
||||
-- This file is owned and controlled by Xilinx and must be used solely --
|
||||
-- for design, simulation, implementation and creation of design files --
|
||||
-- limited to Xilinx devices or technologies. Use with non-Xilinx --
|
||||
-- devices or technologies is expressly prohibited and immediately --
|
||||
-- terminates your license. --
|
||||
-- --
|
||||
-- XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" SOLELY --
|
||||
-- FOR USE IN DEVELOPING PROGRAMS AND SOLUTIONS FOR XILINX DEVICES. BY --
|
||||
-- PROVIDING THIS DESIGN, CODE, OR INFORMATION AS ONE POSSIBLE --
|
||||
-- IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD, XILINX IS --
|
||||
-- MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE FROM ANY --
|
||||
-- CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING ANY --
|
||||
-- RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY --
|
||||
-- DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE --
|
||||
-- IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR --
|
||||
-- REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF --
|
||||
-- INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
|
||||
-- PARTICULAR PURPOSE. --
|
||||
-- --
|
||||
-- Xilinx products are not intended for use in life support appliances, --
|
||||
-- devices, or systems. Use in such applications are expressly --
|
||||
-- prohibited. --
|
||||
-- --
|
||||
-- (c) Copyright 1995-2022 Xilinx, Inc. --
|
||||
-- All rights reserved. --
|
||||
--------------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
-- You must compile the wrapper file VCO_Mem.vhd when simulating
|
||||
-- the core, VCO_Mem. When compiling the wrapper file, be sure to
|
||||
-- reference the XilinxCoreLib VHDL simulation library. For detailed
|
||||
-- instructions, please refer to the "CORE Generator Help".
|
||||
|
||||
-- The synthesis directives "translate_off/translate_on" specified
|
||||
-- below are supported by Xilinx, Mentor Graphics and Synplicity
|
||||
-- synthesis tools. Ensure they are correct for your synthesis tool(s).
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.ALL;
|
||||
-- synthesis translate_off
|
||||
LIBRARY XilinxCoreLib;
|
||||
-- synthesis translate_on
|
||||
ENTITY VCO_Mem IS
|
||||
PORT (
|
||||
clka : IN STD_LOGIC;
|
||||
wea : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
addra : IN STD_LOGIC_VECTOR(5 DOWNTO 0);
|
||||
dina : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
|
||||
clkb : IN STD_LOGIC;
|
||||
addrb : IN STD_LOGIC_VECTOR(5 DOWNTO 0);
|
||||
doutb : OUT STD_LOGIC_VECTOR(15 DOWNTO 0)
|
||||
);
|
||||
END VCO_Mem;
|
||||
|
||||
ARCHITECTURE VCO_Mem_a OF VCO_Mem IS
|
||||
-- synthesis translate_off
|
||||
COMPONENT wrapped_VCO_Mem
|
||||
PORT (
|
||||
clka : IN STD_LOGIC;
|
||||
wea : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
addra : IN STD_LOGIC_VECTOR(5 DOWNTO 0);
|
||||
dina : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
|
||||
clkb : IN STD_LOGIC;
|
||||
addrb : IN STD_LOGIC_VECTOR(5 DOWNTO 0);
|
||||
doutb : OUT STD_LOGIC_VECTOR(15 DOWNTO 0)
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
-- Configuration specification
|
||||
FOR ALL : wrapped_VCO_Mem USE ENTITY XilinxCoreLib.blk_mem_gen_v7_3(behavioral)
|
||||
GENERIC MAP (
|
||||
c_addra_width => 6,
|
||||
c_addrb_width => 6,
|
||||
c_algorithm => 1,
|
||||
c_axi_id_width => 4,
|
||||
c_axi_slave_type => 0,
|
||||
c_axi_type => 1,
|
||||
c_byte_size => 9,
|
||||
c_common_clk => 0,
|
||||
c_default_data => "0",
|
||||
c_disable_warn_bhv_coll => 0,
|
||||
c_disable_warn_bhv_range => 0,
|
||||
c_enable_32bit_address => 0,
|
||||
c_family => "spartan6",
|
||||
c_has_axi_id => 0,
|
||||
c_has_ena => 0,
|
||||
c_has_enb => 0,
|
||||
c_has_injecterr => 0,
|
||||
c_has_mem_output_regs_a => 0,
|
||||
c_has_mem_output_regs_b => 0,
|
||||
c_has_mux_output_regs_a => 0,
|
||||
c_has_mux_output_regs_b => 0,
|
||||
c_has_regcea => 0,
|
||||
c_has_regceb => 0,
|
||||
c_has_rsta => 0,
|
||||
c_has_rstb => 0,
|
||||
c_has_softecc_input_regs_a => 0,
|
||||
c_has_softecc_output_regs_b => 0,
|
||||
c_init_file => "BlankString",
|
||||
c_init_file_name => "no_coe_file_loaded",
|
||||
c_inita_val => "0",
|
||||
c_initb_val => "0",
|
||||
c_interface_type => 0,
|
||||
c_load_init_file => 0,
|
||||
c_mem_type => 1,
|
||||
c_mux_pipeline_stages => 0,
|
||||
c_prim_type => 1,
|
||||
c_read_depth_a => 64,
|
||||
c_read_depth_b => 64,
|
||||
c_read_width_a => 16,
|
||||
c_read_width_b => 16,
|
||||
c_rst_priority_a => "CE",
|
||||
c_rst_priority_b => "CE",
|
||||
c_rst_type => "SYNC",
|
||||
c_rstram_a => 0,
|
||||
c_rstram_b => 0,
|
||||
c_sim_collision_check => "ALL",
|
||||
c_use_bram_block => 0,
|
||||
c_use_byte_wea => 0,
|
||||
c_use_byte_web => 0,
|
||||
c_use_default_data => 0,
|
||||
c_use_ecc => 0,
|
||||
c_use_softecc => 0,
|
||||
c_wea_width => 1,
|
||||
c_web_width => 1,
|
||||
c_write_depth_a => 64,
|
||||
c_write_depth_b => 64,
|
||||
c_write_mode_a => "WRITE_FIRST",
|
||||
c_write_mode_b => "WRITE_FIRST",
|
||||
c_write_width_a => 16,
|
||||
c_write_width_b => 16,
|
||||
c_xdevicefamily => "spartan6"
|
||||
);
|
||||
-- synthesis translate_on
|
||||
BEGIN
|
||||
-- synthesis translate_off
|
||||
U0 : wrapped_VCO_Mem
|
||||
PORT MAP (
|
||||
clka => clka,
|
||||
wea => wea,
|
||||
addra => addra,
|
||||
dina => dina,
|
||||
clkb => clkb,
|
||||
addrb => addrb,
|
||||
doutb => doutb
|
||||
);
|
||||
-- synthesis translate_on
|
||||
|
||||
END VCO_Mem_a;
|
||||
32
FPGA/Generator/ipcore_dir/result_bram.gise
Normal file
32
FPGA/Generator/ipcore_dir/result_bram.gise
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?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="result_bram.xise"/>
|
||||
|
||||
<files xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<file xil_pn:fileType="FILE_ASY" xil_pn:name="result_bram.asy" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_SYMBOL" xil_pn:name="result_bram.sym" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_VHO" xil_pn:name="result_bram.vho" xil_pn:origination="imported"/>
|
||||
</files>
|
||||
|
||||
<transforms xmlns="http://www.xilinx.com/XMLSchema"/>
|
||||
|
||||
</generated_project>
|
||||
149
FPGA/Generator/ipcore_dir/result_bram.vhd
Normal file
149
FPGA/Generator/ipcore_dir/result_bram.vhd
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
--------------------------------------------------------------------------------
|
||||
-- This file is owned and controlled by Xilinx and must be used solely --
|
||||
-- for design, simulation, implementation and creation of design files --
|
||||
-- limited to Xilinx devices or technologies. Use with non-Xilinx --
|
||||
-- devices or technologies is expressly prohibited and immediately --
|
||||
-- terminates your license. --
|
||||
-- --
|
||||
-- XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" SOLELY --
|
||||
-- FOR USE IN DEVELOPING PROGRAMS AND SOLUTIONS FOR XILINX DEVICES. BY --
|
||||
-- PROVIDING THIS DESIGN, CODE, OR INFORMATION AS ONE POSSIBLE --
|
||||
-- IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD, XILINX IS --
|
||||
-- MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE FROM ANY --
|
||||
-- CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING ANY --
|
||||
-- RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY --
|
||||
-- DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE --
|
||||
-- IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR --
|
||||
-- REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF --
|
||||
-- INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
|
||||
-- PARTICULAR PURPOSE. --
|
||||
-- --
|
||||
-- Xilinx products are not intended for use in life support appliances, --
|
||||
-- devices, or systems. Use in such applications are expressly --
|
||||
-- prohibited. --
|
||||
-- --
|
||||
-- (c) Copyright 1995-2020 Xilinx, Inc. --
|
||||
-- All rights reserved. --
|
||||
--------------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
-- You must compile the wrapper file result_bram.vhd when simulating
|
||||
-- the core, result_bram. When compiling the wrapper file, be sure to
|
||||
-- reference the XilinxCoreLib VHDL simulation library. For detailed
|
||||
-- instructions, please refer to the "CORE Generator Help".
|
||||
|
||||
-- The synthesis directives "translate_off/translate_on" specified
|
||||
-- below are supported by Xilinx, Mentor Graphics and Synplicity
|
||||
-- synthesis tools. Ensure they are correct for your synthesis tool(s).
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.ALL;
|
||||
-- synthesis translate_off
|
||||
LIBRARY XilinxCoreLib;
|
||||
-- synthesis translate_on
|
||||
ENTITY result_bram IS
|
||||
PORT (
|
||||
clka : IN STD_LOGIC;
|
||||
wea : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
addra : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
dina : IN STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
clkb : IN STD_LOGIC;
|
||||
addrb : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
doutb : OUT STD_LOGIC_VECTOR(191 DOWNTO 0)
|
||||
);
|
||||
END result_bram;
|
||||
|
||||
ARCHITECTURE result_bram_a OF result_bram IS
|
||||
-- synthesis translate_off
|
||||
COMPONENT wrapped_result_bram
|
||||
PORT (
|
||||
clka : IN STD_LOGIC;
|
||||
wea : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
addra : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
dina : IN STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
clkb : IN STD_LOGIC;
|
||||
addrb : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
doutb : OUT STD_LOGIC_VECTOR(191 DOWNTO 0)
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
-- Configuration specification
|
||||
FOR ALL : wrapped_result_bram USE ENTITY XilinxCoreLib.blk_mem_gen_v7_3(behavioral)
|
||||
GENERIC MAP (
|
||||
c_addra_width => 8,
|
||||
c_addrb_width => 8,
|
||||
c_algorithm => 1,
|
||||
c_axi_id_width => 4,
|
||||
c_axi_slave_type => 0,
|
||||
c_axi_type => 1,
|
||||
c_byte_size => 9,
|
||||
c_common_clk => 0,
|
||||
c_default_data => "0",
|
||||
c_disable_warn_bhv_coll => 0,
|
||||
c_disable_warn_bhv_range => 0,
|
||||
c_enable_32bit_address => 0,
|
||||
c_family => "spartan6",
|
||||
c_has_axi_id => 0,
|
||||
c_has_ena => 0,
|
||||
c_has_enb => 0,
|
||||
c_has_injecterr => 0,
|
||||
c_has_mem_output_regs_a => 0,
|
||||
c_has_mem_output_regs_b => 0,
|
||||
c_has_mux_output_regs_a => 0,
|
||||
c_has_mux_output_regs_b => 0,
|
||||
c_has_regcea => 0,
|
||||
c_has_regceb => 0,
|
||||
c_has_rsta => 0,
|
||||
c_has_rstb => 0,
|
||||
c_has_softecc_input_regs_a => 0,
|
||||
c_has_softecc_output_regs_b => 0,
|
||||
c_init_file => "BlankString",
|
||||
c_init_file_name => "no_coe_file_loaded",
|
||||
c_inita_val => "0",
|
||||
c_initb_val => "0",
|
||||
c_interface_type => 0,
|
||||
c_load_init_file => 0,
|
||||
c_mem_type => 1,
|
||||
c_mux_pipeline_stages => 0,
|
||||
c_prim_type => 1,
|
||||
c_read_depth_a => 256,
|
||||
c_read_depth_b => 256,
|
||||
c_read_width_a => 192,
|
||||
c_read_width_b => 192,
|
||||
c_rst_priority_a => "CE",
|
||||
c_rst_priority_b => "CE",
|
||||
c_rst_type => "SYNC",
|
||||
c_rstram_a => 0,
|
||||
c_rstram_b => 0,
|
||||
c_sim_collision_check => "ALL",
|
||||
c_use_bram_block => 0,
|
||||
c_use_byte_wea => 0,
|
||||
c_use_byte_web => 0,
|
||||
c_use_default_data => 0,
|
||||
c_use_ecc => 0,
|
||||
c_use_softecc => 0,
|
||||
c_wea_width => 1,
|
||||
c_web_width => 1,
|
||||
c_write_depth_a => 256,
|
||||
c_write_depth_b => 256,
|
||||
c_write_mode_a => "WRITE_FIRST",
|
||||
c_write_mode_b => "WRITE_FIRST",
|
||||
c_write_width_a => 192,
|
||||
c_write_width_b => 192,
|
||||
c_xdevicefamily => "spartan6"
|
||||
);
|
||||
-- synthesis translate_on
|
||||
BEGIN
|
||||
-- synthesis translate_off
|
||||
U0 : wrapped_result_bram
|
||||
PORT MAP (
|
||||
clka => clka,
|
||||
wea => wea,
|
||||
addra => addra,
|
||||
dina => dina,
|
||||
clkb => clkb,
|
||||
addrb => addrb,
|
||||
doutb => doutb
|
||||
);
|
||||
-- synthesis translate_on
|
||||
|
||||
END result_bram_a;
|
||||
61
FPGA/Generator/ipcore_dir/result_bram/example_design/result_bram_exdes.ucf
Executable file
61
FPGA/Generator/ipcore_dir/result_bram/example_design/result_bram_exdes.ucf
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
################################################################################
|
||||
#
|
||||
# (c) Copyright 2002 - 2010 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.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Tx Core Period Constraint. This constraint can be modified, and is
|
||||
# valid as long as it is met after place and route.
|
||||
NET "CLKA" TNM_NET = "CLKA";
|
||||
|
||||
NET "CLKB" TNM_NET = "CLKB";
|
||||
|
||||
TIMESPEC "TS_CLKA" = PERIOD "CLKA" 25 MHZ;
|
||||
|
||||
TIMESPEC "TS_CLKB" = PERIOD "CLKB" 25 MHZ;
|
||||
|
||||
################################################################################
|
||||
179
FPGA/Generator/ipcore_dir/result_bram/example_design/result_bram_exdes.vhd
Executable file
179
FPGA/Generator/ipcore_dir/result_bram/example_design/result_bram_exdes.vhd
Executable file
|
|
@ -0,0 +1,179 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7.1 Core - Top-level core wrapper
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006-2010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: result_bram_exdes.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- This is the actual BMG core wrapper.
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: August 31, 2005 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
LIBRARY UNISIM;
|
||||
USE UNISIM.VCOMPONENTS.ALL;
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Entity Declaration
|
||||
--------------------------------------------------------------------------------
|
||||
ENTITY result_bram_exdes IS
|
||||
PORT (
|
||||
--Inputs - Port A
|
||||
|
||||
WEA : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
ADDRA : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
|
||||
DINA : IN STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
|
||||
CLKA : IN STD_LOGIC;
|
||||
|
||||
|
||||
--Inputs - Port B
|
||||
ADDRB : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
DOUTB : OUT STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
CLKB : IN STD_LOGIC
|
||||
|
||||
);
|
||||
|
||||
END result_bram_exdes;
|
||||
|
||||
|
||||
ARCHITECTURE xilinx OF result_bram_exdes IS
|
||||
|
||||
COMPONENT BUFG IS
|
||||
PORT (
|
||||
I : IN STD_ULOGIC;
|
||||
O : OUT STD_ULOGIC
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
COMPONENT result_bram IS
|
||||
PORT (
|
||||
--Port A
|
||||
|
||||
WEA : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
ADDRA : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
|
||||
DINA : IN STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
|
||||
|
||||
CLKA : IN STD_LOGIC;
|
||||
|
||||
|
||||
--Port B
|
||||
ADDRB : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
DOUTB : OUT STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
CLKB : IN STD_LOGIC
|
||||
|
||||
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
SIGNAL CLKA_buf : STD_LOGIC;
|
||||
SIGNAL CLKB_buf : STD_LOGIC;
|
||||
SIGNAL S_ACLK_buf : STD_LOGIC;
|
||||
|
||||
BEGIN
|
||||
|
||||
bufg_A : BUFG
|
||||
PORT MAP (
|
||||
I => CLKA,
|
||||
O => CLKA_buf
|
||||
);
|
||||
|
||||
bufg_B : BUFG
|
||||
PORT MAP (
|
||||
I => CLKB,
|
||||
O => CLKB_buf
|
||||
);
|
||||
|
||||
|
||||
bmg0 : result_bram
|
||||
PORT MAP (
|
||||
--Port A
|
||||
|
||||
WEA => WEA,
|
||||
ADDRA => ADDRA,
|
||||
|
||||
DINA => DINA,
|
||||
|
||||
CLKA => CLKA_buf,
|
||||
|
||||
|
||||
--Port B
|
||||
ADDRB => ADDRB,
|
||||
DOUTB => DOUTB,
|
||||
CLKB => CLKB_buf
|
||||
|
||||
);
|
||||
|
||||
END xilinx;
|
||||
275
FPGA/Generator/ipcore_dir/result_bram/example_design/result_bram_prod.vhd
Executable file
275
FPGA/Generator/ipcore_dir/result_bram/example_design/result_bram_prod.vhd
Executable file
|
|
@ -0,0 +1,275 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7.1 Core - Top-level wrapper
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006-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.
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: result_bram_prod.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- This is the top-level BMG wrapper (over BMG core).
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: August 31, 2005 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Configured Core Parameter Values:
|
||||
-- (Refer to the SIM Parameters table in the datasheet for more information on
|
||||
-- the these parameters.)
|
||||
-- C_FAMILY : spartan6
|
||||
-- C_XDEVICEFAMILY : spartan6
|
||||
-- C_INTERFACE_TYPE : 0
|
||||
-- C_ENABLE_32BIT_ADDRESS : 0
|
||||
-- C_AXI_TYPE : 1
|
||||
-- C_AXI_SLAVE_TYPE : 0
|
||||
-- C_AXI_ID_WIDTH : 4
|
||||
-- C_MEM_TYPE : 1
|
||||
-- C_BYTE_SIZE : 9
|
||||
-- C_ALGORITHM : 1
|
||||
-- C_PRIM_TYPE : 1
|
||||
-- C_LOAD_INIT_FILE : 0
|
||||
-- C_INIT_FILE_NAME : no_coe_file_loaded
|
||||
-- C_USE_DEFAULT_DATA : 0
|
||||
-- C_DEFAULT_DATA : 0
|
||||
-- C_RST_TYPE : SYNC
|
||||
-- C_HAS_RSTA : 0
|
||||
-- C_RST_PRIORITY_A : CE
|
||||
-- C_RSTRAM_A : 0
|
||||
-- C_INITA_VAL : 0
|
||||
-- C_HAS_ENA : 0
|
||||
-- C_HAS_REGCEA : 0
|
||||
-- C_USE_BYTE_WEA : 0
|
||||
-- C_WEA_WIDTH : 1
|
||||
-- C_WRITE_MODE_A : WRITE_FIRST
|
||||
-- C_WRITE_WIDTH_A : 192
|
||||
-- C_READ_WIDTH_A : 192
|
||||
-- C_WRITE_DEPTH_A : 256
|
||||
-- C_READ_DEPTH_A : 256
|
||||
-- C_ADDRA_WIDTH : 8
|
||||
-- C_HAS_RSTB : 0
|
||||
-- C_RST_PRIORITY_B : CE
|
||||
-- C_RSTRAM_B : 0
|
||||
-- C_INITB_VAL : 0
|
||||
-- C_HAS_ENB : 0
|
||||
-- C_HAS_REGCEB : 0
|
||||
-- C_USE_BYTE_WEB : 0
|
||||
-- C_WEB_WIDTH : 1
|
||||
-- C_WRITE_MODE_B : WRITE_FIRST
|
||||
-- C_WRITE_WIDTH_B : 192
|
||||
-- C_READ_WIDTH_B : 192
|
||||
-- C_WRITE_DEPTH_B : 256
|
||||
-- C_READ_DEPTH_B : 256
|
||||
-- C_ADDRB_WIDTH : 8
|
||||
-- C_HAS_MEM_OUTPUT_REGS_A : 0
|
||||
-- C_HAS_MEM_OUTPUT_REGS_B : 0
|
||||
-- C_HAS_MUX_OUTPUT_REGS_A : 0
|
||||
-- C_HAS_MUX_OUTPUT_REGS_B : 0
|
||||
-- C_HAS_SOFTECC_INPUT_REGS_A : 0
|
||||
-- C_HAS_SOFTECC_OUTPUT_REGS_B : 0
|
||||
-- C_MUX_PIPELINE_STAGES : 0
|
||||
-- C_USE_ECC : 0
|
||||
-- C_USE_SOFTECC : 0
|
||||
-- C_HAS_INJECTERR : 0
|
||||
-- C_SIM_COLLISION_CHECK : ALL
|
||||
-- C_COMMON_CLK : 0
|
||||
-- C_DISABLE_WARN_BHV_COLL : 0
|
||||
-- C_DISABLE_WARN_BHV_RANGE : 0
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
LIBRARY UNISIM;
|
||||
USE UNISIM.VCOMPONENTS.ALL;
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Entity Declaration
|
||||
--------------------------------------------------------------------------------
|
||||
ENTITY result_bram_prod IS
|
||||
PORT (
|
||||
--Port A
|
||||
CLKA : IN STD_LOGIC;
|
||||
RSTA : IN STD_LOGIC; --opt port
|
||||
ENA : IN STD_LOGIC; --optional port
|
||||
REGCEA : IN STD_LOGIC; --optional port
|
||||
WEA : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
ADDRA : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
DINA : IN STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
DOUTA : OUT STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
|
||||
--Port B
|
||||
CLKB : IN STD_LOGIC;
|
||||
RSTB : IN STD_LOGIC; --opt port
|
||||
ENB : IN STD_LOGIC; --optional port
|
||||
REGCEB : IN STD_LOGIC; --optional port
|
||||
WEB : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
ADDRB : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
DINB : IN STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
DOUTB : OUT STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
|
||||
--ECC
|
||||
INJECTSBITERR : IN STD_LOGIC; --optional port
|
||||
INJECTDBITERR : IN STD_LOGIC; --optional port
|
||||
SBITERR : OUT STD_LOGIC; --optional port
|
||||
DBITERR : OUT STD_LOGIC; --optional port
|
||||
RDADDRECC : OUT STD_LOGIC_VECTOR(7 DOWNTO 0); --optional port
|
||||
-- AXI BMG Input and Output Port Declarations
|
||||
|
||||
-- AXI Global Signals
|
||||
S_ACLK : IN STD_LOGIC;
|
||||
S_AXI_AWID : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
|
||||
S_AXI_AWADDR : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
|
||||
S_AXI_AWLEN : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
S_AXI_AWSIZE : IN STD_LOGIC_VECTOR(2 DOWNTO 0);
|
||||
S_AXI_AWBURST : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
|
||||
S_AXI_AWVALID : IN STD_LOGIC;
|
||||
S_AXI_AWREADY : OUT STD_LOGIC;
|
||||
S_AXI_WDATA : IN STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
S_AXI_WSTRB : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
S_AXI_WLAST : IN STD_LOGIC;
|
||||
S_AXI_WVALID : IN STD_LOGIC;
|
||||
S_AXI_WREADY : OUT STD_LOGIC;
|
||||
S_AXI_BID : OUT STD_LOGIC_VECTOR(3 DOWNTO 0):= (OTHERS => '0');
|
||||
S_AXI_BRESP : OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
|
||||
S_AXI_BVALID : OUT STD_LOGIC;
|
||||
S_AXI_BREADY : IN STD_LOGIC;
|
||||
|
||||
-- AXI Full/Lite Slave Read (Write side)
|
||||
S_AXI_ARID : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
|
||||
S_AXI_ARADDR : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
|
||||
S_AXI_ARLEN : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
S_AXI_ARSIZE : IN STD_LOGIC_VECTOR(2 DOWNTO 0);
|
||||
S_AXI_ARBURST : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
|
||||
S_AXI_ARVALID : IN STD_LOGIC;
|
||||
S_AXI_ARREADY : OUT STD_LOGIC;
|
||||
S_AXI_RID : OUT STD_LOGIC_VECTOR(3 DOWNTO 0):= (OTHERS => '0');
|
||||
S_AXI_RDATA : OUT STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
S_AXI_RRESP : OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
|
||||
S_AXI_RLAST : OUT STD_LOGIC;
|
||||
S_AXI_RVALID : OUT STD_LOGIC;
|
||||
S_AXI_RREADY : IN STD_LOGIC;
|
||||
|
||||
-- AXI Full/Lite Sideband Signals
|
||||
S_AXI_INJECTSBITERR : IN STD_LOGIC;
|
||||
S_AXI_INJECTDBITERR : IN STD_LOGIC;
|
||||
S_AXI_SBITERR : OUT STD_LOGIC;
|
||||
S_AXI_DBITERR : OUT STD_LOGIC;
|
||||
S_AXI_RDADDRECC : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
S_ARESETN : IN STD_LOGIC
|
||||
|
||||
|
||||
);
|
||||
|
||||
END result_bram_prod;
|
||||
|
||||
|
||||
ARCHITECTURE xilinx OF result_bram_prod IS
|
||||
|
||||
COMPONENT result_bram_exdes IS
|
||||
PORT (
|
||||
--Port A
|
||||
|
||||
WEA : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
ADDRA : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
|
||||
DINA : IN STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
|
||||
|
||||
CLKA : IN STD_LOGIC;
|
||||
|
||||
|
||||
--Port B
|
||||
ADDRB : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
DOUTB : OUT STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
CLKB : IN STD_LOGIC
|
||||
|
||||
|
||||
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
BEGIN
|
||||
|
||||
bmg0 : result_bram_exdes
|
||||
PORT MAP (
|
||||
--Port A
|
||||
|
||||
WEA => WEA,
|
||||
ADDRA => ADDRA,
|
||||
|
||||
DINA => DINA,
|
||||
|
||||
CLKA => CLKA,
|
||||
|
||||
--Port B
|
||||
ADDRB => ADDRB,
|
||||
DOUTB => DOUTB,
|
||||
CLKB => CLKB
|
||||
|
||||
|
||||
|
||||
);
|
||||
END xilinx;
|
||||
117
FPGA/Generator/ipcore_dir/result_bram/simulation/addr_gen.vhd
Executable file
117
FPGA/Generator/ipcore_dir/result_bram/simulation/addr_gen.vhd
Executable file
|
|
@ -0,0 +1,117 @@
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Address Generator
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: addr_gen.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- Address Generator
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
LIBRARY work;
|
||||
USE work.ALL;
|
||||
|
||||
ENTITY ADDR_GEN IS
|
||||
GENERIC ( C_MAX_DEPTH : INTEGER := 1024 ;
|
||||
RST_VALUE : STD_LOGIC_VECTOR(31 DOWNTO 0) := (OTHERS=> '0');
|
||||
RST_INC : INTEGER := 0);
|
||||
PORT (
|
||||
CLK : IN STD_LOGIC;
|
||||
RST : IN STD_LOGIC;
|
||||
EN : IN STD_LOGIC;
|
||||
LOAD :IN STD_LOGIC;
|
||||
LOAD_VALUE : IN STD_LOGIC_VECTOR (31 DOWNTO 0) := (OTHERS => '0');
|
||||
ADDR_OUT : OUT STD_LOGIC_VECTOR (31 DOWNTO 0) --OUTPUT VECTOR
|
||||
);
|
||||
END ADDR_GEN;
|
||||
|
||||
ARCHITECTURE BEHAVIORAL OF ADDR_GEN IS
|
||||
SIGNAL ADDR_TEMP : STD_LOGIC_VECTOR(31 DOWNTO 0) := (OTHERS =>'0');
|
||||
BEGIN
|
||||
ADDR_OUT <= ADDR_TEMP;
|
||||
PROCESS(CLK)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLK)) THEN
|
||||
IF(RST='1') THEN
|
||||
ADDR_TEMP<= RST_VALUE + conv_std_logic_vector(RST_INC,32 );
|
||||
ELSE
|
||||
IF(EN='1') THEN
|
||||
IF(LOAD='1') THEN
|
||||
ADDR_TEMP <=LOAD_VALUE;
|
||||
ELSE
|
||||
IF(ADDR_TEMP = C_MAX_DEPTH-1) THEN
|
||||
ADDR_TEMP<= RST_VALUE + conv_std_logic_vector(RST_INC,32 );
|
||||
ELSE
|
||||
ADDR_TEMP <= ADDR_TEMP + '1';
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
END ARCHITECTURE;
|
||||
434
FPGA/Generator/ipcore_dir/result_bram/simulation/bmg_stim_gen.vhd
Executable file
434
FPGA/Generator/ipcore_dir/result_bram/simulation/bmg_stim_gen.vhd
Executable file
|
|
@ -0,0 +1,434 @@
|
|||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Stimulus Generator For Simple Dual Port RAM
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: bmg_stim_gen.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- Stimulus Generation For SDP Configuration
|
||||
-- 100 Writes and 100 Reads will be performed in a repeatitive loop till the
|
||||
-- simulation ends
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
USE IEEE.STD_LOGIC_MISC.ALL;
|
||||
|
||||
LIBRARY work;
|
||||
USE work.ALL;
|
||||
USE work.BMG_TB_PKG.ALL;
|
||||
|
||||
|
||||
ENTITY REGISTER_LOGIC IS
|
||||
PORT(
|
||||
Q : OUT STD_LOGIC;
|
||||
CLK : IN STD_LOGIC;
|
||||
RST : IN STD_LOGIC;
|
||||
D : IN STD_LOGIC
|
||||
);
|
||||
END REGISTER_LOGIC;
|
||||
|
||||
ARCHITECTURE REGISTER_ARCH OF REGISTER_LOGIC IS
|
||||
SIGNAL Q_O : STD_LOGIC :='0';
|
||||
BEGIN
|
||||
Q <= Q_O;
|
||||
FF_BEH: PROCESS(CLK)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLK)) THEN
|
||||
IF(RST ='1') THEN
|
||||
Q_O <= '0';
|
||||
ELSE
|
||||
Q_O <= D;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
END REGISTER_ARCH;
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
USE IEEE.STD_LOGIC_MISC.ALL;
|
||||
|
||||
LIBRARY work;
|
||||
USE work.ALL;
|
||||
USE work.BMG_TB_PKG.ALL;
|
||||
|
||||
|
||||
ENTITY BMG_STIM_GEN IS
|
||||
PORT (
|
||||
CLKA : IN STD_LOGIC;
|
||||
CLKB : IN STD_LOGIC;
|
||||
TB_RST : IN STD_LOGIC;
|
||||
ADDRA: OUT STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0');
|
||||
DINA : OUT STD_LOGIC_VECTOR(191 DOWNTO 0) := (OTHERS => '0');
|
||||
WEA : OUT STD_LOGIC_VECTOR (0 DOWNTO 0) := (OTHERS => '0');
|
||||
ADDRB: OUT STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0');
|
||||
CHECK_DATA: OUT STD_LOGIC:='0'
|
||||
);
|
||||
END BMG_STIM_GEN;
|
||||
|
||||
|
||||
ARCHITECTURE BEHAVIORAL OF BMG_STIM_GEN IS
|
||||
|
||||
CONSTANT ZERO : STD_LOGIC_VECTOR(31 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL WRITE_ADDR : STD_LOGIC_VECTOR(31 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL READ_ADDR : STD_LOGIC_VECTOR(31 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL DINA_INT : STD_LOGIC_VECTOR(191 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL DO_WRITE : STD_LOGIC := '0';
|
||||
SIGNAL DO_READ : STD_LOGIC := '0';
|
||||
SIGNAL DO_READ_R : STD_LOGIC := '0';
|
||||
SIGNAL DO_READ_REG : STD_LOGIC_VECTOR(5 DOWNTO 0) :=(OTHERS => '0');
|
||||
SIGNAL PORTA_WR : STD_LOGIC:='0';
|
||||
SIGNAL COUNT : INTEGER :=0;
|
||||
SIGNAL INCR_WR_CNT : STD_LOGIC:='0';
|
||||
SIGNAL PORTA_WR_COMPLETE : STD_LOGIC :='0';
|
||||
SIGNAL PORTB_RD : STD_LOGIC:='0';
|
||||
SIGNAL COUNT_RD : INTEGER :=0;
|
||||
SIGNAL INCR_RD_CNT : STD_LOGIC:='0';
|
||||
SIGNAL PORTB_RD_COMPLETE : STD_LOGIC :='0';
|
||||
SIGNAL LATCH_PORTA_WR_COMPLETE : STD_LOGIC :='0';
|
||||
SIGNAL PORTB_RD_HAPPENED : STD_LOGIC := '0';
|
||||
SIGNAL PORTA_WR_L1 :STD_LOGIC := '0';
|
||||
SIGNAL PORTA_WR_L2 :STD_LOGIC := '0';
|
||||
SIGNAL PORTB_RD_R2 :STD_LOGIC := '0';
|
||||
SIGNAL PORTB_RD_R1 :STD_LOGIC := '0';
|
||||
SIGNAL LATCH_PORTB_RD_COMPLETE : STD_LOGIC :='0';
|
||||
SIGNAL PORTA_WR_HAPPENED : STD_LOGIC := '0';
|
||||
SIGNAL PORTB_RD_L1 : STD_LOGIC := '0';
|
||||
SIGNAL PORTB_RD_L2 : STD_LOGIC := '0';
|
||||
SIGNAL PORTA_WR_R2 : STD_LOGIC := '0';
|
||||
SIGNAL PORTA_WR_R1 : STD_LOGIC := '0';
|
||||
|
||||
CONSTANT WR_RD_DEEP_COUNT :INTEGER :=8;
|
||||
CONSTANT WR_DEEP_COUNT : INTEGER := if_then_else((8 <= 8),WR_RD_DEEP_COUNT,
|
||||
((192/192)*WR_RD_DEEP_COUNT));
|
||||
CONSTANT RD_DEEP_COUNT : INTEGER := if_then_else((8 <= 8),WR_RD_DEEP_COUNT,
|
||||
((192/192)*WR_RD_DEEP_COUNT));
|
||||
|
||||
BEGIN
|
||||
|
||||
ADDRA <= WRITE_ADDR(7 DOWNTO 0) ;
|
||||
DINA <= DINA_INT ;
|
||||
ADDRB <= READ_ADDR(7 DOWNTO 0) when (DO_READ='1') else (OTHERS=>'0');
|
||||
CHECK_DATA <= DO_READ;
|
||||
|
||||
RD_ADDR_GEN_INST:ENTITY work.ADDR_GEN
|
||||
GENERIC MAP(
|
||||
C_MAX_DEPTH => 256 ,
|
||||
RST_INC => 1 )
|
||||
PORT MAP(
|
||||
CLK => CLKB,
|
||||
RST => TB_RST,
|
||||
EN => DO_READ,
|
||||
LOAD => '0',
|
||||
LOAD_VALUE => ZERO,
|
||||
ADDR_OUT => READ_ADDR
|
||||
);
|
||||
|
||||
WR_ADDR_GEN_INST:ENTITY work.ADDR_GEN
|
||||
GENERIC MAP(
|
||||
C_MAX_DEPTH => 256,
|
||||
RST_INC => 1 )
|
||||
PORT MAP(
|
||||
CLK => CLKA,
|
||||
RST => TB_RST,
|
||||
EN => DO_WRITE,
|
||||
LOAD => '0',
|
||||
LOAD_VALUE => ZERO,
|
||||
ADDR_OUT => WRITE_ADDR
|
||||
);
|
||||
|
||||
WR_DATA_GEN_INST:ENTITY work.DATA_GEN
|
||||
GENERIC MAP (
|
||||
DATA_GEN_WIDTH => 192,
|
||||
DOUT_WIDTH => 192 ,
|
||||
DATA_PART_CNT => 1,
|
||||
SEED => 2)
|
||||
PORT MAP (
|
||||
CLK => CLKA,
|
||||
RST => TB_RST,
|
||||
EN => DO_WRITE,
|
||||
DATA_OUT => DINA_INT
|
||||
);
|
||||
|
||||
|
||||
PORTA_WR_PROCESS: PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
PORTA_WR<='1';
|
||||
ELSE
|
||||
PORTA_WR<=PORTB_RD_COMPLETE;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PORTB_RD_PROCESS: PROCESS(CLKB)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKB)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
PORTB_RD<='0';
|
||||
ELSE
|
||||
PORTB_RD<=PORTA_WR_L2;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PORTB_RD_COMPLETE_LATCH: PROCESS(CLKB)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKB)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
LATCH_PORTB_RD_COMPLETE<='0';
|
||||
ELSIF(PORTB_RD_COMPLETE='1') THEN
|
||||
LATCH_PORTB_RD_COMPLETE <='1';
|
||||
ELSIF(PORTA_WR_HAPPENED='1') THEN
|
||||
LATCH_PORTB_RD_COMPLETE<='0';
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
PORTB_RD_L1 <='0';
|
||||
PORTB_RD_L2 <='0';
|
||||
ELSE
|
||||
PORTB_RD_L1 <= LATCH_PORTB_RD_COMPLETE;
|
||||
PORTB_RD_L2 <= PORTB_RD_L1;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PROCESS(CLKB)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKB)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
PORTA_WR_R1 <='0';
|
||||
PORTA_WR_R2 <='0';
|
||||
ELSE
|
||||
PORTA_WR_R1 <= PORTA_WR;
|
||||
PORTA_WR_R2 <= PORTA_WR_R1;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PORTA_WR_HAPPENED <= PORTA_WR_R2;
|
||||
|
||||
PORTA_WR_COMPLETE_LATCH: PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
LATCH_PORTA_WR_COMPLETE<='0';
|
||||
ELSIF(PORTA_WR_COMPLETE='1') THEN
|
||||
LATCH_PORTA_WR_COMPLETE <='1';
|
||||
--ELSIF(PORTB_RD_HAPPENED='1') THEN
|
||||
ELSE
|
||||
LATCH_PORTA_WR_COMPLETE<='0';
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PROCESS(CLKB)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKB)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
PORTA_WR_L1 <='0';
|
||||
PORTA_WR_L2 <='0';
|
||||
ELSE
|
||||
PORTA_WR_L1 <= LATCH_PORTA_WR_COMPLETE;
|
||||
PORTA_WR_L2 <= PORTA_WR_L1;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
PORTB_RD_R1 <='0';
|
||||
PORTB_RD_R2 <='0';
|
||||
ELSE
|
||||
PORTB_RD_R1 <= PORTB_RD;
|
||||
PORTB_RD_R2 <= PORTB_RD_R1;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PORTB_RD_HAPPENED <= PORTB_RD_R2;
|
||||
|
||||
PORTB_RD_COMPLETE <= '1' when (count_rd=RD_DEEP_COUNT) else '0';
|
||||
|
||||
start_rd_counter: process(clkb)
|
||||
begin
|
||||
if(rising_edge(clkb)) then
|
||||
if(tb_rst='1') then
|
||||
incr_rd_cnt <= '0';
|
||||
elsif(portb_rd ='1') then
|
||||
incr_rd_cnt <='1';
|
||||
elsif(portb_rd_complete='1') then
|
||||
incr_rd_cnt <='0';
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
RD_COUNTER: process(clkb)
|
||||
begin
|
||||
if(rising_edge(clkb)) then
|
||||
if(tb_rst='1') then
|
||||
count_rd <= 0;
|
||||
elsif(incr_rd_cnt='1') then
|
||||
count_rd<=count_rd+1;
|
||||
end if;
|
||||
--if(count_rd=(wr_rd_deep_count)) then
|
||||
if(count_rd=(RD_DEEP_COUNT)) then
|
||||
count_rd<=0;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
DO_READ<='1' when (count_rd <RD_DEEP_COUNT and incr_rd_cnt='1') else '0';
|
||||
|
||||
PORTA_WR_COMPLETE <= '1' when (count=WR_DEEP_COUNT) else '0';
|
||||
|
||||
start_counter: process(clka)
|
||||
begin
|
||||
if(rising_edge(clka)) then
|
||||
if(tb_rst='1') then
|
||||
incr_wr_cnt <= '0';
|
||||
elsif(porta_wr ='1') then
|
||||
incr_wr_cnt <='1';
|
||||
elsif(porta_wr_complete='1') then
|
||||
incr_wr_cnt <='0';
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
COUNTER: process(clka)
|
||||
begin
|
||||
if(rising_edge(clka)) then
|
||||
if(tb_rst='1') then
|
||||
count <= 0;
|
||||
elsif(incr_wr_cnt='1') then
|
||||
count<=count+1;
|
||||
end if;
|
||||
if(count=(WR_DEEP_COUNT)) then
|
||||
count<=0;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
DO_WRITE<='1' when (count <WR_DEEP_COUNT and incr_wr_cnt='1') else '0';
|
||||
|
||||
|
||||
BEGIN_SHIFT_REG: FOR I IN 0 TO 5 GENERATE
|
||||
BEGIN
|
||||
DFF_RIGHT: IF I=0 GENERATE
|
||||
BEGIN
|
||||
SHIFT_INST_0: ENTITY work.REGISTER_LOGIC
|
||||
PORT MAP(
|
||||
Q => DO_READ_REG(0),
|
||||
CLK => CLKB,
|
||||
RST => TB_RST,
|
||||
D => DO_READ
|
||||
);
|
||||
END GENERATE DFF_RIGHT;
|
||||
|
||||
DFF_OTHERS: IF ((I>0) AND (I<=5)) GENERATE
|
||||
BEGIN
|
||||
SHIFT_INST: ENTITY work.REGISTER_LOGIC
|
||||
PORT MAP(
|
||||
Q => DO_READ_REG(I),
|
||||
CLK =>CLKB,
|
||||
RST =>TB_RST,
|
||||
D =>DO_READ_REG(I-1)
|
||||
);
|
||||
END GENERATE DFF_OTHERS;
|
||||
END GENERATE BEGIN_SHIFT_REG;
|
||||
|
||||
REGCE_PROCESS: PROCESS(CLKB)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKB)) THEN
|
||||
IF(TB_RST='1') THEN
|
||||
DO_READ_R <= '0';
|
||||
ELSE
|
||||
DO_READ_R <= DO_READ;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
|
||||
|
||||
WEA(0) <= DO_WRITE ;
|
||||
|
||||
|
||||
END ARCHITECTURE;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
200
FPGA/Generator/ipcore_dir/result_bram/simulation/bmg_tb_pkg.vhd
Executable file
200
FPGA/Generator/ipcore_dir/result_bram/simulation/bmg_tb_pkg.vhd
Executable file
|
|
@ -0,0 +1,200 @@
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Testbench Package
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: bmg_tb_pkg.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- BMG Testbench Package files
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
PACKAGE BMG_TB_PKG IS
|
||||
|
||||
FUNCTION DIVROUNDUP (
|
||||
DATA_VALUE : INTEGER;
|
||||
DIVISOR : INTEGER)
|
||||
RETURN INTEGER;
|
||||
------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : STD_LOGIC_VECTOR;
|
||||
FALSE_CASE : STD_LOGIC_VECTOR)
|
||||
RETURN STD_LOGIC_VECTOR;
|
||||
------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : STRING;
|
||||
FALSE_CASE :STRING)
|
||||
RETURN STRING;
|
||||
------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : STD_LOGIC;
|
||||
FALSE_CASE :STD_LOGIC)
|
||||
RETURN STD_LOGIC;
|
||||
------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : INTEGER;
|
||||
FALSE_CASE : INTEGER)
|
||||
RETURN INTEGER;
|
||||
------------------------
|
||||
FUNCTION LOG2ROUNDUP (
|
||||
DATA_VALUE : INTEGER)
|
||||
RETURN INTEGER;
|
||||
|
||||
END BMG_TB_PKG;
|
||||
|
||||
PACKAGE BODY BMG_TB_PKG IS
|
||||
|
||||
FUNCTION DIVROUNDUP (
|
||||
DATA_VALUE : INTEGER;
|
||||
DIVISOR : INTEGER)
|
||||
RETURN INTEGER IS
|
||||
VARIABLE DIV : INTEGER;
|
||||
BEGIN
|
||||
DIV := DATA_VALUE/DIVISOR;
|
||||
IF ( (DATA_VALUE MOD DIVISOR) /= 0) THEN
|
||||
DIV := DIV+1;
|
||||
END IF;
|
||||
RETURN DIV;
|
||||
END DIVROUNDUP;
|
||||
---------------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : STD_LOGIC_VECTOR;
|
||||
FALSE_CASE : STD_LOGIC_VECTOR)
|
||||
RETURN STD_LOGIC_VECTOR IS
|
||||
BEGIN
|
||||
IF NOT CONDITION THEN
|
||||
RETURN FALSE_CASE;
|
||||
ELSE
|
||||
RETURN TRUE_CASE;
|
||||
END IF;
|
||||
END IF_THEN_ELSE;
|
||||
---------------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : STD_LOGIC;
|
||||
FALSE_CASE : STD_LOGIC)
|
||||
RETURN STD_LOGIC IS
|
||||
BEGIN
|
||||
IF NOT CONDITION THEN
|
||||
RETURN FALSE_CASE;
|
||||
ELSE
|
||||
RETURN TRUE_CASE;
|
||||
END IF;
|
||||
END IF_THEN_ELSE;
|
||||
---------------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : INTEGER;
|
||||
FALSE_CASE : INTEGER)
|
||||
RETURN INTEGER IS
|
||||
VARIABLE RETVAL : INTEGER := 0;
|
||||
BEGIN
|
||||
IF CONDITION=FALSE THEN
|
||||
RETVAL:=FALSE_CASE;
|
||||
ELSE
|
||||
RETVAL:=TRUE_CASE;
|
||||
END IF;
|
||||
RETURN RETVAL;
|
||||
END IF_THEN_ELSE;
|
||||
---------------------------------
|
||||
FUNCTION IF_THEN_ELSE (
|
||||
CONDITION : BOOLEAN;
|
||||
TRUE_CASE : STRING;
|
||||
FALSE_CASE : STRING)
|
||||
RETURN STRING IS
|
||||
BEGIN
|
||||
IF NOT CONDITION THEN
|
||||
RETURN FALSE_CASE;
|
||||
ELSE
|
||||
RETURN TRUE_CASE;
|
||||
END IF;
|
||||
END IF_THEN_ELSE;
|
||||
-------------------------------
|
||||
FUNCTION LOG2ROUNDUP (
|
||||
DATA_VALUE : INTEGER)
|
||||
RETURN INTEGER IS
|
||||
VARIABLE WIDTH : INTEGER := 0;
|
||||
VARIABLE CNT : INTEGER := 1;
|
||||
BEGIN
|
||||
IF (DATA_VALUE <= 1) THEN
|
||||
WIDTH := 1;
|
||||
ELSE
|
||||
WHILE (CNT < DATA_VALUE) LOOP
|
||||
WIDTH := WIDTH + 1;
|
||||
CNT := CNT *2;
|
||||
END LOOP;
|
||||
END IF;
|
||||
RETURN WIDTH;
|
||||
END LOG2ROUNDUP;
|
||||
|
||||
END BMG_TB_PKG;
|
||||
161
FPGA/Generator/ipcore_dir/result_bram/simulation/checker.vhd
Executable file
161
FPGA/Generator/ipcore_dir/result_bram/simulation/checker.vhd
Executable file
|
|
@ -0,0 +1,161 @@
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Checker
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: checker.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- Checker
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
LIBRARY work;
|
||||
USE work.BMG_TB_PKG.ALL;
|
||||
|
||||
ENTITY CHECKER IS
|
||||
GENERIC ( WRITE_WIDTH : INTEGER :=32;
|
||||
READ_WIDTH : INTEGER :=32
|
||||
);
|
||||
|
||||
PORT (
|
||||
CLK : IN STD_LOGIC;
|
||||
RST : IN STD_LOGIC;
|
||||
EN : IN STD_LOGIC;
|
||||
DATA_IN : IN STD_LOGIC_VECTOR (READ_WIDTH-1 DOWNTO 0); --OUTPUT VECTOR
|
||||
STATUS : OUT STD_LOGIC:= '0'
|
||||
);
|
||||
END CHECKER;
|
||||
|
||||
ARCHITECTURE CHECKER_ARCH OF CHECKER IS
|
||||
SIGNAL EXPECTED_DATA : STD_LOGIC_VECTOR(READ_WIDTH-1 DOWNTO 0);
|
||||
SIGNAL DATA_IN_R: STD_LOGIC_VECTOR(READ_WIDTH-1 DOWNTO 0);
|
||||
SIGNAL EN_R : STD_LOGIC := '0';
|
||||
SIGNAL EN_2R : STD_LOGIC := '0';
|
||||
--DATA PART CNT DEFINES THE ASPECT RATIO AND GIVES THE INFO TO THE DATA GENERATOR TO PROVIDE THE DATA EITHER IN PARTS OR COMPLETE DATA IN ONE SHOT
|
||||
--IF READ_WIDTH > WRITE_WIDTH DIVROUNDUP RESULTS IN '1' AND DATA GENERATOR GIVES THE DATAOUT EQUALS TO MAX OF (WRITE_WIDTH, READ_WIDTH)
|
||||
--IF READ_WIDTH < WRITE-WIDTH DIVROUNDUP RESULTS IN > '1' AND DATA GENERATOR GIVES THE DATAOUT IN TERMS OF PARTS(EG 4 PARTS WHEN WRITE_WIDTH 32 AND READ WIDTH 8)
|
||||
CONSTANT DATA_PART_CNT: INTEGER:= DIVROUNDUP(WRITE_WIDTH,READ_WIDTH);
|
||||
CONSTANT MAX_WIDTH: INTEGER:= IF_THEN_ELSE((WRITE_WIDTH>READ_WIDTH),WRITE_WIDTH,READ_WIDTH);
|
||||
SIGNAL ERR_HOLD : STD_LOGIC :='0';
|
||||
SIGNAL ERR_DET : STD_LOGIC :='0';
|
||||
BEGIN
|
||||
PROCESS(CLK)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLK)) THEN
|
||||
IF(RST= '1') THEN
|
||||
EN_R <= '0';
|
||||
EN_2R <= '0';
|
||||
DATA_IN_R <= (OTHERS=>'0');
|
||||
ELSE
|
||||
EN_R <= EN;
|
||||
EN_2R <= EN_R;
|
||||
DATA_IN_R <= DATA_IN;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
EXPECTED_DATA_GEN_INST:ENTITY work.DATA_GEN
|
||||
GENERIC MAP ( DATA_GEN_WIDTH =>MAX_WIDTH,
|
||||
DOUT_WIDTH => READ_WIDTH,
|
||||
DATA_PART_CNT => DATA_PART_CNT,
|
||||
SEED => 2
|
||||
)
|
||||
PORT MAP (
|
||||
CLK => CLK,
|
||||
RST => RST,
|
||||
EN => EN_2R,
|
||||
DATA_OUT => EXPECTED_DATA
|
||||
);
|
||||
|
||||
PROCESS(CLK)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLK)) THEN
|
||||
IF(EN_2R='1') THEN
|
||||
IF(EXPECTED_DATA = DATA_IN_R) THEN
|
||||
ERR_DET<='0';
|
||||
ELSE
|
||||
ERR_DET<= '1';
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PROCESS(CLK,RST)
|
||||
BEGIN
|
||||
IF(RST='1') THEN
|
||||
ERR_HOLD <= '0';
|
||||
ELSIF(RISING_EDGE(CLK)) THEN
|
||||
ERR_HOLD <= ERR_HOLD OR ERR_DET ;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
STATUS <= ERR_HOLD;
|
||||
|
||||
END ARCHITECTURE;
|
||||
|
||||
|
||||
|
||||
140
FPGA/Generator/ipcore_dir/result_bram/simulation/data_gen.vhd
Executable file
140
FPGA/Generator/ipcore_dir/result_bram/simulation/data_gen.vhd
Executable file
|
|
@ -0,0 +1,140 @@
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Data Generator
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: data_gen.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- Data Generator
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
LIBRARY work;
|
||||
USE work.BMG_TB_PKG.ALL;
|
||||
|
||||
ENTITY DATA_GEN IS
|
||||
GENERIC ( DATA_GEN_WIDTH : INTEGER := 32;
|
||||
DOUT_WIDTH : INTEGER := 32;
|
||||
DATA_PART_CNT : INTEGER := 1;
|
||||
SEED : INTEGER := 2
|
||||
);
|
||||
|
||||
PORT (
|
||||
CLK : IN STD_LOGIC;
|
||||
RST : IN STD_LOGIC;
|
||||
EN : IN STD_LOGIC;
|
||||
DATA_OUT : OUT STD_LOGIC_VECTOR (DOUT_WIDTH-1 DOWNTO 0) --OUTPUT VECTOR
|
||||
);
|
||||
END DATA_GEN;
|
||||
|
||||
ARCHITECTURE DATA_GEN_ARCH OF DATA_GEN IS
|
||||
CONSTANT LOOP_COUNT : INTEGER := DIVROUNDUP(DATA_GEN_WIDTH,8);
|
||||
SIGNAL RAND_DATA : STD_LOGIC_VECTOR(8*LOOP_COUNT-1 DOWNTO 0);
|
||||
SIGNAL LOCAL_DATA_OUT : STD_LOGIC_VECTOR(DATA_GEN_WIDTH-1 DOWNTO 0);
|
||||
SIGNAL LOCAL_CNT : INTEGER :=1;
|
||||
SIGNAL DATA_GEN_I : STD_LOGIC :='0';
|
||||
BEGIN
|
||||
|
||||
LOCAL_DATA_OUT <= RAND_DATA(DATA_GEN_WIDTH-1 DOWNTO 0);
|
||||
DATA_OUT <= LOCAL_DATA_OUT(((DOUT_WIDTH*LOCAL_CNT)-1) DOWNTO ((DOUT_WIDTH*LOCAL_CNT)-DOUT_WIDTH));
|
||||
DATA_GEN_I <= '0' WHEN (LOCAL_CNT < DATA_PART_CNT) ELSE EN;
|
||||
|
||||
PROCESS(CLK)
|
||||
BEGIN
|
||||
IF(RISING_EDGE (CLK)) THEN
|
||||
IF(EN ='1' AND (DATA_PART_CNT =1)) THEN
|
||||
LOCAL_CNT <=1;
|
||||
ELSIF(EN='1' AND (DATA_PART_CNT>1)) THEN
|
||||
IF(LOCAL_CNT = 1) THEN
|
||||
LOCAL_CNT <= LOCAL_CNT+1;
|
||||
ELSIF(LOCAL_CNT < DATA_PART_CNT) THEN
|
||||
LOCAL_CNT <= LOCAL_CNT+1;
|
||||
ELSE
|
||||
LOCAL_CNT <= 1;
|
||||
END IF;
|
||||
ELSE
|
||||
LOCAL_CNT <= 1;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
RAND_GEN:FOR N IN LOOP_COUNT-1 DOWNTO 0 GENERATE
|
||||
RAND_GEN_INST:ENTITY work.RANDOM
|
||||
GENERIC MAP(
|
||||
WIDTH => 8,
|
||||
SEED => (SEED+N)
|
||||
)
|
||||
PORT MAP(
|
||||
CLK => CLK,
|
||||
RST => RST,
|
||||
EN => DATA_GEN_I,
|
||||
RANDOM_NUM => RAND_DATA(8*(N+1)-1 DOWNTO 8*N)
|
||||
);
|
||||
END GENERATE RAND_GEN;
|
||||
|
||||
END ARCHITECTURE;
|
||||
|
||||
112
FPGA/Generator/ipcore_dir/result_bram/simulation/random.vhd
Executable file
112
FPGA/Generator/ipcore_dir/result_bram/simulation/random.vhd
Executable file
|
|
@ -0,0 +1,112 @@
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Random Number Generator
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: random.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- Random Generator
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
|
||||
ENTITY RANDOM IS
|
||||
GENERIC ( WIDTH : INTEGER := 32;
|
||||
SEED : INTEGER :=2
|
||||
);
|
||||
|
||||
PORT (
|
||||
CLK : IN STD_LOGIC;
|
||||
RST : IN STD_LOGIC;
|
||||
EN : IN STD_LOGIC;
|
||||
RANDOM_NUM : OUT STD_LOGIC_VECTOR (WIDTH-1 DOWNTO 0) --OUTPUT VECTOR
|
||||
);
|
||||
END RANDOM;
|
||||
|
||||
ARCHITECTURE BEHAVIORAL OF RANDOM IS
|
||||
BEGIN
|
||||
PROCESS(CLK)
|
||||
VARIABLE RAND_TEMP : STD_LOGIC_VECTOR(WIDTH-1 DOWNTO 0):=CONV_STD_LOGIC_VECTOR(SEED,WIDTH);
|
||||
VARIABLE TEMP : STD_LOGIC := '0';
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLK)) THEN
|
||||
IF(RST='1') THEN
|
||||
RAND_TEMP := CONV_STD_LOGIC_VECTOR(SEED,WIDTH);
|
||||
ELSE
|
||||
IF(EN = '1') THEN
|
||||
TEMP := RAND_TEMP(WIDTH-1) XOR RAND_TEMP(WIDTH-2);
|
||||
RAND_TEMP(WIDTH-1 DOWNTO 1) := RAND_TEMP(WIDTH-2 DOWNTO 0);
|
||||
RAND_TEMP(0) := TEMP;
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
RANDOM_NUM <= RAND_TEMP;
|
||||
END PROCESS;
|
||||
END ARCHITECTURE;
|
||||
322
FPGA/Generator/ipcore_dir/result_bram/simulation/result_bram_synth.vhd
Executable file
322
FPGA/Generator/ipcore_dir/result_bram/simulation/result_bram_synth.vhd
Executable file
|
|
@ -0,0 +1,322 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Synthesizable Testbench
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- Filename: result_bram_synth.vhd
|
||||
--
|
||||
-- Description:
|
||||
-- Synthesizable Testbench
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
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_MISC.ALL;
|
||||
|
||||
LIBRARY STD;
|
||||
USE STD.TEXTIO.ALL;
|
||||
|
||||
--LIBRARY unisim;
|
||||
--USE unisim.vcomponents.ALL;
|
||||
|
||||
LIBRARY work;
|
||||
USE work.ALL;
|
||||
USE work.BMG_TB_PKG.ALL;
|
||||
|
||||
ENTITY result_bram_synth IS
|
||||
PORT(
|
||||
CLK_IN : IN STD_LOGIC;
|
||||
CLKB_IN : IN STD_LOGIC;
|
||||
RESET_IN : IN STD_LOGIC;
|
||||
STATUS : OUT STD_LOGIC_VECTOR(8 DOWNTO 0) := (OTHERS => '0') --ERROR STATUS OUT OF FPGA
|
||||
);
|
||||
END ENTITY;
|
||||
|
||||
ARCHITECTURE result_bram_synth_ARCH OF result_bram_synth IS
|
||||
|
||||
|
||||
COMPONENT result_bram_exdes
|
||||
PORT (
|
||||
--Inputs - Port A
|
||||
WEA : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
||||
ADDRA : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
DINA : IN STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
CLKA : IN STD_LOGIC;
|
||||
|
||||
--Inputs - Port B
|
||||
ADDRB : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
DOUTB : OUT STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
CLKB : IN STD_LOGIC
|
||||
|
||||
);
|
||||
|
||||
END COMPONENT;
|
||||
|
||||
|
||||
SIGNAL CLKA: STD_LOGIC := '0';
|
||||
SIGNAL RSTA: STD_LOGIC := '0';
|
||||
SIGNAL WEA: STD_LOGIC_VECTOR(0 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL WEA_R: STD_LOGIC_VECTOR(0 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL ADDRA: STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL ADDRA_R: STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL DINA: STD_LOGIC_VECTOR(191 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL DINA_R: STD_LOGIC_VECTOR(191 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL CLKB: STD_LOGIC := '0';
|
||||
SIGNAL RSTB: STD_LOGIC := '0';
|
||||
SIGNAL ADDRB: STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL ADDRB_R: STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL DOUTB: STD_LOGIC_VECTOR(191 DOWNTO 0);
|
||||
SIGNAL CHECKER_EN : STD_LOGIC:='0';
|
||||
SIGNAL CHECKER_EN_R : STD_LOGIC:='0';
|
||||
SIGNAL STIMULUS_FLOW : STD_LOGIC_VECTOR(22 DOWNTO 0) := (OTHERS =>'0');
|
||||
SIGNAL clk_in_i: STD_LOGIC;
|
||||
|
||||
SIGNAL RESET_SYNC_R1 : STD_LOGIC:='1';
|
||||
SIGNAL RESET_SYNC_R2 : STD_LOGIC:='1';
|
||||
SIGNAL RESET_SYNC_R3 : STD_LOGIC:='1';
|
||||
|
||||
SIGNAL clkb_in_i: STD_LOGIC;
|
||||
SIGNAL RESETB_SYNC_R1 : STD_LOGIC := '1';
|
||||
SIGNAL RESETB_SYNC_R2 : STD_LOGIC := '1';
|
||||
SIGNAL RESETB_SYNC_R3 : STD_LOGIC := '1';
|
||||
SIGNAL ITER_R0 : STD_LOGIC := '0';
|
||||
SIGNAL ITER_R1 : STD_LOGIC := '0';
|
||||
SIGNAL ITER_R2 : STD_LOGIC := '0';
|
||||
|
||||
SIGNAL ISSUE_FLAG : STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0');
|
||||
SIGNAL ISSUE_FLAG_STATUS : STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0');
|
||||
|
||||
BEGIN
|
||||
|
||||
-- clk_buf: bufg
|
||||
-- PORT map(
|
||||
-- i => CLK_IN,
|
||||
-- o => clk_in_i
|
||||
-- );
|
||||
clk_in_i <= CLK_IN;
|
||||
CLKA <= clk_in_i;
|
||||
|
||||
-- clkb_buf: bufg
|
||||
-- PORT map(
|
||||
-- i => CLKB_IN,
|
||||
-- o => clkb_in_i
|
||||
-- );
|
||||
clkb_in_i <= CLKB_IN;
|
||||
CLKB <= clkb_in_i;
|
||||
RSTA <= RESET_SYNC_R3 AFTER 50 ns;
|
||||
|
||||
|
||||
PROCESS(clk_in_i)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(clk_in_i)) THEN
|
||||
RESET_SYNC_R1 <= RESET_IN;
|
||||
RESET_SYNC_R2 <= RESET_SYNC_R1;
|
||||
RESET_SYNC_R3 <= RESET_SYNC_R2;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
RSTB <= RESETB_SYNC_R3 AFTER 50 ns;
|
||||
|
||||
PROCESS(clkb_in_i)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(clkb_in_i)) THEN
|
||||
RESETB_SYNC_R1 <= RESET_IN;
|
||||
RESETB_SYNC_R2 <= RESETB_SYNC_R1;
|
||||
RESETB_SYNC_R3 <= RESETB_SYNC_R2;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(RESET_SYNC_R3='1') THEN
|
||||
ISSUE_FLAG_STATUS<= (OTHERS => '0');
|
||||
ELSE
|
||||
ISSUE_FLAG_STATUS <= ISSUE_FLAG_STATUS OR ISSUE_FLAG;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
STATUS(7 DOWNTO 0) <= ISSUE_FLAG_STATUS;
|
||||
|
||||
|
||||
|
||||
|
||||
BMG_DATA_CHECKER_INST: ENTITY work.CHECKER
|
||||
GENERIC MAP (
|
||||
WRITE_WIDTH => 192,
|
||||
READ_WIDTH => 192 )
|
||||
PORT MAP (
|
||||
CLK => clkb_in_i,
|
||||
RST => RSTB,
|
||||
EN => CHECKER_EN_R,
|
||||
DATA_IN => DOUTB,
|
||||
STATUS => ISSUE_FLAG(0)
|
||||
);
|
||||
|
||||
PROCESS(clkb_in_i)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(clkb_in_i)) THEN
|
||||
IF(RSTB='1') THEN
|
||||
CHECKER_EN_R <= '0';
|
||||
ELSE
|
||||
CHECKER_EN_R <= CHECKER_EN AFTER 50 ns;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
|
||||
BMG_STIM_GEN_INST:ENTITY work.BMG_STIM_GEN
|
||||
PORT MAP(
|
||||
CLKA => clk_in_i,
|
||||
CLKB => clkb_in_i,
|
||||
TB_RST => RSTA,
|
||||
ADDRA => ADDRA,
|
||||
DINA => DINA,
|
||||
WEA => WEA,
|
||||
ADDRB => ADDRB,
|
||||
CHECK_DATA => CHECKER_EN
|
||||
);
|
||||
PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(RESET_SYNC_R3='1') THEN
|
||||
STATUS(8) <= '0';
|
||||
iter_r2 <= '0';
|
||||
iter_r1 <= '0';
|
||||
iter_r0 <= '0';
|
||||
ELSE
|
||||
STATUS(8) <= iter_r2;
|
||||
iter_r2 <= iter_r1;
|
||||
iter_r1 <= iter_r0;
|
||||
iter_r0 <= STIMULUS_FLOW(8);
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
|
||||
PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(RESET_SYNC_R3='1') THEN
|
||||
STIMULUS_FLOW <= (OTHERS => '0');
|
||||
ELSIF(WEA(0)='1') THEN
|
||||
STIMULUS_FLOW <= STIMULUS_FLOW+1;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
|
||||
|
||||
PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(RESET_SYNC_R3='1') THEN
|
||||
WEA_R <= (OTHERS=>'0') AFTER 50 ns;
|
||||
DINA_R <= (OTHERS=>'0') AFTER 50 ns;
|
||||
|
||||
|
||||
ELSE
|
||||
WEA_R <= WEA AFTER 50 ns;
|
||||
DINA_R <= DINA AFTER 50 ns;
|
||||
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
|
||||
PROCESS(CLKA)
|
||||
BEGIN
|
||||
IF(RISING_EDGE(CLKA)) THEN
|
||||
IF(RESET_SYNC_R3='1') THEN
|
||||
ADDRA_R <= (OTHERS=> '0') AFTER 50 ns;
|
||||
ADDRB_R <= (OTHERS=> '0') AFTER 50 ns;
|
||||
ELSE
|
||||
ADDRA_R <= ADDRA AFTER 50 ns;
|
||||
ADDRB_R <= ADDRB AFTER 50 ns;
|
||||
END IF;
|
||||
END IF;
|
||||
END PROCESS;
|
||||
|
||||
|
||||
BMG_PORT: result_bram_exdes PORT MAP (
|
||||
--Port A
|
||||
WEA => WEA_R,
|
||||
ADDRA => ADDRA_R,
|
||||
DINA => DINA_R,
|
||||
CLKA => CLKA,
|
||||
--Port B
|
||||
ADDRB => ADDRB_R,
|
||||
DOUTB => DOUTB,
|
||||
CLKB => CLKB
|
||||
|
||||
);
|
||||
END ARCHITECTURE;
|
||||
142
FPGA/Generator/ipcore_dir/result_bram/simulation/result_bram_tb.vhd
Executable file
142
FPGA/Generator/ipcore_dir/result_bram/simulation/result_bram_tb.vhd
Executable file
|
|
@ -0,0 +1,142 @@
|
|||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- BLK MEM GEN v7_3 Core - Top File for the Example Testbench
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
-- (c) Copyright 2006_3010 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Filename: result_bram_tb.vhd
|
||||
-- Description:
|
||||
-- Testbench Top
|
||||
--------------------------------------------------------------------------------
|
||||
-- Author: IP Solutions Division
|
||||
--
|
||||
-- History: Sep 12, 2011 - First Release
|
||||
--------------------------------------------------------------------------------
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
-- Library Declarations
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
LIBRARY IEEE;
|
||||
USE IEEE.STD_LOGIC_1164.ALL;
|
||||
USE IEEE.STD_LOGIC_ARITH.ALL;
|
||||
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
||||
|
||||
LIBRARY work;
|
||||
USE work.ALL;
|
||||
|
||||
ENTITY result_bram_tb IS
|
||||
END ENTITY;
|
||||
|
||||
|
||||
ARCHITECTURE result_bram_tb_ARCH OF result_bram_tb IS
|
||||
SIGNAL STATUS : STD_LOGIC_VECTOR(8 DOWNTO 0);
|
||||
SIGNAL CLK : STD_LOGIC := '1';
|
||||
SIGNAL CLKB : STD_LOGIC := '1';
|
||||
SIGNAL RESET : STD_LOGIC;
|
||||
|
||||
BEGIN
|
||||
|
||||
|
||||
CLK_GEN: PROCESS BEGIN
|
||||
CLK <= NOT CLK;
|
||||
WAIT FOR 100 NS;
|
||||
CLK <= NOT CLK;
|
||||
WAIT FOR 100 NS;
|
||||
END PROCESS;
|
||||
CLKB_GEN: PROCESS BEGIN
|
||||
CLKB <= NOT CLKB;
|
||||
WAIT FOR 100 NS;
|
||||
CLKB <= NOT CLKB;
|
||||
WAIT FOR 100 NS;
|
||||
END PROCESS;
|
||||
|
||||
RST_GEN: PROCESS BEGIN
|
||||
RESET <= '1';
|
||||
WAIT FOR 1000 NS;
|
||||
RESET <= '0';
|
||||
WAIT;
|
||||
END PROCESS;
|
||||
|
||||
|
||||
--STOP_SIM: PROCESS BEGIN
|
||||
-- WAIT FOR 200 US; -- STOP SIMULATION AFTER 1 MS
|
||||
-- ASSERT FALSE
|
||||
-- REPORT "END SIMULATION TIME REACHED"
|
||||
-- SEVERITY FAILURE;
|
||||
--END PROCESS;
|
||||
--
|
||||
PROCESS BEGIN
|
||||
WAIT UNTIL STATUS(8)='1';
|
||||
IF( STATUS(7 downto 0)/="0") THEN
|
||||
ASSERT false
|
||||
REPORT "Test Completed Successfully"
|
||||
SEVERITY NOTE;
|
||||
REPORT "Simulation Failed"
|
||||
SEVERITY FAILURE;
|
||||
ELSE
|
||||
ASSERT false
|
||||
REPORT "TEST PASS"
|
||||
SEVERITY NOTE;
|
||||
REPORT "Test Completed Successfully"
|
||||
SEVERITY FAILURE;
|
||||
END IF;
|
||||
|
||||
END PROCESS;
|
||||
|
||||
result_bram_synth_inst:ENTITY work.result_bram_synth
|
||||
PORT MAP(
|
||||
CLK_IN => CLK,
|
||||
CLKB_IN => CLK,
|
||||
RESET_IN => RESET,
|
||||
STATUS => STATUS
|
||||
);
|
||||
|
||||
END ARCHITECTURE;
|
||||
53
FPGA/Generator/ipcore_dir/wide_mult.gise
Normal file
53
FPGA/Generator/ipcore_dir/wide_mult.gise
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?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="wide_mult.xise"/>
|
||||
|
||||
<files xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<file xil_pn:fileType="FILE_ASY" xil_pn:name="wide_mult.asy" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_SYMBOL" xil_pn:name="wide_mult.sym" xil_pn:origination="imported"/>
|
||||
<file xil_pn:fileType="FILE_VHO" xil_pn:name="wide_mult.vho" xil_pn:origination="imported"/>
|
||||
</files>
|
||||
|
||||
<transforms xmlns="http://www.xilinx.com/XMLSchema">
|
||||
<transform xil_pn:end_ts="1654646662" xil_pn:name="TRAN_copyInitialToXSTAbstractSynthesis" xil_pn:start_ts="1654646662">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_schematicsToHdl" xil_pn:prop_ck="4659816854749047906" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_regenerateCores" xil_pn:prop_ck="-5812453015497774159" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_SubProjectAbstractToPreProxy" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
<transform xil_pn:end_ts="1654895235" xil_pn:name="TRAN_xawsTohdl" xil_pn:prop_ck="7916142474556992292" xil_pn:start_ts="1654895235">
|
||||
<status xil_pn:value="SuccessfullyRun"/>
|
||||
<status xil_pn:value="ReadyToRun"/>
|
||||
</transform>
|
||||
</transforms>
|
||||
|
||||
</generated_project>
|
||||
102
FPGA/Generator/ipcore_dir/wide_mult.vhd
Normal file
102
FPGA/Generator/ipcore_dir/wide_mult.vhd
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
--------------------------------------------------------------------------------
|
||||
-- This file is owned and controlled by Xilinx and must be used solely --
|
||||
-- for design, simulation, implementation and creation of design files --
|
||||
-- limited to Xilinx devices or technologies. Use with non-Xilinx --
|
||||
-- devices or technologies is expressly prohibited and immediately --
|
||||
-- terminates your license. --
|
||||
-- --
|
||||
-- XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" SOLELY --
|
||||
-- FOR USE IN DEVELOPING PROGRAMS AND SOLUTIONS FOR XILINX DEVICES. BY --
|
||||
-- PROVIDING THIS DESIGN, CODE, OR INFORMATION AS ONE POSSIBLE --
|
||||
-- IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD, XILINX IS --
|
||||
-- MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE FROM ANY --
|
||||
-- CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING ANY --
|
||||
-- RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY --
|
||||
-- DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE --
|
||||
-- IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR --
|
||||
-- REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF --
|
||||
-- INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
|
||||
-- PARTICULAR PURPOSE. --
|
||||
-- --
|
||||
-- Xilinx products are not intended for use in life support appliances, --
|
||||
-- devices, or systems. Use in such applications are expressly --
|
||||
-- prohibited. --
|
||||
-- --
|
||||
-- (c) Copyright 1995-2022 Xilinx, Inc. --
|
||||
-- All rights reserved. --
|
||||
--------------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
-- You must compile the wrapper file wide_mult.vhd when simulating
|
||||
-- the core, wide_mult. When compiling the wrapper file, be sure to
|
||||
-- reference the XilinxCoreLib VHDL simulation library. For detailed
|
||||
-- instructions, please refer to the "CORE Generator Help".
|
||||
|
||||
-- The synthesis directives "translate_off/translate_on" specified
|
||||
-- below are supported by Xilinx, Mentor Graphics and Synplicity
|
||||
-- synthesis tools. Ensure they are correct for your synthesis tool(s).
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.ALL;
|
||||
-- synthesis translate_off
|
||||
LIBRARY XilinxCoreLib;
|
||||
-- synthesis translate_on
|
||||
ENTITY wide_mult IS
|
||||
PORT (
|
||||
clk : IN STD_LOGIC;
|
||||
a : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
b : IN STD_LOGIC_VECTOR(26 DOWNTO 0);
|
||||
ce : IN STD_LOGIC;
|
||||
p : OUT STD_LOGIC_VECTOR(39 DOWNTO 0)
|
||||
);
|
||||
END wide_mult;
|
||||
|
||||
ARCHITECTURE wide_mult_a OF wide_mult IS
|
||||
-- synthesis translate_off
|
||||
COMPONENT wrapped_wide_mult
|
||||
PORT (
|
||||
clk : IN STD_LOGIC;
|
||||
a : IN STD_LOGIC_VECTOR(12 DOWNTO 0);
|
||||
b : IN STD_LOGIC_VECTOR(26 DOWNTO 0);
|
||||
ce : IN STD_LOGIC;
|
||||
p : OUT STD_LOGIC_VECTOR(39 DOWNTO 0)
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
-- Configuration specification
|
||||
FOR ALL : wrapped_wide_mult USE ENTITY XilinxCoreLib.mult_gen_v11_2(behavioral)
|
||||
GENERIC MAP (
|
||||
c_a_type => 1,
|
||||
c_a_width => 13,
|
||||
c_b_type => 1,
|
||||
c_b_value => "10000001",
|
||||
c_b_width => 27,
|
||||
c_ccm_imp => 0,
|
||||
c_ce_overrides_sclr => 0,
|
||||
c_has_ce => 1,
|
||||
c_has_sclr => 0,
|
||||
c_has_zero_detect => 0,
|
||||
c_latency => 5,
|
||||
c_model_type => 0,
|
||||
c_mult_type => 1,
|
||||
c_optimize_goal => 1,
|
||||
c_out_high => 39,
|
||||
c_out_low => 0,
|
||||
c_round_output => 0,
|
||||
c_round_pt => 0,
|
||||
c_verbosity => 0,
|
||||
c_xdevicefamily => "spartan6"
|
||||
);
|
||||
-- synthesis translate_on
|
||||
BEGIN
|
||||
-- synthesis translate_off
|
||||
U0 : wrapped_wide_mult
|
||||
PORT MAP (
|
||||
clk => clk,
|
||||
a => a,
|
||||
b => b,
|
||||
ce => ce,
|
||||
p => p
|
||||
);
|
||||
-- synthesis translate_on
|
||||
|
||||
END wide_mult_a;
|
||||
Loading…
Add table
Add a link
Reference in a new issue