first commit
This commit is contained in:
commit
e33703443c
8
Miz_sys/Miz_sys.hw/Miz_sys.lpr
Normal file
8
Miz_sys/Miz_sys.hw/Miz_sys.lpr
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Product Version: Vivado v2016.4 (64-bit) -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- Copyright 1986-2016 Xilinx, Inc. All Rights Reserved. -->
|
||||||
|
|
||||||
|
<labtools version="1" minor="0">
|
||||||
|
<HWSession Dir="hw_1" File="hw.xml"/>
|
||||||
|
</labtools>
|
9
Miz_sys/Miz_sys.hw/hw_1/hw.xml
Normal file
9
Miz_sys/Miz_sys.hw/hw_1/hw.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Product Version: Vivado v2016.4 (64-bit) -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- Copyright 1986-2016 Xilinx, Inc. All Rights Reserved. -->
|
||||||
|
|
||||||
|
<hwsession version="1" minor="2">
|
||||||
|
<device name="xc7z010_1" gui_info=""/>
|
||||||
|
<probeset name="hw project" active="false"/>
|
||||||
|
</hwsession>
|
1
Miz_sys/Miz_sys.ip_user_files/README.txt
Normal file
1
Miz_sys/Miz_sys.ip_user_files/README.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
The files in this directory structure are automatically generated and managed by Vivado. Editing these files is not recommended.
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,578 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// (c) Copyright 1995-2013 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.
|
||||||
|
//
|
||||||
|
// DO NOT MODIFY THIS FILE.
|
||||||
|
|
||||||
|
|
||||||
|
// IP VLNV: xilinx.com:ip:processing_system7_vip:1.0
|
||||||
|
// IP Revision: 1
|
||||||
|
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module system_processing_system7_0_0 (
|
||||||
|
M_AXI_GP0_ARVALID,
|
||||||
|
M_AXI_GP0_AWVALID,
|
||||||
|
M_AXI_GP0_BREADY,
|
||||||
|
M_AXI_GP0_RREADY,
|
||||||
|
M_AXI_GP0_WLAST,
|
||||||
|
M_AXI_GP0_WVALID,
|
||||||
|
M_AXI_GP0_ARID,
|
||||||
|
M_AXI_GP0_AWID,
|
||||||
|
M_AXI_GP0_WID,
|
||||||
|
M_AXI_GP0_ARBURST,
|
||||||
|
M_AXI_GP0_ARLOCK,
|
||||||
|
M_AXI_GP0_ARSIZE,
|
||||||
|
M_AXI_GP0_AWBURST,
|
||||||
|
M_AXI_GP0_AWLOCK,
|
||||||
|
M_AXI_GP0_AWSIZE,
|
||||||
|
M_AXI_GP0_ARPROT,
|
||||||
|
M_AXI_GP0_AWPROT,
|
||||||
|
M_AXI_GP0_ARADDR,
|
||||||
|
M_AXI_GP0_AWADDR,
|
||||||
|
M_AXI_GP0_WDATA,
|
||||||
|
M_AXI_GP0_ARCACHE,
|
||||||
|
M_AXI_GP0_ARLEN,
|
||||||
|
M_AXI_GP0_ARQOS,
|
||||||
|
M_AXI_GP0_AWCACHE,
|
||||||
|
M_AXI_GP0_AWLEN,
|
||||||
|
M_AXI_GP0_AWQOS,
|
||||||
|
M_AXI_GP0_WSTRB,
|
||||||
|
M_AXI_GP0_ACLK,
|
||||||
|
M_AXI_GP0_ARREADY,
|
||||||
|
M_AXI_GP0_AWREADY,
|
||||||
|
M_AXI_GP0_BVALID,
|
||||||
|
M_AXI_GP0_RLAST,
|
||||||
|
M_AXI_GP0_RVALID,
|
||||||
|
M_AXI_GP0_WREADY,
|
||||||
|
M_AXI_GP0_BID,
|
||||||
|
M_AXI_GP0_RID,
|
||||||
|
M_AXI_GP0_BRESP,
|
||||||
|
M_AXI_GP0_RRESP,
|
||||||
|
M_AXI_GP0_RDATA,
|
||||||
|
FCLK_CLK0,
|
||||||
|
FCLK_RESET0_N,
|
||||||
|
MIO,
|
||||||
|
DDR_CAS_n,
|
||||||
|
DDR_CKE,
|
||||||
|
DDR_Clk_n,
|
||||||
|
DDR_Clk,
|
||||||
|
DDR_CS_n,
|
||||||
|
DDR_DRSTB,
|
||||||
|
DDR_ODT,
|
||||||
|
DDR_RAS_n,
|
||||||
|
DDR_WEB,
|
||||||
|
DDR_BankAddr,
|
||||||
|
DDR_Addr,
|
||||||
|
DDR_VRN,
|
||||||
|
DDR_VRP,
|
||||||
|
DDR_DM,
|
||||||
|
DDR_DQ,
|
||||||
|
DDR_DQS_n,
|
||||||
|
DDR_DQS,
|
||||||
|
PS_SRSTB,
|
||||||
|
PS_CLK,
|
||||||
|
PS_PORB
|
||||||
|
);
|
||||||
|
output M_AXI_GP0_ARVALID;
|
||||||
|
output M_AXI_GP0_AWVALID;
|
||||||
|
output M_AXI_GP0_BREADY;
|
||||||
|
output M_AXI_GP0_RREADY;
|
||||||
|
output M_AXI_GP0_WLAST;
|
||||||
|
output M_AXI_GP0_WVALID;
|
||||||
|
output [11 : 0] M_AXI_GP0_ARID;
|
||||||
|
output [11 : 0] M_AXI_GP0_AWID;
|
||||||
|
output [11 : 0] M_AXI_GP0_WID;
|
||||||
|
output [1 : 0] M_AXI_GP0_ARBURST;
|
||||||
|
output [1 : 0] M_AXI_GP0_ARLOCK;
|
||||||
|
output [2 : 0] M_AXI_GP0_ARSIZE;
|
||||||
|
output [1 : 0] M_AXI_GP0_AWBURST;
|
||||||
|
output [1 : 0] M_AXI_GP0_AWLOCK;
|
||||||
|
output [2 : 0] M_AXI_GP0_AWSIZE;
|
||||||
|
output [2 : 0] M_AXI_GP0_ARPROT;
|
||||||
|
output [2 : 0] M_AXI_GP0_AWPROT;
|
||||||
|
output [31 : 0] M_AXI_GP0_ARADDR;
|
||||||
|
output [31 : 0] M_AXI_GP0_AWADDR;
|
||||||
|
output [31 : 0] M_AXI_GP0_WDATA;
|
||||||
|
output [3 : 0] M_AXI_GP0_ARCACHE;
|
||||||
|
output [3 : 0] M_AXI_GP0_ARLEN;
|
||||||
|
output [3 : 0] M_AXI_GP0_ARQOS;
|
||||||
|
output [3 : 0] M_AXI_GP0_AWCACHE;
|
||||||
|
output [3 : 0] M_AXI_GP0_AWLEN;
|
||||||
|
output [3 : 0] M_AXI_GP0_AWQOS;
|
||||||
|
output [3 : 0] M_AXI_GP0_WSTRB;
|
||||||
|
input M_AXI_GP0_ACLK;
|
||||||
|
input M_AXI_GP0_ARREADY;
|
||||||
|
input M_AXI_GP0_AWREADY;
|
||||||
|
input M_AXI_GP0_BVALID;
|
||||||
|
input M_AXI_GP0_RLAST;
|
||||||
|
input M_AXI_GP0_RVALID;
|
||||||
|
input M_AXI_GP0_WREADY;
|
||||||
|
input [11 : 0] M_AXI_GP0_BID;
|
||||||
|
input [11 : 0] M_AXI_GP0_RID;
|
||||||
|
input [1 : 0] M_AXI_GP0_BRESP;
|
||||||
|
input [1 : 0] M_AXI_GP0_RRESP;
|
||||||
|
input [31 : 0] M_AXI_GP0_RDATA;
|
||||||
|
output FCLK_CLK0;
|
||||||
|
output FCLK_RESET0_N;
|
||||||
|
input [53 : 0] MIO;
|
||||||
|
input DDR_CAS_n;
|
||||||
|
input DDR_CKE;
|
||||||
|
input DDR_Clk_n;
|
||||||
|
input DDR_Clk;
|
||||||
|
input DDR_CS_n;
|
||||||
|
input DDR_DRSTB;
|
||||||
|
input DDR_ODT;
|
||||||
|
input DDR_RAS_n;
|
||||||
|
input DDR_WEB;
|
||||||
|
input [2 : 0] DDR_BankAddr;
|
||||||
|
input [14 : 0] DDR_Addr;
|
||||||
|
input DDR_VRN;
|
||||||
|
input DDR_VRP;
|
||||||
|
input [3 : 0] DDR_DM;
|
||||||
|
input [31 : 0] DDR_DQ;
|
||||||
|
input [3 : 0] DDR_DQS_n;
|
||||||
|
input [3 : 0] DDR_DQS;
|
||||||
|
input PS_SRSTB;
|
||||||
|
input PS_CLK;
|
||||||
|
input PS_PORB;
|
||||||
|
|
||||||
|
processing_system7_vip_v1_0_3 #(
|
||||||
|
.C_USE_M_AXI_GP0(1),
|
||||||
|
.C_USE_M_AXI_GP1(0),
|
||||||
|
.C_USE_S_AXI_ACP(0),
|
||||||
|
.C_USE_S_AXI_GP0(0),
|
||||||
|
.C_USE_S_AXI_GP1(0),
|
||||||
|
.C_USE_S_AXI_HP0(0),
|
||||||
|
.C_USE_S_AXI_HP1(0),
|
||||||
|
.C_USE_S_AXI_HP2(0),
|
||||||
|
.C_USE_S_AXI_HP3(0),
|
||||||
|
.C_S_AXI_HP0_DATA_WIDTH(64),
|
||||||
|
.C_S_AXI_HP1_DATA_WIDTH(64),
|
||||||
|
.C_S_AXI_HP2_DATA_WIDTH(64),
|
||||||
|
.C_S_AXI_HP3_DATA_WIDTH(64),
|
||||||
|
.C_HIGH_OCM_EN(0),
|
||||||
|
.C_FCLK_CLK0_FREQ(50.0),
|
||||||
|
.C_FCLK_CLK1_FREQ(10.0),
|
||||||
|
.C_FCLK_CLK2_FREQ(10.0),
|
||||||
|
.C_FCLK_CLK3_FREQ(10.0),
|
||||||
|
.C_M_AXI_GP0_ENABLE_STATIC_REMAP(0),
|
||||||
|
.C_M_AXI_GP1_ENABLE_STATIC_REMAP(0),
|
||||||
|
.C_M_AXI_GP0_THREAD_ID_WIDTH (12),
|
||||||
|
.C_M_AXI_GP1_THREAD_ID_WIDTH (12)
|
||||||
|
) inst (
|
||||||
|
.M_AXI_GP0_ARVALID(M_AXI_GP0_ARVALID),
|
||||||
|
.M_AXI_GP0_AWVALID(M_AXI_GP0_AWVALID),
|
||||||
|
.M_AXI_GP0_BREADY(M_AXI_GP0_BREADY),
|
||||||
|
.M_AXI_GP0_RREADY(M_AXI_GP0_RREADY),
|
||||||
|
.M_AXI_GP0_WLAST(M_AXI_GP0_WLAST),
|
||||||
|
.M_AXI_GP0_WVALID(M_AXI_GP0_WVALID),
|
||||||
|
.M_AXI_GP0_ARID(M_AXI_GP0_ARID),
|
||||||
|
.M_AXI_GP0_AWID(M_AXI_GP0_AWID),
|
||||||
|
.M_AXI_GP0_WID(M_AXI_GP0_WID),
|
||||||
|
.M_AXI_GP0_ARBURST(M_AXI_GP0_ARBURST),
|
||||||
|
.M_AXI_GP0_ARLOCK(M_AXI_GP0_ARLOCK),
|
||||||
|
.M_AXI_GP0_ARSIZE(M_AXI_GP0_ARSIZE),
|
||||||
|
.M_AXI_GP0_AWBURST(M_AXI_GP0_AWBURST),
|
||||||
|
.M_AXI_GP0_AWLOCK(M_AXI_GP0_AWLOCK),
|
||||||
|
.M_AXI_GP0_AWSIZE(M_AXI_GP0_AWSIZE),
|
||||||
|
.M_AXI_GP0_ARPROT(M_AXI_GP0_ARPROT),
|
||||||
|
.M_AXI_GP0_AWPROT(M_AXI_GP0_AWPROT),
|
||||||
|
.M_AXI_GP0_ARADDR(M_AXI_GP0_ARADDR),
|
||||||
|
.M_AXI_GP0_AWADDR(M_AXI_GP0_AWADDR),
|
||||||
|
.M_AXI_GP0_WDATA(M_AXI_GP0_WDATA),
|
||||||
|
.M_AXI_GP0_ARCACHE(M_AXI_GP0_ARCACHE),
|
||||||
|
.M_AXI_GP0_ARLEN(M_AXI_GP0_ARLEN),
|
||||||
|
.M_AXI_GP0_ARQOS(M_AXI_GP0_ARQOS),
|
||||||
|
.M_AXI_GP0_AWCACHE(M_AXI_GP0_AWCACHE),
|
||||||
|
.M_AXI_GP0_AWLEN(M_AXI_GP0_AWLEN),
|
||||||
|
.M_AXI_GP0_AWQOS(M_AXI_GP0_AWQOS),
|
||||||
|
.M_AXI_GP0_WSTRB(M_AXI_GP0_WSTRB),
|
||||||
|
.M_AXI_GP0_ACLK(M_AXI_GP0_ACLK),
|
||||||
|
.M_AXI_GP0_ARREADY(M_AXI_GP0_ARREADY),
|
||||||
|
.M_AXI_GP0_AWREADY(M_AXI_GP0_AWREADY),
|
||||||
|
.M_AXI_GP0_BVALID(M_AXI_GP0_BVALID),
|
||||||
|
.M_AXI_GP0_RLAST(M_AXI_GP0_RLAST),
|
||||||
|
.M_AXI_GP0_RVALID(M_AXI_GP0_RVALID),
|
||||||
|
.M_AXI_GP0_WREADY(M_AXI_GP0_WREADY),
|
||||||
|
.M_AXI_GP0_BID(M_AXI_GP0_BID),
|
||||||
|
.M_AXI_GP0_RID(M_AXI_GP0_RID),
|
||||||
|
.M_AXI_GP0_BRESP(M_AXI_GP0_BRESP),
|
||||||
|
.M_AXI_GP0_RRESP(M_AXI_GP0_RRESP),
|
||||||
|
.M_AXI_GP0_RDATA(M_AXI_GP0_RDATA),
|
||||||
|
.M_AXI_GP1_ARVALID(),
|
||||||
|
.M_AXI_GP1_AWVALID(),
|
||||||
|
.M_AXI_GP1_BREADY(),
|
||||||
|
.M_AXI_GP1_RREADY(),
|
||||||
|
.M_AXI_GP1_WLAST(),
|
||||||
|
.M_AXI_GP1_WVALID(),
|
||||||
|
.M_AXI_GP1_ARID(),
|
||||||
|
.M_AXI_GP1_AWID(),
|
||||||
|
.M_AXI_GP1_WID(),
|
||||||
|
.M_AXI_GP1_ARBURST(),
|
||||||
|
.M_AXI_GP1_ARLOCK(),
|
||||||
|
.M_AXI_GP1_ARSIZE(),
|
||||||
|
.M_AXI_GP1_AWBURST(),
|
||||||
|
.M_AXI_GP1_AWLOCK(),
|
||||||
|
.M_AXI_GP1_AWSIZE(),
|
||||||
|
.M_AXI_GP1_ARPROT(),
|
||||||
|
.M_AXI_GP1_AWPROT(),
|
||||||
|
.M_AXI_GP1_ARADDR(),
|
||||||
|
.M_AXI_GP1_AWADDR(),
|
||||||
|
.M_AXI_GP1_WDATA(),
|
||||||
|
.M_AXI_GP1_ARCACHE(),
|
||||||
|
.M_AXI_GP1_ARLEN(),
|
||||||
|
.M_AXI_GP1_ARQOS(),
|
||||||
|
.M_AXI_GP1_AWCACHE(),
|
||||||
|
.M_AXI_GP1_AWLEN(),
|
||||||
|
.M_AXI_GP1_AWQOS(),
|
||||||
|
.M_AXI_GP1_WSTRB(),
|
||||||
|
.M_AXI_GP1_ACLK(1'B0),
|
||||||
|
.M_AXI_GP1_ARREADY(1'B0),
|
||||||
|
.M_AXI_GP1_AWREADY(1'B0),
|
||||||
|
.M_AXI_GP1_BVALID(1'B0),
|
||||||
|
.M_AXI_GP1_RLAST(1'B0),
|
||||||
|
.M_AXI_GP1_RVALID(1'B0),
|
||||||
|
.M_AXI_GP1_WREADY(1'B0),
|
||||||
|
.M_AXI_GP1_BID(12'B0),
|
||||||
|
.M_AXI_GP1_RID(12'B0),
|
||||||
|
.M_AXI_GP1_BRESP(2'B0),
|
||||||
|
.M_AXI_GP1_RRESP(2'B0),
|
||||||
|
.M_AXI_GP1_RDATA(32'B0),
|
||||||
|
.S_AXI_GP0_ARREADY(),
|
||||||
|
.S_AXI_GP0_AWREADY(),
|
||||||
|
.S_AXI_GP0_BVALID(),
|
||||||
|
.S_AXI_GP0_RLAST(),
|
||||||
|
.S_AXI_GP0_RVALID(),
|
||||||
|
.S_AXI_GP0_WREADY(),
|
||||||
|
.S_AXI_GP0_BRESP(),
|
||||||
|
.S_AXI_GP0_RRESP(),
|
||||||
|
.S_AXI_GP0_RDATA(),
|
||||||
|
.S_AXI_GP0_BID(),
|
||||||
|
.S_AXI_GP0_RID(),
|
||||||
|
.S_AXI_GP0_ACLK(1'B0),
|
||||||
|
.S_AXI_GP0_ARVALID(1'B0),
|
||||||
|
.S_AXI_GP0_AWVALID(1'B0),
|
||||||
|
.S_AXI_GP0_BREADY(1'B0),
|
||||||
|
.S_AXI_GP0_RREADY(1'B0),
|
||||||
|
.S_AXI_GP0_WLAST(1'B0),
|
||||||
|
.S_AXI_GP0_WVALID(1'B0),
|
||||||
|
.S_AXI_GP0_ARBURST(2'B0),
|
||||||
|
.S_AXI_GP0_ARLOCK(2'B0),
|
||||||
|
.S_AXI_GP0_ARSIZE(3'B0),
|
||||||
|
.S_AXI_GP0_AWBURST(2'B0),
|
||||||
|
.S_AXI_GP0_AWLOCK(2'B0),
|
||||||
|
.S_AXI_GP0_AWSIZE(3'B0),
|
||||||
|
.S_AXI_GP0_ARPROT(3'B0),
|
||||||
|
.S_AXI_GP0_AWPROT(3'B0),
|
||||||
|
.S_AXI_GP0_ARADDR(32'B0),
|
||||||
|
.S_AXI_GP0_AWADDR(32'B0),
|
||||||
|
.S_AXI_GP0_WDATA(32'B0),
|
||||||
|
.S_AXI_GP0_ARCACHE(4'B0),
|
||||||
|
.S_AXI_GP0_ARLEN(4'B0),
|
||||||
|
.S_AXI_GP0_ARQOS(4'B0),
|
||||||
|
.S_AXI_GP0_AWCACHE(4'B0),
|
||||||
|
.S_AXI_GP0_AWLEN(4'B0),
|
||||||
|
.S_AXI_GP0_AWQOS(4'B0),
|
||||||
|
.S_AXI_GP0_WSTRB(4'B0),
|
||||||
|
.S_AXI_GP0_ARID(6'B0),
|
||||||
|
.S_AXI_GP0_AWID(6'B0),
|
||||||
|
.S_AXI_GP0_WID(6'B0),
|
||||||
|
.S_AXI_GP1_ARREADY(),
|
||||||
|
.S_AXI_GP1_AWREADY(),
|
||||||
|
.S_AXI_GP1_BVALID(),
|
||||||
|
.S_AXI_GP1_RLAST(),
|
||||||
|
.S_AXI_GP1_RVALID(),
|
||||||
|
.S_AXI_GP1_WREADY(),
|
||||||
|
.S_AXI_GP1_BRESP(),
|
||||||
|
.S_AXI_GP1_RRESP(),
|
||||||
|
.S_AXI_GP1_RDATA(),
|
||||||
|
.S_AXI_GP1_BID(),
|
||||||
|
.S_AXI_GP1_RID(),
|
||||||
|
.S_AXI_GP1_ACLK(1'B0),
|
||||||
|
.S_AXI_GP1_ARVALID(1'B0),
|
||||||
|
.S_AXI_GP1_AWVALID(1'B0),
|
||||||
|
.S_AXI_GP1_BREADY(1'B0),
|
||||||
|
.S_AXI_GP1_RREADY(1'B0),
|
||||||
|
.S_AXI_GP1_WLAST(1'B0),
|
||||||
|
.S_AXI_GP1_WVALID(1'B0),
|
||||||
|
.S_AXI_GP1_ARBURST(2'B0),
|
||||||
|
.S_AXI_GP1_ARLOCK(2'B0),
|
||||||
|
.S_AXI_GP1_ARSIZE(3'B0),
|
||||||
|
.S_AXI_GP1_AWBURST(2'B0),
|
||||||
|
.S_AXI_GP1_AWLOCK(2'B0),
|
||||||
|
.S_AXI_GP1_AWSIZE(3'B0),
|
||||||
|
.S_AXI_GP1_ARPROT(3'B0),
|
||||||
|
.S_AXI_GP1_AWPROT(3'B0),
|
||||||
|
.S_AXI_GP1_ARADDR(32'B0),
|
||||||
|
.S_AXI_GP1_AWADDR(32'B0),
|
||||||
|
.S_AXI_GP1_WDATA(32'B0),
|
||||||
|
.S_AXI_GP1_ARCACHE(4'B0),
|
||||||
|
.S_AXI_GP1_ARLEN(4'B0),
|
||||||
|
.S_AXI_GP1_ARQOS(4'B0),
|
||||||
|
.S_AXI_GP1_AWCACHE(4'B0),
|
||||||
|
.S_AXI_GP1_AWLEN(4'B0),
|
||||||
|
.S_AXI_GP1_AWQOS(4'B0),
|
||||||
|
.S_AXI_GP1_WSTRB(4'B0),
|
||||||
|
.S_AXI_GP1_ARID(6'B0),
|
||||||
|
.S_AXI_GP1_AWID(6'B0),
|
||||||
|
.S_AXI_GP1_WID(6'B0),
|
||||||
|
.S_AXI_ACP_ARREADY(),
|
||||||
|
.S_AXI_ACP_AWREADY(),
|
||||||
|
.S_AXI_ACP_BVALID(),
|
||||||
|
.S_AXI_ACP_RLAST(),
|
||||||
|
.S_AXI_ACP_RVALID(),
|
||||||
|
.S_AXI_ACP_WREADY(),
|
||||||
|
.S_AXI_ACP_BRESP(),
|
||||||
|
.S_AXI_ACP_RRESP(),
|
||||||
|
.S_AXI_ACP_BID(),
|
||||||
|
.S_AXI_ACP_RID(),
|
||||||
|
.S_AXI_ACP_RDATA(),
|
||||||
|
.S_AXI_ACP_ACLK(1'B0),
|
||||||
|
.S_AXI_ACP_ARVALID(1'B0),
|
||||||
|
.S_AXI_ACP_AWVALID(1'B0),
|
||||||
|
.S_AXI_ACP_BREADY(1'B0),
|
||||||
|
.S_AXI_ACP_RREADY(1'B0),
|
||||||
|
.S_AXI_ACP_WLAST(1'B0),
|
||||||
|
.S_AXI_ACP_WVALID(1'B0),
|
||||||
|
.S_AXI_ACP_ARID(3'B0),
|
||||||
|
.S_AXI_ACP_ARPROT(3'B0),
|
||||||
|
.S_AXI_ACP_AWID(3'B0),
|
||||||
|
.S_AXI_ACP_AWPROT(3'B0),
|
||||||
|
.S_AXI_ACP_WID(3'B0),
|
||||||
|
.S_AXI_ACP_ARADDR(32'B0),
|
||||||
|
.S_AXI_ACP_AWADDR(32'B0),
|
||||||
|
.S_AXI_ACP_ARCACHE(4'B0),
|
||||||
|
.S_AXI_ACP_ARLEN(4'B0),
|
||||||
|
.S_AXI_ACP_ARQOS(4'B0),
|
||||||
|
.S_AXI_ACP_AWCACHE(4'B0),
|
||||||
|
.S_AXI_ACP_AWLEN(4'B0),
|
||||||
|
.S_AXI_ACP_AWQOS(4'B0),
|
||||||
|
.S_AXI_ACP_ARBURST(2'B0),
|
||||||
|
.S_AXI_ACP_ARLOCK(2'B0),
|
||||||
|
.S_AXI_ACP_ARSIZE(3'B0),
|
||||||
|
.S_AXI_ACP_AWBURST(2'B0),
|
||||||
|
.S_AXI_ACP_AWLOCK(2'B0),
|
||||||
|
.S_AXI_ACP_AWSIZE(3'B0),
|
||||||
|
.S_AXI_ACP_ARUSER(5'B0),
|
||||||
|
.S_AXI_ACP_AWUSER(5'B0),
|
||||||
|
.S_AXI_ACP_WDATA(64'B0),
|
||||||
|
.S_AXI_ACP_WSTRB(8'B0),
|
||||||
|
.S_AXI_HP0_ARREADY(),
|
||||||
|
.S_AXI_HP0_AWREADY(),
|
||||||
|
.S_AXI_HP0_BVALID(),
|
||||||
|
.S_AXI_HP0_RLAST(),
|
||||||
|
.S_AXI_HP0_RVALID(),
|
||||||
|
.S_AXI_HP0_WREADY(),
|
||||||
|
.S_AXI_HP0_BRESP(),
|
||||||
|
.S_AXI_HP0_RRESP(),
|
||||||
|
.S_AXI_HP0_BID(),
|
||||||
|
.S_AXI_HP0_RID(),
|
||||||
|
.S_AXI_HP0_RDATA(),
|
||||||
|
.S_AXI_HP0_ACLK(1'B0),
|
||||||
|
.S_AXI_HP0_ARVALID(1'B0),
|
||||||
|
.S_AXI_HP0_AWVALID(1'B0),
|
||||||
|
.S_AXI_HP0_BREADY(1'B0),
|
||||||
|
.S_AXI_HP0_RREADY(1'B0),
|
||||||
|
.S_AXI_HP0_WLAST(1'B0),
|
||||||
|
.S_AXI_HP0_WVALID(1'B0),
|
||||||
|
.S_AXI_HP0_ARBURST(2'B0),
|
||||||
|
.S_AXI_HP0_ARLOCK(2'B0),
|
||||||
|
.S_AXI_HP0_ARSIZE(3'B0),
|
||||||
|
.S_AXI_HP0_AWBURST(2'B0),
|
||||||
|
.S_AXI_HP0_AWLOCK(2'B0),
|
||||||
|
.S_AXI_HP0_AWSIZE(3'B0),
|
||||||
|
.S_AXI_HP0_ARPROT(3'B0),
|
||||||
|
.S_AXI_HP0_AWPROT(3'B0),
|
||||||
|
.S_AXI_HP0_ARADDR(32'B0),
|
||||||
|
.S_AXI_HP0_AWADDR(32'B0),
|
||||||
|
.S_AXI_HP0_ARCACHE(4'B0),
|
||||||
|
.S_AXI_HP0_ARLEN(4'B0),
|
||||||
|
.S_AXI_HP0_ARQOS(4'B0),
|
||||||
|
.S_AXI_HP0_AWCACHE(4'B0),
|
||||||
|
.S_AXI_HP0_AWLEN(4'B0),
|
||||||
|
.S_AXI_HP0_AWQOS(4'B0),
|
||||||
|
.S_AXI_HP0_ARID(6'B0),
|
||||||
|
.S_AXI_HP0_AWID(6'B0),
|
||||||
|
.S_AXI_HP0_WID(6'B0),
|
||||||
|
.S_AXI_HP0_WDATA(64'B0),
|
||||||
|
.S_AXI_HP0_WSTRB(8'B0),
|
||||||
|
.S_AXI_HP1_ARREADY(),
|
||||||
|
.S_AXI_HP1_AWREADY(),
|
||||||
|
.S_AXI_HP1_BVALID(),
|
||||||
|
.S_AXI_HP1_RLAST(),
|
||||||
|
.S_AXI_HP1_RVALID(),
|
||||||
|
.S_AXI_HP1_WREADY(),
|
||||||
|
.S_AXI_HP1_BRESP(),
|
||||||
|
.S_AXI_HP1_RRESP(),
|
||||||
|
.S_AXI_HP1_BID(),
|
||||||
|
.S_AXI_HP1_RID(),
|
||||||
|
.S_AXI_HP1_RDATA(),
|
||||||
|
.S_AXI_HP1_ACLK(1'B0),
|
||||||
|
.S_AXI_HP1_ARVALID(1'B0),
|
||||||
|
.S_AXI_HP1_AWVALID(1'B0),
|
||||||
|
.S_AXI_HP1_BREADY(1'B0),
|
||||||
|
.S_AXI_HP1_RREADY(1'B0),
|
||||||
|
.S_AXI_HP1_WLAST(1'B0),
|
||||||
|
.S_AXI_HP1_WVALID(1'B0),
|
||||||
|
.S_AXI_HP1_ARBURST(2'B0),
|
||||||
|
.S_AXI_HP1_ARLOCK(2'B0),
|
||||||
|
.S_AXI_HP1_ARSIZE(3'B0),
|
||||||
|
.S_AXI_HP1_AWBURST(2'B0),
|
||||||
|
.S_AXI_HP1_AWLOCK(2'B0),
|
||||||
|
.S_AXI_HP1_AWSIZE(3'B0),
|
||||||
|
.S_AXI_HP1_ARPROT(3'B0),
|
||||||
|
.S_AXI_HP1_AWPROT(3'B0),
|
||||||
|
.S_AXI_HP1_ARADDR(32'B0),
|
||||||
|
.S_AXI_HP1_AWADDR(32'B0),
|
||||||
|
.S_AXI_HP1_ARCACHE(4'B0),
|
||||||
|
.S_AXI_HP1_ARLEN(4'B0),
|
||||||
|
.S_AXI_HP1_ARQOS(4'B0),
|
||||||
|
.S_AXI_HP1_AWCACHE(4'B0),
|
||||||
|
.S_AXI_HP1_AWLEN(4'B0),
|
||||||
|
.S_AXI_HP1_AWQOS(4'B0),
|
||||||
|
.S_AXI_HP1_ARID(6'B0),
|
||||||
|
.S_AXI_HP1_AWID(6'B0),
|
||||||
|
.S_AXI_HP1_WID(6'B0),
|
||||||
|
.S_AXI_HP1_WDATA(64'B0),
|
||||||
|
.S_AXI_HP1_WSTRB(8'B0),
|
||||||
|
.S_AXI_HP2_ARREADY(),
|
||||||
|
.S_AXI_HP2_AWREADY(),
|
||||||
|
.S_AXI_HP2_BVALID(),
|
||||||
|
.S_AXI_HP2_RLAST(),
|
||||||
|
.S_AXI_HP2_RVALID(),
|
||||||
|
.S_AXI_HP2_WREADY(),
|
||||||
|
.S_AXI_HP2_BRESP(),
|
||||||
|
.S_AXI_HP2_RRESP(),
|
||||||
|
.S_AXI_HP2_BID(),
|
||||||
|
.S_AXI_HP2_RID(),
|
||||||
|
.S_AXI_HP2_RDATA(),
|
||||||
|
.S_AXI_HP2_ACLK(1'B0),
|
||||||
|
.S_AXI_HP2_ARVALID(1'B0),
|
||||||
|
.S_AXI_HP2_AWVALID(1'B0),
|
||||||
|
.S_AXI_HP2_BREADY(1'B0),
|
||||||
|
.S_AXI_HP2_RREADY(1'B0),
|
||||||
|
.S_AXI_HP2_WLAST(1'B0),
|
||||||
|
.S_AXI_HP2_WVALID(1'B0),
|
||||||
|
.S_AXI_HP2_ARBURST(2'B0),
|
||||||
|
.S_AXI_HP2_ARLOCK(2'B0),
|
||||||
|
.S_AXI_HP2_ARSIZE(3'B0),
|
||||||
|
.S_AXI_HP2_AWBURST(2'B0),
|
||||||
|
.S_AXI_HP2_AWLOCK(2'B0),
|
||||||
|
.S_AXI_HP2_AWSIZE(3'B0),
|
||||||
|
.S_AXI_HP2_ARPROT(3'B0),
|
||||||
|
.S_AXI_HP2_AWPROT(3'B0),
|
||||||
|
.S_AXI_HP2_ARADDR(32'B0),
|
||||||
|
.S_AXI_HP2_AWADDR(32'B0),
|
||||||
|
.S_AXI_HP2_ARCACHE(4'B0),
|
||||||
|
.S_AXI_HP2_ARLEN(4'B0),
|
||||||
|
.S_AXI_HP2_ARQOS(4'B0),
|
||||||
|
.S_AXI_HP2_AWCACHE(4'B0),
|
||||||
|
.S_AXI_HP2_AWLEN(4'B0),
|
||||||
|
.S_AXI_HP2_AWQOS(4'B0),
|
||||||
|
.S_AXI_HP2_ARID(6'B0),
|
||||||
|
.S_AXI_HP2_AWID(6'B0),
|
||||||
|
.S_AXI_HP2_WID(6'B0),
|
||||||
|
.S_AXI_HP2_WDATA(64'B0),
|
||||||
|
.S_AXI_HP2_WSTRB(8'B0),
|
||||||
|
.S_AXI_HP3_ARREADY(),
|
||||||
|
.S_AXI_HP3_AWREADY(),
|
||||||
|
.S_AXI_HP3_BVALID(),
|
||||||
|
.S_AXI_HP3_RLAST(),
|
||||||
|
.S_AXI_HP3_RVALID(),
|
||||||
|
.S_AXI_HP3_WREADY(),
|
||||||
|
.S_AXI_HP3_BRESP(),
|
||||||
|
.S_AXI_HP3_RRESP(),
|
||||||
|
.S_AXI_HP3_BID(),
|
||||||
|
.S_AXI_HP3_RID(),
|
||||||
|
.S_AXI_HP3_RDATA(),
|
||||||
|
.S_AXI_HP3_ACLK(1'B0),
|
||||||
|
.S_AXI_HP3_ARVALID(1'B0),
|
||||||
|
.S_AXI_HP3_AWVALID(1'B0),
|
||||||
|
.S_AXI_HP3_BREADY(1'B0),
|
||||||
|
.S_AXI_HP3_RREADY(1'B0),
|
||||||
|
.S_AXI_HP3_WLAST(1'B0),
|
||||||
|
.S_AXI_HP3_WVALID(1'B0),
|
||||||
|
.S_AXI_HP3_ARBURST(2'B0),
|
||||||
|
.S_AXI_HP3_ARLOCK(2'B0),
|
||||||
|
.S_AXI_HP3_ARSIZE(3'B0),
|
||||||
|
.S_AXI_HP3_AWBURST(2'B0),
|
||||||
|
.S_AXI_HP3_AWLOCK(2'B0),
|
||||||
|
.S_AXI_HP3_AWSIZE(3'B0),
|
||||||
|
.S_AXI_HP3_ARPROT(3'B0),
|
||||||
|
.S_AXI_HP3_AWPROT(3'B0),
|
||||||
|
.S_AXI_HP3_ARADDR(32'B0),
|
||||||
|
.S_AXI_HP3_AWADDR(32'B0),
|
||||||
|
.S_AXI_HP3_ARCACHE(4'B0),
|
||||||
|
.S_AXI_HP3_ARLEN(4'B0),
|
||||||
|
.S_AXI_HP3_ARQOS(4'B0),
|
||||||
|
.S_AXI_HP3_AWCACHE(4'B0),
|
||||||
|
.S_AXI_HP3_AWLEN(4'B0),
|
||||||
|
.S_AXI_HP3_AWQOS(4'B0),
|
||||||
|
.S_AXI_HP3_ARID(6'B0),
|
||||||
|
.S_AXI_HP3_AWID(6'B0),
|
||||||
|
.S_AXI_HP3_WID(6'B0),
|
||||||
|
.S_AXI_HP3_WDATA(64'B0),
|
||||||
|
.S_AXI_HP3_WSTRB(8'B0),
|
||||||
|
.FCLK_CLK0(FCLK_CLK0),
|
||||||
|
|
||||||
|
.FCLK_CLK1(),
|
||||||
|
|
||||||
|
.FCLK_CLK2(),
|
||||||
|
|
||||||
|
.FCLK_CLK3(),
|
||||||
|
.FCLK_RESET0_N(FCLK_RESET0_N),
|
||||||
|
.FCLK_RESET1_N(),
|
||||||
|
.FCLK_RESET2_N(),
|
||||||
|
.FCLK_RESET3_N(),
|
||||||
|
.IRQ_F2P(IRQ_F2P),
|
||||||
|
.PS_SRSTB(PS_SRSTB),
|
||||||
|
.PS_CLK(PS_CLK),
|
||||||
|
.PS_PORB(PS_PORB)
|
||||||
|
);
|
||||||
|
endmodule
|
115
Miz_sys/Miz_sys.ip_user_files/bd/system/sim/system.v
Normal file
115
Miz_sys/Miz_sys.ip_user_files/bd/system/sim/system.v
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
//Copyright 1986-2017 Xilinx, Inc. All Rights Reserved.
|
||||||
|
//--------------------------------------------------------------------------------
|
||||||
|
//Tool Version: Vivado v.2017.4 (win64) Build 2086221 Fri Dec 15 20:55:39 MST 2017
|
||||||
|
//Date : Sat May 25 13:08:00 2019
|
||||||
|
//Host : LB-201810041430 running 64-bit major release (build 9200)
|
||||||
|
//Command : generate_target system.bd
|
||||||
|
//Design : system
|
||||||
|
//Purpose : IP block netlist
|
||||||
|
//--------------------------------------------------------------------------------
|
||||||
|
`timescale 1 ps / 1 ps
|
||||||
|
|
||||||
|
(* CORE_GENERATION_INFO = "system,IP_Integrator,{x_ipVendor=xilinx.com,x_ipLibrary=BlockDiagram,x_ipName=system,x_ipVersion=1.00.a,x_ipLanguage=VERILOG,numBlks=1,numReposBlks=1,numNonXlnxBlks=0,numHierBlks=0,maxHierDepth=0,numSysgenBlks=0,numHlsBlks=0,numHdlrefBlks=0,numPkgbdBlks=0,bdsource=USER,da_ps7_cnt=1,synth_mode=Global}" *) (* HW_HANDOFF = "system.hwdef" *)
|
||||||
|
module system
|
||||||
|
(DDR_addr,
|
||||||
|
DDR_ba,
|
||||||
|
DDR_cas_n,
|
||||||
|
DDR_ck_n,
|
||||||
|
DDR_ck_p,
|
||||||
|
DDR_cke,
|
||||||
|
DDR_cs_n,
|
||||||
|
DDR_dm,
|
||||||
|
DDR_dq,
|
||||||
|
DDR_dqs_n,
|
||||||
|
DDR_dqs_p,
|
||||||
|
DDR_odt,
|
||||||
|
DDR_ras_n,
|
||||||
|
DDR_reset_n,
|
||||||
|
DDR_we_n,
|
||||||
|
FIXED_IO_ddr_vrn,
|
||||||
|
FIXED_IO_ddr_vrp,
|
||||||
|
FIXED_IO_mio,
|
||||||
|
FIXED_IO_ps_clk,
|
||||||
|
FIXED_IO_ps_porb,
|
||||||
|
FIXED_IO_ps_srstb);
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:interface:ddrx:1.0 DDR ADDR" *) (* X_INTERFACE_PARAMETER = "XIL_INTERFACENAME DDR, AXI_ARBITRATION_SCHEME TDM, BURST_LENGTH 8, CAN_DEBUG false, CAS_LATENCY 11, CAS_WRITE_LATENCY 11, CS_ENABLED true, DATA_MASK_ENABLED true, DATA_WIDTH 8, MEMORY_TYPE COMPONENTS, MEM_ADDR_MAP ROW_COLUMN_BANK, SLOT Single, TIMEPERIOD_PS 1250" *) inout [14:0]DDR_addr;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:interface:ddrx:1.0 DDR BA" *) inout [2:0]DDR_ba;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:interface:ddrx:1.0 DDR CAS_N" *) inout DDR_cas_n;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:interface:ddrx:1.0 DDR CK_N" *) inout DDR_ck_n;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:interface:ddrx:1.0 DDR CK_P" *) inout DDR_ck_p;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:interface:ddrx:1.0 DDR CKE" *) inout DDR_cke;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:interface:ddrx:1.0 DDR CS_N" *) inout DDR_cs_n;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:interface:ddrx:1.0 DDR DM" *) inout [3:0]DDR_dm;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:interface:ddrx:1.0 DDR DQ" *) inout [31:0]DDR_dq;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:interface:ddrx:1.0 DDR DQS_N" *) inout [3:0]DDR_dqs_n;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:interface:ddrx:1.0 DDR DQS_P" *) inout [3:0]DDR_dqs_p;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:interface:ddrx:1.0 DDR ODT" *) inout DDR_odt;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:interface:ddrx:1.0 DDR RAS_N" *) inout DDR_ras_n;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:interface:ddrx:1.0 DDR RESET_N" *) inout DDR_reset_n;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:interface:ddrx:1.0 DDR WE_N" *) inout DDR_we_n;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:display_processing_system7:fixedio:1.0 FIXED_IO DDR_VRN" *) (* X_INTERFACE_PARAMETER = "XIL_INTERFACENAME FIXED_IO, CAN_DEBUG false" *) inout FIXED_IO_ddr_vrn;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:display_processing_system7:fixedio:1.0 FIXED_IO DDR_VRP" *) inout FIXED_IO_ddr_vrp;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:display_processing_system7:fixedio:1.0 FIXED_IO MIO" *) inout [53:0]FIXED_IO_mio;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:display_processing_system7:fixedio:1.0 FIXED_IO PS_CLK" *) inout FIXED_IO_ps_clk;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:display_processing_system7:fixedio:1.0 FIXED_IO PS_PORB" *) inout FIXED_IO_ps_porb;
|
||||||
|
(* X_INTERFACE_INFO = "xilinx.com:display_processing_system7:fixedio:1.0 FIXED_IO PS_SRSTB" *) inout FIXED_IO_ps_srstb;
|
||||||
|
|
||||||
|
wire [14:0]processing_system7_0_DDR_ADDR;
|
||||||
|
wire [2:0]processing_system7_0_DDR_BA;
|
||||||
|
wire processing_system7_0_DDR_CAS_N;
|
||||||
|
wire processing_system7_0_DDR_CKE;
|
||||||
|
wire processing_system7_0_DDR_CK_N;
|
||||||
|
wire processing_system7_0_DDR_CK_P;
|
||||||
|
wire processing_system7_0_DDR_CS_N;
|
||||||
|
wire [3:0]processing_system7_0_DDR_DM;
|
||||||
|
wire [31:0]processing_system7_0_DDR_DQ;
|
||||||
|
wire [3:0]processing_system7_0_DDR_DQS_N;
|
||||||
|
wire [3:0]processing_system7_0_DDR_DQS_P;
|
||||||
|
wire processing_system7_0_DDR_ODT;
|
||||||
|
wire processing_system7_0_DDR_RAS_N;
|
||||||
|
wire processing_system7_0_DDR_RESET_N;
|
||||||
|
wire processing_system7_0_DDR_WE_N;
|
||||||
|
wire processing_system7_0_FCLK_CLK0;
|
||||||
|
wire processing_system7_0_FIXED_IO_DDR_VRN;
|
||||||
|
wire processing_system7_0_FIXED_IO_DDR_VRP;
|
||||||
|
wire [53:0]processing_system7_0_FIXED_IO_MIO;
|
||||||
|
wire processing_system7_0_FIXED_IO_PS_CLK;
|
||||||
|
wire processing_system7_0_FIXED_IO_PS_PORB;
|
||||||
|
wire processing_system7_0_FIXED_IO_PS_SRSTB;
|
||||||
|
|
||||||
|
system_processing_system7_0_0 processing_system7_0
|
||||||
|
(.DDR_Addr(DDR_addr[14:0]),
|
||||||
|
.DDR_BankAddr(DDR_ba[2:0]),
|
||||||
|
.DDR_CAS_n(DDR_cas_n),
|
||||||
|
.DDR_CKE(DDR_cke),
|
||||||
|
.DDR_CS_n(DDR_cs_n),
|
||||||
|
.DDR_Clk(DDR_ck_p),
|
||||||
|
.DDR_Clk_n(DDR_ck_n),
|
||||||
|
.DDR_DM(DDR_dm[3:0]),
|
||||||
|
.DDR_DQ(DDR_dq[31:0]),
|
||||||
|
.DDR_DQS(DDR_dqs_p[3:0]),
|
||||||
|
.DDR_DQS_n(DDR_dqs_n[3:0]),
|
||||||
|
.DDR_DRSTB(DDR_reset_n),
|
||||||
|
.DDR_ODT(DDR_odt),
|
||||||
|
.DDR_RAS_n(DDR_ras_n),
|
||||||
|
.DDR_VRN(FIXED_IO_ddr_vrn),
|
||||||
|
.DDR_VRP(FIXED_IO_ddr_vrp),
|
||||||
|
.DDR_WEB(DDR_we_n),
|
||||||
|
.FCLK_CLK0(processing_system7_0_FCLK_CLK0),
|
||||||
|
.MIO(FIXED_IO_mio[53:0]),
|
||||||
|
.M_AXI_GP0_ACLK(processing_system7_0_FCLK_CLK0),
|
||||||
|
.M_AXI_GP0_ARREADY(1'b0),
|
||||||
|
.M_AXI_GP0_AWREADY(1'b0),
|
||||||
|
.M_AXI_GP0_BID({1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0}),
|
||||||
|
.M_AXI_GP0_BRESP({1'b0,1'b0}),
|
||||||
|
.M_AXI_GP0_BVALID(1'b0),
|
||||||
|
.M_AXI_GP0_RDATA({1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0}),
|
||||||
|
.M_AXI_GP0_RID({1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0}),
|
||||||
|
.M_AXI_GP0_RLAST(1'b0),
|
||||||
|
.M_AXI_GP0_RRESP({1'b0,1'b0}),
|
||||||
|
.M_AXI_GP0_RVALID(1'b0),
|
||||||
|
.M_AXI_GP0_WREADY(1'b0),
|
||||||
|
.PS_CLK(FIXED_IO_ps_clk),
|
||||||
|
.PS_PORB(FIXED_IO_ps_porb),
|
||||||
|
.PS_SRSTB(FIXED_IO_ps_srstb));
|
||||||
|
endmodule
|
@ -0,0 +1,825 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_apis.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Set of Zynq BFM APIs that are used for writing tests.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/* API for setting the STOP_ON_ERROR*/
|
||||||
|
task automatic set_stop_on_error;
|
||||||
|
input LEVEL;
|
||||||
|
begin
|
||||||
|
$display("[%0d] : %0s : Setting Stop On Error as %0b",$time, DISP_INFO, LEVEL);
|
||||||
|
STOP_ON_ERROR = LEVEL;
|
||||||
|
M_AXI_GP0.master.set_stop_on_error(LEVEL);
|
||||||
|
M_AXI_GP1.master.set_stop_on_error(LEVEL);
|
||||||
|
S_AXI_GP0.slave.set_stop_on_error(LEVEL);
|
||||||
|
S_AXI_GP1.slave.set_stop_on_error(LEVEL);
|
||||||
|
S_AXI_HP0.slave.set_stop_on_error(LEVEL);
|
||||||
|
S_AXI_HP1.slave.set_stop_on_error(LEVEL);
|
||||||
|
S_AXI_HP2.slave.set_stop_on_error(LEVEL);
|
||||||
|
S_AXI_HP3.slave.set_stop_on_error(LEVEL);
|
||||||
|
S_AXI_ACP.slave.set_stop_on_error(LEVEL);
|
||||||
|
M_AXI_GP0.STOP_ON_ERROR = LEVEL;
|
||||||
|
M_AXI_GP1.STOP_ON_ERROR = LEVEL;
|
||||||
|
S_AXI_GP0.STOP_ON_ERROR = LEVEL;
|
||||||
|
S_AXI_GP1.STOP_ON_ERROR = LEVEL;
|
||||||
|
S_AXI_HP0.STOP_ON_ERROR = LEVEL;
|
||||||
|
S_AXI_HP1.STOP_ON_ERROR = LEVEL;
|
||||||
|
S_AXI_HP2.STOP_ON_ERROR = LEVEL;
|
||||||
|
S_AXI_HP3.STOP_ON_ERROR = LEVEL;
|
||||||
|
S_AXI_ACP.STOP_ON_ERROR = LEVEL;
|
||||||
|
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API for setting the verbosity for channel level info*/
|
||||||
|
task automatic set_channel_level_info;
|
||||||
|
input [1023:0] name;
|
||||||
|
input LEVEL;
|
||||||
|
begin
|
||||||
|
$display("[%0d] : [%0s] : %0s Port/s : Setting Channel Level Info as %0b",$time, DISP_INFO, name , LEVEL);
|
||||||
|
case(name)
|
||||||
|
"M_AXI_GP0" : M_AXI_GP0.master.set_channel_level_info(LEVEL);
|
||||||
|
"M_AXI_GP1" : M_AXI_GP1.master.set_channel_level_info(LEVEL);
|
||||||
|
"S_AXI_GP0" : S_AXI_GP0.slave.set_channel_level_info(LEVEL);
|
||||||
|
"S_AXI_GP1" : S_AXI_GP1.slave.set_channel_level_info(LEVEL);
|
||||||
|
"S_AXI_HP0" : S_AXI_HP0.slave.set_channel_level_info(LEVEL);
|
||||||
|
"S_AXI_HP1" : S_AXI_HP1.slave.set_channel_level_info(LEVEL);
|
||||||
|
"S_AXI_HP2" : S_AXI_HP2.slave.set_channel_level_info(LEVEL);
|
||||||
|
"S_AXI_HP3" : S_AXI_HP3.slave.set_channel_level_info(LEVEL);
|
||||||
|
"S_AXI_ACP" : S_AXI_ACP.slave.set_channel_level_info(LEVEL);
|
||||||
|
"ALL" : begin
|
||||||
|
M_AXI_GP0.master.set_channel_level_info(LEVEL);
|
||||||
|
M_AXI_GP1.master.set_channel_level_info(LEVEL);
|
||||||
|
S_AXI_GP0.slave.set_channel_level_info(LEVEL);
|
||||||
|
S_AXI_GP1.slave.set_channel_level_info(LEVEL);
|
||||||
|
S_AXI_HP0.slave.set_channel_level_info(LEVEL);
|
||||||
|
S_AXI_HP1.slave.set_channel_level_info(LEVEL);
|
||||||
|
S_AXI_HP2.slave.set_channel_level_info(LEVEL);
|
||||||
|
S_AXI_HP3.slave.set_channel_level_info(LEVEL);
|
||||||
|
S_AXI_ACP.slave.set_channel_level_info(LEVEL);
|
||||||
|
end
|
||||||
|
default : $display("[%0d] : %0s : Invalid Port name (%0s)",$time, DISP_ERR, name);
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API for setting the verbosity for function level info*/
|
||||||
|
task automatic set_function_level_info;
|
||||||
|
input [1023:0] name;
|
||||||
|
input LEVEL;
|
||||||
|
begin
|
||||||
|
$display("[%0d] : [%0s] : %0s Port/s : Setting Function Level Info as %0b",$time, DISP_INFO, name , LEVEL);
|
||||||
|
case(name)
|
||||||
|
"M_AXI_GP0" : M_AXI_GP0.master.set_function_level_info(LEVEL);
|
||||||
|
"M_AXI_GP1" : M_AXI_GP1.master.set_function_level_info(LEVEL);
|
||||||
|
"S_AXI_GP0" : S_AXI_GP0.slave.set_function_level_info(LEVEL);
|
||||||
|
"S_AXI_GP1" : S_AXI_GP1.slave.set_function_level_info(LEVEL);
|
||||||
|
"S_AXI_HP0" : S_AXI_HP0.slave.set_function_level_info(LEVEL);
|
||||||
|
"S_AXI_HP1" : S_AXI_HP1.slave.set_function_level_info(LEVEL);
|
||||||
|
"S_AXI_HP2" : S_AXI_HP2.slave.set_function_level_info(LEVEL);
|
||||||
|
"S_AXI_HP3" : S_AXI_HP3.slave.set_function_level_info(LEVEL);
|
||||||
|
"S_AXI_ACP" : S_AXI_ACP.slave.set_function_level_info(LEVEL);
|
||||||
|
"ALL" : begin
|
||||||
|
M_AXI_GP0.master.set_function_level_info(LEVEL);
|
||||||
|
M_AXI_GP1.master.set_function_level_info(LEVEL);
|
||||||
|
S_AXI_GP0.slave.set_function_level_info(LEVEL);
|
||||||
|
S_AXI_GP1.slave.set_function_level_info(LEVEL);
|
||||||
|
S_AXI_HP0.slave.set_function_level_info(LEVEL);
|
||||||
|
S_AXI_HP1.slave.set_function_level_info(LEVEL);
|
||||||
|
S_AXI_HP2.slave.set_function_level_info(LEVEL);
|
||||||
|
S_AXI_HP3.slave.set_function_level_info(LEVEL);
|
||||||
|
S_AXI_ACP.slave.set_function_level_info(LEVEL);
|
||||||
|
end
|
||||||
|
default : $display("[%0d] : %0s : Invalid Port name (%0s)",$time, DISP_ERR, name);
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API for setting the Message verbosity */
|
||||||
|
task automatic set_debug_level_info;
|
||||||
|
input LEVEL;
|
||||||
|
begin
|
||||||
|
$display("[%0d] : %0s : Setting Debug Level Info as %0b",$time, DISP_INFO, LEVEL);
|
||||||
|
DEBUG_INFO = LEVEL;
|
||||||
|
M_AXI_GP0.DEBUG_INFO = LEVEL;
|
||||||
|
M_AXI_GP1.DEBUG_INFO = LEVEL;
|
||||||
|
S_AXI_GP0.DEBUG_INFO = LEVEL;
|
||||||
|
S_AXI_GP1.DEBUG_INFO = LEVEL;
|
||||||
|
S_AXI_HP0.DEBUG_INFO = LEVEL;
|
||||||
|
S_AXI_HP1.DEBUG_INFO = LEVEL;
|
||||||
|
S_AXI_HP2.DEBUG_INFO = LEVEL;
|
||||||
|
S_AXI_HP3.DEBUG_INFO = LEVEL;
|
||||||
|
S_AXI_ACP.DEBUG_INFO = LEVEL;
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API for setting ARQos Values */
|
||||||
|
task automatic set_arqos;
|
||||||
|
input [1023:0] name;
|
||||||
|
input [axi_qos_width-1:0] value;
|
||||||
|
begin
|
||||||
|
$display("[%0d] : [%0s] : %0s Port/s : Setting AWQOS as %0b",$time, DISP_INFO, name , value);
|
||||||
|
case(name)
|
||||||
|
"S_AXI_GP0" : S_AXI_GP0.set_arqos(value);
|
||||||
|
"S_AXI_GP1" : S_AXI_GP1.set_arqos(value);
|
||||||
|
"S_AXI_HP0" : S_AXI_HP0.set_arqos(value);
|
||||||
|
"S_AXI_HP1" : S_AXI_HP1.set_arqos(value);
|
||||||
|
"S_AXI_HP2" : S_AXI_HP2.set_arqos(value);
|
||||||
|
"S_AXI_HP3" : S_AXI_HP3.set_arqos(value);
|
||||||
|
"S_AXI_ACP" : S_AXI_ACP.set_arqos(value);
|
||||||
|
default : $display("[%0d] : %0s : Invalid Slave Port name (%0s)",$time, DISP_ERR, name);
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API for setting AWQos Values */
|
||||||
|
task automatic set_awqos;
|
||||||
|
input [1023:0] name;
|
||||||
|
input [axi_qos_width-1:0] value;
|
||||||
|
begin
|
||||||
|
$display("[%0d] : [%0s] : %0s Port/s : Setting ARQOS as %0b",$time, DISP_INFO, name , value);
|
||||||
|
case(name)
|
||||||
|
"S_AXI_GP0" : S_AXI_GP0.set_awqos(value);
|
||||||
|
"S_AXI_GP1" : S_AXI_GP1.set_awqos(value);
|
||||||
|
"S_AXI_HP0" : S_AXI_HP0.set_awqos(value);
|
||||||
|
"S_AXI_HP1" : S_AXI_HP1.set_awqos(value);
|
||||||
|
"S_AXI_HP2" : S_AXI_HP2.set_awqos(value);
|
||||||
|
"S_AXI_HP3" : S_AXI_HP3.set_awqos(value);
|
||||||
|
"S_AXI_ACP" : S_AXI_ACP.set_awqos(value);
|
||||||
|
default : $display("[%0d] : %0s : Invalid Slave Port (%0s)",$time, DISP_ERR, name);
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API for soft reset control */
|
||||||
|
task automatic fpga_soft_reset;
|
||||||
|
input[data_width-1:0] reset_ctrl;
|
||||||
|
begin
|
||||||
|
if(DEBUG_INFO) $display("[%0d] : %0s : FPGA Soft Reset called for 0x%0h",$time, DISP_INFO, reset_ctrl);
|
||||||
|
gen_rst.fpga_soft_reset(reset_ctrl);
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API for pre-loading memories from (DDR/OCM model) */
|
||||||
|
task automatic pre_load_mem_from_file;
|
||||||
|
input [(max_chars*8)-1:0] file_name;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [int_width-1:0] no_of_bytes;
|
||||||
|
reg [1:0] mem_type;
|
||||||
|
integer succ;
|
||||||
|
begin
|
||||||
|
mem_type = decode_address(start_addr);
|
||||||
|
succ = $fopen(file_name,"r");
|
||||||
|
if(succ == 0) begin
|
||||||
|
$display("[%0d] : %0s : '%0s' doesn't exist. 'pre_load_mem_from_file' call failed ...\n",$time, DISP_ERR, file_name);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end
|
||||||
|
else if(check_addr_aligned(start_addr)) begin
|
||||||
|
case(mem_type)
|
||||||
|
OCM_MEM : begin
|
||||||
|
if (!C_HIGH_OCM_EN)
|
||||||
|
ocmc.ocm.pre_load_mem_from_file(file_name,start_addr,no_of_bytes);
|
||||||
|
else
|
||||||
|
ocmc.ocm.pre_load_mem_from_file(file_name,(start_addr - high_ocm_start_addr),no_of_bytes);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : Starting Address(0x%0h) -> OCM Memory is pre-loaded with %0d bytes of data from file %0s",$time, DISP_INFO, start_addr, no_of_bytes, file_name);
|
||||||
|
end
|
||||||
|
DDR_MEM : begin
|
||||||
|
ddrc.ddr.pre_load_mem_from_file(file_name,start_addr,no_of_bytes);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : Starting Address(0x%0h) -> DDR Memory is pre-loaded with %0d bytes of data from file %0s",$time, DISP_INFO, start_addr, no_of_bytes, file_name);
|
||||||
|
end
|
||||||
|
default : begin
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) is out-of-range. 'pre_load_mem_from_file' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end else begin
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) has to be 32-bit aligned. 'pre_load_mem_from_file' call failed ...",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR)
|
||||||
|
$stop;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API for pre-loading memories (DDR/OCM) */
|
||||||
|
task automatic pre_load_mem;
|
||||||
|
input [1:0] data_type;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [int_width-1:0] no_of_bytes;
|
||||||
|
reg [1:0] mem_type;
|
||||||
|
begin
|
||||||
|
mem_type = decode_address(start_addr);
|
||||||
|
if(check_addr_aligned(start_addr)) begin
|
||||||
|
case(mem_type)
|
||||||
|
OCM_MEM : begin
|
||||||
|
if (!C_HIGH_OCM_EN)
|
||||||
|
ocmc.ocm.pre_load_mem(data_type,start_addr,no_of_bytes);
|
||||||
|
else
|
||||||
|
ocmc.ocm.pre_load_mem(data_type,(start_addr - high_ocm_start_addr),no_of_bytes);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : Starting Address(0x%0h) -> OCM Memory is pre-loaded with %0d bytes of data",$time, DISP_INFO, start_addr, no_of_bytes);
|
||||||
|
end
|
||||||
|
DDR_MEM : begin
|
||||||
|
ddrc.ddr.pre_load_mem(data_type,start_addr,no_of_bytes);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : Starting Address(0x%0h) -> DDR Memory is pre-loaded with %0d bytes of data",$time, DISP_INFO, start_addr, no_of_bytes);
|
||||||
|
end
|
||||||
|
default : begin
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) is out-of-range. 'pre_load_mem' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end else begin
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) has to be 32-bit aligned. 'pre_load_mem' call failed ...",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API for backdoor write to memories (DDR/OCM) */
|
||||||
|
task automatic write_mem;
|
||||||
|
input [max_burst_bits-1 :0] data;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [max_burst_bytes_width:0] no_of_bytes;
|
||||||
|
reg [1:0] mem_type;
|
||||||
|
integer succ;
|
||||||
|
begin
|
||||||
|
mem_type = decode_address(start_addr);
|
||||||
|
if(check_addr_aligned(start_addr)) begin
|
||||||
|
case(mem_type)
|
||||||
|
OCM_MEM : begin
|
||||||
|
if (!C_HIGH_OCM_EN)
|
||||||
|
ocmc.ocm.write_mem(data,start_addr,no_of_bytes);
|
||||||
|
else
|
||||||
|
ocmc.ocm.write_mem(data,(start_addr - high_ocm_start_addr),no_of_bytes);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : Starting Address(0x%0h) -> Write %0d bytes of data to OCM Memory",$time, DISP_INFO, start_addr, no_of_bytes);
|
||||||
|
end
|
||||||
|
DDR_MEM : begin
|
||||||
|
ddrc.ddr.write_mem(data,start_addr,no_of_bytes);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : Starting Address(0x%0h) -> Write %0d bytes of data to DDR Memory",$time, DISP_INFO, start_addr, no_of_bytes);
|
||||||
|
end
|
||||||
|
default : begin
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) is out-of-range. 'write_mem' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end else begin
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) has to be 32-bit aligned. 'write_mem' call failed ...",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR)
|
||||||
|
$stop;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* read_memory */
|
||||||
|
task automatic read_mem;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [max_burst_bytes_width :0] no_of_bytes;
|
||||||
|
output[max_burst_bits-1 :0] data;
|
||||||
|
reg [1:0] mem_type;
|
||||||
|
integer succ;
|
||||||
|
begin
|
||||||
|
mem_type = decode_address(start_addr);
|
||||||
|
if(check_addr_aligned(start_addr)) begin
|
||||||
|
case(mem_type)
|
||||||
|
OCM_MEM : begin
|
||||||
|
if (!C_HIGH_OCM_EN)
|
||||||
|
ocmc.ocm.read_mem(data,start_addr,no_of_bytes);
|
||||||
|
else
|
||||||
|
ocmc.ocm.read_mem(data,(start_addr - high_ocm_start_addr),no_of_bytes);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : Starting Address(0x%0h) -> Read %0d bytes of data from OCM Memory ",$time, DISP_INFO, start_addr, no_of_bytes);
|
||||||
|
end
|
||||||
|
DDR_MEM : begin
|
||||||
|
ddrc.ddr.read_mem(data,start_addr,no_of_bytes);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : Starting Address(0x%0h) -> Read %0d bytes of data from DDR Memory",$time, DISP_INFO, start_addr, no_of_bytes);
|
||||||
|
end
|
||||||
|
default : begin
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) is out-of-range. 'read_mem' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end else begin
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) has to be 32-bit aligned. 'read_mem' call failed ...",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR)
|
||||||
|
$stop;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API for backdoor read to memories (DDR/OCM) */
|
||||||
|
task automatic peek_mem_to_file;
|
||||||
|
input [(max_chars*8)-1:0] file_name;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [int_width-1:0] no_of_bytes;
|
||||||
|
reg [1:0] mem_type;
|
||||||
|
integer succ;
|
||||||
|
begin
|
||||||
|
mem_type = decode_address(start_addr);
|
||||||
|
if(check_addr_aligned(start_addr)) begin
|
||||||
|
case(mem_type)
|
||||||
|
OCM_MEM : begin
|
||||||
|
if (!C_HIGH_OCM_EN)
|
||||||
|
ocmc.ocm.peek_mem_to_file(file_name,start_addr,no_of_bytes);
|
||||||
|
else
|
||||||
|
ocmc.ocm.peek_mem_to_file(file_name,(start_addr - high_ocm_start_addr),no_of_bytes);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : Starting Address(0x%0h) -> Peeked %0d bytes of data from OCM Memory to file %0s",$time, DISP_INFO, start_addr, no_of_bytes, file_name);
|
||||||
|
end
|
||||||
|
DDR_MEM : begin
|
||||||
|
ddrc.ddr.peek_mem_to_file(file_name,start_addr,no_of_bytes);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : Starting Address(0x%0h) -> Peeked %0d bytes of data from DDR Memory to file %0s",$time, DISP_INFO, start_addr, no_of_bytes, file_name);
|
||||||
|
end
|
||||||
|
default : begin
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) is out-of-range. 'peek_mem_to_file' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end else begin
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) has to be 32-bit aligned. 'peek_mem_to_file' call failed ...",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR)
|
||||||
|
$stop;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API to read interrupt status */
|
||||||
|
task automatic read_interrupt;
|
||||||
|
output[irq_width-1:0] irq_status;
|
||||||
|
begin
|
||||||
|
irq_status = IRQ_F2P;
|
||||||
|
if(DEBUG_INFO) $display("[%0d] : %0s : Reading Interrupt Status as 0x%0h",$time, DISP_INFO, irq_status);
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API to wait on interrup */
|
||||||
|
task automatic wait_interrupt;
|
||||||
|
input [3:0] irq;
|
||||||
|
output[irq_width-1:0] irq_status;
|
||||||
|
begin
|
||||||
|
if(DEBUG_INFO) $display("[%0d] : %0s : Waiting on Interrupt irq[%0d]",$time, DISP_INFO, irq);
|
||||||
|
|
||||||
|
case(irq)
|
||||||
|
0 : wait(IRQ_F2P[0] === 1'b1);
|
||||||
|
1 : wait(IRQ_F2P[1] === 1'b1);
|
||||||
|
2 : wait(IRQ_F2P[2] === 1'b1);
|
||||||
|
3 : wait(IRQ_F2P[3] === 1'b1);
|
||||||
|
4 : wait(IRQ_F2P[4] === 1'b1);
|
||||||
|
5 : wait(IRQ_F2P[5] === 1'b1);
|
||||||
|
6 : wait(IRQ_F2P[6] === 1'b1);
|
||||||
|
7 : wait(IRQ_F2P[7] === 1'b1);
|
||||||
|
8 : wait(IRQ_F2P[8] === 1'b1);
|
||||||
|
8 : wait(IRQ_F2P[9] === 1'b1);
|
||||||
|
10: wait(IRQ_F2P[10] === 1'b1);
|
||||||
|
11: wait(IRQ_F2P[11] === 1'b1);
|
||||||
|
12: wait(IRQ_F2P[12] === 1'b1);
|
||||||
|
13: wait(IRQ_F2P[13] === 1'b1);
|
||||||
|
14: wait(IRQ_F2P[14] === 1'b1);
|
||||||
|
15: wait(IRQ_F2P[15] === 1'b1);
|
||||||
|
default : $display("[%0d] : %0s : Only 16 Interrupt lines (irq_fp0:irq_fp15) are supported",$time, DISP_ERR);
|
||||||
|
endcase
|
||||||
|
if(DEBUG_INFO) $display("[%0d] : %0s : Received Interrupt irq[%0d]",$time, DISP_INFO, irq);
|
||||||
|
irq_status = IRQ_F2P;
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API to wait for a certain match pattern*/
|
||||||
|
task automatic wait_mem_update;
|
||||||
|
input[addr_width-1:0] address;
|
||||||
|
input[data_width-1:0] data_in;
|
||||||
|
output[data_width-1:0] data_out;
|
||||||
|
reg[data_width-1:0] datao;
|
||||||
|
begin
|
||||||
|
if(mem_update_key) begin
|
||||||
|
mem_update_key = 0;
|
||||||
|
if(DEBUG_INFO) $display("[%0d] : %0s : 'wait_mem_update' called for Address(0x%0h) , Match Pattern(0x%0h) \n",$time, DISP_INFO, address, data_in);
|
||||||
|
if(check_addr_aligned(address)) begin
|
||||||
|
ddrc.ddr.wait_mem_update(address, datao);
|
||||||
|
if(datao != data_in)begin
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) -> DATA PATTERN MATCH FAILED, Expected data = 0x%0h, Received data = 0x%0h \n",$time, DISP_ERR, address, data_in,datao);
|
||||||
|
$stop;
|
||||||
|
end else
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) -> DATA PATTERN(0x%0h) MATCHED \n",$time, DISP_INFO, address, data_in);
|
||||||
|
data_out = datao;
|
||||||
|
end else begin
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) has to be 32-bit aligned. 'wait_mem_update' call failed ...\n",$time, DISP_ERR, address);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end
|
||||||
|
mem_update_key = 1;
|
||||||
|
end else
|
||||||
|
$display("[%0d] : %0s : One instance of 'wait_mem_update' thread is already running.Only one instance can be called at a time ...\n",$time, DISP_WARN);
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
|
||||||
|
/* API to initiate a WRITE transaction on one of the AXI-Master ports*/
|
||||||
|
task automatic write_from_file;
|
||||||
|
input [(max_chars*8)-1:0] file_name;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [int_width-1:0] wr_size;
|
||||||
|
output [axi_rsp_width-1:0] response;
|
||||||
|
integer succ;
|
||||||
|
begin
|
||||||
|
succ = $fopen(file_name,"r");
|
||||||
|
if(succ == 0) begin
|
||||||
|
$display("[%0d] : %0s : '%0s' doesn't exist. 'write_from_file' call failed ...\n",$time, DISP_ERR, file_name);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end
|
||||||
|
else if(!check_master_address(start_addr)) begin
|
||||||
|
$display("[%0d] : %0s : Master Address(0x%0h) is out of range\n",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else if(check_addr_aligned(start_addr)) begin
|
||||||
|
$fclose(succ);
|
||||||
|
case(start_addr[31:30])
|
||||||
|
GP_M0 : begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : Starting Address(0x%0h) -> AXI Write -> %0d bytes from file %0s",$time, DISP_INFO, start_addr, wr_size, file_name);
|
||||||
|
M_AXI_GP0.write_from_file(file_name,start_addr,wr_size,response);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : Done AXI Write for Starting Address(0x%0h)",$time, DISP_INFO, start_addr);
|
||||||
|
end
|
||||||
|
GP_M1 : begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : Starting Address(0x%0h) -> AXI Write -> %0d bytes from file %0s",$time, DISP_INFO, start_addr, wr_size, file_name);
|
||||||
|
M_AXI_GP1.write_from_file(file_name,start_addr,wr_size,response);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : Done AXI Write for Starting Address(0x%0h)",$time, DISP_INFO, start_addr);
|
||||||
|
end
|
||||||
|
default : begin
|
||||||
|
$display("[%0d] : %0s : Invalid Address(0x%0h) 'write_from_file' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end else begin
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) has to be 32-bit aligned. 'write_from_file' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API to initiate a READ transaction on one of the AXI-Master ports*/
|
||||||
|
task automatic read_to_file;
|
||||||
|
input [(max_chars*8)-1:0] file_name;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [int_width-1:0] rd_size;
|
||||||
|
output [axi_rsp_width-1:0] response;
|
||||||
|
begin
|
||||||
|
if(!check_master_address(start_addr)) begin
|
||||||
|
$display("[%0d] : %0s : Master Address(0x%0h) is out of range\n",$time, DISP_ERR , start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else if(check_addr_aligned(start_addr)) begin
|
||||||
|
case(start_addr[31:30])
|
||||||
|
GP_M0 : begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : Starting Address(0x%0h) -> AXI Read -> %0d bytes to file %0s",$time, DISP_INFO, start_addr, rd_size, file_name);
|
||||||
|
M_AXI_GP0.read_to_file(file_name,start_addr,rd_size,response);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : Done AXI Read for Starting Address(0x%0h)",$time, DISP_INFO, start_addr);
|
||||||
|
end
|
||||||
|
GP_M1 : begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : Starting Address(0x%0h) -> AXI Read -> %0d bytes to file %0s",$time, DISP_INFO, start_addr, rd_size, file_name);
|
||||||
|
M_AXI_GP1.read_to_file(file_name,start_addr,rd_size,response);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : Done AXI Read for Starting Address(0x%0h)",$time, DISP_INFO, start_addr);
|
||||||
|
end
|
||||||
|
default : $display("[%0d] : %0s : Invalid Address(0x%0h) 'read_to_file' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
endcase
|
||||||
|
end else begin
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) has to be 32-bit aligned. 'read_to_file' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API to initiate a WRITE transaction(<= 128 bytes) on one of the AXI-Master ports*/
|
||||||
|
task automatic write_data;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [max_transfer_bytes_width:0] wr_size;
|
||||||
|
input [(max_transfer_bytes*8)-1:0] w_data;
|
||||||
|
output [axi_rsp_width-1:0] response;
|
||||||
|
reg[511:0] rsp;
|
||||||
|
begin
|
||||||
|
if(!check_master_address(start_addr)) begin
|
||||||
|
$display("[%0d] : %0s : Master Address(0x%0h) is out of range. 'write_data' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else if(wr_size > max_transfer_bytes) begin
|
||||||
|
$display("[%0d] : %0s : Byte Size supported is 128 bytes only. 'write_data' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else if(start_addr[31:30] === GP_M0) begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : Starting Address(0x%0h) -> AXI Write -> %0d bytes",$time, DISP_INFO, start_addr, wr_size);
|
||||||
|
M_AXI_GP0.write_data(start_addr,wr_size,w_data,response);
|
||||||
|
rsp = get_resp(response);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : Done AXI Write for Starting Address(0x%0h) with Response '%0s'",$time, DISP_INFO, start_addr, rsp);
|
||||||
|
end else if(start_addr[31:30] === GP_M1) begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : Starting Address(0x%0h) -> AXI Write -> %0d bytes",$time, DISP_INFO, start_addr, wr_size);
|
||||||
|
M_AXI_GP1.write_data(start_addr,wr_size,w_data,response);
|
||||||
|
rsp = get_resp(response);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : Done AXI Write for Starting Address(0x%0h) with Response '%0s'",$time, DISP_INFO, start_addr, rsp);
|
||||||
|
end else
|
||||||
|
$display("[%0d] : %0s : Invalid Address(0x%0h) 'write_data' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API to initiate a READ transaction(<= 128 bytes) on one of the AXI-Master ports*/
|
||||||
|
task automatic read_data;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [max_transfer_bytes_width:0] rd_size;
|
||||||
|
output[(max_transfer_bytes*8)-1:0] rd_data;
|
||||||
|
output [axi_rsp_width-1:0] response;
|
||||||
|
reg[511:0] rsp;
|
||||||
|
begin
|
||||||
|
if(!check_master_address(start_addr)) begin
|
||||||
|
$display("[%0d] : %0s : Master Address(0x%0h) is out of range 'read_data' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else if(rd_size > max_transfer_bytes) begin
|
||||||
|
$display("[%0d] : %0s : Byte Size supported is 128 bytes only.'read_data' call failed ... \n",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else if(start_addr[31:30] === GP_M0) begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : Starting Address(0x%0h) -> AXI Read -> %0d bytes",$time, DISP_INFO, start_addr, rd_size);
|
||||||
|
M_AXI_GP0.read_data(start_addr,rd_size,rd_data,response);
|
||||||
|
rsp = get_resp(response);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : Done AXI Read for Starting Address(0x%0h) with Response '%0s'",$time, DISP_INFO, start_addr, rsp);
|
||||||
|
end else if(start_addr[31:30] === GP_M1) begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : Starting Address(0x%0h) -> AXI Read -> %0d bytes",$time, DISP_INFO, start_addr, rd_size);
|
||||||
|
M_AXI_GP1.read_data(start_addr,rd_size,rd_data,response);
|
||||||
|
rsp = get_resp(response);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : Done AXI Read for Starting Address(0x%0h) with Response '%0s'",$time, DISP_INFO, start_addr, rsp);
|
||||||
|
end else
|
||||||
|
$display("[%0d] : %0s : Invalid Address(0x%0h) 'read_data' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* Hooks to call to BFM APIs */
|
||||||
|
task automatic write_burst(input [addr_width-1:0] start_addr,input [axi_len_width-1:0] len,input [axi_size_width-1:0] siz,input [axi_brst_type_width-1:0] burst,input [axi_lock_width-1:0] lck,input [axi_cache_width-1:0] cache,input [axi_prot_width-1:0] prot,input [(axi_mgp_data_width*axi_burst_len)-1:0] data,input integer datasize, output [axi_rsp_width-1:0] response);
|
||||||
|
reg[511:0] rsp;
|
||||||
|
begin
|
||||||
|
if(!check_master_address(start_addr)) begin
|
||||||
|
$display("[%0d] : %0s : Master Address(0x%0h) is out of range. 'write_burst' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else if(start_addr[31:30] === GP_M0) begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : Starting Address(0x%0h) -> AXI Write -> %0d bytes",$time, DISP_INFO, start_addr, datasize);
|
||||||
|
M_AXI_GP0.write_burst(start_addr,len,siz,burst,lck,cache,prot,data,datasize,response);
|
||||||
|
rsp = get_resp(response);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : Done AXI Write for Starting Address(0x%0h) with Response '%0s'",$time, DISP_INFO, start_addr, rsp);
|
||||||
|
end else if(start_addr[31:30] === GP_M1) begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : Starting Address(0x%0h) -> AXI Write -> %0d bytes",$time, DISP_INFO, start_addr, datasize);
|
||||||
|
M_AXI_GP1.write_burst(start_addr,len,siz,burst,lck,cache,prot,data,datasize,response);
|
||||||
|
rsp = get_resp(response);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : Done AXI Write for Starting Address(0x%0h) with Response '%0s'",$time, DISP_INFO, start_addr, rsp);
|
||||||
|
end else
|
||||||
|
$display("[%0d] : %0s : Invalid Address(0x%0h) 'write_burst' call failed ... \n",$time, DISP_ERR, start_addr);
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
task automatic write_burst_concurrent(input [addr_width-1:0] start_addr,input [axi_len_width-1:0] len,input [axi_size_width-1:0] siz,input [axi_brst_type_width-1:0] burst,input [axi_lock_width-1:0] lck,input [axi_cache_width-1:0] cache,input [axi_prot_width-1:0] prot,input [(axi_mgp_data_width*axi_burst_len)-1:0] data,input integer datasize, output [axi_rsp_width-1:0] response);
|
||||||
|
reg[511:0] rsp; /// string for response
|
||||||
|
begin
|
||||||
|
if(!check_master_address(start_addr)) begin
|
||||||
|
$display("[%0d] : %0s : Master Address(0x%0h) is out of range. 'write_burst_concurrent' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else if(start_addr[31:30] === GP_M0) begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : Starting Address(0x%0h) -> AXI Write -> %0d bytes",$time, DISP_INFO, start_addr, datasize);
|
||||||
|
M_AXI_GP0.write_burst_concurrent(start_addr,len,siz,burst,lck,cache,prot,data,datasize,response);
|
||||||
|
rsp = get_resp(response);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : Done AXI Write for Starting Address(0x%0h) with Response '%0s'",$time, DISP_INFO, start_addr, rsp);
|
||||||
|
end else if(start_addr[31:30] === GP_M1) begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : Starting Address(0x%0h) -> AXI Write -> %0d bytes",$time, DISP_INFO, start_addr, datasize);
|
||||||
|
M_AXI_GP1.write_burst_concurrent(start_addr,len,siz,burst,lck,cache,prot,data,datasize,response);
|
||||||
|
rsp = get_resp(response);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : Done AXI Write for Starting Address(0x%0h) with Response '%0s'",$time, DISP_INFO, start_addr, rsp);
|
||||||
|
end else
|
||||||
|
$display("[%0d] : %0s : Invalid Address(0x%0h) 'write_burst_concurrent' call failed ... \n",$time, DISP_ERR, start_addr);
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
task automatic read_burst;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [axi_len_width-1:0] len;
|
||||||
|
input [axi_size_width-1:0] siz;
|
||||||
|
input [axi_brst_type_width-1:0] burst;
|
||||||
|
input [axi_lock_width-1:0] lck;
|
||||||
|
input [axi_cache_width-1:0] cache;
|
||||||
|
input [axi_prot_width-1:0] prot;
|
||||||
|
output [(axi_mgp_data_width*axi_burst_len)-1:0] data;
|
||||||
|
output [(axi_rsp_width*axi_burst_len)-1:0] response;
|
||||||
|
reg[511:0] rsp;
|
||||||
|
begin
|
||||||
|
if(!check_master_address(start_addr)) begin
|
||||||
|
$display("[%0d] : %0s : Master Address(0x%0h) is out of range. 'read_burst' call failed ...\n",$time, DISP_ERR, start_addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else if(start_addr[31:30] === GP_M0) begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : Starting Address(0x%0h) -> AXI Read",$time, DISP_INFO, start_addr);
|
||||||
|
M_AXI_GP0.read_burst(start_addr,len,siz,burst,lck,cache,prot,data,response);
|
||||||
|
rsp = get_resp(response);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : Done AXI Read for Starting Address(0x%0h) with Response '%0s'",$time, DISP_INFO, start_addr, rsp);
|
||||||
|
end else if(start_addr[31:30] === GP_M1) begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : Starting Address(0x%0h) -> AXI Read",$time, DISP_INFO, start_addr);
|
||||||
|
M_AXI_GP1.read_burst(start_addr,len,siz,burst,lck,cache,prot,data,response);
|
||||||
|
rsp = get_resp(response);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : Done AXI Read for Starting Address(0x%0h) with Response '%0s'",$time, DISP_INFO, start_addr, rsp);
|
||||||
|
end else
|
||||||
|
$display("[%0d] : %0s : Invalid Address(0x%0h) 'read_burst' call failed ... \n",$time, DISP_ERR, start_addr);
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
task automatic wait_reg_update;
|
||||||
|
input [addr_width-1:0] addr;
|
||||||
|
input [data_width-1:0] data_i;
|
||||||
|
input [data_width-1:0] mask_i;
|
||||||
|
input [int_width-1:0] time_interval;
|
||||||
|
input [int_width-1:0] time_out;
|
||||||
|
output [data_width-1:0] data_o;
|
||||||
|
|
||||||
|
reg upd_done0;
|
||||||
|
reg upd_done1;
|
||||||
|
begin
|
||||||
|
if(!check_master_address(addr)) begin
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) is out of range. 'wait_reg_update' call failed ...\n",$time, DISP_ERR, addr);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else if(addr[31:30] === GP_M0) begin
|
||||||
|
if(reg_update_key_0) begin
|
||||||
|
reg_update_key_0 = 0;
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : 'wait_reg_update' called for Address(0x%0h), Mask(0x%0h), Match Pattern(0x%0h) \n ",$time, DISP_INFO, addr, mask_i, data_i);
|
||||||
|
M_AXI_GP0.wait_reg_update(addr, data_i, mask_i, time_interval, time_out, data_o, upd_done0);
|
||||||
|
if(DEBUG_INFO && upd_done0)
|
||||||
|
$display("[%0d] : M_AXI_GP0 : %0s : Register mapped at Address(0x%0h) is updated ",$time, DISP_INFO, addr);
|
||||||
|
reg_update_key_0 = 1;
|
||||||
|
end else
|
||||||
|
$display("[%0d] : M_AXI_GP0 : One instance of 'wait_reg_update' thread is already running.Only one instance can be called at a time ...\n",$time, DISP_WARN);
|
||||||
|
end else if(addr[31:30] === GP_M1) begin
|
||||||
|
if(reg_update_key_1) begin
|
||||||
|
reg_update_key_1 = 0;
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : 'wait_reg_update' called for Address(0x%0h), Mask(0x%0h), Match Pattern(0x%0h) \n ",$time, DISP_INFO, addr, mask_i, data_i);
|
||||||
|
M_AXI_GP1.wait_reg_update(addr, data_i, mask_i, time_interval, time_out, data_o, upd_done1);
|
||||||
|
if(DEBUG_INFO && upd_done1)
|
||||||
|
$display("[%0d] : M_AXI_GP1 : %0s : Register mapped at Address(0x%0h) is updated ",$time, DISP_INFO, addr);
|
||||||
|
reg_update_key_1 = 1;
|
||||||
|
end else
|
||||||
|
$display("[%0d] : M_AXI_GP1 : One instance of 'wait_reg_update' thread is already running.Only one instance can be called at a time ...\n",$time, DISP_WARN);
|
||||||
|
end else
|
||||||
|
$display("[%0d] : %0s : Invalid Address(0x%0h) 'wait_reg_update' call failed ... \n",$time, DISP_ERR, addr);
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API to read register map */
|
||||||
|
task read_register_map;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [max_regs_width:0] no_of_registers;
|
||||||
|
output[max_burst_bits-1 :0] data;
|
||||||
|
reg [max_regs_width:0] no_of_regs;
|
||||||
|
begin
|
||||||
|
no_of_regs = no_of_registers;
|
||||||
|
if(no_of_registers > 32) begin
|
||||||
|
$display("[%0d] : %0s : No_of_Registers(%0d) exceeds the supported number (32).\n Only 32 registers will be read.",$time, DISP_ERR, start_addr);
|
||||||
|
no_of_regs = 32;
|
||||||
|
end
|
||||||
|
if(check_addr_aligned(start_addr)) begin
|
||||||
|
if(decode_address(start_addr) == REG_MEM) begin
|
||||||
|
if(DEBUG_INFO) $display("[%0d] : %0s : Reading Registers starting address (0x%0h) -> %0d registers",$time, DISP_INFO, start_addr,no_of_regs );
|
||||||
|
regc.regm.read_reg_mem(data,start_addr,no_of_regs*4); /// as each register is of 4 bytes
|
||||||
|
if(DEBUG_INFO) $display("[%0d] : %0s : DONE -> Reading Registers starting address (0x%0h), Data returned(0x%0h)",$time, DISP_INFO, start_addr, data );
|
||||||
|
end else begin
|
||||||
|
$display("[%0d] : %0s : Invalid Address(0x%0h) for Register Read. 'read_register_map' call failed ...",$time, DISP_ERR, start_addr);
|
||||||
|
end
|
||||||
|
end else begin
|
||||||
|
data = 0;
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) has to be 32-bit aligned. 'read_register_map' call failed ...",$time, DISP_ERR, start_addr);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API to read single register */
|
||||||
|
task read_register;
|
||||||
|
input [addr_width-1:0] addr;
|
||||||
|
output[data_width-1:0] data;
|
||||||
|
begin
|
||||||
|
if(check_addr_aligned(addr)) begin
|
||||||
|
if(decode_address(addr) == REG_MEM) begin
|
||||||
|
if(DEBUG_INFO) $display("[%0d] : %0s : Reading Register (0x%0h) ",$time, DISP_INFO, addr );
|
||||||
|
regc.regm.get_data(addr >> 2, data);
|
||||||
|
if(DEBUG_INFO) $display("[%0d] : %0s : DONE -> Reading Register (0x%0h), Data returned(0x%0h)",$time, DISP_INFO, addr, data );
|
||||||
|
end else begin
|
||||||
|
$display("[%0d] : %0s : Invalid Address(0x%0h) for Register Read. 'read_register' call failed ...",$time, DISP_ERR, addr);
|
||||||
|
end
|
||||||
|
end else begin
|
||||||
|
data = 0;
|
||||||
|
$display("[%0d] : %0s : Address(0x%0h) has to be 32-bit aligned. 'read_register' call failed ...",$time, DISP_ERR, addr);
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* API to set the AXI-Slave profile*/
|
||||||
|
task automatic set_slave_profile;
|
||||||
|
input[1023:0] name;
|
||||||
|
input[1:0] latency ;
|
||||||
|
begin
|
||||||
|
if(DEBUG_INFO) $display("[%0d] : %0s : %0s Port/s : Setting Slave profile",$time, DISP_INFO, name);
|
||||||
|
case(name)
|
||||||
|
"S_AXI_GP0" : S_AXI_GP0.set_latency_type(latency);
|
||||||
|
"S_AXI_GP1" : S_AXI_GP1.set_latency_type(latency);
|
||||||
|
"S_AXI_HP0" : S_AXI_HP0.set_latency_type(latency);
|
||||||
|
"S_AXI_HP1" : S_AXI_HP1.set_latency_type(latency);
|
||||||
|
"S_AXI_HP2" : S_AXI_HP2.set_latency_type(latency);
|
||||||
|
"S_AXI_HP3" : S_AXI_HP3.set_latency_type(latency);
|
||||||
|
"S_AXI_ACP" : S_AXI_ACP.set_latency_type(latency);
|
||||||
|
"ALL" : begin
|
||||||
|
S_AXI_GP0.set_latency_type(latency);
|
||||||
|
S_AXI_GP1.set_latency_type(latency);
|
||||||
|
S_AXI_HP0.set_latency_type(latency);
|
||||||
|
S_AXI_HP1.set_latency_type(latency);
|
||||||
|
S_AXI_HP2.set_latency_type(latency);
|
||||||
|
S_AXI_HP3.set_latency_type(latency);
|
||||||
|
S_AXI_ACP.set_latency_type(latency);
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------ LOCAL APIs ------------------------------------------------ */
|
||||||
|
|
||||||
|
/* local API for address decoding*/
|
||||||
|
function automatic [1:0] decode_address;
|
||||||
|
input [addr_width-1:0] address;
|
||||||
|
begin
|
||||||
|
if(!C_HIGH_OCM_EN && (address < ocm_end_addr || address >= ocm_low_addr ))
|
||||||
|
decode_address = OCM_MEM; /// OCM
|
||||||
|
else if(address >= ddr_start_addr && address <= ddr_end_addr)
|
||||||
|
decode_address = DDR_MEM; /// DDR
|
||||||
|
else if(C_HIGH_OCM_EN && address >= high_ocm_start_addr)
|
||||||
|
decode_address = OCM_MEM; /// OCM
|
||||||
|
else if(address >= reg_start_addr && reg_start_addr <= reg_end_addr)
|
||||||
|
decode_address = REG_MEM; /// Register Map
|
||||||
|
else
|
||||||
|
decode_address = INVALID_MEM_TYPE; /// ERROR in Address
|
||||||
|
end
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
/* local API for checking address is 32-bit (4-byte) aligned */
|
||||||
|
function automatic check_addr_aligned;
|
||||||
|
input [addr_width-1:0] address;
|
||||||
|
begin
|
||||||
|
if((address%4) !=0 ) begin //
|
||||||
|
check_addr_aligned = 0; ///not_aligned
|
||||||
|
end else
|
||||||
|
check_addr_aligned = 1;
|
||||||
|
end
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
/* local API to check address for GP Masters */
|
||||||
|
function check_master_address;
|
||||||
|
input [addr_width-1:0] address;
|
||||||
|
begin
|
||||||
|
if(address >= m_axi_gp0_baseaddr && address <= m_axi_gp0_highaddr)
|
||||||
|
check_master_address = 1'b1;
|
||||||
|
else if(address >= m_axi_gp1_baseaddr && address <= m_axi_gp1_highaddr)
|
||||||
|
check_master_address = 1'b1;
|
||||||
|
else
|
||||||
|
check_master_address = 1'b0; /// ERROR in Address
|
||||||
|
end
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
/* Response decode */
|
||||||
|
function automatic [511:0] get_resp;
|
||||||
|
input[axi_rsp_width-1:0] response;
|
||||||
|
begin
|
||||||
|
case(response)
|
||||||
|
2'b00 : get_resp = "OKAY";
|
||||||
|
2'b01 : get_resp = "EXOKAY";
|
||||||
|
2'b10 : get_resp = "SLVERR";
|
||||||
|
2'b11 : get_resp = "DECERR";
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
endfunction
|
@ -0,0 +1,93 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_axi_acp.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Connections for ACP port
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/* AXI Slave ACP */
|
||||||
|
processing_system7_bfm_v2_0_5_axi_slave #( C_USE_S_AXI_ACP, // enable
|
||||||
|
axi_acp_name, // name
|
||||||
|
axi_acp_data_width, // data width
|
||||||
|
addr_width, /// address width
|
||||||
|
axi_acp_id_width, // ID width
|
||||||
|
C_S_AXI_ACP_BASEADDR, // slave base address
|
||||||
|
C_S_AXI_ACP_HIGHADDR,// slave size
|
||||||
|
axi_acp_outstanding, // outstanding transactions // 7 Reads and 3 Writes
|
||||||
|
axi_slv_excl_support, // Exclusive access support
|
||||||
|
axi_acp_wr_outstanding,
|
||||||
|
axi_acp_rd_outstanding)
|
||||||
|
S_AXI_ACP(.S_RESETN (net_axi_acp_rstn),
|
||||||
|
.S_ACLK (S_AXI_ACP_ACLK),
|
||||||
|
// Write Address Channel
|
||||||
|
.S_AWID (S_AXI_ACP_AWID),
|
||||||
|
.S_AWADDR (S_AXI_ACP_AWADDR),
|
||||||
|
.S_AWLEN (S_AXI_ACP_AWLEN),
|
||||||
|
.S_AWSIZE (S_AXI_ACP_AWSIZE),
|
||||||
|
.S_AWBURST (S_AXI_ACP_AWBURST),
|
||||||
|
.S_AWLOCK (S_AXI_ACP_AWLOCK),
|
||||||
|
.S_AWCACHE (S_AXI_ACP_AWCACHE),
|
||||||
|
.S_AWPROT (S_AXI_ACP_AWPROT),
|
||||||
|
.S_AWVALID (S_AXI_ACP_AWVALID),
|
||||||
|
.S_AWREADY (S_AXI_ACP_AWREADY),
|
||||||
|
// Write Data Channel Signals.
|
||||||
|
.S_WID (S_AXI_ACP_WID),
|
||||||
|
.S_WDATA (S_AXI_ACP_WDATA),
|
||||||
|
.S_WSTRB (S_AXI_ACP_WSTRB),
|
||||||
|
.S_WLAST (S_AXI_ACP_WLAST),
|
||||||
|
.S_WVALID (S_AXI_ACP_WVALID),
|
||||||
|
.S_WREADY (S_AXI_ACP_WREADY),
|
||||||
|
// Write Response Channel Signals.
|
||||||
|
.S_BID (S_AXI_ACP_BID),
|
||||||
|
.S_BRESP (S_AXI_ACP_BRESP),
|
||||||
|
.S_BVALID (S_AXI_ACP_BVALID),
|
||||||
|
.S_BREADY (S_AXI_ACP_BREADY),
|
||||||
|
// Read Address Channel Signals.
|
||||||
|
.S_ARID (S_AXI_ACP_ARID),
|
||||||
|
.S_ARADDR (S_AXI_ACP_ARADDR),
|
||||||
|
.S_ARLEN (S_AXI_ACP_ARLEN),
|
||||||
|
.S_ARSIZE (S_AXI_ACP_ARSIZE),
|
||||||
|
.S_ARBURST (S_AXI_ACP_ARBURST),
|
||||||
|
.S_ARLOCK (S_AXI_ACP_ARLOCK),
|
||||||
|
.S_ARCACHE (S_AXI_ACP_ARCACHE),
|
||||||
|
.S_ARPROT (S_AXI_ACP_ARPROT),
|
||||||
|
.S_ARVALID (S_AXI_ACP_ARVALID),
|
||||||
|
.S_ARREADY (S_AXI_ACP_ARREADY),
|
||||||
|
// Read Data Channel Signals.
|
||||||
|
.S_RID (S_AXI_ACP_RID),
|
||||||
|
.S_RDATA (S_AXI_ACP_RDATA),
|
||||||
|
.S_RRESP (S_AXI_ACP_RRESP),
|
||||||
|
.S_RLAST (S_AXI_ACP_RLAST),
|
||||||
|
.S_RVALID (S_AXI_ACP_RVALID),
|
||||||
|
.S_RREADY (S_AXI_ACP_RREADY),
|
||||||
|
// Side band signals
|
||||||
|
.S_AWQOS (S_AXI_ACP_AWQOS),
|
||||||
|
.S_ARQOS (S_AXI_ACP_ARQOS), // Side band signals
|
||||||
|
|
||||||
|
.SW_CLK (net_sw_clk),
|
||||||
|
/* This goes to port 0 of DDR and port 0 of OCM , port 0 of REG*/
|
||||||
|
.WR_DATA_ACK_DDR (ddr_wr_ack_port0),
|
||||||
|
.WR_DATA_ACK_OCM (ocm_wr_ack_port0),
|
||||||
|
.WR_DATA (net_wr_data_acp),
|
||||||
|
.WR_ADDR (net_wr_addr_acp),
|
||||||
|
.WR_BYTES (net_wr_bytes_acp),
|
||||||
|
.WR_DATA_VALID_DDR (ddr_wr_dv_port0),
|
||||||
|
.WR_DATA_VALID_OCM (ocm_wr_dv_port0),
|
||||||
|
.WR_QOS (net_wr_qos_acp),
|
||||||
|
|
||||||
|
.RD_REQ_DDR (ddr_rd_req_port0),
|
||||||
|
.RD_REQ_OCM (ocm_rd_req_port0),
|
||||||
|
.RD_REQ_REG (reg_rd_req_port0),
|
||||||
|
.RD_ADDR (net_rd_addr_acp),
|
||||||
|
.RD_DATA_DDR (ddr_rd_data_port0),
|
||||||
|
.RD_DATA_OCM (ocm_rd_data_port0),
|
||||||
|
.RD_DATA_REG (reg_rd_data_port0),
|
||||||
|
.RD_BYTES (net_rd_bytes_acp),
|
||||||
|
.RD_DATA_VALID_DDR (ddr_rd_dv_port0),
|
||||||
|
.RD_DATA_VALID_OCM (ocm_rd_dv_port0),
|
||||||
|
.RD_DATA_VALID_REG (reg_rd_dv_port0),
|
||||||
|
.RD_QOS (net_rd_qos_acp)
|
||||||
|
|
||||||
|
);
|
@ -0,0 +1,309 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_axi_gp.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Connections for AXI GP ports
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/* IDs for Masters
|
||||||
|
// l2m1 (CPU000)
|
||||||
|
12'b11_000_000_00_00
|
||||||
|
12'b11_010_000_00_00
|
||||||
|
12'b11_011_000_00_00
|
||||||
|
12'b11_100_000_00_00
|
||||||
|
12'b11_101_000_00_00
|
||||||
|
12'b11_110_000_00_00
|
||||||
|
12'b11_111_000_00_00
|
||||||
|
// l2m1 (CPU001)
|
||||||
|
12'b11_000_001_00_00
|
||||||
|
12'b11_010_001_00_00
|
||||||
|
12'b11_011_001_00_00
|
||||||
|
12'b11_100_001_00_00
|
||||||
|
12'b11_101_001_00_00
|
||||||
|
12'b11_110_001_00_00
|
||||||
|
12'b11_111_001_00_00
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* AXI -Master GP0 */
|
||||||
|
processing_system7_bfm_v2_0_5_axi_master #(C_USE_M_AXI_GP0, // enable
|
||||||
|
axi_mgp0_name,// name
|
||||||
|
axi_mgp_data_width, /// Data Width
|
||||||
|
addr_width, /// Address width
|
||||||
|
axi_mgp_id_width, //// ID Width
|
||||||
|
axi_mgp_outstanding, //// Outstanding transactions
|
||||||
|
axi_mst_excl_support, // EXCL Access Support
|
||||||
|
axi_mgp_wr_id, //WR_ID
|
||||||
|
axi_mgp_rd_id) //RD_ID
|
||||||
|
M_AXI_GP0(.M_RESETN (net_axi_mgp0_rstn),
|
||||||
|
.M_ACLK (M_AXI_GP0_ACLK),
|
||||||
|
// Write Address Channel
|
||||||
|
.M_AWID (M_AXI_GP0_AWID_FULL),
|
||||||
|
.M_AWADDR (M_AXI_GP0_AWADDR),
|
||||||
|
.M_AWLEN (M_AXI_GP0_AWLEN),
|
||||||
|
.M_AWSIZE (M_AXI_GP0_AWSIZE),
|
||||||
|
.M_AWBURST (M_AXI_GP0_AWBURST),
|
||||||
|
.M_AWLOCK (M_AXI_GP0_AWLOCK),
|
||||||
|
.M_AWCACHE (M_AXI_GP0_AWCACHE),
|
||||||
|
.M_AWPROT (M_AXI_GP0_AWPROT),
|
||||||
|
.M_AWVALID (M_AXI_GP0_AWVALID),
|
||||||
|
.M_AWREADY (M_AXI_GP0_AWREADY),
|
||||||
|
// Write Data Channel Signals.
|
||||||
|
.M_WID (M_AXI_GP0_WID_FULL),
|
||||||
|
.M_WDATA (M_AXI_GP0_WDATA),
|
||||||
|
.M_WSTRB (M_AXI_GP0_WSTRB),
|
||||||
|
.M_WLAST (M_AXI_GP0_WLAST),
|
||||||
|
.M_WVALID (M_AXI_GP0_WVALID),
|
||||||
|
.M_WREADY (M_AXI_GP0_WREADY),
|
||||||
|
// Write Response Channel Signals.
|
||||||
|
.M_BID (M_AXI_GP0_BID_FULL),
|
||||||
|
.M_BRESP (M_AXI_GP0_BRESP),
|
||||||
|
.M_BVALID (M_AXI_GP0_BVALID),
|
||||||
|
.M_BREADY (M_AXI_GP0_BREADY),
|
||||||
|
// Read Address Channel Signals.
|
||||||
|
.M_ARID (M_AXI_GP0_ARID_FULL),
|
||||||
|
.M_ARADDR (M_AXI_GP0_ARADDR),
|
||||||
|
.M_ARLEN (M_AXI_GP0_ARLEN),
|
||||||
|
.M_ARSIZE (M_AXI_GP0_ARSIZE),
|
||||||
|
.M_ARBURST (M_AXI_GP0_ARBURST),
|
||||||
|
.M_ARLOCK (M_AXI_GP0_ARLOCK),
|
||||||
|
.M_ARCACHE (M_AXI_GP0_ARCACHE),
|
||||||
|
.M_ARPROT (M_AXI_GP0_ARPROT),
|
||||||
|
.M_ARVALID (M_AXI_GP0_ARVALID),
|
||||||
|
.M_ARREADY (M_AXI_GP0_ARREADY),
|
||||||
|
// Read Data Channel Signals.
|
||||||
|
.M_RID (M_AXI_GP0_RID_FULL),
|
||||||
|
.M_RDATA (M_AXI_GP0_RDATA),
|
||||||
|
.M_RRESP (M_AXI_GP0_RRESP),
|
||||||
|
.M_RLAST (M_AXI_GP0_RLAST),
|
||||||
|
.M_RVALID (M_AXI_GP0_RVALID),
|
||||||
|
.M_RREADY (M_AXI_GP0_RREADY),
|
||||||
|
// Side band signals
|
||||||
|
.M_AWQOS (M_AXI_GP0_AWQOS),
|
||||||
|
.M_ARQOS (M_AXI_GP0_ARQOS)
|
||||||
|
);
|
||||||
|
|
||||||
|
/* AXI Master GP1 */
|
||||||
|
processing_system7_bfm_v2_0_5_axi_master #(C_USE_M_AXI_GP1, // enable
|
||||||
|
axi_mgp1_name,// name
|
||||||
|
axi_mgp_data_width, /// Data Width
|
||||||
|
addr_width, /// Address width
|
||||||
|
axi_mgp_id_width, //// ID Width
|
||||||
|
axi_mgp_outstanding, //// Outstanding transactions
|
||||||
|
axi_mst_excl_support, // EXCL Access Support
|
||||||
|
axi_mgp_wr_id, //WR_ID
|
||||||
|
axi_mgp_rd_id) //RD_ID
|
||||||
|
M_AXI_GP1(.M_RESETN (net_axi_mgp1_rstn),
|
||||||
|
.M_ACLK (M_AXI_GP1_ACLK),
|
||||||
|
// Write Address Channel
|
||||||
|
.M_AWID (M_AXI_GP1_AWID_FULL),
|
||||||
|
.M_AWADDR (M_AXI_GP1_AWADDR),
|
||||||
|
.M_AWLEN (M_AXI_GP1_AWLEN),
|
||||||
|
.M_AWSIZE (M_AXI_GP1_AWSIZE),
|
||||||
|
.M_AWBURST (M_AXI_GP1_AWBURST),
|
||||||
|
.M_AWLOCK (M_AXI_GP1_AWLOCK),
|
||||||
|
.M_AWCACHE (M_AXI_GP1_AWCACHE),
|
||||||
|
.M_AWPROT (M_AXI_GP1_AWPROT),
|
||||||
|
.M_AWVALID (M_AXI_GP1_AWVALID),
|
||||||
|
.M_AWREADY (M_AXI_GP1_AWREADY),
|
||||||
|
// Write Data Channel Signals.
|
||||||
|
.M_WID (M_AXI_GP1_WID_FULL),
|
||||||
|
.M_WDATA (M_AXI_GP1_WDATA),
|
||||||
|
.M_WSTRB (M_AXI_GP1_WSTRB),
|
||||||
|
.M_WLAST (M_AXI_GP1_WLAST),
|
||||||
|
.M_WVALID (M_AXI_GP1_WVALID),
|
||||||
|
.M_WREADY (M_AXI_GP1_WREADY),
|
||||||
|
// Write Response Channel Signals.
|
||||||
|
.M_BID (M_AXI_GP1_BID_FULL),
|
||||||
|
.M_BRESP (M_AXI_GP1_BRESP),
|
||||||
|
.M_BVALID (M_AXI_GP1_BVALID),
|
||||||
|
.M_BREADY (M_AXI_GP1_BREADY),
|
||||||
|
// Read Address Channel Signals.
|
||||||
|
.M_ARID (M_AXI_GP1_ARID_FULL),
|
||||||
|
.M_ARADDR (M_AXI_GP1_ARADDR),
|
||||||
|
.M_ARLEN (M_AXI_GP1_ARLEN),
|
||||||
|
.M_ARSIZE (M_AXI_GP1_ARSIZE),
|
||||||
|
.M_ARBURST (M_AXI_GP1_ARBURST),
|
||||||
|
.M_ARLOCK (M_AXI_GP1_ARLOCK),
|
||||||
|
.M_ARCACHE (M_AXI_GP1_ARCACHE),
|
||||||
|
.M_ARPROT (M_AXI_GP1_ARPROT),
|
||||||
|
.M_ARVALID (M_AXI_GP1_ARVALID),
|
||||||
|
.M_ARREADY (M_AXI_GP1_ARREADY),
|
||||||
|
// Read Data Channel Signals.
|
||||||
|
.M_RID (M_AXI_GP1_RID_FULL),
|
||||||
|
.M_RDATA (M_AXI_GP1_RDATA),
|
||||||
|
.M_RRESP (M_AXI_GP1_RRESP),
|
||||||
|
.M_RLAST (M_AXI_GP1_RLAST),
|
||||||
|
.M_RVALID (M_AXI_GP1_RVALID),
|
||||||
|
.M_RREADY (M_AXI_GP1_RREADY),
|
||||||
|
// Side band signals
|
||||||
|
.M_AWQOS (M_AXI_GP1_AWQOS),
|
||||||
|
.M_ARQOS (M_AXI_GP1_ARQOS)
|
||||||
|
);
|
||||||
|
|
||||||
|
/* AXI Slave GP0 */
|
||||||
|
processing_system7_bfm_v2_0_5_axi_slave #(C_USE_S_AXI_GP0, /// enable
|
||||||
|
axi_sgp0_name, //name
|
||||||
|
axi_sgp_data_width, /// data width
|
||||||
|
addr_width, /// address width
|
||||||
|
axi_sgp_id_width, /// ID width
|
||||||
|
C_S_AXI_GP0_BASEADDR,//// base address
|
||||||
|
C_S_AXI_GP0_HIGHADDR,/// Memory size (high_addr - base_addr)
|
||||||
|
axi_sgp_outstanding, // outstanding transactions
|
||||||
|
axi_slv_excl_support, // exclusive access not supported
|
||||||
|
axi_sgp_wr_outstanding,
|
||||||
|
axi_sgp_rd_outstanding)
|
||||||
|
S_AXI_GP0(.S_RESETN (net_axi_gp0_rstn),
|
||||||
|
.S_ACLK (S_AXI_GP0_ACLK),
|
||||||
|
// Write Address Channel
|
||||||
|
.S_AWID (S_AXI_GP0_AWID),
|
||||||
|
.S_AWADDR (S_AXI_GP0_AWADDR),
|
||||||
|
.S_AWLEN (S_AXI_GP0_AWLEN),
|
||||||
|
.S_AWSIZE (S_AXI_GP0_AWSIZE),
|
||||||
|
.S_AWBURST (S_AXI_GP0_AWBURST),
|
||||||
|
.S_AWLOCK (S_AXI_GP0_AWLOCK),
|
||||||
|
.S_AWCACHE (S_AXI_GP0_AWCACHE),
|
||||||
|
.S_AWPROT (S_AXI_GP0_AWPROT),
|
||||||
|
.S_AWVALID (S_AXI_GP0_AWVALID),
|
||||||
|
.S_AWREADY (S_AXI_GP0_AWREADY),
|
||||||
|
// Write Data Channel Signals.
|
||||||
|
.S_WID (S_AXI_GP0_WID),
|
||||||
|
.S_WDATA (S_AXI_GP0_WDATA),
|
||||||
|
.S_WSTRB (S_AXI_GP0_WSTRB),
|
||||||
|
.S_WLAST (S_AXI_GP0_WLAST),
|
||||||
|
.S_WVALID (S_AXI_GP0_WVALID),
|
||||||
|
.S_WREADY (S_AXI_GP0_WREADY),
|
||||||
|
// Write Response Channel Signals.
|
||||||
|
.S_BID (S_AXI_GP0_BID),
|
||||||
|
.S_BRESP (S_AXI_GP0_BRESP),
|
||||||
|
.S_BVALID (S_AXI_GP0_BVALID),
|
||||||
|
.S_BREADY (S_AXI_GP0_BREADY),
|
||||||
|
// Read Address Channel Signals.
|
||||||
|
.S_ARID (S_AXI_GP0_ARID),
|
||||||
|
.S_ARADDR (S_AXI_GP0_ARADDR),
|
||||||
|
.S_ARLEN (S_AXI_GP0_ARLEN),
|
||||||
|
.S_ARSIZE (S_AXI_GP0_ARSIZE),
|
||||||
|
.S_ARBURST (S_AXI_GP0_ARBURST),
|
||||||
|
.S_ARLOCK (S_AXI_GP0_ARLOCK),
|
||||||
|
.S_ARCACHE (S_AXI_GP0_ARCACHE),
|
||||||
|
.S_ARPROT (S_AXI_GP0_ARPROT),
|
||||||
|
.S_ARVALID (S_AXI_GP0_ARVALID),
|
||||||
|
.S_ARREADY (S_AXI_GP0_ARREADY),
|
||||||
|
// Read Data Channel Signals.
|
||||||
|
.S_RID (S_AXI_GP0_RID),
|
||||||
|
.S_RDATA (S_AXI_GP0_RDATA),
|
||||||
|
.S_RRESP (S_AXI_GP0_RRESP),
|
||||||
|
.S_RLAST (S_AXI_GP0_RLAST),
|
||||||
|
.S_RVALID (S_AXI_GP0_RVALID),
|
||||||
|
.S_RREADY (S_AXI_GP0_RREADY),
|
||||||
|
// Side band signals
|
||||||
|
.S_AWQOS (S_AXI_GP0_AWQOS),
|
||||||
|
.S_ARQOS (S_AXI_GP0_ARQOS),
|
||||||
|
|
||||||
|
.SW_CLK (net_sw_clk),
|
||||||
|
.WR_DATA_ACK_OCM (net_wr_ack_ocm_gp0),
|
||||||
|
.WR_DATA_ACK_DDR (net_wr_ack_ddr_gp0),
|
||||||
|
.WR_DATA (net_wr_data_gp0),
|
||||||
|
.WR_ADDR (net_wr_addr_gp0),
|
||||||
|
.WR_BYTES (net_wr_bytes_gp0),
|
||||||
|
.WR_DATA_VALID_OCM (net_wr_dv_ocm_gp0),
|
||||||
|
.WR_DATA_VALID_DDR (net_wr_dv_ddr_gp0),
|
||||||
|
.WR_QOS (net_wr_qos_gp0),
|
||||||
|
.RD_REQ_DDR (net_rd_req_ddr_gp0),
|
||||||
|
.RD_REQ_OCM (net_rd_req_ocm_gp0),
|
||||||
|
.RD_REQ_REG (net_rd_req_reg_gp0),
|
||||||
|
.RD_ADDR (net_rd_addr_gp0),
|
||||||
|
.RD_DATA_DDR (net_rd_data_ddr_gp0),
|
||||||
|
.RD_DATA_OCM (net_rd_data_ocm_gp0),
|
||||||
|
.RD_DATA_REG (net_rd_data_reg_gp0),
|
||||||
|
.RD_BYTES (net_rd_bytes_gp0),
|
||||||
|
.RD_DATA_VALID_DDR (net_rd_dv_ddr_gp0),
|
||||||
|
.RD_DATA_VALID_OCM (net_rd_dv_ocm_gp0),
|
||||||
|
.RD_DATA_VALID_REG (net_rd_dv_reg_gp0),
|
||||||
|
.RD_QOS (net_rd_qos_gp0)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
/* AXI Slave GP1 */
|
||||||
|
processing_system7_bfm_v2_0_5_axi_slave #(C_USE_S_AXI_GP1, /// enable
|
||||||
|
axi_sgp1_name, //name
|
||||||
|
axi_sgp_data_width, /// data width
|
||||||
|
addr_width, /// address width
|
||||||
|
axi_sgp_id_width, /// ID width
|
||||||
|
C_S_AXI_GP1_BASEADDR,//// base address
|
||||||
|
C_S_AXI_GP1_HIGHADDR,/// HIGh_addr
|
||||||
|
axi_sgp_outstanding, // outstanding transactions
|
||||||
|
axi_slv_excl_support, // exclusive access
|
||||||
|
axi_sgp_wr_outstanding,
|
||||||
|
axi_sgp_rd_outstanding)
|
||||||
|
S_AXI_GP1(.S_RESETN (net_axi_gp1_rstn),
|
||||||
|
.S_ACLK (S_AXI_GP1_ACLK),
|
||||||
|
// Write Address Channel
|
||||||
|
.S_AWID (S_AXI_GP1_AWID),
|
||||||
|
.S_AWADDR (S_AXI_GP1_AWADDR),
|
||||||
|
.S_AWLEN (S_AXI_GP1_AWLEN),
|
||||||
|
.S_AWSIZE (S_AXI_GP1_AWSIZE),
|
||||||
|
.S_AWBURST (S_AXI_GP1_AWBURST),
|
||||||
|
.S_AWLOCK (S_AXI_GP1_AWLOCK),
|
||||||
|
.S_AWCACHE (S_AXI_GP1_AWCACHE),
|
||||||
|
.S_AWPROT (S_AXI_GP1_AWPROT),
|
||||||
|
.S_AWVALID (S_AXI_GP1_AWVALID),
|
||||||
|
.S_AWREADY (S_AXI_GP1_AWREADY),
|
||||||
|
// Write Data Channel Signals.
|
||||||
|
.S_WID (S_AXI_GP1_WID),
|
||||||
|
.S_WDATA (S_AXI_GP1_WDATA),
|
||||||
|
.S_WSTRB (S_AXI_GP1_WSTRB),
|
||||||
|
.S_WLAST (S_AXI_GP1_WLAST),
|
||||||
|
.S_WVALID (S_AXI_GP1_WVALID),
|
||||||
|
.S_WREADY (S_AXI_GP1_WREADY),
|
||||||
|
// Write Response Channel Signals.
|
||||||
|
.S_BID (S_AXI_GP1_BID),
|
||||||
|
.S_BRESP (S_AXI_GP1_BRESP),
|
||||||
|
.S_BVALID (S_AXI_GP1_BVALID),
|
||||||
|
.S_BREADY (S_AXI_GP1_BREADY),
|
||||||
|
// Read Address Channel Signals.
|
||||||
|
.S_ARID (S_AXI_GP1_ARID),
|
||||||
|
.S_ARADDR (S_AXI_GP1_ARADDR),
|
||||||
|
.S_ARLEN (S_AXI_GP1_ARLEN),
|
||||||
|
.S_ARSIZE (S_AXI_GP1_ARSIZE),
|
||||||
|
.S_ARBURST (S_AXI_GP1_ARBURST),
|
||||||
|
.S_ARLOCK (S_AXI_GP1_ARLOCK),
|
||||||
|
.S_ARCACHE (S_AXI_GP1_ARCACHE),
|
||||||
|
.S_ARPROT (S_AXI_GP1_ARPROT),
|
||||||
|
.S_ARVALID (S_AXI_GP1_ARVALID),
|
||||||
|
.S_ARREADY (S_AXI_GP1_ARREADY),
|
||||||
|
// Read Data Channel Signals.
|
||||||
|
.S_RID (S_AXI_GP1_RID),
|
||||||
|
.S_RDATA (S_AXI_GP1_RDATA),
|
||||||
|
.S_RRESP (S_AXI_GP1_RRESP),
|
||||||
|
.S_RLAST (S_AXI_GP1_RLAST),
|
||||||
|
.S_RVALID (S_AXI_GP1_RVALID),
|
||||||
|
.S_RREADY (S_AXI_GP1_RREADY),
|
||||||
|
// Side band signals
|
||||||
|
.S_AWQOS (S_AXI_GP1_AWQOS),
|
||||||
|
.S_ARQOS (S_AXI_GP1_ARQOS),
|
||||||
|
|
||||||
|
.SW_CLK (net_sw_clk),
|
||||||
|
.WR_DATA_ACK_DDR (net_wr_ack_ddr_gp1),
|
||||||
|
.WR_DATA_ACK_OCM (net_wr_ack_ocm_gp1),
|
||||||
|
.WR_DATA (net_wr_data_gp1),
|
||||||
|
.WR_ADDR (net_wr_addr_gp1),
|
||||||
|
.WR_BYTES (net_wr_bytes_gp1),
|
||||||
|
.WR_DATA_VALID_OCM (net_wr_dv_ocm_gp1),
|
||||||
|
.WR_DATA_VALID_DDR (net_wr_dv_ddr_gp1),
|
||||||
|
.WR_QOS (net_wr_qos_gp1),
|
||||||
|
.RD_REQ_OCM (net_rd_req_ocm_gp1),
|
||||||
|
.RD_REQ_DDR (net_rd_req_ddr_gp1),
|
||||||
|
.RD_REQ_REG (net_rd_req_reg_gp1),
|
||||||
|
.RD_ADDR (net_rd_addr_gp1),
|
||||||
|
.RD_DATA_DDR (net_rd_data_ddr_gp1),
|
||||||
|
.RD_DATA_OCM (net_rd_data_ocm_gp1),
|
||||||
|
.RD_DATA_REG (net_rd_data_reg_gp1),
|
||||||
|
.RD_BYTES (net_rd_bytes_gp1),
|
||||||
|
.RD_DATA_VALID_OCM (net_rd_dv_ocm_gp1),
|
||||||
|
.RD_DATA_VALID_DDR (net_rd_dv_ddr_gp1),
|
||||||
|
.RD_DATA_VALID_REG (net_rd_dv_reg_gp1),
|
||||||
|
.RD_QOS (net_rd_qos_gp1)
|
||||||
|
|
||||||
|
);
|
@ -0,0 +1,346 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_axi_hp.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Connections for AXI HP ports
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/* AXI Slave HP0 */
|
||||||
|
processing_system7_bfm_v2_0_5_afi_slave #( C_USE_S_AXI_HP0, // enable
|
||||||
|
axi_hp0_name, // name
|
||||||
|
C_S_AXI_HP0_DATA_WIDTH, // data width
|
||||||
|
addr_width, /// address width
|
||||||
|
axi_hp_id_width, // ID width
|
||||||
|
C_S_AXI_HP0_BASEADDR, // slave base address
|
||||||
|
C_S_AXI_HP0_HIGHADDR, // slave size
|
||||||
|
axi_hp_outstanding, // outstanding transactions // dynamic for AFI ports
|
||||||
|
axi_slv_excl_support) // Exclusive access support
|
||||||
|
S_AXI_HP0(.S_RESETN (net_axi_hp0_rstn),
|
||||||
|
.S_ACLK (S_AXI_HP0_ACLK),
|
||||||
|
// Write Address channel
|
||||||
|
.S_AWID (S_AXI_HP0_AWID),
|
||||||
|
.S_AWADDR (S_AXI_HP0_AWADDR),
|
||||||
|
.S_AWLEN (S_AXI_HP0_AWLEN),
|
||||||
|
.S_AWSIZE (S_AXI_HP0_AWSIZE),
|
||||||
|
.S_AWBURST (S_AXI_HP0_AWBURST),
|
||||||
|
.S_AWLOCK (S_AXI_HP0_AWLOCK),
|
||||||
|
.S_AWCACHE (S_AXI_HP0_AWCACHE),
|
||||||
|
.S_AWPROT (S_AXI_HP0_AWPROT),
|
||||||
|
.S_AWVALID (S_AXI_HP0_AWVALID),
|
||||||
|
.S_AWREADY (S_AXI_HP0_AWREADY),
|
||||||
|
// Write Data channel signals.
|
||||||
|
.S_WID (S_AXI_HP0_WID),
|
||||||
|
.S_WDATA (S_AXI_HP0_WDATA),
|
||||||
|
.S_WSTRB (S_AXI_HP0_WSTRB),
|
||||||
|
.S_WLAST (S_AXI_HP0_WLAST),
|
||||||
|
.S_WVALID (S_AXI_HP0_WVALID),
|
||||||
|
.S_WREADY (S_AXI_HP0_WREADY),
|
||||||
|
// Write Response channel signals.
|
||||||
|
.S_BID (S_AXI_HP0_BID),
|
||||||
|
.S_BRESP (S_AXI_HP0_BRESP),
|
||||||
|
.S_BVALID (S_AXI_HP0_BVALID),
|
||||||
|
.S_BREADY (S_AXI_HP0_BREADY),
|
||||||
|
// Read Address channel signals.
|
||||||
|
.S_ARID (S_AXI_HP0_ARID),
|
||||||
|
.S_ARADDR (S_AXI_HP0_ARADDR),
|
||||||
|
.S_ARLEN (S_AXI_HP0_ARLEN),
|
||||||
|
.S_ARSIZE (S_AXI_HP0_ARSIZE),
|
||||||
|
.S_ARBURST (S_AXI_HP0_ARBURST),
|
||||||
|
.S_ARLOCK (S_AXI_HP0_ARLOCK),
|
||||||
|
.S_ARCACHE (S_AXI_HP0_ARCACHE),
|
||||||
|
.S_ARPROT (S_AXI_HP0_ARPROT),
|
||||||
|
.S_ARVALID (S_AXI_HP0_ARVALID),
|
||||||
|
.S_ARREADY (S_AXI_HP0_ARREADY),
|
||||||
|
// Read Data channel signals.
|
||||||
|
.S_RID (S_AXI_HP0_RID),
|
||||||
|
.S_RDATA (S_AXI_HP0_RDATA),
|
||||||
|
.S_RRESP (S_AXI_HP0_RRESP),
|
||||||
|
.S_RLAST (S_AXI_HP0_RLAST),
|
||||||
|
.S_RVALID (S_AXI_HP0_RVALID),
|
||||||
|
.S_RREADY (S_AXI_HP0_RREADY),
|
||||||
|
// Side band signals
|
||||||
|
.S_AWQOS (S_AXI_HP0_AWQOS),
|
||||||
|
.S_ARQOS (S_AXI_HP0_ARQOS),
|
||||||
|
// these are needed only for HP ports
|
||||||
|
.S_RDISSUECAP1_EN (S_AXI_HP0_RDISSUECAP1_EN),
|
||||||
|
.S_WRISSUECAP1_EN (S_AXI_HP0_WRISSUECAP1_EN),
|
||||||
|
.S_RCOUNT (S_AXI_HP0_RCOUNT),
|
||||||
|
.S_WCOUNT (S_AXI_HP0_WCOUNT),
|
||||||
|
.S_RACOUNT (S_AXI_HP0_RACOUNT),
|
||||||
|
.S_WACOUNT (S_AXI_HP0_WACOUNT),
|
||||||
|
|
||||||
|
.SW_CLK (net_sw_clk),
|
||||||
|
.WR_DATA_ACK_DDR (net_wr_ack_ddr_hp0),
|
||||||
|
.WR_DATA_ACK_OCM (net_wr_ack_ocm_hp0),
|
||||||
|
.WR_DATA (net_wr_data_hp0),
|
||||||
|
.WR_ADDR (net_wr_addr_hp0),
|
||||||
|
.WR_BYTES (net_wr_bytes_hp0),
|
||||||
|
.WR_DATA_VALID_DDR (net_wr_dv_ddr_hp0),
|
||||||
|
.WR_DATA_VALID_OCM (net_wr_dv_ocm_hp0),
|
||||||
|
.WR_QOS (net_wr_qos_hp0),
|
||||||
|
.RD_REQ_DDR (net_rd_req_ddr_hp0),
|
||||||
|
.RD_REQ_OCM (net_rd_req_ocm_hp0),
|
||||||
|
.RD_ADDR (net_rd_addr_hp0),
|
||||||
|
.RD_DATA_DDR (net_rd_data_ddr_hp0),
|
||||||
|
.RD_DATA_OCM (net_rd_data_ocm_hp0),
|
||||||
|
.RD_BYTES (net_rd_bytes_hp0),
|
||||||
|
.RD_DATA_VALID_DDR (net_rd_dv_ddr_hp0),
|
||||||
|
.RD_DATA_VALID_OCM (net_rd_dv_ocm_hp0),
|
||||||
|
.RD_QOS (net_rd_qos_hp0)
|
||||||
|
);
|
||||||
|
|
||||||
|
/* AXI Slave HP1 */
|
||||||
|
processing_system7_bfm_v2_0_5_afi_slave #( C_USE_S_AXI_HP1, // enable
|
||||||
|
axi_hp1_name, // name
|
||||||
|
C_S_AXI_HP1_DATA_WIDTH, // data width
|
||||||
|
addr_width, /// address width
|
||||||
|
axi_hp_id_width, // ID width
|
||||||
|
C_S_AXI_HP1_BASEADDR, // slave base address
|
||||||
|
C_S_AXI_HP1_HIGHADDR, // Slave size
|
||||||
|
axi_hp_outstanding, // outstanding transactions // dynamic for AFI ports
|
||||||
|
axi_slv_excl_support) // Exclusive access support
|
||||||
|
S_AXI_HP1(.S_RESETN (net_axi_hp1_rstn),
|
||||||
|
.S_ACLK (S_AXI_HP1_ACLK),
|
||||||
|
// Write Address channel
|
||||||
|
.S_AWID (S_AXI_HP1_AWID),
|
||||||
|
.S_AWADDR (S_AXI_HP1_AWADDR),
|
||||||
|
.S_AWLEN (S_AXI_HP1_AWLEN),
|
||||||
|
.S_AWSIZE (S_AXI_HP1_AWSIZE),
|
||||||
|
.S_AWBURST (S_AXI_HP1_AWBURST),
|
||||||
|
.S_AWLOCK (S_AXI_HP1_AWLOCK),
|
||||||
|
.S_AWCACHE (S_AXI_HP1_AWCACHE),
|
||||||
|
.S_AWPROT (S_AXI_HP1_AWPROT),
|
||||||
|
.S_AWVALID (S_AXI_HP1_AWVALID),
|
||||||
|
.S_AWREADY (S_AXI_HP1_AWREADY),
|
||||||
|
// Write Data channel signals.
|
||||||
|
.S_WID (S_AXI_HP1_WID),
|
||||||
|
.S_WDATA (S_AXI_HP1_WDATA),
|
||||||
|
.S_WSTRB (S_AXI_HP1_WSTRB),
|
||||||
|
.S_WLAST (S_AXI_HP1_WLAST),
|
||||||
|
.S_WVALID (S_AXI_HP1_WVALID),
|
||||||
|
.S_WREADY (S_AXI_HP1_WREADY),
|
||||||
|
// Write Response channel signals.
|
||||||
|
.S_BID (S_AXI_HP1_BID),
|
||||||
|
.S_BRESP (S_AXI_HP1_BRESP),
|
||||||
|
.S_BVALID (S_AXI_HP1_BVALID),
|
||||||
|
.S_BREADY (S_AXI_HP1_BREADY),
|
||||||
|
// Read Address channel signals.
|
||||||
|
.S_ARID (S_AXI_HP1_ARID),
|
||||||
|
.S_ARADDR (S_AXI_HP1_ARADDR),
|
||||||
|
.S_ARLEN (S_AXI_HP1_ARLEN),
|
||||||
|
.S_ARSIZE (S_AXI_HP1_ARSIZE),
|
||||||
|
.S_ARBURST (S_AXI_HP1_ARBURST),
|
||||||
|
.S_ARLOCK (S_AXI_HP1_ARLOCK),
|
||||||
|
.S_ARCACHE (S_AXI_HP1_ARCACHE),
|
||||||
|
.S_ARPROT (S_AXI_HP1_ARPROT),
|
||||||
|
.S_ARVALID (S_AXI_HP1_ARVALID),
|
||||||
|
.S_ARREADY (S_AXI_HP1_ARREADY),
|
||||||
|
// Read Data channel signals.
|
||||||
|
.S_RID (S_AXI_HP1_RID),
|
||||||
|
.S_RDATA (S_AXI_HP1_RDATA),
|
||||||
|
.S_RRESP (S_AXI_HP1_RRESP),
|
||||||
|
.S_RLAST (S_AXI_HP1_RLAST),
|
||||||
|
.S_RVALID (S_AXI_HP1_RVALID),
|
||||||
|
.S_RREADY (S_AXI_HP1_RREADY),
|
||||||
|
// Side band signals
|
||||||
|
.S_AWQOS (S_AXI_HP1_AWQOS),
|
||||||
|
.S_ARQOS (S_AXI_HP1_ARQOS),
|
||||||
|
// these are needed only for HP ports
|
||||||
|
.S_RDISSUECAP1_EN (S_AXI_HP1_RDISSUECAP1_EN),
|
||||||
|
.S_WRISSUECAP1_EN (S_AXI_HP1_WRISSUECAP1_EN),
|
||||||
|
.S_RCOUNT (S_AXI_HP1_RCOUNT),
|
||||||
|
.S_WCOUNT (S_AXI_HP1_WCOUNT),
|
||||||
|
.S_RACOUNT (S_AXI_HP1_RACOUNT),
|
||||||
|
.S_WACOUNT (S_AXI_HP1_WACOUNT),
|
||||||
|
|
||||||
|
.SW_CLK (net_sw_clk),
|
||||||
|
.WR_DATA_ACK_DDR (net_wr_ack_ddr_hp1),
|
||||||
|
.WR_DATA_ACK_OCM (net_wr_ack_ocm_hp1),
|
||||||
|
.WR_DATA (net_wr_data_hp1),
|
||||||
|
.WR_ADDR (net_wr_addr_hp1),
|
||||||
|
.WR_BYTES (net_wr_bytes_hp1),
|
||||||
|
.WR_DATA_VALID_DDR (net_wr_dv_ddr_hp1),
|
||||||
|
.WR_DATA_VALID_OCM (net_wr_dv_ocm_hp1),
|
||||||
|
.WR_QOS (net_wr_qos_hp1),
|
||||||
|
.RD_REQ_DDR (net_rd_req_ddr_hp1),
|
||||||
|
.RD_REQ_OCM (net_rd_req_ocm_hp1),
|
||||||
|
.RD_ADDR (net_rd_addr_hp1),
|
||||||
|
.RD_DATA_DDR (net_rd_data_ddr_hp1),
|
||||||
|
.RD_DATA_OCM (net_rd_data_ocm_hp1),
|
||||||
|
.RD_BYTES (net_rd_bytes_hp1),
|
||||||
|
.RD_DATA_VALID_DDR (net_rd_dv_ddr_hp1),
|
||||||
|
.RD_DATA_VALID_OCM (net_rd_dv_ocm_hp1),
|
||||||
|
.RD_QOS (net_rd_qos_hp1)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
/* AXI Slave HP2 */
|
||||||
|
processing_system7_bfm_v2_0_5_afi_slave #( C_USE_S_AXI_HP2, // enable
|
||||||
|
axi_hp2_name, // name
|
||||||
|
C_S_AXI_HP2_DATA_WIDTH, // data width
|
||||||
|
addr_width, /// address width
|
||||||
|
axi_hp_id_width, // ID width
|
||||||
|
C_S_AXI_HP2_BASEADDR, // slave base address
|
||||||
|
C_S_AXI_HP2_HIGHADDR, // SLave size
|
||||||
|
axi_hp_outstanding, // outstanding transactions // dynamic for AFI ports
|
||||||
|
axi_slv_excl_support) // Exclusive access support
|
||||||
|
S_AXI_HP2(.S_RESETN (net_axi_hp2_rstn),
|
||||||
|
.S_ACLK (S_AXI_HP2_ACLK),
|
||||||
|
// Write Address channel
|
||||||
|
.S_AWID (S_AXI_HP2_AWID),
|
||||||
|
.S_AWADDR (S_AXI_HP2_AWADDR),
|
||||||
|
.S_AWLEN (S_AXI_HP2_AWLEN),
|
||||||
|
.S_AWSIZE (S_AXI_HP2_AWSIZE),
|
||||||
|
.S_AWBURST (S_AXI_HP2_AWBURST),
|
||||||
|
.S_AWLOCK (S_AXI_HP2_AWLOCK),
|
||||||
|
.S_AWCACHE (S_AXI_HP2_AWCACHE),
|
||||||
|
.S_AWPROT (S_AXI_HP2_AWPROT),
|
||||||
|
.S_AWVALID (S_AXI_HP2_AWVALID),
|
||||||
|
.S_AWREADY (S_AXI_HP2_AWREADY),
|
||||||
|
// Write Data channel signals.
|
||||||
|
.S_WID (S_AXI_HP2_WID),
|
||||||
|
.S_WDATA (S_AXI_HP2_WDATA),
|
||||||
|
.S_WSTRB (S_AXI_HP2_WSTRB),
|
||||||
|
.S_WLAST (S_AXI_HP2_WLAST),
|
||||||
|
.S_WVALID (S_AXI_HP2_WVALID),
|
||||||
|
.S_WREADY (S_AXI_HP2_WREADY),
|
||||||
|
// Write Response channel signals.
|
||||||
|
.S_BID (S_AXI_HP2_BID),
|
||||||
|
.S_BRESP (S_AXI_HP2_BRESP),
|
||||||
|
.S_BVALID (S_AXI_HP2_BVALID),
|
||||||
|
.S_BREADY (S_AXI_HP2_BREADY),
|
||||||
|
// Read Address channel signals.
|
||||||
|
.S_ARID (S_AXI_HP2_ARID),
|
||||||
|
.S_ARADDR (S_AXI_HP2_ARADDR),
|
||||||
|
.S_ARLEN (S_AXI_HP2_ARLEN),
|
||||||
|
.S_ARSIZE (S_AXI_HP2_ARSIZE),
|
||||||
|
.S_ARBURST (S_AXI_HP2_ARBURST),
|
||||||
|
.S_ARLOCK (S_AXI_HP2_ARLOCK),
|
||||||
|
.S_ARCACHE (S_AXI_HP2_ARCACHE),
|
||||||
|
.S_ARPROT (S_AXI_HP2_ARPROT),
|
||||||
|
.S_ARVALID (S_AXI_HP2_ARVALID),
|
||||||
|
.S_ARREADY (S_AXI_HP2_ARREADY),
|
||||||
|
// Read Data channel signals.
|
||||||
|
.S_RID (S_AXI_HP2_RID),
|
||||||
|
.S_RDATA (S_AXI_HP2_RDATA),
|
||||||
|
.S_RRESP (S_AXI_HP2_RRESP),
|
||||||
|
.S_RLAST (S_AXI_HP2_RLAST),
|
||||||
|
.S_RVALID (S_AXI_HP2_RVALID),
|
||||||
|
.S_RREADY (S_AXI_HP2_RREADY),
|
||||||
|
// Side band signals
|
||||||
|
.S_AWQOS (S_AXI_HP2_AWQOS),
|
||||||
|
.S_ARQOS (S_AXI_HP2_ARQOS),
|
||||||
|
// these are needed only for HP ports
|
||||||
|
.S_RDISSUECAP1_EN (S_AXI_HP2_RDISSUECAP1_EN),
|
||||||
|
.S_WRISSUECAP1_EN (S_AXI_HP2_WRISSUECAP1_EN),
|
||||||
|
.S_RCOUNT (S_AXI_HP2_RCOUNT),
|
||||||
|
.S_WCOUNT (S_AXI_HP2_WCOUNT),
|
||||||
|
.S_RACOUNT (S_AXI_HP2_RACOUNT),
|
||||||
|
.S_WACOUNT (S_AXI_HP2_WACOUNT),
|
||||||
|
|
||||||
|
.SW_CLK (net_sw_clk),
|
||||||
|
.WR_DATA_ACK_DDR (net_wr_ack_ddr_hp2),
|
||||||
|
.WR_DATA_ACK_OCM (net_wr_ack_ocm_hp2),
|
||||||
|
.WR_DATA (net_wr_data_hp2),
|
||||||
|
.WR_ADDR (net_wr_addr_hp2),
|
||||||
|
.WR_BYTES (net_wr_bytes_hp2),
|
||||||
|
.WR_DATA_VALID_DDR (net_wr_dv_ddr_hp2),
|
||||||
|
.WR_DATA_VALID_OCM (net_wr_dv_ocm_hp2),
|
||||||
|
.WR_QOS (net_wr_qos_hp2),
|
||||||
|
.RD_REQ_DDR (net_rd_req_ddr_hp2),
|
||||||
|
.RD_REQ_OCM (net_rd_req_ocm_hp2),
|
||||||
|
.RD_ADDR (net_rd_addr_hp2),
|
||||||
|
.RD_DATA_DDR (net_rd_data_ddr_hp2),
|
||||||
|
.RD_DATA_OCM (net_rd_data_ocm_hp2),
|
||||||
|
.RD_BYTES (net_rd_bytes_hp2),
|
||||||
|
.RD_DATA_VALID_DDR (net_rd_dv_ddr_hp2),
|
||||||
|
.RD_DATA_VALID_OCM (net_rd_dv_ocm_hp2),
|
||||||
|
.RD_QOS (net_rd_qos_hp2)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
/* AXI Slave HP3 */
|
||||||
|
processing_system7_bfm_v2_0_5_afi_slave #( C_USE_S_AXI_HP3, // enable
|
||||||
|
axi_hp3_name, // name
|
||||||
|
C_S_AXI_HP3_DATA_WIDTH, // data width
|
||||||
|
addr_width, /// address width
|
||||||
|
axi_hp_id_width, // ID width
|
||||||
|
C_S_AXI_HP3_BASEADDR, // slave base address
|
||||||
|
C_S_AXI_HP3_HIGHADDR, // SLave size
|
||||||
|
axi_hp_outstanding, // outstanding transactions // dynamic for AFI ports
|
||||||
|
axi_slv_excl_support) // Exclusive access support
|
||||||
|
S_AXI_HP3(.S_RESETN (net_axi_hp3_rstn),
|
||||||
|
.S_ACLK (S_AXI_HP3_ACLK),
|
||||||
|
// Write ADDRESS CHANNEL
|
||||||
|
.S_AWID (S_AXI_HP3_AWID),
|
||||||
|
.S_AWADDR (S_AXI_HP3_AWADDR),
|
||||||
|
.S_AWLEN (S_AXI_HP3_AWLEN),
|
||||||
|
.S_AWSIZE (S_AXI_HP3_AWSIZE),
|
||||||
|
.S_AWBURST (S_AXI_HP3_AWBURST),
|
||||||
|
.S_AWLOCK (S_AXI_HP3_AWLOCK),
|
||||||
|
.S_AWCACHE (S_AXI_HP3_AWCACHE),
|
||||||
|
.S_AWPROT (S_AXI_HP3_AWPROT),
|
||||||
|
.S_AWVALID (S_AXI_HP3_AWVALID),
|
||||||
|
.S_AWREADY (S_AXI_HP3_AWREADY),
|
||||||
|
// Write Data channel signals.
|
||||||
|
.S_WID (S_AXI_HP3_WID),
|
||||||
|
.S_WDATA (S_AXI_HP3_WDATA),
|
||||||
|
.S_WSTRB (S_AXI_HP3_WSTRB),
|
||||||
|
.S_WLAST (S_AXI_HP3_WLAST),
|
||||||
|
.S_WVALID (S_AXI_HP3_WVALID),
|
||||||
|
.S_WREADY (S_AXI_HP3_WREADY),
|
||||||
|
// Write Response channel signals.
|
||||||
|
.S_BID (S_AXI_HP3_BID),
|
||||||
|
.S_BRESP (S_AXI_HP3_BRESP),
|
||||||
|
.S_BVALID (S_AXI_HP3_BVALID),
|
||||||
|
.S_BREADY (S_AXI_HP3_BREADY),
|
||||||
|
// Read Address channel signals.
|
||||||
|
.S_ARID (S_AXI_HP3_ARID),
|
||||||
|
.S_ARADDR (S_AXI_HP3_ARADDR),
|
||||||
|
.S_ARLEN (S_AXI_HP3_ARLEN),
|
||||||
|
.S_ARSIZE (S_AXI_HP3_ARSIZE),
|
||||||
|
.S_ARBURST (S_AXI_HP3_ARBURST),
|
||||||
|
.S_ARLOCK (S_AXI_HP3_ARLOCK),
|
||||||
|
.S_ARCACHE (S_AXI_HP3_ARCACHE),
|
||||||
|
.S_ARPROT (S_AXI_HP3_ARPROT),
|
||||||
|
.S_ARVALID (S_AXI_HP3_ARVALID),
|
||||||
|
.S_ARREADY (S_AXI_HP3_ARREADY),
|
||||||
|
// Read Data channel signals.
|
||||||
|
.S_RID (S_AXI_HP3_RID),
|
||||||
|
.S_RDATA (S_AXI_HP3_RDATA),
|
||||||
|
.S_RRESP (S_AXI_HP3_RRESP),
|
||||||
|
.S_RLAST (S_AXI_HP3_RLAST),
|
||||||
|
.S_RVALID (S_AXI_HP3_RVALID),
|
||||||
|
.S_RREADY (S_AXI_HP3_RREADY),
|
||||||
|
// Side band signals
|
||||||
|
.S_AWQOS (S_AXI_HP3_AWQOS),
|
||||||
|
.S_ARQOS (S_AXI_HP3_ARQOS),
|
||||||
|
// these are needed only for HP ports
|
||||||
|
.S_RDISSUECAP1_EN (S_AXI_HP3_RDISSUECAP1_EN),
|
||||||
|
.S_WRISSUECAP1_EN (S_AXI_HP3_WRISSUECAP1_EN),
|
||||||
|
.S_RCOUNT (S_AXI_HP3_RCOUNT),
|
||||||
|
.S_WCOUNT (S_AXI_HP3_WCOUNT),
|
||||||
|
.S_RACOUNT (S_AXI_HP3_RACOUNT),
|
||||||
|
.S_WACOUNT (S_AXI_HP3_WACOUNT),
|
||||||
|
|
||||||
|
.SW_CLK (net_sw_clk),
|
||||||
|
.WR_DATA_ACK_DDR (net_wr_ack_ddr_hp3),
|
||||||
|
.WR_DATA_ACK_OCM (net_wr_ack_ocm_hp3),
|
||||||
|
.WR_DATA (net_wr_data_hp3),
|
||||||
|
.WR_ADDR (net_wr_addr_hp3),
|
||||||
|
.WR_BYTES (net_wr_bytes_hp3),
|
||||||
|
.WR_DATA_VALID_DDR (net_wr_dv_ddr_hp3),
|
||||||
|
.WR_DATA_VALID_OCM (net_wr_dv_ocm_hp3),
|
||||||
|
.WR_QOS (net_wr_qos_hp3),
|
||||||
|
.RD_REQ_DDR (net_rd_req_ddr_hp3),
|
||||||
|
.RD_REQ_OCM (net_rd_req_ocm_hp3),
|
||||||
|
.RD_ADDR (net_rd_addr_hp3),
|
||||||
|
.RD_DATA_DDR (net_rd_data_ddr_hp3),
|
||||||
|
.RD_DATA_OCM (net_rd_data_ocm_hp3),
|
||||||
|
.RD_BYTES (net_rd_bytes_hp3),
|
||||||
|
.RD_DATA_VALID_DDR (net_rd_dv_ddr_hp3),
|
||||||
|
.RD_DATA_VALID_OCM (net_rd_dv_ocm_hp3),
|
||||||
|
.RD_QOS (net_rd_qos_hp3)
|
||||||
|
);
|
@ -0,0 +1,239 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_local_params.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Parameters used in Zynq BFM
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/* local */
|
||||||
|
parameter m_axi_gp0_baseaddr = 32'h4000_0000;
|
||||||
|
parameter m_axi_gp1_baseaddr = 32'h8000_0000;
|
||||||
|
parameter m_axi_gp0_highaddr = 32'h7FFF_FFFF;
|
||||||
|
parameter m_axi_gp1_highaddr = 32'hBFFF_FFFF;
|
||||||
|
|
||||||
|
parameter addr_width = 32; // maximum address width
|
||||||
|
parameter data_width = 32; // maximum data width.
|
||||||
|
parameter max_chars = 128; // max characters for file name
|
||||||
|
parameter mem_width = data_width/8; /// memory width in bytes
|
||||||
|
parameter shft_addr_bits = clogb2(mem_width); /// Address to be right shifted
|
||||||
|
parameter int_width = 32; //integre width
|
||||||
|
|
||||||
|
/* for internal read/write APIs used for data transfers */
|
||||||
|
parameter max_burst_len = 16; /// maximum brst length on axi
|
||||||
|
parameter max_data_width = 64; // maximum data width for internal AXI bursts
|
||||||
|
parameter max_burst_bits = (max_data_width * max_burst_len); // maximum data width for internal AXI bursts
|
||||||
|
parameter max_burst_bytes = (max_burst_bits)/8; // maximum data bytes in each transfer
|
||||||
|
parameter max_burst_bytes_width = clogb2(max_burst_bytes); // maximum data width for internal AXI bursts
|
||||||
|
|
||||||
|
parameter max_registers = 32;
|
||||||
|
parameter max_regs_width = clogb2(max_registers);
|
||||||
|
|
||||||
|
parameter REG_MEM = 2'b00, DDR_MEM = 2'b01, OCM_MEM = 2'b10, INVALID_MEM_TYPE = 2'b11;
|
||||||
|
|
||||||
|
/* Interrupt bits supported */
|
||||||
|
parameter irq_width = 16;
|
||||||
|
|
||||||
|
/* GP Master0 & Master1 address decode */
|
||||||
|
parameter GP_M0 = 2'b01;
|
||||||
|
parameter GP_M1 = 2'b10;
|
||||||
|
|
||||||
|
parameter ALL_RANDOM= 2'b00;
|
||||||
|
parameter ALL_ZEROS = 2'b01;
|
||||||
|
parameter ALL_ONES = 2'b10;
|
||||||
|
|
||||||
|
parameter ddr_start_addr = 32'h0008_0000;
|
||||||
|
parameter ddr_end_addr = 32'h3FFF_FFFF;
|
||||||
|
|
||||||
|
parameter ocm_start_addr = 32'h0000_0000;
|
||||||
|
parameter ocm_end_addr = 32'h0003_FFFF;
|
||||||
|
parameter high_ocm_start_addr = 32'hFFFC_0000;
|
||||||
|
parameter high_ocm_end_addr = 32'hFFFF_FFFF;
|
||||||
|
parameter ocm_low_addr = 32'hFFFF_0000;
|
||||||
|
|
||||||
|
parameter reg_start_addr = 32'hE000_0000;
|
||||||
|
parameter reg_end_addr = 32'hF8F0_2F80;
|
||||||
|
|
||||||
|
|
||||||
|
/* for Master port APIs and AXI protocol related signal widths*/
|
||||||
|
parameter axi_burst_len = 16;
|
||||||
|
parameter axi_len_width = clogb2(axi_burst_len);
|
||||||
|
parameter axi_size_width = 3;
|
||||||
|
parameter axi_brst_type_width = 2;
|
||||||
|
parameter axi_lock_width = 2;
|
||||||
|
parameter axi_cache_width = 4;
|
||||||
|
parameter axi_prot_width = 3;
|
||||||
|
parameter axi_rsp_width = 2;
|
||||||
|
parameter axi_mgp_data_width = 32;
|
||||||
|
parameter axi_mgp_id_width = 12;
|
||||||
|
parameter axi_mgp_outstanding = 8;
|
||||||
|
parameter axi_mgp_wr_id = 12'hC00;
|
||||||
|
parameter axi_mgp_rd_id = 12'hC0C;
|
||||||
|
parameter axi_mgp0_name = "M_AXI_GP0";
|
||||||
|
parameter axi_mgp1_name = "M_AXI_GP1";
|
||||||
|
parameter axi_qos_width = 4;
|
||||||
|
parameter max_transfer_bytes = 128; // For Master APIs.
|
||||||
|
parameter max_transfer_bytes_width = clogb2(max_transfer_bytes); // For Master APIs.
|
||||||
|
|
||||||
|
|
||||||
|
/* for GP slave ports*/
|
||||||
|
parameter axi_sgp_data_width = 32;
|
||||||
|
parameter axi_sgp_id_width = 6;
|
||||||
|
parameter axi_sgp_rd_outstanding = 8;
|
||||||
|
parameter axi_sgp_wr_outstanding = 8;
|
||||||
|
parameter axi_sgp_outstanding = axi_sgp_rd_outstanding + axi_sgp_wr_outstanding;
|
||||||
|
parameter axi_sgp0_name = "S_AXI_GP0";
|
||||||
|
parameter axi_sgp1_name = "S_AXI_GP1";
|
||||||
|
|
||||||
|
/* for ACP slave ports*/
|
||||||
|
parameter axi_acp_data_width = 64;
|
||||||
|
parameter axi_acp_id_width = 3;
|
||||||
|
parameter axi_acp_rd_outstanding = 7;
|
||||||
|
parameter axi_acp_wr_outstanding = 3;
|
||||||
|
parameter axi_acp_outstanding = axi_acp_rd_outstanding + axi_acp_wr_outstanding;
|
||||||
|
parameter axi_acp_name = "S_AXI_ACP";
|
||||||
|
|
||||||
|
/* for HP slave ports*/
|
||||||
|
parameter axi_hp_id_width = 6;
|
||||||
|
parameter axi_hp_outstanding = 256; /// dynamic based on RCOUNT, WCOUNT ..
|
||||||
|
parameter axi_hp0_name = "S_AXI_HP0";
|
||||||
|
parameter axi_hp1_name = "S_AXI_HP1";
|
||||||
|
parameter axi_hp2_name = "S_AXI_HP2";
|
||||||
|
parameter axi_hp3_name = "S_AXI_HP3";
|
||||||
|
|
||||||
|
|
||||||
|
parameter axi_slv_excl_support = 0; // For Slave ports EXCL access is not supported
|
||||||
|
parameter axi_mst_excl_support = 1; // For Master ports EXCL access is supported
|
||||||
|
|
||||||
|
/* AXI transfer types */
|
||||||
|
parameter AXI_FIXED = 2'b00;
|
||||||
|
parameter AXI_INCR = 2'b01;
|
||||||
|
parameter AXI_WRAP = 2'b10;
|
||||||
|
|
||||||
|
/* Exclusive Access */
|
||||||
|
parameter AXI_NRML = 2'b00;
|
||||||
|
parameter AXI_EXCL = 2'b01;
|
||||||
|
parameter AXI_LOCK = 2'b10;
|
||||||
|
|
||||||
|
/* AXI Response types */
|
||||||
|
parameter AXI_OK = 2'b00;
|
||||||
|
parameter AXI_EXCL_OK = 2'b01;
|
||||||
|
parameter AXI_SLV_ERR = 2'b10;
|
||||||
|
parameter AXI_DEC_ERR = 2'b11;
|
||||||
|
|
||||||
|
function automatic integer clogb2;
|
||||||
|
input [31:0] value;
|
||||||
|
begin
|
||||||
|
value = value - 1;
|
||||||
|
for (clogb2 = 0; value > 0; clogb2 = clogb2 + 1) begin
|
||||||
|
value = value >> 1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
/* needed only for AFI modules and axi_slave modules for internal WRITE FIFOs and RESP FIFOs and interconnect fifo models */
|
||||||
|
/* WR FIFO data */
|
||||||
|
parameter wr_fifo_data_bits = axi_qos_width + addr_width + max_burst_bits + (max_burst_bytes_width+1);
|
||||||
|
parameter wr_bytes_lsb = 0;
|
||||||
|
parameter wr_bytes_msb = max_burst_bytes_width;
|
||||||
|
parameter wr_addr_lsb = wr_bytes_msb + 1;
|
||||||
|
parameter wr_addr_msb = wr_addr_lsb + addr_width-1;
|
||||||
|
parameter wr_data_lsb = wr_addr_msb + 1;
|
||||||
|
parameter wr_data_msb = wr_data_lsb + max_burst_bits-1;
|
||||||
|
parameter wr_qos_lsb = wr_data_msb + 1;
|
||||||
|
parameter wr_qos_msb = wr_qos_lsb + axi_qos_width-1;
|
||||||
|
|
||||||
|
/* WR AFI FIFO data */
|
||||||
|
/* ID - 1071:1066
|
||||||
|
Resp - 1065:1064
|
||||||
|
data - 1063:40
|
||||||
|
address - 39:8
|
||||||
|
valid_bytes - 7:0
|
||||||
|
*/
|
||||||
|
parameter wr_afi_fifo_data_bits = axi_qos_width + axi_len_width + axi_hp_id_width + axi_rsp_width + max_burst_bits + addr_width + (max_burst_bytes_width+1);
|
||||||
|
parameter wr_afi_bytes_lsb = 0;
|
||||||
|
parameter wr_afi_bytes_msb = max_burst_bytes_width;
|
||||||
|
parameter wr_afi_addr_lsb = wr_afi_bytes_msb + 1;
|
||||||
|
parameter wr_afi_addr_msb = wr_afi_addr_lsb + addr_width-1;
|
||||||
|
parameter wr_afi_data_lsb = wr_afi_addr_msb + 1;
|
||||||
|
parameter wr_afi_data_msb = wr_afi_data_lsb + max_burst_bits-1;
|
||||||
|
parameter wr_afi_rsp_lsb = wr_afi_data_msb + 1;
|
||||||
|
parameter wr_afi_rsp_msb = wr_afi_rsp_lsb + axi_rsp_width-1;
|
||||||
|
parameter wr_afi_id_lsb = wr_afi_rsp_msb + 1;
|
||||||
|
parameter wr_afi_id_msb = wr_afi_id_lsb + axi_hp_id_width-1;
|
||||||
|
parameter wr_afi_ln_lsb = wr_afi_id_msb + 1;
|
||||||
|
parameter wr_afi_ln_msb = wr_afi_ln_lsb + axi_len_width-1;
|
||||||
|
parameter wr_afi_qos_lsb = wr_afi_ln_msb + 1;
|
||||||
|
parameter wr_afi_qos_msb = wr_afi_qos_lsb + axi_qos_width-1;
|
||||||
|
|
||||||
|
|
||||||
|
parameter afi_fifo_size = 1024; /// AFI FIFO is stored as 1024-bytes
|
||||||
|
parameter afi_fifo_databits = 64; /// AFI FIFO is stored as 64-bits i.e 8 bytes per location (8 bytes(64-bits) * 128 locations = 1024 bytes)
|
||||||
|
parameter afi_fifo_locations= afi_fifo_size/(afi_fifo_databits/8); /// AFI FIFO is stored as 128-locations with 8 bytes per location
|
||||||
|
|
||||||
|
/* for interconnect fifo models */
|
||||||
|
parameter intr_max_outstanding = 8;
|
||||||
|
parameter intr_cnt_width = clogb2(intr_max_outstanding)+1;
|
||||||
|
parameter rd_info_bits = addr_width + axi_size_width + axi_brst_type_width + axi_len_width + axi_hp_id_width + axi_rsp_width + (max_burst_bytes_width+1);
|
||||||
|
parameter rd_afi_fifo_bits = max_burst_bits + rd_info_bits ;
|
||||||
|
|
||||||
|
//Read Burst Data, addr, size, burst, len, RID, RRESP, valid bytes
|
||||||
|
parameter rd_afi_bytes_lsb = 0;
|
||||||
|
parameter rd_afi_bytes_msb = max_burst_bytes_width;
|
||||||
|
parameter rd_afi_rsp_lsb = rd_afi_bytes_msb + 1;
|
||||||
|
parameter rd_afi_rsp_msb = rd_afi_rsp_lsb + axi_rsp_width-1;
|
||||||
|
parameter rd_afi_id_lsb = rd_afi_rsp_msb + 1;
|
||||||
|
parameter rd_afi_id_msb = rd_afi_id_lsb + axi_hp_id_width-1;
|
||||||
|
parameter rd_afi_ln_lsb = rd_afi_id_msb + 1;
|
||||||
|
parameter rd_afi_ln_msb = rd_afi_ln_lsb + axi_len_width-1;
|
||||||
|
parameter rd_afi_brst_lsb = rd_afi_ln_msb + 1;
|
||||||
|
parameter rd_afi_brst_msb = rd_afi_brst_lsb + axi_brst_type_width-1;
|
||||||
|
parameter rd_afi_siz_lsb = rd_afi_brst_msb + 1;
|
||||||
|
parameter rd_afi_siz_msb = rd_afi_siz_lsb + axi_size_width-1;
|
||||||
|
parameter rd_afi_addr_lsb = rd_afi_siz_msb + 1;
|
||||||
|
parameter rd_afi_addr_msb = rd_afi_addr_lsb + addr_width-1;
|
||||||
|
parameter rd_afi_data_lsb = rd_afi_addr_msb + 1;
|
||||||
|
parameter rd_afi_data_msb = rd_afi_data_lsb + max_burst_bits-1;
|
||||||
|
|
||||||
|
|
||||||
|
/* Latency types */
|
||||||
|
parameter BEST_CASE = 0;
|
||||||
|
parameter AVG_CASE = 1;
|
||||||
|
parameter WORST_CASE = 2;
|
||||||
|
parameter RANDOM_CASE = 3;
|
||||||
|
|
||||||
|
/* Latency Parameters ACP */
|
||||||
|
parameter acp_wr_min = 21;
|
||||||
|
parameter acp_wr_avg = 16;
|
||||||
|
parameter acp_wr_max = 27;
|
||||||
|
parameter acp_rd_min = 34;
|
||||||
|
parameter acp_rd_avg = 125;
|
||||||
|
parameter acp_rd_max = 130;
|
||||||
|
|
||||||
|
/* Latency Parameters GP */
|
||||||
|
parameter gp_wr_min = 21;
|
||||||
|
parameter gp_wr_avg = 16;
|
||||||
|
parameter gp_wr_max = 46;
|
||||||
|
parameter gp_rd_min = 38;
|
||||||
|
parameter gp_rd_avg = 125;
|
||||||
|
parameter gp_rd_max = 130;
|
||||||
|
|
||||||
|
/* Latency Parameters HP */
|
||||||
|
parameter afi_wr_min = 37;
|
||||||
|
parameter afi_wr_avg = 41;
|
||||||
|
parameter afi_wr_max = 42;
|
||||||
|
parameter afi_rd_min = 41;
|
||||||
|
parameter afi_rd_avg = 221;
|
||||||
|
parameter afi_rd_max = 229;
|
||||||
|
|
||||||
|
/* ID VALID and INVALID */
|
||||||
|
parameter secure_access_enabled = 0;
|
||||||
|
parameter id_invalid = 0;
|
||||||
|
parameter id_valid = 1;
|
||||||
|
|
||||||
|
/* Display */
|
||||||
|
parameter DISP_INFO = "*ZYNQ_BFM_INFO";
|
||||||
|
parameter DISP_WARN = "*ZYNQ_BFM_WARNING";
|
||||||
|
parameter DISP_ERR = "*ZYNQ_BFM_ERROR";
|
||||||
|
parameter DISP_INT_INFO = "ZYNQ_BFM_INT_INFO";
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,433 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_unused_ports.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Semantic checks for unused ports.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/* CAN */
|
||||||
|
assign CAN0_PHY_TX = 0;
|
||||||
|
assign CAN1_PHY_TX = 0;
|
||||||
|
always @(CAN0_PHY_RX or CAN1_PHY_RX)
|
||||||
|
begin
|
||||||
|
if(CAN0_PHY_RX | CAN1_PHY_RX)
|
||||||
|
$display("[%0d] : %0s : CAN Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* ETHERNET */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
assign ENET0_GMII_TX_EN = 0;
|
||||||
|
assign ENET0_GMII_TX_ER = 0;
|
||||||
|
assign ENET0_MDIO_MDC = 0;
|
||||||
|
assign ENET0_MDIO_O = 0; /// confirm
|
||||||
|
assign ENET0_MDIO_T = 0;
|
||||||
|
assign ENET0_PTP_DELAY_REQ_RX = 0;
|
||||||
|
assign ENET0_PTP_DELAY_REQ_TX = 0;
|
||||||
|
assign ENET0_PTP_PDELAY_REQ_RX = 0;
|
||||||
|
assign ENET0_PTP_PDELAY_REQ_TX = 0;
|
||||||
|
assign ENET0_PTP_PDELAY_RESP_RX = 0;
|
||||||
|
assign ENET0_PTP_PDELAY_RESP_TX = 0;
|
||||||
|
assign ENET0_PTP_SYNC_FRAME_RX = 0;
|
||||||
|
assign ENET0_PTP_SYNC_FRAME_TX = 0;
|
||||||
|
assign ENET0_SOF_RX = 0;
|
||||||
|
assign ENET0_SOF_TX = 0;
|
||||||
|
assign ENET0_GMII_TXD = 0;
|
||||||
|
always@(ENET0_GMII_COL or ENET0_GMII_CRS or ENET0_EXT_INTIN or
|
||||||
|
ENET0_GMII_RX_CLK or ENET0_GMII_RX_DV or ENET0_GMII_RX_ER or
|
||||||
|
ENET0_GMII_TX_CLK or ENET0_MDIO_I or ENET0_GMII_RXD)
|
||||||
|
begin
|
||||||
|
if(ENET0_GMII_COL | ENET0_GMII_CRS | ENET0_EXT_INTIN |
|
||||||
|
ENET0_GMII_RX_CLK | ENET0_GMII_RX_DV | ENET0_GMII_RX_ER |
|
||||||
|
ENET0_GMII_TX_CLK | ENET0_MDIO_I )
|
||||||
|
$display("[%0d] : %0s : ETHERNET Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
assign ENET1_GMII_TX_EN = 0;
|
||||||
|
assign ENET1_GMII_TX_ER = 0;
|
||||||
|
assign ENET1_MDIO_MDC = 0;
|
||||||
|
assign ENET1_MDIO_O = 0;/// confirm
|
||||||
|
assign ENET1_MDIO_T = 0;
|
||||||
|
assign ENET1_PTP_DELAY_REQ_RX = 0;
|
||||||
|
assign ENET1_PTP_DELAY_REQ_TX = 0;
|
||||||
|
assign ENET1_PTP_PDELAY_REQ_RX = 0;
|
||||||
|
assign ENET1_PTP_PDELAY_REQ_TX = 0;
|
||||||
|
assign ENET1_PTP_PDELAY_RESP_RX = 0;
|
||||||
|
assign ENET1_PTP_PDELAY_RESP_TX = 0;
|
||||||
|
assign ENET1_PTP_SYNC_FRAME_RX = 0;
|
||||||
|
assign ENET1_PTP_SYNC_FRAME_TX = 0;
|
||||||
|
assign ENET1_SOF_RX = 0;
|
||||||
|
assign ENET1_SOF_TX = 0;
|
||||||
|
assign ENET1_GMII_TXD = 0;
|
||||||
|
always@(ENET1_GMII_COL or ENET1_GMII_CRS or ENET1_EXT_INTIN or
|
||||||
|
ENET1_GMII_RX_CLK or ENET1_GMII_RX_DV or ENET1_GMII_RX_ER or
|
||||||
|
ENET1_GMII_TX_CLK or ENET1_MDIO_I or ENET1_GMII_RXD)
|
||||||
|
begin
|
||||||
|
if(ENET1_GMII_COL | ENET1_GMII_CRS | ENET1_EXT_INTIN |
|
||||||
|
ENET1_GMII_RX_CLK | ENET1_GMII_RX_DV | ENET1_GMII_RX_ER |
|
||||||
|
ENET1_GMII_TX_CLK | ENET1_MDIO_I )
|
||||||
|
$display("[%0d] : %0s : ETHERNET Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* GPIO */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
assign GPIO_O = 0;
|
||||||
|
assign GPIO_T = 0;
|
||||||
|
always@(GPIO_I)
|
||||||
|
begin
|
||||||
|
if(GPIO_I !== 0)
|
||||||
|
$display("[%0d] : %0s : GPIO Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* I2C */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
assign I2C0_SDA_O = 0;
|
||||||
|
assign I2C0_SDA_T = 0;
|
||||||
|
assign I2C0_SCL_O = 0;
|
||||||
|
assign I2C0_SCL_T = 0;
|
||||||
|
assign I2C1_SDA_O = 0;
|
||||||
|
assign I2C1_SDA_T = 0;
|
||||||
|
assign I2C1_SCL_O = 0;
|
||||||
|
assign I2C1_SCL_T = 0;
|
||||||
|
always@(I2C0_SDA_I or I2C0_SCL_I or I2C1_SDA_I or I2C1_SCL_I )
|
||||||
|
begin
|
||||||
|
if(I2C0_SDA_I | I2C0_SCL_I | I2C1_SDA_I | I2C1_SCL_I)
|
||||||
|
$display("[%0d] : %0s : I2C Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* JTAG */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
assign PJTAG_TD_T = 0;
|
||||||
|
assign PJTAG_TD_O = 0;
|
||||||
|
always@(PJTAG_TCK or PJTAG_TMS or PJTAG_TD_I)
|
||||||
|
begin
|
||||||
|
if(PJTAG_TCK | PJTAG_TMS | PJTAG_TD_I)
|
||||||
|
$display("[%0d] : %0s : JTAG Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* SDIO */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
assign SDIO0_CLK = 0;
|
||||||
|
assign SDIO0_CMD_O = 0;
|
||||||
|
assign SDIO0_CMD_T = 0;
|
||||||
|
assign SDIO0_DATA_O = 0;
|
||||||
|
assign SDIO0_DATA_T = 0;
|
||||||
|
assign SDIO0_LED = 0;
|
||||||
|
assign SDIO0_BUSPOW = 0;
|
||||||
|
assign SDIO0_BUSVOLT = 0;
|
||||||
|
always@(SDIO0_CLK_FB or SDIO0_CMD_I or SDIO0_DATA_I or SDIO0_CDN or SDIO0_WP )
|
||||||
|
begin
|
||||||
|
if(SDIO0_CLK_FB | SDIO0_CMD_I | SDIO0_CDN | SDIO0_WP )
|
||||||
|
$display("[%0d] : %0s : SDIO Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
assign SDIO1_CLK = 0;
|
||||||
|
assign SDIO1_CMD_O = 0;
|
||||||
|
assign SDIO1_CMD_T = 0;
|
||||||
|
assign SDIO1_DATA_O = 0;
|
||||||
|
assign SDIO1_DATA_T = 0;
|
||||||
|
assign SDIO1_LED = 0;
|
||||||
|
assign SDIO1_BUSPOW = 0;
|
||||||
|
assign SDIO1_BUSVOLT = 0;
|
||||||
|
always@(SDIO1_CLK_FB or SDIO1_CMD_I or SDIO1_DATA_I or SDIO1_CDN or SDIO1_WP )
|
||||||
|
begin
|
||||||
|
if(SDIO1_CLK_FB | SDIO1_CMD_I | SDIO1_CDN | SDIO1_WP )
|
||||||
|
$display("[%0d] : %0s : SDIO Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* SPI */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
assign SPI0_SCLK_O = 0;
|
||||||
|
assign SPI0_SCLK_T = 0;
|
||||||
|
assign SPI0_MOSI_O = 0;
|
||||||
|
assign SPI0_MOSI_T = 0;
|
||||||
|
assign SPI0_MISO_O = 0;
|
||||||
|
assign SPI0_MISO_T = 0;
|
||||||
|
assign SPI0_SS_O = 0; /// confirm
|
||||||
|
assign SPI0_SS1_O = 0;/// confirm
|
||||||
|
assign SPI0_SS2_O = 0;/// confirm
|
||||||
|
assign SPI0_SS_T = 0;
|
||||||
|
always@(SPI0_SCLK_I or SPI0_MOSI_I or SPI0_MISO_I or SPI0_SS_I)
|
||||||
|
begin
|
||||||
|
if(SPI0_SCLK_I | SPI0_MOSI_I | SPI0_MISO_I | SPI0_SS_I)
|
||||||
|
$display("[%0d] : %0s : SPI Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
assign SPI1_SCLK_O = 0;
|
||||||
|
assign SPI1_SCLK_T = 0;
|
||||||
|
assign SPI1_MOSI_O = 0;
|
||||||
|
assign SPI1_MOSI_T = 0;
|
||||||
|
assign SPI1_MISO_O = 0;
|
||||||
|
assign SPI1_MISO_T = 0;
|
||||||
|
assign SPI1_SS_O = 0;
|
||||||
|
assign SPI1_SS1_O = 0;
|
||||||
|
assign SPI1_SS2_O = 0;
|
||||||
|
assign SPI1_SS_T = 0;
|
||||||
|
always@(SPI1_SCLK_I or SPI1_MOSI_I or SPI1_MISO_I or SPI1_SS_I)
|
||||||
|
begin
|
||||||
|
if(SPI1_SCLK_I | SPI1_MOSI_I | SPI1_MISO_I | SPI1_SS_I)
|
||||||
|
$display("[%0d] : %0s : SPI Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* UART */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/// confirm
|
||||||
|
assign UART0_DTRN = 0;
|
||||||
|
assign UART0_RTSN = 0;
|
||||||
|
assign UART0_TX = 0;
|
||||||
|
always@(UART0_CTSN or UART0_DCDN or UART0_DSRN or UART0_RIN or UART0_RX)
|
||||||
|
begin
|
||||||
|
if(UART0_CTSN | UART0_DCDN | UART0_DSRN | UART0_RIN | UART0_RX)
|
||||||
|
$display("[%0d] : %0s : UART Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
assign UART1_DTRN = 0;
|
||||||
|
assign UART1_RTSN = 0;
|
||||||
|
assign UART1_TX = 0;
|
||||||
|
always@(UART1_CTSN or UART1_DCDN or UART1_DSRN or UART1_RIN or UART1_RX)
|
||||||
|
begin
|
||||||
|
if(UART1_CTSN | UART1_DCDN | UART1_DSRN | UART1_RIN | UART1_RX)
|
||||||
|
$display("[%0d] : %0s : UART Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* TTC */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
assign TTC0_WAVE0_OUT = 0;
|
||||||
|
assign TTC0_WAVE1_OUT = 0;
|
||||||
|
assign TTC0_WAVE2_OUT = 0;
|
||||||
|
always@(TTC0_CLK0_IN or TTC0_CLK1_IN or TTC0_CLK2_IN)
|
||||||
|
begin
|
||||||
|
if(TTC0_CLK0_IN | TTC0_CLK1_IN | TTC0_CLK2_IN)
|
||||||
|
$display("[%0d] : %0s : TTC Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
assign TTC1_WAVE0_OUT = 0;
|
||||||
|
assign TTC1_WAVE1_OUT = 0;
|
||||||
|
assign TTC1_WAVE2_OUT = 0;
|
||||||
|
always@(TTC1_CLK0_IN or TTC1_CLK1_IN or TTC1_CLK2_IN)
|
||||||
|
begin
|
||||||
|
if(TTC1_CLK0_IN | TTC1_CLK1_IN | TTC1_CLK2_IN)
|
||||||
|
$display("[%0d] : %0s : TTC Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* WDT */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
assign WDT_RST_OUT = 0;
|
||||||
|
always@(WDT_CLK_IN)
|
||||||
|
begin
|
||||||
|
if(WDT_CLK_IN)
|
||||||
|
$display("[%0d] : %0s : WDT Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* TRACE */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
assign TRACE_CTL = 0;
|
||||||
|
assign TRACE_DATA = 0;
|
||||||
|
always@(TRACE_CLK)
|
||||||
|
begin
|
||||||
|
if(TRACE_CLK)
|
||||||
|
$display("[%0d] : %0s : TRACE Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* USB */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
assign USB0_PORT_INDCTL = 0;
|
||||||
|
assign USB0_VBUS_PWRSELECT = 0;
|
||||||
|
always@(USB0_VBUS_PWRFAULT)
|
||||||
|
begin
|
||||||
|
if(USB0_VBUS_PWRFAULT)
|
||||||
|
$display("[%0d] : %0s : USB Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
assign USB1_PORT_INDCTL = 0;
|
||||||
|
assign USB1_VBUS_PWRSELECT = 0;
|
||||||
|
always@(USB1_VBUS_PWRFAULT)
|
||||||
|
begin
|
||||||
|
if(USB1_VBUS_PWRFAULT)
|
||||||
|
$display("[%0d] : %0s : USB Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
always@(SRAM_INTIN)
|
||||||
|
begin
|
||||||
|
if(SRAM_INTIN)
|
||||||
|
$display("[%0d] : %0s : SRAM_INTIN is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* DMA */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
assign DMA0_DATYPE = 0;
|
||||||
|
assign DMA0_DAVALID = 0;
|
||||||
|
assign DMA0_DRREADY = 0;
|
||||||
|
assign DMA0_RSTN = 0;
|
||||||
|
always@(DMA0_ACLK or DMA0_DAREADY or DMA0_DRLAST or DMA0_DRVALID or DMA0_DRTYPE)
|
||||||
|
begin
|
||||||
|
if(DMA0_ACLK | DMA0_DAREADY | DMA0_DRLAST | DMA0_DRVALID | DMA0_DRTYPE)
|
||||||
|
$display("[%0d] : %0s : DMA Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
assign DMA1_DATYPE = 0;
|
||||||
|
assign DMA1_DAVALID = 0;
|
||||||
|
assign DMA1_DRREADY = 0;
|
||||||
|
assign DMA1_RSTN = 0;
|
||||||
|
always@(DMA1_ACLK or DMA1_DAREADY or DMA1_DRLAST or DMA1_DRVALID or DMA1_DRTYPE)
|
||||||
|
begin
|
||||||
|
if(DMA1_ACLK | DMA1_DAREADY | DMA1_DRLAST | DMA1_DRVALID | DMA1_DRTYPE)
|
||||||
|
$display("[%0d] : %0s : DMA Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
assign DMA2_DATYPE = 0;
|
||||||
|
assign DMA2_DAVALID = 0;
|
||||||
|
assign DMA2_DRREADY = 0;
|
||||||
|
assign DMA2_RSTN = 0;
|
||||||
|
always@(DMA2_ACLK or DMA2_DAREADY or DMA2_DRLAST or DMA2_DRVALID or DMA2_DRTYPE)
|
||||||
|
begin
|
||||||
|
if(DMA2_ACLK | DMA2_DAREADY | DMA2_DRLAST | DMA2_DRVALID | DMA2_DRTYPE)
|
||||||
|
$display("[%0d] : %0s : DMA Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
assign DMA3_DATYPE = 0;
|
||||||
|
assign DMA3_DAVALID = 0;
|
||||||
|
assign DMA3_DRREADY = 0;
|
||||||
|
assign DMA3_RSTN = 0;
|
||||||
|
always@(DMA3_ACLK or DMA3_DAREADY or DMA3_DRLAST or DMA3_DRVALID or DMA3_DRTYPE)
|
||||||
|
begin
|
||||||
|
if(DMA3_ACLK | DMA3_DAREADY | DMA3_DRLAST | DMA3_DRVALID | DMA3_DRTYPE)
|
||||||
|
$display("[%0d] : %0s : DMA Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* FTM */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
assign FTMT_F2P_TRIGACK = 0;
|
||||||
|
assign FTMT_P2F_TRIG = 0;
|
||||||
|
assign FTMT_P2F_DEBUG = 0;
|
||||||
|
always@(FTMD_TRACEIN_DATA or FTMD_TRACEIN_VALID or FTMD_TRACEIN_CLK or
|
||||||
|
FTMD_TRACEIN_ATID or FTMT_F2P_TRIG or FTMT_F2P_DEBUG or FTMT_P2F_TRIGACK)
|
||||||
|
begin
|
||||||
|
if(FTMD_TRACEIN_DATA | FTMD_TRACEIN_VALID | FTMD_TRACEIN_CLK | FTMD_TRACEIN_ATID | FTMT_F2P_TRIG | FTMT_F2P_DEBUG | FTMT_P2F_TRIGACK)
|
||||||
|
$display("[%0d] : %0s : FTM Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* EVENT */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
assign EVENT_EVENTO = 0;
|
||||||
|
assign EVENT_STANDBYWFE = 0;
|
||||||
|
assign EVENT_STANDBYWFI = 0;
|
||||||
|
always@(EVENT_EVENTI)
|
||||||
|
begin
|
||||||
|
if(EVENT_EVENTI)
|
||||||
|
$display("[%0d] : %0s : EVENT Interface is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* MIO */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
always@(MIO)
|
||||||
|
begin
|
||||||
|
if(MIO !== 0)
|
||||||
|
$display("[%0d] : %0s : MIO is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* FCLK_TRIG */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
always@(FCLK_CLKTRIG3_N or FCLK_CLKTRIG2_N or FCLK_CLKTRIG1_N or FCLK_CLKTRIG0_N )
|
||||||
|
begin
|
||||||
|
if(FCLK_CLKTRIG3_N | FCLK_CLKTRIG2_N | FCLK_CLKTRIG1_N | FCLK_CLKTRIG0_N )
|
||||||
|
$display("[%0d] : %0s : FCLK_TRIG is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* MISC */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
always@(FPGA_IDLE_N)
|
||||||
|
begin
|
||||||
|
if(FPGA_IDLE_N)
|
||||||
|
$display("[%0d] : %0s : FPGA_IDLE_N is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
always@(DDR_ARB)
|
||||||
|
begin
|
||||||
|
if(DDR_ARB !== 0)
|
||||||
|
$display("[%0d] : %0s : DDR_ARB is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
always@(Core0_nFIQ or Core0_nIRQ or Core1_nFIQ or Core1_nIRQ )
|
||||||
|
begin
|
||||||
|
if(Core0_nFIQ | Core0_nIRQ | Core1_nFIQ | Core1_nIRQ)
|
||||||
|
$display("[%0d] : %0s : CORE FIQ,IRQ is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* DDR */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
assign DDR_WEB = 0;
|
||||||
|
always@(DDR_Clk or DDR_CS_n)
|
||||||
|
begin
|
||||||
|
if(!DDR_CS_n)
|
||||||
|
$display("[%0d] : %0s : EXTERNAL DDR is not supported.",$time, DISP_ERR);
|
||||||
|
end
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
/* IRQ_P2F */
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
|
||||||
|
assign IRQ_P2F_DMAC_ABORT = 0;
|
||||||
|
assign IRQ_P2F_DMAC0 = 0;
|
||||||
|
assign IRQ_P2F_DMAC1 = 0;
|
||||||
|
assign IRQ_P2F_DMAC2 = 0;
|
||||||
|
assign IRQ_P2F_DMAC3 = 0;
|
||||||
|
assign IRQ_P2F_DMAC4 = 0;
|
||||||
|
assign IRQ_P2F_DMAC5 = 0;
|
||||||
|
assign IRQ_P2F_DMAC6 = 0;
|
||||||
|
assign IRQ_P2F_DMAC7 = 0;
|
||||||
|
assign IRQ_P2F_SMC = 0;
|
||||||
|
assign IRQ_P2F_QSPI = 0;
|
||||||
|
assign IRQ_P2F_CTI = 0;
|
||||||
|
assign IRQ_P2F_GPIO = 0;
|
||||||
|
assign IRQ_P2F_USB0 = 0;
|
||||||
|
assign IRQ_P2F_ENET0 = 0;
|
||||||
|
assign IRQ_P2F_ENET_WAKE0 = 0;
|
||||||
|
assign IRQ_P2F_SDIO0 = 0;
|
||||||
|
assign IRQ_P2F_I2C0 = 0;
|
||||||
|
assign IRQ_P2F_SPI0 = 0;
|
||||||
|
assign IRQ_P2F_UART0 = 0;
|
||||||
|
assign IRQ_P2F_CAN0 = 0;
|
||||||
|
assign IRQ_P2F_USB1 = 0;
|
||||||
|
assign IRQ_P2F_ENET1 = 0;
|
||||||
|
assign IRQ_P2F_ENET_WAKE1 = 0;
|
||||||
|
assign IRQ_P2F_SDIO1 = 0;
|
||||||
|
assign IRQ_P2F_I2C1 = 0;
|
||||||
|
assign IRQ_P2F_SPI1 = 0;
|
||||||
|
assign IRQ_P2F_UART1 = 0;
|
||||||
|
assign IRQ_P2F_CAN1 = 0;
|
@ -0,0 +1,978 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_afi_slave.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Model that acts as AFI port interface. It uses AXI3 Slave BFM
|
||||||
|
* from Cadence.
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_afi_slave (
|
||||||
|
S_RESETN,
|
||||||
|
|
||||||
|
S_ARREADY,
|
||||||
|
S_AWREADY,
|
||||||
|
S_BVALID,
|
||||||
|
S_RLAST,
|
||||||
|
S_RVALID,
|
||||||
|
S_WREADY,
|
||||||
|
S_BRESP,
|
||||||
|
S_RRESP,
|
||||||
|
S_RDATA,
|
||||||
|
S_BID,
|
||||||
|
S_RID,
|
||||||
|
S_ACLK,
|
||||||
|
S_ARVALID,
|
||||||
|
S_AWVALID,
|
||||||
|
S_BREADY,
|
||||||
|
S_RREADY,
|
||||||
|
S_WLAST,
|
||||||
|
S_WVALID,
|
||||||
|
S_ARBURST,
|
||||||
|
S_ARLOCK,
|
||||||
|
S_ARSIZE,
|
||||||
|
S_AWBURST,
|
||||||
|
S_AWLOCK,
|
||||||
|
S_AWSIZE,
|
||||||
|
S_ARPROT,
|
||||||
|
S_AWPROT,
|
||||||
|
S_ARADDR,
|
||||||
|
S_AWADDR,
|
||||||
|
S_WDATA,
|
||||||
|
S_ARCACHE,
|
||||||
|
S_ARLEN,
|
||||||
|
S_AWCACHE,
|
||||||
|
S_AWLEN,
|
||||||
|
S_WSTRB,
|
||||||
|
S_ARID,
|
||||||
|
S_AWID,
|
||||||
|
S_WID,
|
||||||
|
|
||||||
|
S_AWQOS,
|
||||||
|
S_ARQOS,
|
||||||
|
|
||||||
|
SW_CLK,
|
||||||
|
WR_DATA_ACK_OCM,
|
||||||
|
WR_DATA_ACK_DDR,
|
||||||
|
WR_ADDR,
|
||||||
|
WR_DATA,
|
||||||
|
WR_BYTES,
|
||||||
|
WR_DATA_VALID_OCM,
|
||||||
|
WR_DATA_VALID_DDR,
|
||||||
|
WR_QOS,
|
||||||
|
|
||||||
|
RD_REQ_DDR,
|
||||||
|
RD_REQ_OCM,
|
||||||
|
RD_ADDR,
|
||||||
|
RD_DATA_OCM,
|
||||||
|
RD_DATA_DDR,
|
||||||
|
RD_BYTES,
|
||||||
|
RD_QOS,
|
||||||
|
RD_DATA_VALID_OCM,
|
||||||
|
RD_DATA_VALID_DDR,
|
||||||
|
S_RDISSUECAP1_EN,
|
||||||
|
S_WRISSUECAP1_EN,
|
||||||
|
S_RCOUNT,
|
||||||
|
S_WCOUNT,
|
||||||
|
S_RACOUNT,
|
||||||
|
S_WACOUNT
|
||||||
|
|
||||||
|
);
|
||||||
|
parameter enable_this_port = 0;
|
||||||
|
parameter slave_name = "Slave";
|
||||||
|
parameter data_bus_width = 32;
|
||||||
|
parameter address_bus_width = 32;
|
||||||
|
parameter id_bus_width = 6;
|
||||||
|
parameter slave_base_address = 0;
|
||||||
|
parameter slave_high_address = 4;
|
||||||
|
parameter max_outstanding_transactions = 8;
|
||||||
|
parameter exclusive_access_supported = 0;
|
||||||
|
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
|
||||||
|
/* Local parameters only for this module */
|
||||||
|
/* Internal counters that are used as Read/Write pointers to the fifo's that store all the transaction info on all channles.
|
||||||
|
This parameter is used to define the width of these pointers --> depending on Maximum outstanding transactions supported.
|
||||||
|
1-bit extra width than the no.of.bits needed to represent the outstanding transactions
|
||||||
|
Extra bit helps in generating the empty and full flags
|
||||||
|
*/
|
||||||
|
parameter int_cntr_width = clogb2(max_outstanding_transactions)+1;
|
||||||
|
|
||||||
|
/* RESP data */
|
||||||
|
parameter rsp_fifo_bits = axi_rsp_width+id_bus_width;
|
||||||
|
parameter rsp_lsb = 0;
|
||||||
|
parameter rsp_msb = axi_rsp_width-1;
|
||||||
|
parameter rsp_id_lsb = rsp_msb + 1;
|
||||||
|
parameter rsp_id_msb = rsp_id_lsb + id_bus_width-1;
|
||||||
|
|
||||||
|
input S_RESETN;
|
||||||
|
|
||||||
|
output S_ARREADY;
|
||||||
|
output S_AWREADY;
|
||||||
|
output S_BVALID;
|
||||||
|
output S_RLAST;
|
||||||
|
output S_RVALID;
|
||||||
|
output S_WREADY;
|
||||||
|
output [axi_rsp_width-1:0] S_BRESP;
|
||||||
|
output [axi_rsp_width-1:0] S_RRESP;
|
||||||
|
output [data_bus_width-1:0] S_RDATA;
|
||||||
|
output [id_bus_width-1:0] S_BID;
|
||||||
|
output [id_bus_width-1:0] S_RID;
|
||||||
|
input S_ACLK;
|
||||||
|
input S_ARVALID;
|
||||||
|
input S_AWVALID;
|
||||||
|
input S_BREADY;
|
||||||
|
input S_RREADY;
|
||||||
|
input S_WLAST;
|
||||||
|
input S_WVALID;
|
||||||
|
input [axi_brst_type_width-1:0] S_ARBURST;
|
||||||
|
input [axi_lock_width-1:0] S_ARLOCK;
|
||||||
|
input [axi_size_width-1:0] S_ARSIZE;
|
||||||
|
input [axi_brst_type_width-1:0] S_AWBURST;
|
||||||
|
input [axi_lock_width-1:0] S_AWLOCK;
|
||||||
|
input [axi_size_width-1:0] S_AWSIZE;
|
||||||
|
input [axi_prot_width-1:0] S_ARPROT;
|
||||||
|
input [axi_prot_width-1:0] S_AWPROT;
|
||||||
|
input [address_bus_width-1:0] S_ARADDR;
|
||||||
|
input [address_bus_width-1:0] S_AWADDR;
|
||||||
|
input [data_bus_width-1:0] S_WDATA;
|
||||||
|
input [axi_cache_width-1:0] S_ARCACHE;
|
||||||
|
input [axi_cache_width-1:0] S_ARLEN;
|
||||||
|
|
||||||
|
input [axi_qos_width-1:0] S_ARQOS;
|
||||||
|
|
||||||
|
input [axi_cache_width-1:0] S_AWCACHE;
|
||||||
|
input [axi_len_width-1:0] S_AWLEN;
|
||||||
|
|
||||||
|
input [axi_qos_width-1:0] S_AWQOS;
|
||||||
|
input [(data_bus_width/8)-1:0] S_WSTRB;
|
||||||
|
input [id_bus_width-1:0] S_ARID;
|
||||||
|
input [id_bus_width-1:0] S_AWID;
|
||||||
|
input [id_bus_width-1:0] S_WID;
|
||||||
|
|
||||||
|
input SW_CLK;
|
||||||
|
input WR_DATA_ACK_DDR, WR_DATA_ACK_OCM;
|
||||||
|
output WR_DATA_VALID_DDR, WR_DATA_VALID_OCM;
|
||||||
|
output [max_burst_bits-1:0] WR_DATA;
|
||||||
|
output [addr_width-1:0] WR_ADDR;
|
||||||
|
output [max_transfer_bytes_width:0] WR_BYTES;
|
||||||
|
output reg RD_REQ_OCM, RD_REQ_DDR;
|
||||||
|
output reg [addr_width-1:0] RD_ADDR;
|
||||||
|
input [max_burst_bits-1:0] RD_DATA_DDR,RD_DATA_OCM;
|
||||||
|
output reg[max_transfer_bytes_width:0] RD_BYTES;
|
||||||
|
input RD_DATA_VALID_OCM,RD_DATA_VALID_DDR;
|
||||||
|
output [axi_qos_width-1:0] WR_QOS;
|
||||||
|
output reg [axi_qos_width-1:0] RD_QOS;
|
||||||
|
|
||||||
|
input S_RDISSUECAP1_EN;
|
||||||
|
input S_WRISSUECAP1_EN;
|
||||||
|
|
||||||
|
output [7:0] S_RCOUNT;
|
||||||
|
output [7:0] S_WCOUNT;
|
||||||
|
output [2:0] S_RACOUNT;
|
||||||
|
output [5:0] S_WACOUNT;
|
||||||
|
|
||||||
|
wire net_ARVALID;
|
||||||
|
wire net_AWVALID;
|
||||||
|
wire net_WVALID;
|
||||||
|
|
||||||
|
real s_aclk_period;
|
||||||
|
|
||||||
|
cdn_axi3_slave_bfm #(slave_name,
|
||||||
|
data_bus_width,
|
||||||
|
address_bus_width,
|
||||||
|
id_bus_width,
|
||||||
|
slave_base_address,
|
||||||
|
(slave_high_address- slave_base_address),
|
||||||
|
max_outstanding_transactions,
|
||||||
|
0, ///MEMORY_MODEL_MODE,
|
||||||
|
exclusive_access_supported)
|
||||||
|
slave (.ACLK (S_ACLK),
|
||||||
|
.ARESETn (S_RESETN), /// confirm this
|
||||||
|
// Write Address Channel
|
||||||
|
.AWID (S_AWID),
|
||||||
|
.AWADDR (S_AWADDR),
|
||||||
|
.AWLEN (S_AWLEN),
|
||||||
|
.AWSIZE (S_AWSIZE),
|
||||||
|
.AWBURST (S_AWBURST),
|
||||||
|
.AWLOCK (S_AWLOCK),
|
||||||
|
.AWCACHE (S_AWCACHE),
|
||||||
|
.AWPROT (S_AWPROT),
|
||||||
|
.AWVALID (net_AWVALID),
|
||||||
|
.AWREADY (S_AWREADY),
|
||||||
|
// Write Data Channel Signals.
|
||||||
|
.WID (S_WID),
|
||||||
|
.WDATA (S_WDATA),
|
||||||
|
.WSTRB (S_WSTRB),
|
||||||
|
.WLAST (S_WLAST),
|
||||||
|
.WVALID (net_WVALID),
|
||||||
|
.WREADY (S_WREADY),
|
||||||
|
// Write Response Channel Signals.
|
||||||
|
.BID (S_BID),
|
||||||
|
.BRESP (S_BRESP),
|
||||||
|
.BVALID (S_BVALID),
|
||||||
|
.BREADY (S_BREADY),
|
||||||
|
// Read Address Channel Signals.
|
||||||
|
.ARID (S_ARID),
|
||||||
|
.ARADDR (S_ARADDR),
|
||||||
|
.ARLEN (S_ARLEN),
|
||||||
|
.ARSIZE (S_ARSIZE),
|
||||||
|
.ARBURST (S_ARBURST),
|
||||||
|
.ARLOCK (S_ARLOCK),
|
||||||
|
.ARCACHE (S_ARCACHE),
|
||||||
|
.ARPROT (S_ARPROT),
|
||||||
|
.ARVALID (net_ARVALID),
|
||||||
|
.ARREADY (S_ARREADY),
|
||||||
|
// Read Data Channel Signals.
|
||||||
|
.RID (S_RID),
|
||||||
|
.RDATA (S_RDATA),
|
||||||
|
.RRESP (S_RRESP),
|
||||||
|
.RLAST (S_RLAST),
|
||||||
|
.RVALID (S_RVALID),
|
||||||
|
.RREADY (S_RREADY));
|
||||||
|
|
||||||
|
|
||||||
|
wire wr_intr_fifo_full;
|
||||||
|
reg temp_wr_intr_fifo_full;
|
||||||
|
|
||||||
|
/* Interconnect WR_FIFO model instance */
|
||||||
|
processing_system7_bfm_v2_0_5_intr_wr_mem wr_intr_fifo(SW_CLK, S_RESETN, wr_intr_fifo_full, WR_DATA_ACK_OCM, WR_DATA_ACK_DDR, WR_ADDR, WR_DATA, WR_BYTES, WR_QOS, WR_DATA_VALID_OCM, WR_DATA_VALID_DDR);
|
||||||
|
|
||||||
|
/* Register the async 'full' signal to S_ACLK clock */
|
||||||
|
always@(posedge S_ACLK) temp_wr_intr_fifo_full = wr_intr_fifo_full;
|
||||||
|
|
||||||
|
/* Latency type and Debug/Error Control */
|
||||||
|
reg[1:0] latency_type = RANDOM_CASE;
|
||||||
|
reg DEBUG_INFO = 1;
|
||||||
|
reg STOP_ON_ERROR = 1'b1;
|
||||||
|
|
||||||
|
/* Internal nets/regs for calling slave BFM API's*/
|
||||||
|
reg [wr_afi_fifo_data_bits-1:0] wr_fifo [0:max_outstanding_transactions-1];
|
||||||
|
reg [int_cntr_width-1:0] wr_fifo_wr_ptr = 0, wr_fifo_rd_ptr = 0;
|
||||||
|
wire wr_fifo_empty;
|
||||||
|
|
||||||
|
/* Store the awvalid receive time --- necessary for calculating the bresp latency */
|
||||||
|
reg [7:0] aw_time_cnt = 0,bresp_time_cnt = 0;
|
||||||
|
real awvalid_receive_time[0:max_outstanding_transactions]; // store the time when a new awvalid is received
|
||||||
|
reg awvalid_flag[0:max_outstanding_transactions]; // store the time when a new awvalid is received
|
||||||
|
|
||||||
|
/* Address Write Channel handshake*/
|
||||||
|
reg[int_cntr_width-1:0] aw_cnt = 0;//
|
||||||
|
|
||||||
|
/* various FIFOs for storing the ADDR channel info */
|
||||||
|
reg [axi_size_width-1:0] awsize [0:max_outstanding_transactions-1];
|
||||||
|
reg [axi_prot_width-1:0] awprot [0:max_outstanding_transactions-1];
|
||||||
|
reg [axi_lock_width-1:0] awlock [0:max_outstanding_transactions-1];
|
||||||
|
reg [axi_cache_width-1:0] awcache [0:max_outstanding_transactions-1];
|
||||||
|
reg [axi_brst_type_width-1:0] awbrst [0:max_outstanding_transactions-1];
|
||||||
|
reg [axi_len_width-1:0] awlen [0:max_outstanding_transactions-1];
|
||||||
|
reg aw_flag [0:max_outstanding_transactions-1];
|
||||||
|
reg [addr_width-1:0] awaddr [0:max_outstanding_transactions-1];
|
||||||
|
reg [id_bus_width-1:0] awid [0:max_outstanding_transactions-1];
|
||||||
|
reg [axi_qos_width-1:0] awqos [0:max_outstanding_transactions-1];
|
||||||
|
wire aw_fifo_full; // indicates awvalid_fifo is full (max outstanding transactions reached)
|
||||||
|
|
||||||
|
/* internal fifos to store burst write data, ID & strobes*/
|
||||||
|
reg [(data_bus_width*axi_burst_len)-1:0] burst_data [0:max_outstanding_transactions-1];
|
||||||
|
reg [max_burst_bytes_width:0] burst_valid_bytes [0:max_outstanding_transactions-1]; /// total valid bytes received in a complete burst transfer
|
||||||
|
reg wlast_flag [0:max_outstanding_transactions-1]; // flag to indicate WLAST received
|
||||||
|
wire wd_fifo_full;
|
||||||
|
|
||||||
|
/* Write Data Channel and Write Response handshake signals*/
|
||||||
|
reg [int_cntr_width-1:0] wd_cnt = 0;
|
||||||
|
reg [(data_bus_width*axi_burst_len)-1:0] aligned_wr_data;
|
||||||
|
reg [addr_width-1:0] aligned_wr_addr;
|
||||||
|
reg [max_burst_bytes_width:0] valid_data_bytes;
|
||||||
|
reg [int_cntr_width-1:0] wr_bresp_cnt = 0;
|
||||||
|
reg [axi_rsp_width-1:0] bresp;
|
||||||
|
reg [rsp_fifo_bits-1:0] fifo_bresp [0:max_outstanding_transactions-1]; // store the ID and its corresponding response
|
||||||
|
reg enable_write_bresp;
|
||||||
|
reg [int_cntr_width-1:0] rd_bresp_cnt = 0;
|
||||||
|
integer wr_latency_count;
|
||||||
|
reg wr_delayed;
|
||||||
|
wire bresp_fifo_empty;
|
||||||
|
|
||||||
|
/* keep track of count values */
|
||||||
|
reg[7:0] wcount;
|
||||||
|
reg[5:0] wacount;
|
||||||
|
|
||||||
|
/* Qos*/
|
||||||
|
reg [axi_qos_width-1:0] ar_qos, aw_qos;
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
if(DEBUG_INFO) begin
|
||||||
|
if(enable_this_port)
|
||||||
|
$display("[%0d] : %0s : %0s : Port is ENABLED.",$time, DISP_INFO, slave_name);
|
||||||
|
else
|
||||||
|
$display("[%0d] : %0s : %0s : Port is DISABLED.",$time, DISP_INFO, slave_name);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Store the Clock cycle time period */
|
||||||
|
|
||||||
|
always@(S_RESETN)
|
||||||
|
begin
|
||||||
|
if(S_RESETN) begin
|
||||||
|
@(posedge S_ACLK);
|
||||||
|
s_aclk_period = $time;
|
||||||
|
@(posedge S_ACLK);
|
||||||
|
s_aclk_period = $time - s_aclk_period;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
initial slave.set_disable_reset_value_checks(1);
|
||||||
|
initial begin
|
||||||
|
repeat(2) @(posedge S_ACLK);
|
||||||
|
if(!enable_this_port) begin
|
||||||
|
slave.set_channel_level_info(0);
|
||||||
|
slave.set_function_level_info(0);
|
||||||
|
end
|
||||||
|
slave.RESPONSE_TIMEOUT = 0;
|
||||||
|
end
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Set Latency type to be used */
|
||||||
|
task set_latency_type;
|
||||||
|
input[1:0] lat;
|
||||||
|
begin
|
||||||
|
if(enable_this_port)
|
||||||
|
latency_type = lat;
|
||||||
|
else begin
|
||||||
|
//if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. 'Latency Profile' will not be set...",$time, DISP_WARN, slave_name);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
/* Set ARQoS to be used */
|
||||||
|
task set_arqos;
|
||||||
|
input[axi_qos_width-1:0] qos;
|
||||||
|
begin
|
||||||
|
if(enable_this_port)
|
||||||
|
ar_qos = qos;
|
||||||
|
else begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. 'ARQOS' will not be set...",$time, DISP_WARN, slave_name);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Set AWQoS to be used */
|
||||||
|
task set_awqos;
|
||||||
|
input[axi_qos_width-1:0] qos;
|
||||||
|
begin
|
||||||
|
if(enable_this_port)
|
||||||
|
aw_qos = qos;
|
||||||
|
else begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. 'AWQOS' will not be set...",$time, DISP_WARN, slave_name);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* get the wr latency number */
|
||||||
|
function [31:0] get_wr_lat_number;
|
||||||
|
input dummy;
|
||||||
|
reg[1:0] temp;
|
||||||
|
begin
|
||||||
|
case(latency_type)
|
||||||
|
BEST_CASE : get_wr_lat_number = afi_wr_min;
|
||||||
|
AVG_CASE : get_wr_lat_number = afi_wr_avg;
|
||||||
|
WORST_CASE : get_wr_lat_number = afi_wr_max;
|
||||||
|
default : begin // RANDOM_CASE
|
||||||
|
temp = $random;
|
||||||
|
case(temp)
|
||||||
|
2'b00 : get_wr_lat_number = ($random()%10+ afi_wr_min);
|
||||||
|
2'b01 : get_wr_lat_number = ($random()%40+ afi_wr_avg);
|
||||||
|
default : get_wr_lat_number = ($random()%60+ afi_wr_max);
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
endfunction
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* get the rd latency number */
|
||||||
|
function [31:0] get_rd_lat_number;
|
||||||
|
input dummy;
|
||||||
|
reg[1:0] temp;
|
||||||
|
begin
|
||||||
|
case(latency_type)
|
||||||
|
BEST_CASE : get_rd_lat_number = afi_rd_min;
|
||||||
|
AVG_CASE : get_rd_lat_number = afi_rd_avg;
|
||||||
|
WORST_CASE : get_rd_lat_number = afi_rd_max;
|
||||||
|
default : begin // RANDOM_CASE
|
||||||
|
temp = $random;
|
||||||
|
case(temp)
|
||||||
|
2'b00 : get_rd_lat_number = ($random()%10+ afi_rd_min);
|
||||||
|
2'b01 : get_rd_lat_number = ($random()%40+ afi_rd_avg);
|
||||||
|
default : get_rd_lat_number = ($random()%60+ afi_rd_max);
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
endfunction
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
/* Check for any WRITE/READs when this port is disabled */
|
||||||
|
always@(S_AWVALID or S_WVALID or S_ARVALID)
|
||||||
|
begin
|
||||||
|
if((S_AWVALID | S_WVALID | S_ARVALID) && !enable_this_port) begin
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. AXI transaction is initiated on this port ...\nSimulation will halt ..",$time, DISP_ERR, slave_name);
|
||||||
|
$stop;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
assign net_ARVALID = enable_this_port ? S_ARVALID : 1'b0;
|
||||||
|
assign net_AWVALID = enable_this_port ? S_AWVALID : 1'b0;
|
||||||
|
assign net_WVALID = enable_this_port ? S_WVALID : 1'b0;
|
||||||
|
|
||||||
|
assign wr_fifo_empty = (wr_fifo_wr_ptr === wr_fifo_rd_ptr)?1'b1: 1'b0;
|
||||||
|
assign bresp_fifo_empty = (wr_bresp_cnt === rd_bresp_cnt)?1'b1:1'b0;
|
||||||
|
assign bresp_fifo_full = ((wr_bresp_cnt[int_cntr_width-1] !== rd_bresp_cnt[int_cntr_width-1]) && (wr_bresp_cnt[int_cntr_width-2:0] === rd_bresp_cnt[int_cntr_width-2:0]))?1'b1:1'b0;
|
||||||
|
|
||||||
|
assign S_WCOUNT = wcount;
|
||||||
|
assign S_WACOUNT = wacount;
|
||||||
|
|
||||||
|
// FIFO_STATUS (only if AFI port) 1- full
|
||||||
|
function automatic wrfifo_full ;
|
||||||
|
input [axi_len_width:0] fifo_space_exp;
|
||||||
|
integer fifo_space_left;
|
||||||
|
begin
|
||||||
|
fifo_space_left = afi_fifo_locations - wcount;
|
||||||
|
if(fifo_space_left < fifo_space_exp)
|
||||||
|
wrfifo_full = 1;
|
||||||
|
else
|
||||||
|
wrfifo_full = 0;
|
||||||
|
end
|
||||||
|
endfunction
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Store the awvalid receive time --- necessary for calculating the bresp latency */
|
||||||
|
always@(negedge S_RESETN or S_AWID or S_AWADDR or S_AWVALID )
|
||||||
|
begin
|
||||||
|
if(!S_RESETN)
|
||||||
|
aw_time_cnt = 0;
|
||||||
|
else begin
|
||||||
|
if(S_AWVALID) begin
|
||||||
|
awvalid_receive_time[aw_time_cnt] = $time;
|
||||||
|
awvalid_flag[aw_time_cnt] = 1'b1;
|
||||||
|
aw_time_cnt = aw_time_cnt + 1;
|
||||||
|
end
|
||||||
|
end // else
|
||||||
|
end /// always
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
always@(posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(net_AWVALID && S_AWREADY) begin
|
||||||
|
if(S_AWQOS === 0) awqos[aw_cnt[int_cntr_width-2:0]] = aw_qos;
|
||||||
|
else awqos[aw_cnt[int_cntr_width-2:0]] = S_AWQOS;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
/* Address Write Channel handshake*/
|
||||||
|
always@(negedge S_RESETN or posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN) begin
|
||||||
|
aw_cnt = 0;
|
||||||
|
wacount = 0;
|
||||||
|
end else begin
|
||||||
|
if(S_AWVALID && !wrfifo_full(S_AWLEN+1)) begin
|
||||||
|
slave.RECEIVE_WRITE_ADDRESS(0,
|
||||||
|
id_invalid,
|
||||||
|
awaddr[aw_cnt[int_cntr_width-2:0]],
|
||||||
|
awlen[aw_cnt[int_cntr_width-2:0]],
|
||||||
|
awsize[aw_cnt[int_cntr_width-2:0]],
|
||||||
|
awbrst[aw_cnt[int_cntr_width-2:0]],
|
||||||
|
awlock[aw_cnt[int_cntr_width-2:0]],
|
||||||
|
awcache[aw_cnt[int_cntr_width-2:0]],
|
||||||
|
awprot[aw_cnt[int_cntr_width-2:0]],
|
||||||
|
awid[aw_cnt[int_cntr_width-2:0]]); /// sampled valid ID.
|
||||||
|
aw_flag[aw_cnt[int_cntr_width-2:0]] = 1'b1;
|
||||||
|
aw_cnt = aw_cnt + 1;
|
||||||
|
wacount = wacount + 1;
|
||||||
|
end // if (!aw_fifo_full)
|
||||||
|
end /// if else
|
||||||
|
end /// always
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Write Data Channel Handshake */
|
||||||
|
always@(negedge S_RESETN or posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN) begin
|
||||||
|
wd_cnt = 0;
|
||||||
|
end else begin
|
||||||
|
if(aw_flag[wd_cnt[int_cntr_width-2:0]]) begin
|
||||||
|
if(S_WVALID && !wrfifo_full(awlen[wd_cnt[int_cntr_width-2:0]] + 1)) begin
|
||||||
|
slave.RECEIVE_WRITE_BURST_NO_CHECKS(S_WID, burst_data[wd_cnt[int_cntr_width-2:0]], burst_valid_bytes[wd_cnt[int_cntr_width-2:0]]);
|
||||||
|
wlast_flag[wd_cnt[int_cntr_width-2:0]] = 1'b1;
|
||||||
|
wd_cnt = wd_cnt + 1;
|
||||||
|
end
|
||||||
|
end else begin
|
||||||
|
if(!wrfifo_full(axi_burst_len+1) && S_WVALID) begin
|
||||||
|
slave.RECEIVE_WRITE_BURST_NO_CHECKS(S_WID, burst_data[wd_cnt[int_cntr_width-2:0]], burst_valid_bytes[wd_cnt[int_cntr_width-2:0]]);
|
||||||
|
wlast_flag[wd_cnt[int_cntr_width-2:0]] = 1'b1;
|
||||||
|
wd_cnt = wd_cnt + 1;
|
||||||
|
end
|
||||||
|
end /// if
|
||||||
|
end /// else
|
||||||
|
end /// always
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Align the wrap data for write transaction */
|
||||||
|
task automatic get_wrap_aligned_wr_data;
|
||||||
|
output [(data_bus_width*axi_burst_len)-1:0] aligned_data;
|
||||||
|
output [addr_width-1:0] start_addr; /// aligned start address
|
||||||
|
input [addr_width-1:0] addr;
|
||||||
|
input [(data_bus_width*axi_burst_len)-1:0] b_data;
|
||||||
|
input [max_burst_bytes_width:0] v_bytes;
|
||||||
|
reg [(data_bus_width*axi_burst_len)-1:0] temp_data, wrp_data;
|
||||||
|
integer wrp_bytes;
|
||||||
|
integer i;
|
||||||
|
begin
|
||||||
|
start_addr = (addr/v_bytes) * v_bytes;
|
||||||
|
wrp_bytes = addr - start_addr;
|
||||||
|
wrp_data = b_data;
|
||||||
|
temp_data = 0;
|
||||||
|
wrp_data = wrp_data << ((data_bus_width*axi_burst_len) - (v_bytes*8));
|
||||||
|
while(wrp_bytes > 0) begin /// get the data that is wrapped
|
||||||
|
temp_data = temp_data << 8;
|
||||||
|
temp_data[7:0] = wrp_data[(data_bus_width*axi_burst_len)-1 : (data_bus_width*axi_burst_len)-8];
|
||||||
|
wrp_data = wrp_data << 8;
|
||||||
|
wrp_bytes = wrp_bytes - 1;
|
||||||
|
end
|
||||||
|
wrp_bytes = addr - start_addr;
|
||||||
|
wrp_data = b_data << (wrp_bytes*8);
|
||||||
|
|
||||||
|
aligned_data = (temp_data | wrp_data);
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Calculate the Response for each read/write transaction */
|
||||||
|
function [axi_rsp_width-1:0] calculate_resp;
|
||||||
|
input [addr_width-1:0] awaddr;
|
||||||
|
input [axi_prot_width-1:0] awprot;
|
||||||
|
reg [axi_rsp_width-1:0] rsp;
|
||||||
|
begin
|
||||||
|
rsp = AXI_OK;
|
||||||
|
/* Address Decode */
|
||||||
|
if(decode_address(awaddr) === INVALID_MEM_TYPE) begin
|
||||||
|
rsp = AXI_SLV_ERR; //slave error
|
||||||
|
$display("[%0d] : %0s : %0s : AXI Access to Invalid location(0x%0h) ",$time, DISP_ERR, slave_name, awaddr);
|
||||||
|
end
|
||||||
|
else if(decode_address(awaddr) === REG_MEM) begin
|
||||||
|
rsp = AXI_SLV_ERR; //slave error
|
||||||
|
$display("[%0d] : %0s : %0s : AXI Access to Register Map(0x%0h) is not allowed through this port.",$time, DISP_ERR, slave_name, awaddr);
|
||||||
|
end
|
||||||
|
if(secure_access_enabled && awprot[1])
|
||||||
|
rsp = AXI_DEC_ERR; // decode error
|
||||||
|
calculate_resp = rsp;
|
||||||
|
end
|
||||||
|
endfunction
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
reg[max_burst_bits-1:0] temp_wr_data;
|
||||||
|
/* Store the Write response for each write transaction */
|
||||||
|
always@(negedge S_RESETN or posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN) begin
|
||||||
|
wr_fifo_wr_ptr = 0;
|
||||||
|
wcount = 0;
|
||||||
|
end else begin
|
||||||
|
enable_write_bresp = aw_flag[wr_fifo_wr_ptr[int_cntr_width-2:0]] && wlast_flag[wr_fifo_wr_ptr[int_cntr_width-2:0]];
|
||||||
|
/* calculate bresp only when AWVALID && WLAST is received */
|
||||||
|
if(enable_write_bresp) begin
|
||||||
|
aw_flag[wr_fifo_wr_ptr[int_cntr_width-2:0]] = 0;
|
||||||
|
wlast_flag[wr_fifo_wr_ptr[int_cntr_width-2:0]] = 0;
|
||||||
|
|
||||||
|
bresp = calculate_resp(awaddr[wr_fifo_wr_ptr[int_cntr_width-2:0]], awprot[wr_fifo_wr_ptr[int_cntr_width-2:0]]);
|
||||||
|
/* Fill AFI_WR_data FIFO */
|
||||||
|
if(bresp === AXI_OK ) begin
|
||||||
|
if(awbrst[wr_fifo_wr_ptr[int_cntr_width-2:0]]=== AXI_WRAP) begin /// wrap type? then align the data
|
||||||
|
get_wrap_aligned_wr_data(aligned_wr_data, aligned_wr_addr, awaddr[wr_fifo_wr_ptr[int_cntr_width-2:0]], burst_data[wr_fifo_wr_ptr[int_cntr_width-2:0]],burst_valid_bytes[wr_fifo_wr_ptr[int_cntr_width-2:0]]); /// gives wrapped start address
|
||||||
|
end else begin
|
||||||
|
aligned_wr_data = burst_data[wr_fifo_wr_ptr[int_cntr_width-2:0]];
|
||||||
|
aligned_wr_addr = awaddr[wr_fifo_wr_ptr[int_cntr_width-2:0]] ;
|
||||||
|
end
|
||||||
|
valid_data_bytes = burst_valid_bytes[wr_fifo_wr_ptr[int_cntr_width-2:0]];
|
||||||
|
end else
|
||||||
|
valid_data_bytes = 0;
|
||||||
|
temp_wr_data = aligned_wr_data;
|
||||||
|
wr_fifo[wr_fifo_wr_ptr[int_cntr_width-2:0]] = {awqos[wr_fifo_wr_ptr[int_cntr_width-2:0]], awlen[wr_fifo_wr_ptr[int_cntr_width-2:0]], awid[wr_fifo_wr_ptr[int_cntr_width-2:0]], bresp, temp_wr_data, aligned_wr_addr, valid_data_bytes};
|
||||||
|
wcount = wcount + awlen[wr_fifo_wr_ptr[int_cntr_width-2:0]]+1;
|
||||||
|
wr_fifo_wr_ptr = wr_fifo_wr_ptr + 1;
|
||||||
|
end
|
||||||
|
end // else
|
||||||
|
end // always
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Send Write Response Channel handshake */
|
||||||
|
always@(negedge S_RESETN or posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN) begin
|
||||||
|
rd_bresp_cnt = 0;
|
||||||
|
wr_latency_count = get_wr_lat_number(1);
|
||||||
|
wr_delayed = 0;
|
||||||
|
bresp_time_cnt = 0;
|
||||||
|
end else begin
|
||||||
|
wr_delayed = 1'b0;
|
||||||
|
if(awvalid_flag[bresp_time_cnt] && (($time - awvalid_receive_time[bresp_time_cnt])/s_aclk_period >= wr_latency_count))
|
||||||
|
wr_delayed = 1;
|
||||||
|
if(!bresp_fifo_empty && wr_delayed) begin
|
||||||
|
slave.SEND_WRITE_RESPONSE(fifo_bresp[rd_bresp_cnt[int_cntr_width-2:0]][rsp_id_msb : rsp_id_lsb], // ID
|
||||||
|
fifo_bresp[rd_bresp_cnt[int_cntr_width-2:0]][rsp_msb : rsp_lsb] // Response
|
||||||
|
);
|
||||||
|
wr_delayed = 0;
|
||||||
|
awvalid_flag[bresp_time_cnt] = 1'b0;
|
||||||
|
bresp_time_cnt = bresp_time_cnt+1;
|
||||||
|
rd_bresp_cnt = rd_bresp_cnt + 1;
|
||||||
|
wr_latency_count = get_wr_lat_number(1);
|
||||||
|
end
|
||||||
|
end // else
|
||||||
|
end//always
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Write Response Channel handshake */
|
||||||
|
reg wr_int_state;
|
||||||
|
/* Reading from the wr_fifo and sending to Interconnect fifo*/
|
||||||
|
always@(negedge S_RESETN or posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN) begin
|
||||||
|
wr_int_state = 1'b0;
|
||||||
|
wr_bresp_cnt = 0;
|
||||||
|
wr_fifo_rd_ptr = 0;
|
||||||
|
end else begin
|
||||||
|
case(wr_int_state)
|
||||||
|
1'b0 : begin
|
||||||
|
wr_int_state = 1'b0;
|
||||||
|
if(!temp_wr_intr_fifo_full && !bresp_fifo_full && !wr_fifo_empty) begin
|
||||||
|
wr_intr_fifo.write_mem({wr_fifo[wr_fifo_rd_ptr[int_cntr_width-2:0]][wr_afi_qos_msb:wr_afi_qos_lsb], wr_fifo[wr_fifo_rd_ptr[int_cntr_width-2:0]][wr_afi_data_msb:wr_afi_bytes_lsb]}); /// qos, data, address and valid_bytes
|
||||||
|
wr_int_state = 1'b1;
|
||||||
|
/* start filling the write response fifo at the same time */
|
||||||
|
fifo_bresp[wr_bresp_cnt[int_cntr_width-2:0]] = wr_fifo[wr_fifo_rd_ptr[int_cntr_width-2:0]][wr_afi_id_msb:wr_afi_rsp_lsb]; // ID and Resp
|
||||||
|
wcount = wcount - (wr_fifo[wr_fifo_rd_ptr[int_cntr_width-2:0]][wr_afi_ln_msb:wr_afi_ln_lsb] + 1); /// burst length
|
||||||
|
wacount = wacount - 1;
|
||||||
|
wr_fifo_rd_ptr = wr_fifo_rd_ptr + 1;
|
||||||
|
wr_bresp_cnt = wr_bresp_cnt+1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
1'b1 : begin
|
||||||
|
wr_int_state = 0;
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
end
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
/*-------------------------------- WRITE HANDSHAKE END ----------------------------------------*/
|
||||||
|
|
||||||
|
/*-------------------------------- READ HANDSHAKE ---------------------------------------------*/
|
||||||
|
|
||||||
|
/* READ CHANNELS */
|
||||||
|
/* Store the arvalid receive time --- necessary for calculating latency in sending the rresp latency */
|
||||||
|
reg [7:0] ar_time_cnt = 0,rresp_time_cnt = 0;
|
||||||
|
real arvalid_receive_time[0:max_outstanding_transactions]; // store the time when a new arvalid is received
|
||||||
|
reg arvalid_flag[0:max_outstanding_transactions]; // store the time when a new arvalid is received
|
||||||
|
reg [int_cntr_width-1:0] ar_cnt = 0;// counter for arvalid info
|
||||||
|
|
||||||
|
/* various FIFOs for storing the ADDR channel info */
|
||||||
|
reg [axi_size_width-1:0] arsize [0:max_outstanding_transactions-1];
|
||||||
|
reg [axi_prot_width-1:0] arprot [0:max_outstanding_transactions-1];
|
||||||
|
reg [axi_brst_type_width-1:0] arbrst [0:max_outstanding_transactions-1];
|
||||||
|
reg [axi_len_width-1:0] arlen [0:max_outstanding_transactions-1];
|
||||||
|
reg [axi_cache_width-1:0] arcache [0:max_outstanding_transactions-1];
|
||||||
|
reg [axi_lock_width-1:0] arlock [0:max_outstanding_transactions-1];
|
||||||
|
reg ar_flag [0:max_outstanding_transactions-1];
|
||||||
|
reg [addr_width-1:0] araddr [0:max_outstanding_transactions-1];
|
||||||
|
reg [id_bus_width-1:0] arid [0:max_outstanding_transactions-1];
|
||||||
|
reg [axi_qos_width-1:0] arqos [0:max_outstanding_transactions-1];
|
||||||
|
wire ar_fifo_full; // indicates arvalid_fifo is full (max outstanding transactions reached)
|
||||||
|
|
||||||
|
reg [int_cntr_width-1:0] wr_rresp_cnt = 0;
|
||||||
|
reg [axi_rsp_width-1:0] rresp;
|
||||||
|
reg [rsp_fifo_bits-1:0] fifo_rresp [0:max_outstanding_transactions-1]; // store the ID and its corresponding response
|
||||||
|
reg enable_write_rresp;
|
||||||
|
|
||||||
|
/* Send Read Response & Data Channel handshake */
|
||||||
|
integer rd_latency_count;
|
||||||
|
reg rd_delayed;
|
||||||
|
|
||||||
|
reg [rd_afi_fifo_bits-1:0] read_fifo[0:max_outstanding_transactions-1]; /// Read Burst Data, addr, size, burst, len, RID, RRESP, valid_bytes
|
||||||
|
reg [int_cntr_width-1:0] rd_fifo_wr_ptr = 0, rd_fifo_rd_ptr = 0;
|
||||||
|
wire read_fifo_full;
|
||||||
|
|
||||||
|
reg [7:0] rcount;
|
||||||
|
reg [2:0] racount;
|
||||||
|
|
||||||
|
wire rd_intr_fifo_full, rd_intr_fifo_empty;
|
||||||
|
wire read_fifo_empty;
|
||||||
|
|
||||||
|
/* signals to communicate with interconnect RD_FIFO model */
|
||||||
|
reg rd_req, invalid_rd_req;
|
||||||
|
|
||||||
|
/* REad control Info
|
||||||
|
56:25 : Address (32)
|
||||||
|
24:22 : Size (3)
|
||||||
|
21:20 : BRST (2)
|
||||||
|
19:16 : LEN (4)
|
||||||
|
15:10 : RID (6)
|
||||||
|
9:8 : RRSP (2)
|
||||||
|
7:0 : byte cnt (8)
|
||||||
|
*/
|
||||||
|
reg [rd_info_bits-1:0] read_control_info;
|
||||||
|
reg [(data_bus_width*axi_burst_len)-1:0] aligned_rd_data;
|
||||||
|
reg temp_rd_intr_fifo_empty;
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_intr_rd_mem rd_intr_fifo(SW_CLK, S_RESETN, rd_intr_fifo_full, rd_intr_fifo_empty, rd_req, invalid_rd_req, read_control_info , RD_DATA_OCM, RD_DATA_DDR, RD_DATA_VALID_OCM, RD_DATA_VALID_DDR);
|
||||||
|
|
||||||
|
assign read_fifo_empty = (rd_fifo_wr_ptr === rd_fifo_rd_ptr)?1'b1: 1'b0;
|
||||||
|
assign S_RCOUNT = rcount;
|
||||||
|
assign S_RACOUNT = racount;
|
||||||
|
|
||||||
|
/* Register the asynch signal empty coming from Interconnect READ FIFO */
|
||||||
|
always@(posedge S_ACLK) temp_rd_intr_fifo_empty = rd_intr_fifo_empty;
|
||||||
|
|
||||||
|
// FIFO_STATUS (only if AFI port) 1- full
|
||||||
|
function automatic rdfifo_full ;
|
||||||
|
input [axi_len_width:0] fifo_space_exp;
|
||||||
|
integer fifo_space_left;
|
||||||
|
begin
|
||||||
|
fifo_space_left = afi_fifo_locations - rcount;
|
||||||
|
if(fifo_space_left < fifo_space_exp)
|
||||||
|
rdfifo_full = 1;
|
||||||
|
else
|
||||||
|
rdfifo_full = 0;
|
||||||
|
end
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
/* Store the arvalid receive time --- necessary for calculating the bresp latency */
|
||||||
|
always@(negedge S_RESETN or S_ARID or S_ARADDR or S_ARVALID )
|
||||||
|
begin
|
||||||
|
if(!S_RESETN)
|
||||||
|
ar_time_cnt = 0;
|
||||||
|
else begin
|
||||||
|
if(S_ARVALID) begin
|
||||||
|
arvalid_receive_time[ar_time_cnt] = $time;
|
||||||
|
arvalid_flag[ar_time_cnt] = 1'b1;
|
||||||
|
ar_time_cnt = ar_time_cnt + 1;
|
||||||
|
end
|
||||||
|
end // else
|
||||||
|
end /// always
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
always@(posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(net_ARVALID && S_ARREADY) begin
|
||||||
|
if(S_ARQOS === 0) arqos[aw_cnt[int_cntr_width-2:0]] = ar_qos;
|
||||||
|
else arqos[aw_cnt[int_cntr_width-2:0]] = S_ARQOS;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
/* Address Read Channel handshake*/
|
||||||
|
always@(negedge S_RESETN or posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN) begin
|
||||||
|
ar_cnt = 0;
|
||||||
|
racount = 0;
|
||||||
|
end else begin
|
||||||
|
if(S_ARVALID && !rdfifo_full(S_ARLEN+1)) begin /// if AFI read fifo is not full
|
||||||
|
slave.RECEIVE_READ_ADDRESS(0,
|
||||||
|
id_invalid,
|
||||||
|
araddr[ar_cnt[int_cntr_width-2:0]],
|
||||||
|
arlen[ar_cnt[int_cntr_width-2:0]],
|
||||||
|
arsize[ar_cnt[int_cntr_width-2:0]],
|
||||||
|
arbrst[ar_cnt[int_cntr_width-2:0]],
|
||||||
|
arlock[ar_cnt[int_cntr_width-2:0]],
|
||||||
|
arcache[ar_cnt[int_cntr_width-2:0]],
|
||||||
|
arprot[ar_cnt[int_cntr_width-2:0]],
|
||||||
|
arid[ar_cnt[int_cntr_width-2:0]]); /// sampled valid ID.
|
||||||
|
ar_flag[ar_cnt[int_cntr_width-2:0]] = 1'b1;
|
||||||
|
ar_cnt = ar_cnt+1;
|
||||||
|
racount = racount + 1;
|
||||||
|
end /// if(!ar_fifo_full)
|
||||||
|
end /// if else
|
||||||
|
end /// always*/
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Align Wrap data for read transaction*/
|
||||||
|
task automatic get_wrap_aligned_rd_data;
|
||||||
|
output [(data_bus_width*axi_burst_len)-1:0] aligned_data;
|
||||||
|
input [addr_width-1:0] addr;
|
||||||
|
input [(data_bus_width*axi_burst_len)-1:0] b_data;
|
||||||
|
input [max_burst_bytes_width:0] v_bytes;
|
||||||
|
reg [addr_width-1:0] start_addr;
|
||||||
|
reg [(data_bus_width*axi_burst_len)-1:0] temp_data, wrp_data;
|
||||||
|
integer wrp_bytes;
|
||||||
|
integer i;
|
||||||
|
begin
|
||||||
|
start_addr = (addr/v_bytes) * v_bytes;
|
||||||
|
wrp_bytes = addr - start_addr;
|
||||||
|
wrp_data = b_data;
|
||||||
|
temp_data = 0;
|
||||||
|
while(wrp_bytes > 0) begin /// get the data that is wrapped
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
temp_data[(data_bus_width*axi_burst_len)-1 : (data_bus_width*axi_burst_len)-8] = wrp_data[7:0];
|
||||||
|
wrp_data = wrp_data >> 8;
|
||||||
|
wrp_bytes = wrp_bytes - 1;
|
||||||
|
end
|
||||||
|
temp_data = temp_data >> ((data_bus_width*axi_burst_len) - (v_bytes*8));
|
||||||
|
wrp_bytes = addr - start_addr;
|
||||||
|
wrp_data = b_data >> (wrp_bytes*8);
|
||||||
|
|
||||||
|
aligned_data = (temp_data | wrp_data);
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
parameter RD_DATA_REQ = 1'b0, WAIT_RD_VALID = 1'b1;
|
||||||
|
reg rd_fifo_state;
|
||||||
|
reg [addr_width-1:0] temp_read_address;
|
||||||
|
reg [max_burst_bytes_width:0] temp_rd_valid_bytes;
|
||||||
|
/* get the data from memory && also calculate the rresp*/
|
||||||
|
always@(negedge S_RESETN or posedge SW_CLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN)begin
|
||||||
|
wr_rresp_cnt =0;
|
||||||
|
rd_fifo_state = RD_DATA_REQ;
|
||||||
|
temp_rd_valid_bytes = 0;
|
||||||
|
temp_read_address = 0;
|
||||||
|
RD_REQ_DDR = 1'b0;
|
||||||
|
RD_REQ_OCM = 1'b0;
|
||||||
|
rd_req = 0;
|
||||||
|
invalid_rd_req= 0;
|
||||||
|
RD_QOS = 0;
|
||||||
|
end else begin
|
||||||
|
case(rd_fifo_state)
|
||||||
|
RD_DATA_REQ : begin
|
||||||
|
rd_fifo_state = RD_DATA_REQ;
|
||||||
|
RD_REQ_DDR = 1'b0;
|
||||||
|
RD_REQ_OCM = 1'b0;
|
||||||
|
invalid_rd_req = 0;
|
||||||
|
if(ar_flag[wr_rresp_cnt[int_cntr_width-2:0]] && !rd_intr_fifo_full) begin /// check the rd_fifo_bytes, interconnect fifo full condition
|
||||||
|
ar_flag[wr_rresp_cnt[int_cntr_width-2:0]] = 0;
|
||||||
|
rresp = calculate_resp(araddr[wr_rresp_cnt[int_cntr_width-2:0]],arprot[wr_rresp_cnt[int_cntr_width-2:0]]);
|
||||||
|
temp_rd_valid_bytes = (arlen[wr_rresp_cnt[int_cntr_width-2:0]]+1)*(2**arsize[wr_rresp_cnt[int_cntr_width-2:0]]);//data_bus_width/8;
|
||||||
|
|
||||||
|
if(arbrst[wr_rresp_cnt[int_cntr_width-2:0]] === AXI_WRAP) /// wrap begin
|
||||||
|
temp_read_address = (araddr[wr_rresp_cnt[int_cntr_width-2:0]]/temp_rd_valid_bytes) * temp_rd_valid_bytes;
|
||||||
|
else
|
||||||
|
temp_read_address = araddr[wr_rresp_cnt[int_cntr_width-2:0]];
|
||||||
|
|
||||||
|
if(rresp === AXI_OK) begin
|
||||||
|
case(decode_address(temp_read_address))//decode_address(araddr[wr_rresp_cnt[int_cntr_width-2:0]]);
|
||||||
|
OCM_MEM : RD_REQ_OCM = 1;
|
||||||
|
DDR_MEM : RD_REQ_DDR = 1;
|
||||||
|
default : invalid_rd_req = 1;
|
||||||
|
endcase
|
||||||
|
end else
|
||||||
|
invalid_rd_req = 1;
|
||||||
|
RD_ADDR = temp_read_address; ///araddr[wr_rresp_cnt[int_cntr_width-2:0]];
|
||||||
|
RD_BYTES = temp_rd_valid_bytes;
|
||||||
|
RD_QOS = arqos[wr_rresp_cnt[int_cntr_width-2:0]];
|
||||||
|
rd_fifo_state = WAIT_RD_VALID;
|
||||||
|
rd_req = 1;
|
||||||
|
racount = racount - 1;
|
||||||
|
read_control_info = {araddr[wr_rresp_cnt[int_cntr_width-2:0]], arsize[wr_rresp_cnt[int_cntr_width-2:0]], arbrst[wr_rresp_cnt[int_cntr_width-2:0]], arlen[wr_rresp_cnt[int_cntr_width-2:0]], arid[wr_rresp_cnt[int_cntr_width-2:0]], rresp, temp_rd_valid_bytes };
|
||||||
|
wr_rresp_cnt = wr_rresp_cnt + 1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
WAIT_RD_VALID : begin
|
||||||
|
rd_fifo_state = WAIT_RD_VALID;
|
||||||
|
rd_req = 0;
|
||||||
|
if(RD_DATA_VALID_OCM | RD_DATA_VALID_DDR | invalid_rd_req) begin ///temp_dec == 2'b11) begin
|
||||||
|
RD_REQ_DDR = 1'b0;
|
||||||
|
RD_REQ_OCM = 1'b0;
|
||||||
|
invalid_rd_req = 0;
|
||||||
|
rd_fifo_state = RD_DATA_REQ;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end /// else
|
||||||
|
end /// always
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* thread to fill in the AFI RD_FIFO */
|
||||||
|
reg[rd_afi_fifo_bits-1:0] temp_rd_data;//Read Burst Data, addr, size, burst, len, RID, RRESP, valid bytes
|
||||||
|
reg tmp_state;
|
||||||
|
always@(negedge S_RESETN or posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN)begin
|
||||||
|
rd_fifo_wr_ptr = 0;
|
||||||
|
rcount = 0;
|
||||||
|
tmp_state = 0;
|
||||||
|
end else begin
|
||||||
|
case(tmp_state)
|
||||||
|
0 : begin
|
||||||
|
tmp_state = 0;
|
||||||
|
if(!temp_rd_intr_fifo_empty) begin
|
||||||
|
rd_intr_fifo.read_mem(temp_rd_data);
|
||||||
|
tmp_state = 1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
1 : begin
|
||||||
|
tmp_state = 1;
|
||||||
|
if(!rdfifo_full(temp_rd_data[rd_afi_ln_msb:rd_afi_ln_lsb]+1)) begin
|
||||||
|
read_fifo[rd_fifo_wr_ptr[int_cntr_width-2:0]] = temp_rd_data;
|
||||||
|
rd_fifo_wr_ptr = rd_fifo_wr_ptr + 1;
|
||||||
|
rcount = rcount + temp_rd_data[rd_afi_ln_msb:rd_afi_ln_lsb]+1; /// Burst length
|
||||||
|
tmp_state = 0;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
end
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
reg[max_burst_bytes_width:0] rd_v_b;
|
||||||
|
reg[rd_afi_fifo_bits-1:0] tmp_fifo_rd; /// Data, addr, size, burst, len, RID, RRESP,valid_bytes
|
||||||
|
reg[(data_bus_width*axi_burst_len)-1:0] temp_read_data;
|
||||||
|
reg[(axi_rsp_width*axi_burst_len)-1:0] temp_read_rsp;
|
||||||
|
|
||||||
|
/* Read Data Channel handshake */
|
||||||
|
always@(negedge S_RESETN or posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN)begin
|
||||||
|
rd_fifo_rd_ptr = 0;
|
||||||
|
rd_latency_count = get_rd_lat_number(1);
|
||||||
|
rd_delayed = 0;
|
||||||
|
rresp_time_cnt = 0;
|
||||||
|
rd_v_b = 0;
|
||||||
|
end else begin
|
||||||
|
if(arvalid_flag[rresp_time_cnt] && ((($time - arvalid_receive_time[rresp_time_cnt])/s_aclk_period) >= rd_latency_count)) begin
|
||||||
|
rd_delayed = 1;
|
||||||
|
end
|
||||||
|
if(!read_fifo_empty && rd_delayed)begin
|
||||||
|
rd_delayed = 0;
|
||||||
|
arvalid_flag[rresp_time_cnt] = 1'b0;
|
||||||
|
tmp_fifo_rd = read_fifo[rd_fifo_rd_ptr[int_cntr_width-2:0]];
|
||||||
|
rd_v_b = (tmp_fifo_rd[rd_afi_ln_msb : rd_afi_ln_lsb]+1)*(2**tmp_fifo_rd[rd_afi_siz_msb : rd_afi_siz_lsb]);
|
||||||
|
temp_read_data = tmp_fifo_rd[rd_afi_data_msb : rd_afi_data_lsb];
|
||||||
|
if(tmp_fifo_rd[rd_afi_brst_msb : rd_afi_brst_lsb] === AXI_WRAP) begin
|
||||||
|
get_wrap_aligned_rd_data(aligned_rd_data, tmp_fifo_rd[rd_afi_addr_msb : rd_afi_addr_lsb], tmp_fifo_rd[rd_afi_data_msb : rd_afi_data_lsb], rd_v_b);
|
||||||
|
temp_read_data = aligned_rd_data;
|
||||||
|
end
|
||||||
|
temp_read_rsp = 0;
|
||||||
|
repeat(axi_burst_len) begin
|
||||||
|
temp_read_rsp = temp_read_rsp >> axi_rsp_width;
|
||||||
|
temp_read_rsp[(axi_rsp_width*axi_burst_len)-1:(axi_rsp_width*axi_burst_len)-axi_rsp_width] = tmp_fifo_rd[rd_afi_rsp_msb : rd_afi_rsp_lsb];
|
||||||
|
end
|
||||||
|
slave.SEND_READ_BURST_RESP_CTRL(tmp_fifo_rd[rd_afi_id_msb : rd_afi_id_lsb],
|
||||||
|
tmp_fifo_rd[rd_afi_addr_msb : rd_afi_addr_lsb],
|
||||||
|
tmp_fifo_rd[rd_afi_ln_msb : rd_afi_ln_lsb],
|
||||||
|
tmp_fifo_rd[rd_afi_siz_msb : rd_afi_siz_lsb],
|
||||||
|
tmp_fifo_rd[rd_afi_brst_msb : rd_afi_brst_lsb],
|
||||||
|
temp_read_data,
|
||||||
|
temp_read_rsp);
|
||||||
|
rcount = rcount - (tmp_fifo_rd[rd_afi_ln_msb : rd_afi_ln_lsb]+ 1) ;
|
||||||
|
rresp_time_cnt = rresp_time_cnt+1;
|
||||||
|
rd_latency_count = get_rd_lat_number(1);
|
||||||
|
rd_fifo_rd_ptr = rd_fifo_rd_ptr+1;
|
||||||
|
end
|
||||||
|
end /// else
|
||||||
|
end /// always
|
||||||
|
endmodule
|
@ -0,0 +1,151 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_arb_hp0_1.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Module that arbitrates between RD/WR requests from 2 ports.
|
||||||
|
* Used for modelling the Top_Interconnect switch.
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_arb_hp0_1(
|
||||||
|
sw_clk,
|
||||||
|
rstn,
|
||||||
|
w_qos_hp0,
|
||||||
|
r_qos_hp0,
|
||||||
|
w_qos_hp1,
|
||||||
|
r_qos_hp1,
|
||||||
|
|
||||||
|
wr_ack_ddr_hp0,
|
||||||
|
wr_data_hp0,
|
||||||
|
wr_addr_hp0,
|
||||||
|
wr_bytes_hp0,
|
||||||
|
wr_dv_ddr_hp0,
|
||||||
|
rd_req_ddr_hp0,
|
||||||
|
rd_addr_hp0,
|
||||||
|
rd_bytes_hp0,
|
||||||
|
rd_data_ddr_hp0,
|
||||||
|
rd_dv_ddr_hp0,
|
||||||
|
|
||||||
|
wr_ack_ddr_hp1,
|
||||||
|
wr_data_hp1,
|
||||||
|
wr_addr_hp1,
|
||||||
|
wr_bytes_hp1,
|
||||||
|
wr_dv_ddr_hp1,
|
||||||
|
rd_req_ddr_hp1,
|
||||||
|
rd_addr_hp1,
|
||||||
|
rd_bytes_hp1,
|
||||||
|
rd_data_ddr_hp1,
|
||||||
|
rd_dv_ddr_hp1,
|
||||||
|
|
||||||
|
ddr_wr_ack,
|
||||||
|
ddr_wr_dv,
|
||||||
|
ddr_rd_req,
|
||||||
|
ddr_rd_dv,
|
||||||
|
ddr_rd_qos,
|
||||||
|
ddr_wr_qos,
|
||||||
|
|
||||||
|
ddr_wr_addr,
|
||||||
|
ddr_wr_data,
|
||||||
|
ddr_wr_bytes,
|
||||||
|
ddr_rd_addr,
|
||||||
|
ddr_rd_data,
|
||||||
|
ddr_rd_bytes
|
||||||
|
|
||||||
|
);
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
input sw_clk;
|
||||||
|
input rstn;
|
||||||
|
input [axi_qos_width-1:0] w_qos_hp0;
|
||||||
|
input [axi_qos_width-1:0] r_qos_hp0;
|
||||||
|
input [axi_qos_width-1:0] w_qos_hp1;
|
||||||
|
input [axi_qos_width-1:0] r_qos_hp1;
|
||||||
|
input [axi_qos_width-1:0] ddr_rd_qos;
|
||||||
|
input [axi_qos_width-1:0] ddr_wr_qos;
|
||||||
|
|
||||||
|
output wr_ack_ddr_hp0;
|
||||||
|
input [max_burst_bits-1:0] wr_data_hp0;
|
||||||
|
input [addr_width-1:0] wr_addr_hp0;
|
||||||
|
input [max_burst_bytes_width:0] wr_bytes_hp0;
|
||||||
|
output wr_dv_ddr_hp0;
|
||||||
|
|
||||||
|
input rd_req_ddr_hp0;
|
||||||
|
input [addr_width-1:0] rd_addr_hp0;
|
||||||
|
input [max_burst_bytes_width:0] rd_bytes_hp0;
|
||||||
|
output [max_burst_bits-1:0] rd_data_ddr_hp0;
|
||||||
|
output rd_dv_ddr_hp0;
|
||||||
|
|
||||||
|
output wr_ack_ddr_hp1;
|
||||||
|
input [max_burst_bits-1:0] wr_data_hp1;
|
||||||
|
input [addr_width-1:0] wr_addr_hp1;
|
||||||
|
input [max_burst_bytes_width:0] wr_bytes_hp1;
|
||||||
|
output wr_dv_ddr_hp1;
|
||||||
|
|
||||||
|
input rd_req_ddr_hp1;
|
||||||
|
input [addr_width-1:0] rd_addr_hp1;
|
||||||
|
input [max_burst_bytes_width:0] rd_bytes_hp1;
|
||||||
|
output [max_burst_bits-1:0] rd_data_ddr_hp1;
|
||||||
|
output rd_dv_ddr_hp1;
|
||||||
|
|
||||||
|
input ddr_wr_ack;
|
||||||
|
output ddr_wr_dv;
|
||||||
|
output [addr_width-1:0]ddr_wr_addr;
|
||||||
|
output [max_burst_bits-1:0]ddr_wr_data;
|
||||||
|
output [max_burst_bytes_width:0]ddr_wr_bytes;
|
||||||
|
|
||||||
|
input ddr_rd_dv;
|
||||||
|
input [max_burst_bits-1:0] ddr_rd_data;
|
||||||
|
output ddr_rd_req;
|
||||||
|
output [addr_width-1:0] ddr_rd_addr;
|
||||||
|
output [max_burst_bytes_width:0] ddr_rd_bytes;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_wr ddr_hp_wr(
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
.qos1(w_qos_hp0),
|
||||||
|
.qos2(w_qos_hp1),
|
||||||
|
.prt_dv1(wr_dv_ddr_hp0),
|
||||||
|
.prt_dv2(wr_dv_ddr_hp1),
|
||||||
|
.prt_data1(wr_data_hp0),
|
||||||
|
.prt_data2(wr_data_hp1),
|
||||||
|
.prt_addr1(wr_addr_hp0),
|
||||||
|
.prt_addr2(wr_addr_hp1),
|
||||||
|
.prt_bytes1(wr_bytes_hp0),
|
||||||
|
.prt_bytes2(wr_bytes_hp1),
|
||||||
|
.prt_ack1(wr_ack_ddr_hp0),
|
||||||
|
.prt_ack2(wr_ack_ddr_hp1),
|
||||||
|
.prt_req(ddr_wr_dv),
|
||||||
|
.prt_qos(ddr_wr_qos),
|
||||||
|
.prt_data(ddr_wr_data),
|
||||||
|
.prt_addr(ddr_wr_addr),
|
||||||
|
.prt_bytes(ddr_wr_bytes),
|
||||||
|
.prt_ack(ddr_wr_ack)
|
||||||
|
);
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_rd ddr_hp_rd(
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
.qos1(r_qos_hp0),
|
||||||
|
.qos2(r_qos_hp1),
|
||||||
|
.prt_req1(rd_req_ddr_hp0),
|
||||||
|
.prt_req2(rd_req_ddr_hp1),
|
||||||
|
.prt_data1(rd_data_ddr_hp0),
|
||||||
|
.prt_data2(rd_data_ddr_hp1),
|
||||||
|
.prt_addr1(rd_addr_hp0),
|
||||||
|
.prt_addr2(rd_addr_hp1),
|
||||||
|
.prt_bytes1(rd_bytes_hp0),
|
||||||
|
.prt_bytes2(rd_bytes_hp1),
|
||||||
|
.prt_dv1(rd_dv_ddr_hp0),
|
||||||
|
.prt_dv2(rd_dv_ddr_hp1),
|
||||||
|
.prt_qos(ddr_rd_qos),
|
||||||
|
.prt_req(ddr_rd_req),
|
||||||
|
.prt_data(ddr_rd_data),
|
||||||
|
.prt_addr(ddr_rd_addr),
|
||||||
|
.prt_bytes(ddr_rd_bytes),
|
||||||
|
.prt_dv(ddr_rd_dv)
|
||||||
|
);
|
||||||
|
|
||||||
|
endmodule
|
@ -0,0 +1,151 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_arb_hp2_3.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Module that arbitrates between RD/WR requests from 2 ports.
|
||||||
|
* Used for modelling the Top_Interconnect switch.
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_arb_hp2_3(
|
||||||
|
sw_clk,
|
||||||
|
rstn,
|
||||||
|
w_qos_hp2,
|
||||||
|
r_qos_hp2,
|
||||||
|
w_qos_hp3,
|
||||||
|
r_qos_hp3,
|
||||||
|
|
||||||
|
wr_ack_ddr_hp2,
|
||||||
|
wr_data_hp2,
|
||||||
|
wr_addr_hp2,
|
||||||
|
wr_bytes_hp2,
|
||||||
|
wr_dv_ddr_hp2,
|
||||||
|
rd_req_ddr_hp2,
|
||||||
|
rd_addr_hp2,
|
||||||
|
rd_bytes_hp2,
|
||||||
|
rd_data_ddr_hp2,
|
||||||
|
rd_dv_ddr_hp2,
|
||||||
|
|
||||||
|
wr_ack_ddr_hp3,
|
||||||
|
wr_data_hp3,
|
||||||
|
wr_addr_hp3,
|
||||||
|
wr_bytes_hp3,
|
||||||
|
wr_dv_ddr_hp3,
|
||||||
|
rd_req_ddr_hp3,
|
||||||
|
rd_addr_hp3,
|
||||||
|
rd_bytes_hp3,
|
||||||
|
rd_data_ddr_hp3,
|
||||||
|
rd_dv_ddr_hp3,
|
||||||
|
|
||||||
|
ddr_wr_ack,
|
||||||
|
ddr_wr_dv,
|
||||||
|
ddr_rd_req,
|
||||||
|
ddr_rd_dv,
|
||||||
|
ddr_rd_qos,
|
||||||
|
ddr_wr_qos,
|
||||||
|
|
||||||
|
ddr_wr_addr,
|
||||||
|
ddr_wr_data,
|
||||||
|
ddr_wr_bytes,
|
||||||
|
ddr_rd_addr,
|
||||||
|
ddr_rd_data,
|
||||||
|
ddr_rd_bytes
|
||||||
|
|
||||||
|
);
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
input sw_clk;
|
||||||
|
input rstn;
|
||||||
|
input [axi_qos_width-1:0] w_qos_hp2;
|
||||||
|
input [axi_qos_width-1:0] r_qos_hp2;
|
||||||
|
input [axi_qos_width-1:0] w_qos_hp3;
|
||||||
|
input [axi_qos_width-1:0] r_qos_hp3;
|
||||||
|
input [axi_qos_width-1:0] ddr_rd_qos;
|
||||||
|
input [axi_qos_width-1:0] ddr_wr_qos;
|
||||||
|
|
||||||
|
output wr_ack_ddr_hp2;
|
||||||
|
input [max_burst_bits-1:0] wr_data_hp2;
|
||||||
|
input [addr_width-1:0] wr_addr_hp2;
|
||||||
|
input [max_burst_bytes_width:0] wr_bytes_hp2;
|
||||||
|
output wr_dv_ddr_hp2;
|
||||||
|
|
||||||
|
input rd_req_ddr_hp2;
|
||||||
|
input [addr_width-1:0] rd_addr_hp2;
|
||||||
|
input [max_burst_bytes_width:0] rd_bytes_hp2;
|
||||||
|
output [max_burst_bits-1:0] rd_data_ddr_hp2;
|
||||||
|
output rd_dv_ddr_hp2;
|
||||||
|
|
||||||
|
output wr_ack_ddr_hp3;
|
||||||
|
input [max_burst_bits-1:0] wr_data_hp3;
|
||||||
|
input [addr_width-1:0] wr_addr_hp3;
|
||||||
|
input [max_burst_bytes_width:0] wr_bytes_hp3;
|
||||||
|
output wr_dv_ddr_hp3;
|
||||||
|
|
||||||
|
input rd_req_ddr_hp3;
|
||||||
|
input [addr_width-1:0] rd_addr_hp3;
|
||||||
|
input [max_burst_bytes_width:0] rd_bytes_hp3;
|
||||||
|
output [max_burst_bits-1:0] rd_data_ddr_hp3;
|
||||||
|
output rd_dv_ddr_hp3;
|
||||||
|
|
||||||
|
input ddr_wr_ack;
|
||||||
|
output ddr_wr_dv;
|
||||||
|
output [addr_width-1:0]ddr_wr_addr;
|
||||||
|
output [max_burst_bits-1:0]ddr_wr_data;
|
||||||
|
output [max_burst_bytes_width:0]ddr_wr_bytes;
|
||||||
|
|
||||||
|
input ddr_rd_dv;
|
||||||
|
input [max_burst_bits-1:0] ddr_rd_data;
|
||||||
|
output ddr_rd_req;
|
||||||
|
output [addr_width-1:0] ddr_rd_addr;
|
||||||
|
output [max_burst_bytes_width:0] ddr_rd_bytes;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_wr ddr_hp_wr(
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
.qos1(w_qos_hp2),
|
||||||
|
.qos2(w_qos_hp3),
|
||||||
|
.prt_dv1(wr_dv_ddr_hp2),
|
||||||
|
.prt_dv2(wr_dv_ddr_hp3),
|
||||||
|
.prt_data1(wr_data_hp2),
|
||||||
|
.prt_data2(wr_data_hp3),
|
||||||
|
.prt_addr1(wr_addr_hp2),
|
||||||
|
.prt_addr2(wr_addr_hp3),
|
||||||
|
.prt_bytes1(wr_bytes_hp2),
|
||||||
|
.prt_bytes2(wr_bytes_hp3),
|
||||||
|
.prt_ack1(wr_ack_ddr_hp2),
|
||||||
|
.prt_ack2(wr_ack_ddr_hp3),
|
||||||
|
.prt_req(ddr_wr_dv),
|
||||||
|
.prt_qos(ddr_wr_qos),
|
||||||
|
.prt_data(ddr_wr_data),
|
||||||
|
.prt_addr(ddr_wr_addr),
|
||||||
|
.prt_bytes(ddr_wr_bytes),
|
||||||
|
.prt_ack(ddr_wr_ack)
|
||||||
|
);
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_rd ddr_hp_rd(
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
.qos1(r_qos_hp2),
|
||||||
|
.qos2(r_qos_hp3),
|
||||||
|
.prt_req1(rd_req_ddr_hp2),
|
||||||
|
.prt_req2(rd_req_ddr_hp3),
|
||||||
|
.prt_data1(rd_data_ddr_hp2),
|
||||||
|
.prt_data2(rd_data_ddr_hp3),
|
||||||
|
.prt_addr1(rd_addr_hp2),
|
||||||
|
.prt_addr2(rd_addr_hp3),
|
||||||
|
.prt_bytes1(rd_bytes_hp2),
|
||||||
|
.prt_bytes2(rd_bytes_hp3),
|
||||||
|
.prt_dv1(rd_dv_ddr_hp2),
|
||||||
|
.prt_dv2(rd_dv_ddr_hp3),
|
||||||
|
.prt_req(ddr_rd_req),
|
||||||
|
.prt_qos(ddr_rd_qos),
|
||||||
|
.prt_data(ddr_rd_data),
|
||||||
|
.prt_addr(ddr_rd_addr),
|
||||||
|
.prt_bytes(ddr_rd_bytes),
|
||||||
|
.prt_dv(ddr_rd_dv)
|
||||||
|
);
|
||||||
|
|
||||||
|
endmodule
|
@ -0,0 +1,154 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_arb_rd.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Module that arbitrates between 2 read requests from 2 ports.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_arb_rd(
|
||||||
|
rstn,
|
||||||
|
sw_clk,
|
||||||
|
|
||||||
|
qos1,
|
||||||
|
qos2,
|
||||||
|
|
||||||
|
prt_req1,
|
||||||
|
prt_req2,
|
||||||
|
prt_bytes1,
|
||||||
|
prt_bytes2,
|
||||||
|
prt_addr1,
|
||||||
|
prt_addr2,
|
||||||
|
prt_data1,
|
||||||
|
prt_data2,
|
||||||
|
prt_dv1,
|
||||||
|
prt_dv2,
|
||||||
|
|
||||||
|
prt_req,
|
||||||
|
prt_qos,
|
||||||
|
prt_addr,
|
||||||
|
prt_bytes,
|
||||||
|
prt_data,
|
||||||
|
prt_dv
|
||||||
|
|
||||||
|
);
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
input rstn, sw_clk;
|
||||||
|
input [axi_qos_width-1:0] qos1,qos2;
|
||||||
|
input prt_req1, prt_req2;
|
||||||
|
input [addr_width-1:0] prt_addr1, prt_addr2;
|
||||||
|
input [max_burst_bytes_width:0] prt_bytes1, prt_bytes2;
|
||||||
|
output reg prt_dv1, prt_dv2;
|
||||||
|
output reg [max_burst_bits-1:0] prt_data1,prt_data2;
|
||||||
|
|
||||||
|
output reg prt_req;
|
||||||
|
output reg [axi_qos_width-1:0] prt_qos;
|
||||||
|
output reg [addr_width-1:0] prt_addr;
|
||||||
|
output reg [max_burst_bytes_width:0] prt_bytes;
|
||||||
|
input [max_burst_bits-1:0] prt_data;
|
||||||
|
input prt_dv;
|
||||||
|
|
||||||
|
parameter wait_req = 2'b00, serv_req1 = 2'b01, serv_req2 = 2'b10,wait_dv_low = 2'b11;
|
||||||
|
reg [1:0] state;
|
||||||
|
|
||||||
|
always@(posedge sw_clk or negedge rstn)
|
||||||
|
begin
|
||||||
|
if(!rstn) begin
|
||||||
|
state = wait_req;
|
||||||
|
prt_req = 1'b0;
|
||||||
|
prt_dv1 = 1'b0;
|
||||||
|
prt_dv2 = 1'b0;
|
||||||
|
prt_qos = 0;
|
||||||
|
end else begin
|
||||||
|
case(state)
|
||||||
|
wait_req:begin
|
||||||
|
state = wait_req;
|
||||||
|
prt_dv1 = 1'b0;
|
||||||
|
prt_dv2 = 1'b0;
|
||||||
|
prt_req = 0;
|
||||||
|
if(prt_req1 && !prt_req2) begin
|
||||||
|
state = serv_req1;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
end else if(!prt_req1 && prt_req2) begin
|
||||||
|
state = serv_req2;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos2;
|
||||||
|
prt_addr = prt_addr2;
|
||||||
|
prt_bytes = prt_bytes2;
|
||||||
|
end else if(prt_req1 && prt_req2) begin
|
||||||
|
if(qos1 > qos2) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
state = serv_req1;
|
||||||
|
end else if(qos1 < qos2) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_addr = prt_addr2;
|
||||||
|
prt_qos = qos2;
|
||||||
|
prt_bytes = prt_bytes2;
|
||||||
|
state = serv_req2;
|
||||||
|
end else begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
state = serv_req1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
serv_req1:begin
|
||||||
|
state = serv_req1;
|
||||||
|
prt_dv2 = 1'b0;
|
||||||
|
if(prt_dv) begin
|
||||||
|
prt_dv1 = 1'b1;
|
||||||
|
prt_data1 = prt_data;
|
||||||
|
prt_req = 0;
|
||||||
|
if(prt_req2) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos2;
|
||||||
|
prt_addr = prt_addr2;
|
||||||
|
prt_bytes = prt_bytes2;
|
||||||
|
state = serv_req2;
|
||||||
|
end else begin
|
||||||
|
state = wait_dv_low;
|
||||||
|
//state = wait_req;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
serv_req2:begin
|
||||||
|
state = serv_req2;
|
||||||
|
prt_dv1 = 1'b0;
|
||||||
|
if(prt_dv) begin
|
||||||
|
prt_dv2 = 1'b1;
|
||||||
|
prt_data2 = prt_data;
|
||||||
|
prt_req = 0;
|
||||||
|
if(prt_req1) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
state = serv_req1;
|
||||||
|
end else begin
|
||||||
|
state = wait_dv_low;
|
||||||
|
//state = wait_req;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
wait_dv_low:begin
|
||||||
|
prt_dv1 = 1'b0;
|
||||||
|
prt_dv2 = 1'b0;
|
||||||
|
state = wait_dv_low;
|
||||||
|
if(!prt_dv)
|
||||||
|
state = wait_req;
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end /// if else
|
||||||
|
end /// always
|
||||||
|
endmodule
|
@ -0,0 +1,254 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_arb_rd_4.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Module that arbitrates between 4 read requests from 4 ports.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_arb_rd_4(
|
||||||
|
rstn,
|
||||||
|
sw_clk,
|
||||||
|
|
||||||
|
qos1,
|
||||||
|
qos2,
|
||||||
|
qos3,
|
||||||
|
qos4,
|
||||||
|
|
||||||
|
prt_req1,
|
||||||
|
prt_req2,
|
||||||
|
prt_req3,
|
||||||
|
prt_req4,
|
||||||
|
|
||||||
|
prt_data1,
|
||||||
|
prt_data2,
|
||||||
|
prt_data3,
|
||||||
|
prt_data4,
|
||||||
|
|
||||||
|
prt_addr1,
|
||||||
|
prt_addr2,
|
||||||
|
prt_addr3,
|
||||||
|
prt_addr4,
|
||||||
|
|
||||||
|
prt_bytes1,
|
||||||
|
prt_bytes2,
|
||||||
|
prt_bytes3,
|
||||||
|
prt_bytes4,
|
||||||
|
|
||||||
|
prt_dv1,
|
||||||
|
prt_dv2,
|
||||||
|
prt_dv3,
|
||||||
|
prt_dv4,
|
||||||
|
|
||||||
|
prt_qos,
|
||||||
|
prt_req,
|
||||||
|
prt_data,
|
||||||
|
prt_addr,
|
||||||
|
prt_bytes,
|
||||||
|
prt_dv
|
||||||
|
|
||||||
|
);
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
input rstn, sw_clk;
|
||||||
|
input [axi_qos_width-1:0] qos1,qos2,qos3,qos4;
|
||||||
|
input prt_req1, prt_req2,prt_req3, prt_req4, prt_dv;
|
||||||
|
output reg [max_burst_bits-1:0] prt_data1,prt_data2,prt_data3,prt_data4;
|
||||||
|
input [addr_width-1:0] prt_addr1,prt_addr2,prt_addr3,prt_addr4;
|
||||||
|
input [max_burst_bytes_width:0] prt_bytes1,prt_bytes2,prt_bytes3,prt_bytes4;
|
||||||
|
output reg prt_dv1,prt_dv2,prt_dv3,prt_dv4,prt_req;
|
||||||
|
input [max_burst_bits-1:0] prt_data;
|
||||||
|
output reg [addr_width-1:0] prt_addr;
|
||||||
|
output reg [max_burst_bytes_width:0] prt_bytes;
|
||||||
|
output reg [axi_qos_width-1:0] prt_qos;
|
||||||
|
|
||||||
|
parameter wait_req = 3'b000, serv_req1 = 3'b001, serv_req2 = 3'b010, serv_req3 = 3'b011, serv_req4 = 3'b100, wait_dv_low=3'b101;
|
||||||
|
reg [2:0] state;
|
||||||
|
|
||||||
|
always@(posedge sw_clk or negedge rstn)
|
||||||
|
begin
|
||||||
|
if(!rstn) begin
|
||||||
|
state = wait_req;
|
||||||
|
prt_req = 1'b0;
|
||||||
|
prt_dv1 = 1'b0;
|
||||||
|
prt_dv2 = 1'b0;
|
||||||
|
prt_dv3 = 1'b0;
|
||||||
|
prt_dv4 = 1'b0;
|
||||||
|
prt_qos = 0;
|
||||||
|
end else begin
|
||||||
|
case(state)
|
||||||
|
wait_req:begin
|
||||||
|
state = wait_req;
|
||||||
|
prt_dv1 = 1'b0;
|
||||||
|
prt_dv2 = 1'b0;
|
||||||
|
prt_dv3 = 1'b0;
|
||||||
|
prt_dv4 = 1'b0;
|
||||||
|
prt_req = 1'b0;
|
||||||
|
if(prt_req1) begin
|
||||||
|
state = serv_req1;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
end else if(prt_req2) begin
|
||||||
|
state = serv_req2;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos2;
|
||||||
|
prt_addr = prt_addr2;
|
||||||
|
prt_bytes = prt_bytes2;
|
||||||
|
end else if(prt_req3) begin
|
||||||
|
state = serv_req3;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos3;
|
||||||
|
prt_addr = prt_addr3;
|
||||||
|
prt_bytes = prt_bytes3;
|
||||||
|
end else if(prt_req4) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_addr = prt_addr4;
|
||||||
|
prt_qos = qos4;
|
||||||
|
prt_bytes = prt_bytes4;
|
||||||
|
state = serv_req4;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
serv_req1:begin
|
||||||
|
state = serv_req1;
|
||||||
|
prt_dv2 = 1'b0;
|
||||||
|
prt_dv3 = 1'b0;
|
||||||
|
prt_dv4 = 1'b0;
|
||||||
|
if(prt_dv)begin
|
||||||
|
prt_dv1 = 1'b1;
|
||||||
|
prt_data1 = prt_data;
|
||||||
|
//state = wait_req;
|
||||||
|
state = wait_dv_low;
|
||||||
|
prt_req = 1'b0;
|
||||||
|
if(prt_req2) begin
|
||||||
|
state = serv_req2;
|
||||||
|
prt_qos = qos2;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_addr = prt_addr2;
|
||||||
|
prt_bytes = prt_bytes2;
|
||||||
|
end else if(prt_req3) begin
|
||||||
|
state = serv_req3;
|
||||||
|
prt_qos = qos3;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_addr = prt_addr3;
|
||||||
|
prt_bytes = prt_bytes3;
|
||||||
|
end else if(prt_req4) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos4;
|
||||||
|
prt_addr = prt_addr4;
|
||||||
|
prt_bytes = prt_bytes4;
|
||||||
|
state = serv_req4;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
serv_req2:begin
|
||||||
|
state = serv_req2;
|
||||||
|
prt_dv1 = 1'b0;
|
||||||
|
prt_dv3 = 1'b0;
|
||||||
|
prt_dv4 = 1'b0;
|
||||||
|
if(prt_dv)begin
|
||||||
|
prt_dv2 = 1'b1;
|
||||||
|
prt_data2 = prt_data;
|
||||||
|
//state = wait_req;
|
||||||
|
state = wait_dv_low;
|
||||||
|
prt_req = 1'b0;
|
||||||
|
if(prt_req3) begin
|
||||||
|
state = serv_req3;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos3;
|
||||||
|
prt_addr = prt_addr3;
|
||||||
|
prt_bytes = prt_bytes3;
|
||||||
|
end else if(prt_req4) begin
|
||||||
|
state = serv_req4;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos4;
|
||||||
|
prt_addr = prt_addr4;
|
||||||
|
prt_bytes = prt_bytes4;
|
||||||
|
end else if(prt_req1) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
state = serv_req1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
serv_req3:begin
|
||||||
|
state = serv_req3;
|
||||||
|
prt_dv1 = 1'b0;
|
||||||
|
prt_dv2 = 1'b0;
|
||||||
|
prt_dv4 = 1'b0;
|
||||||
|
if(prt_dv)begin
|
||||||
|
prt_dv3 = 1'b1;
|
||||||
|
prt_data3 = prt_data;
|
||||||
|
//state = wait_req;
|
||||||
|
state = wait_dv_low;
|
||||||
|
prt_req = 1'b0;
|
||||||
|
if(prt_req4) begin
|
||||||
|
state = serv_req4;
|
||||||
|
prt_qos = qos4;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_addr = prt_addr4;
|
||||||
|
prt_bytes = prt_bytes4;
|
||||||
|
end else if(prt_req1) begin
|
||||||
|
state = serv_req1;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
end else if(prt_req2) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos2;
|
||||||
|
prt_addr = prt_addr2;
|
||||||
|
prt_bytes = prt_bytes2;
|
||||||
|
state = serv_req2;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
serv_req4:begin
|
||||||
|
state = serv_req4;
|
||||||
|
prt_dv1 = 1'b0;
|
||||||
|
prt_dv2 = 1'b0;
|
||||||
|
prt_dv3 = 1'b0;
|
||||||
|
if(prt_dv)begin
|
||||||
|
prt_dv4 = 1'b1;
|
||||||
|
prt_data4 = prt_data;
|
||||||
|
//state = wait_req;
|
||||||
|
state = wait_dv_low;
|
||||||
|
prt_req = 1'b0;
|
||||||
|
if(prt_req1) begin
|
||||||
|
state = serv_req1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
end else if(prt_req2) begin
|
||||||
|
state = serv_req2;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos2;
|
||||||
|
prt_addr = prt_addr2;
|
||||||
|
prt_bytes = prt_bytes2;
|
||||||
|
end else if(prt_req3) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_addr = prt_addr3;
|
||||||
|
prt_qos = qos3;
|
||||||
|
prt_bytes = prt_bytes3;
|
||||||
|
state = serv_req3;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
wait_dv_low:begin
|
||||||
|
state = wait_dv_low;
|
||||||
|
prt_dv1 = 1'b0;
|
||||||
|
prt_dv2 = 1'b0;
|
||||||
|
prt_dv3 = 1'b0;
|
||||||
|
prt_dv4 = 1'b0;
|
||||||
|
if(!prt_dv)
|
||||||
|
state = wait_req;
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end /// if else
|
||||||
|
end /// always
|
||||||
|
endmodule
|
@ -0,0 +1,152 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_arb_wr.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Module that arbitrates between 2 write requests from 2 ports.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_arb_wr(
|
||||||
|
rstn,
|
||||||
|
sw_clk,
|
||||||
|
qos1,
|
||||||
|
qos2,
|
||||||
|
prt_dv1,
|
||||||
|
prt_dv2,
|
||||||
|
prt_data1,
|
||||||
|
prt_data2,
|
||||||
|
prt_addr1,
|
||||||
|
prt_addr2,
|
||||||
|
prt_bytes1,
|
||||||
|
prt_bytes2,
|
||||||
|
prt_ack1,
|
||||||
|
prt_ack2,
|
||||||
|
prt_qos,
|
||||||
|
prt_req,
|
||||||
|
prt_data,
|
||||||
|
prt_addr,
|
||||||
|
prt_bytes,
|
||||||
|
prt_ack
|
||||||
|
|
||||||
|
);
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
input rstn, sw_clk;
|
||||||
|
input [axi_qos_width-1:0] qos1,qos2;
|
||||||
|
input [max_burst_bits-1:0] prt_data1,prt_data2;
|
||||||
|
input [addr_width-1:0] prt_addr1,prt_addr2;
|
||||||
|
input [max_burst_bytes_width:0] prt_bytes1,prt_bytes2;
|
||||||
|
input prt_dv1, prt_dv2, prt_ack;
|
||||||
|
output reg prt_ack1,prt_ack2,prt_req;
|
||||||
|
output reg [max_burst_bits-1:0] prt_data;
|
||||||
|
output reg [addr_width-1:0] prt_addr;
|
||||||
|
output reg [max_burst_bytes_width:0] prt_bytes;
|
||||||
|
output reg [axi_qos_width-1:0] prt_qos;
|
||||||
|
|
||||||
|
parameter wait_req = 2'b00, serv_req1 = 2'b01, serv_req2 = 2'b10,wait_ack_low = 2'b11;
|
||||||
|
reg [1:0] state,temp_state;
|
||||||
|
|
||||||
|
always@(posedge sw_clk or negedge rstn)
|
||||||
|
begin
|
||||||
|
if(!rstn) begin
|
||||||
|
state = wait_req;
|
||||||
|
prt_req = 1'b0;
|
||||||
|
prt_ack1 = 1'b0;
|
||||||
|
prt_ack2 = 1'b0;
|
||||||
|
prt_qos = 0;
|
||||||
|
end else begin
|
||||||
|
case(state)
|
||||||
|
wait_req:begin
|
||||||
|
state = wait_req;
|
||||||
|
prt_ack1 = 1'b0;
|
||||||
|
prt_ack2 = 1'b0;
|
||||||
|
prt_req = 1'b0;
|
||||||
|
if(prt_dv1 && !prt_dv2) begin
|
||||||
|
state = serv_req1;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_data = prt_data1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
end else if(!prt_dv1 && prt_dv2) begin
|
||||||
|
state = serv_req2;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos2;
|
||||||
|
prt_data = prt_data2;
|
||||||
|
prt_addr = prt_addr2;
|
||||||
|
prt_bytes = prt_bytes2;
|
||||||
|
end else if(prt_dv1 && prt_dv2) begin
|
||||||
|
if(qos1 > qos2) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
prt_data = prt_data1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
state = serv_req1;
|
||||||
|
end else if(qos1 < qos2) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos2;
|
||||||
|
prt_data = prt_data2;
|
||||||
|
prt_addr = prt_addr2;
|
||||||
|
prt_bytes = prt_bytes2;
|
||||||
|
state = serv_req2;
|
||||||
|
end else begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
prt_data = prt_data1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
state = serv_req1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
serv_req1:begin
|
||||||
|
state = serv_req1;
|
||||||
|
prt_ack2 = 1'b0;
|
||||||
|
if(prt_ack) begin
|
||||||
|
prt_ack1 = 1'b1;
|
||||||
|
prt_req = 0;
|
||||||
|
if(prt_dv2) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos2;
|
||||||
|
prt_data = prt_data2;
|
||||||
|
prt_addr = prt_addr2;
|
||||||
|
prt_bytes = prt_bytes2;
|
||||||
|
state = serv_req2;
|
||||||
|
end else begin
|
||||||
|
// state = wait_req;
|
||||||
|
state = wait_ack_low;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
serv_req2:begin
|
||||||
|
state = serv_req2;
|
||||||
|
prt_ack1 = 1'b0;
|
||||||
|
if(prt_ack) begin
|
||||||
|
prt_ack2 = 1'b1;
|
||||||
|
prt_req = 0;
|
||||||
|
if(prt_dv1) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
prt_data = prt_data1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
state = serv_req1;
|
||||||
|
end else begin
|
||||||
|
state = wait_ack_low;
|
||||||
|
// state = wait_req;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
wait_ack_low:begin
|
||||||
|
prt_ack1 = 1'b0;
|
||||||
|
prt_ack2 = 1'b0;
|
||||||
|
state = wait_ack_low;
|
||||||
|
if(!prt_ack)
|
||||||
|
state = wait_req;
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end /// if else
|
||||||
|
end /// always
|
||||||
|
endmodule
|
@ -0,0 +1,265 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_arb_wr_4.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Module that arbitrates between 4 write requests from 4 ports.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_arb_wr_4(
|
||||||
|
rstn,
|
||||||
|
sw_clk,
|
||||||
|
|
||||||
|
qos1,
|
||||||
|
qos2,
|
||||||
|
qos3,
|
||||||
|
qos4,
|
||||||
|
|
||||||
|
prt_dv1,
|
||||||
|
prt_dv2,
|
||||||
|
prt_dv3,
|
||||||
|
prt_dv4,
|
||||||
|
|
||||||
|
prt_data1,
|
||||||
|
prt_data2,
|
||||||
|
prt_data3,
|
||||||
|
prt_data4,
|
||||||
|
|
||||||
|
prt_addr1,
|
||||||
|
prt_addr2,
|
||||||
|
prt_addr3,
|
||||||
|
prt_addr4,
|
||||||
|
|
||||||
|
prt_bytes1,
|
||||||
|
prt_bytes2,
|
||||||
|
prt_bytes3,
|
||||||
|
prt_bytes4,
|
||||||
|
|
||||||
|
prt_ack1,
|
||||||
|
prt_ack2,
|
||||||
|
prt_ack3,
|
||||||
|
prt_ack4,
|
||||||
|
|
||||||
|
prt_qos,
|
||||||
|
prt_req,
|
||||||
|
prt_data,
|
||||||
|
prt_addr,
|
||||||
|
prt_bytes,
|
||||||
|
prt_ack
|
||||||
|
|
||||||
|
);
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
input rstn, sw_clk;
|
||||||
|
input [axi_qos_width-1:0] qos1,qos2,qos3,qos4;
|
||||||
|
input [max_burst_bits-1:0] prt_data1,prt_data2,prt_data3,prt_data4;
|
||||||
|
input [addr_width-1:0] prt_addr1,prt_addr2,prt_addr3,prt_addr4;
|
||||||
|
input [max_burst_bytes_width:0] prt_bytes1,prt_bytes2,prt_bytes3,prt_bytes4;
|
||||||
|
input prt_dv1, prt_dv2,prt_dv3, prt_dv4, prt_ack;
|
||||||
|
output reg prt_ack1,prt_ack2,prt_ack3,prt_ack4,prt_req;
|
||||||
|
output reg [max_burst_bits-1:0] prt_data;
|
||||||
|
output reg [addr_width-1:0] prt_addr;
|
||||||
|
output reg [max_burst_bytes_width:0] prt_bytes;
|
||||||
|
output reg [axi_qos_width-1:0] prt_qos;
|
||||||
|
parameter wait_req = 3'b000, serv_req1 = 3'b001, serv_req2 = 3'b010, serv_req3 = 3'b011, serv_req4 = 4'b100,wait_ack_low = 3'b101;
|
||||||
|
reg [2:0] state;
|
||||||
|
|
||||||
|
always@(posedge sw_clk or negedge rstn)
|
||||||
|
begin
|
||||||
|
if(!rstn) begin
|
||||||
|
state = wait_req;
|
||||||
|
prt_req = 1'b0;
|
||||||
|
prt_ack1 = 1'b0;
|
||||||
|
prt_ack2 = 1'b0;
|
||||||
|
prt_ack3 = 1'b0;
|
||||||
|
prt_ack4 = 1'b0;
|
||||||
|
prt_qos = 0;
|
||||||
|
end else begin
|
||||||
|
case(state)
|
||||||
|
wait_req:begin
|
||||||
|
state = wait_req;
|
||||||
|
prt_ack1 = 1'b0;
|
||||||
|
prt_ack2 = 1'b0;
|
||||||
|
prt_ack3 = 1'b0;
|
||||||
|
prt_ack4 = 1'b0;
|
||||||
|
prt_req = 0;
|
||||||
|
if(prt_dv1) begin
|
||||||
|
state = serv_req1;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
prt_data = prt_data1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
end else if(prt_dv2) begin
|
||||||
|
state = serv_req2;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos2;
|
||||||
|
prt_data = prt_data2;
|
||||||
|
prt_addr = prt_addr2;
|
||||||
|
prt_bytes = prt_bytes2;
|
||||||
|
end else if(prt_dv3) begin
|
||||||
|
state = serv_req3;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos3;
|
||||||
|
prt_data = prt_data3;
|
||||||
|
prt_addr = prt_addr3;
|
||||||
|
prt_bytes = prt_bytes3;
|
||||||
|
end else if(prt_dv4) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos4;
|
||||||
|
prt_data = prt_data4;
|
||||||
|
prt_addr = prt_addr4;
|
||||||
|
prt_bytes = prt_bytes4;
|
||||||
|
state = serv_req4;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
serv_req1:begin
|
||||||
|
state = serv_req1;
|
||||||
|
prt_ack2 = 1'b0;
|
||||||
|
prt_ack3 = 1'b0;
|
||||||
|
prt_ack4 = 1'b0;
|
||||||
|
if(prt_ack)begin
|
||||||
|
prt_ack1 = 1'b1;
|
||||||
|
//state = wait_req;
|
||||||
|
state = wait_ack_low;
|
||||||
|
prt_req = 0;
|
||||||
|
if(prt_dv2) begin
|
||||||
|
state = serv_req2;
|
||||||
|
prt_qos = qos2;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_data = prt_data2;
|
||||||
|
prt_addr = prt_addr2;
|
||||||
|
prt_bytes = prt_bytes2;
|
||||||
|
end else if(prt_dv3) begin
|
||||||
|
state = serv_req3;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos3;
|
||||||
|
prt_data = prt_data3;
|
||||||
|
prt_addr = prt_addr3;
|
||||||
|
prt_bytes = prt_bytes3;
|
||||||
|
end else if(prt_dv4) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos4;
|
||||||
|
prt_data = prt_data4;
|
||||||
|
prt_addr = prt_addr4;
|
||||||
|
prt_bytes = prt_bytes4;
|
||||||
|
state = serv_req4;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
serv_req2:begin
|
||||||
|
state = serv_req2;
|
||||||
|
prt_ack1 = 1'b0;
|
||||||
|
prt_ack3 = 1'b0;
|
||||||
|
prt_ack4 = 1'b0;
|
||||||
|
if(prt_ack)begin
|
||||||
|
prt_ack2 = 1'b1;
|
||||||
|
//state = wait_req;
|
||||||
|
state = wait_ack_low;
|
||||||
|
prt_req = 0;
|
||||||
|
if(prt_dv3) begin
|
||||||
|
state = serv_req3;
|
||||||
|
prt_qos = qos3;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_data = prt_data3;
|
||||||
|
prt_addr = prt_addr3;
|
||||||
|
prt_bytes = prt_bytes3;
|
||||||
|
end else if(prt_dv4) begin
|
||||||
|
state = serv_req4;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos4;
|
||||||
|
prt_data = prt_data4;
|
||||||
|
prt_addr = prt_addr4;
|
||||||
|
prt_bytes = prt_bytes4;
|
||||||
|
end else if(prt_dv1) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
prt_data = prt_data1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
state = serv_req1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
serv_req3:begin
|
||||||
|
state = serv_req3;
|
||||||
|
prt_ack1 = 1'b0;
|
||||||
|
prt_ack2 = 1'b0;
|
||||||
|
prt_ack4 = 1'b0;
|
||||||
|
if(prt_ack)begin
|
||||||
|
prt_ack3 = 1'b1;
|
||||||
|
// state = wait_req;
|
||||||
|
state = wait_ack_low;
|
||||||
|
prt_req = 0;
|
||||||
|
if(prt_dv4) begin
|
||||||
|
state = serv_req4;
|
||||||
|
prt_qos = qos4;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_data = prt_data4;
|
||||||
|
prt_addr = prt_addr4;
|
||||||
|
prt_bytes = prt_bytes4;
|
||||||
|
end else if(prt_dv1) begin
|
||||||
|
state = serv_req1;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
prt_data = prt_data1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
end else if(prt_dv2) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos2;
|
||||||
|
prt_data = prt_data2;
|
||||||
|
prt_addr = prt_addr2;
|
||||||
|
prt_bytes = prt_bytes2;
|
||||||
|
state = serv_req2;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
serv_req4:begin
|
||||||
|
state = serv_req4;
|
||||||
|
prt_ack1 = 1'b0;
|
||||||
|
prt_ack2 = 1'b0;
|
||||||
|
prt_ack3 = 1'b0;
|
||||||
|
if(prt_ack)begin
|
||||||
|
prt_ack4 = 1'b1;
|
||||||
|
//state = wait_req;
|
||||||
|
state = wait_ack_low;
|
||||||
|
prt_req = 0;
|
||||||
|
if(prt_dv1) begin
|
||||||
|
state = serv_req1;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos1;
|
||||||
|
prt_data = prt_data1;
|
||||||
|
prt_addr = prt_addr1;
|
||||||
|
prt_bytes = prt_bytes1;
|
||||||
|
end else if(prt_dv2) begin
|
||||||
|
state = serv_req2;
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos2;
|
||||||
|
prt_data = prt_data2;
|
||||||
|
prt_addr = prt_addr2;
|
||||||
|
prt_bytes = prt_bytes2;
|
||||||
|
end else if(prt_dv3) begin
|
||||||
|
prt_req = 1;
|
||||||
|
prt_qos = qos3;
|
||||||
|
prt_data = prt_data3;
|
||||||
|
prt_addr = prt_addr3;
|
||||||
|
prt_bytes = prt_bytes3;
|
||||||
|
state = serv_req3;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
wait_ack_low:begin
|
||||||
|
state = wait_ack_low;
|
||||||
|
prt_ack1 = 1'b0;
|
||||||
|
prt_ack2 = 1'b0;
|
||||||
|
prt_ack3 = 1'b0;
|
||||||
|
prt_ack4 = 1'b0;
|
||||||
|
if(!prt_ack)
|
||||||
|
state = wait_req;
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end /// if else
|
||||||
|
end /// always
|
||||||
|
endmodule
|
@ -0,0 +1,679 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_axi_master.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Model that acts as PS AXI Master port interface.
|
||||||
|
* It uses AXI3 Master BFM
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_axi_master (
|
||||||
|
M_RESETN,
|
||||||
|
M_ARVALID,
|
||||||
|
M_AWVALID,
|
||||||
|
M_BREADY,
|
||||||
|
M_RREADY,
|
||||||
|
M_WLAST,
|
||||||
|
M_WVALID,
|
||||||
|
M_ARID,
|
||||||
|
M_AWID,
|
||||||
|
M_WID,
|
||||||
|
M_ARBURST,
|
||||||
|
M_ARLOCK,
|
||||||
|
M_ARSIZE,
|
||||||
|
M_AWBURST,
|
||||||
|
M_AWLOCK,
|
||||||
|
M_AWSIZE,
|
||||||
|
M_ARPROT,
|
||||||
|
M_AWPROT,
|
||||||
|
M_ARADDR,
|
||||||
|
M_AWADDR,
|
||||||
|
M_WDATA,
|
||||||
|
M_ARCACHE,
|
||||||
|
M_ARLEN,
|
||||||
|
M_AWCACHE,
|
||||||
|
M_AWLEN,
|
||||||
|
M_ARQOS, // not connected to AXI BFM
|
||||||
|
M_AWQOS, // not connected to AXI BFM
|
||||||
|
M_WSTRB,
|
||||||
|
M_ACLK,
|
||||||
|
M_ARREADY,
|
||||||
|
M_AWREADY,
|
||||||
|
M_BVALID,
|
||||||
|
M_RLAST,
|
||||||
|
M_RVALID,
|
||||||
|
M_WREADY,
|
||||||
|
M_BID,
|
||||||
|
M_RID,
|
||||||
|
M_BRESP,
|
||||||
|
M_RRESP,
|
||||||
|
M_RDATA
|
||||||
|
|
||||||
|
);
|
||||||
|
parameter enable_this_port = 0;
|
||||||
|
parameter master_name = "Master";
|
||||||
|
parameter data_bus_width = 32;
|
||||||
|
parameter address_bus_width = 32;
|
||||||
|
parameter id_bus_width = 6;
|
||||||
|
parameter max_outstanding_transactions = 8;
|
||||||
|
parameter exclusive_access_supported = 0;
|
||||||
|
parameter EXCL_ID = 12'hC00;
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
/* IDs for Masters
|
||||||
|
// l2m1 (CPU000)
|
||||||
|
12'b11_000_000_00_00
|
||||||
|
12'b11_010_000_00_00
|
||||||
|
12'b11_011_000_00_00
|
||||||
|
12'b11_100_000_00_00
|
||||||
|
12'b11_101_000_00_00
|
||||||
|
12'b11_110_000_00_00
|
||||||
|
12'b11_111_000_00_00
|
||||||
|
// l2m1 (CPU001)
|
||||||
|
12'b11_000_001_00_00
|
||||||
|
12'b11_010_001_00_00
|
||||||
|
12'b11_011_001_00_00
|
||||||
|
12'b11_100_001_00_00
|
||||||
|
12'b11_101_001_00_00
|
||||||
|
12'b11_110_001_00_00
|
||||||
|
12'b11_111_001_00_00
|
||||||
|
*/
|
||||||
|
|
||||||
|
input M_RESETN;
|
||||||
|
|
||||||
|
output M_ARVALID;
|
||||||
|
output M_AWVALID;
|
||||||
|
output M_BREADY;
|
||||||
|
output M_RREADY;
|
||||||
|
output M_WLAST;
|
||||||
|
output M_WVALID;
|
||||||
|
output [id_bus_width-1:0] M_ARID;
|
||||||
|
output [id_bus_width-1:0] M_AWID;
|
||||||
|
output [id_bus_width-1:0] M_WID;
|
||||||
|
output [axi_brst_type_width-1:0] M_ARBURST;
|
||||||
|
output [axi_lock_width-1:0] M_ARLOCK;
|
||||||
|
output [axi_size_width-1:0] M_ARSIZE;
|
||||||
|
output [axi_brst_type_width-1:0] M_AWBURST;
|
||||||
|
output [axi_lock_width-1:0] M_AWLOCK;
|
||||||
|
output [axi_size_width-1:0] M_AWSIZE;
|
||||||
|
output [axi_prot_width-1:0] M_ARPROT;
|
||||||
|
output [axi_prot_width-1:0] M_AWPROT;
|
||||||
|
output [address_bus_width-1:0] M_ARADDR;
|
||||||
|
output [address_bus_width-1:0] M_AWADDR;
|
||||||
|
output [data_bus_width-1:0] M_WDATA;
|
||||||
|
output [axi_cache_width-1:0] M_ARCACHE;
|
||||||
|
output [axi_len_width-1:0] M_ARLEN;
|
||||||
|
output [axi_qos_width-1:0] M_ARQOS; // not connected to AXI BFM
|
||||||
|
output [axi_cache_width-1:0] M_AWCACHE;
|
||||||
|
output [axi_len_width-1:0] M_AWLEN;
|
||||||
|
output [axi_qos_width-1:0] M_AWQOS; // not connected to AXI BFM
|
||||||
|
output [(data_bus_width/8)-1:0] M_WSTRB;
|
||||||
|
input M_ACLK;
|
||||||
|
input M_ARREADY;
|
||||||
|
input M_AWREADY;
|
||||||
|
input M_BVALID;
|
||||||
|
input M_RLAST;
|
||||||
|
input M_RVALID;
|
||||||
|
input M_WREADY;
|
||||||
|
input [id_bus_width-1:0] M_BID;
|
||||||
|
input [id_bus_width-1:0] M_RID;
|
||||||
|
input [axi_rsp_width-1:0] M_BRESP;
|
||||||
|
input [axi_rsp_width-1:0] M_RRESP;
|
||||||
|
input [data_bus_width-1:0] M_RDATA;
|
||||||
|
|
||||||
|
wire net_RESETN;
|
||||||
|
wire net_RVALID;
|
||||||
|
wire net_BVALID;
|
||||||
|
reg DEBUG_INFO = 1'b1;
|
||||||
|
reg STOP_ON_ERROR = 1'b1;
|
||||||
|
|
||||||
|
integer use_id_no = 0;
|
||||||
|
|
||||||
|
assign M_ARQOS = 'b0;
|
||||||
|
assign M_AWQOS = 'b0;
|
||||||
|
assign net_RESETN = M_RESETN; //ENABLE_THIS_PORT ? M_RESETN : 1'b0;
|
||||||
|
assign net_RVALID = enable_this_port ? M_RVALID : 1'b0;
|
||||||
|
assign net_BVALID = enable_this_port ? M_BVALID : 1'b0;
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
if(DEBUG_INFO) begin
|
||||||
|
if(enable_this_port)
|
||||||
|
$display("[%0d] : %0s : %0s : Port is ENABLED.",$time, DISP_INFO, master_name);
|
||||||
|
else
|
||||||
|
$display("[%0d] : %0s : %0s : Port is DISABLED.",$time, DISP_INFO, master_name);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
initial master.set_disable_reset_value_checks(1);
|
||||||
|
initial begin
|
||||||
|
repeat(2) @(posedge M_ACLK);
|
||||||
|
if(!enable_this_port) begin
|
||||||
|
master.set_channel_level_info(0);
|
||||||
|
master.set_function_level_info(0);
|
||||||
|
end
|
||||||
|
master.RESPONSE_TIMEOUT = 0;
|
||||||
|
end
|
||||||
|
|
||||||
|
cdn_axi3_master_bfm #(master_name,
|
||||||
|
data_bus_width,
|
||||||
|
address_bus_width,
|
||||||
|
id_bus_width,
|
||||||
|
max_outstanding_transactions,
|
||||||
|
exclusive_access_supported)
|
||||||
|
|
||||||
|
master (.ACLK (M_ACLK),
|
||||||
|
.ARESETn (net_RESETN), /// confirm this
|
||||||
|
// Write Address Channel
|
||||||
|
.AWID (M_AWID),
|
||||||
|
.AWADDR (M_AWADDR),
|
||||||
|
.AWLEN (M_AWLEN),
|
||||||
|
.AWSIZE (M_AWSIZE),
|
||||||
|
.AWBURST (M_AWBURST),
|
||||||
|
.AWLOCK (M_AWLOCK),
|
||||||
|
.AWCACHE (M_AWCACHE),
|
||||||
|
.AWPROT (M_AWPROT),
|
||||||
|
.AWVALID (M_AWVALID),
|
||||||
|
.AWREADY (M_AWREADY),
|
||||||
|
// Write Data Channel Signals.
|
||||||
|
.WID (M_WID),
|
||||||
|
.WDATA (M_WDATA),
|
||||||
|
.WSTRB (M_WSTRB),
|
||||||
|
.WLAST (M_WLAST),
|
||||||
|
.WVALID (M_WVALID),
|
||||||
|
.WREADY (M_WREADY),
|
||||||
|
// Write Response Channel Signals.
|
||||||
|
.BID (M_BID),
|
||||||
|
.BRESP (M_BRESP),
|
||||||
|
.BVALID (net_BVALID),
|
||||||
|
.BREADY (M_BREADY),
|
||||||
|
// Read Address Channel Signals.
|
||||||
|
.ARID (M_ARID),
|
||||||
|
.ARADDR (M_ARADDR),
|
||||||
|
.ARLEN (M_ARLEN),
|
||||||
|
.ARSIZE (M_ARSIZE),
|
||||||
|
.ARBURST (M_ARBURST),
|
||||||
|
.ARLOCK (M_ARLOCK),
|
||||||
|
.ARCACHE (M_ARCACHE),
|
||||||
|
.ARPROT (M_ARPROT),
|
||||||
|
.ARVALID (M_ARVALID),
|
||||||
|
.ARREADY (M_ARREADY),
|
||||||
|
// Read Data Channel Signals.
|
||||||
|
.RID (M_RID),
|
||||||
|
.RDATA (M_RDATA),
|
||||||
|
.RRESP (M_RRESP),
|
||||||
|
.RLAST (M_RLAST),
|
||||||
|
.RVALID (net_RVALID),
|
||||||
|
.RREADY (M_RREADY));
|
||||||
|
|
||||||
|
|
||||||
|
/* Call to BFM APIs */
|
||||||
|
task automatic read_burst(input [address_bus_width-1:0] addr,input [axi_len_width-1:0] len,input [axi_size_width-1:0] siz,input [axi_brst_type_width-1:0] burst,input [axi_lock_width-1:0] lck,input [axi_cache_width-1:0] cache,input [axi_prot_width-1:0] prot,output [(axi_mgp_data_width*axi_burst_len)-1:0] data, output [(axi_rsp_width*axi_burst_len)-1:0] response);
|
||||||
|
if(enable_this_port)begin
|
||||||
|
if(lck !== AXI_NRML)
|
||||||
|
master.READ_BURST(EXCL_ID,addr,len,siz,burst,lck,cache,prot,data,response);
|
||||||
|
else
|
||||||
|
master.READ_BURST(get_id(1),addr,len,siz,burst,lck,cache,prot,data,response);
|
||||||
|
end else begin
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. 'read_burst' will not be executed...",$time, DISP_ERR, master_name);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
task automatic write_burst(input [address_bus_width-1:0] addr,input [axi_len_width-1:0] len,input [axi_size_width-1:0] siz,input [axi_brst_type_width-1:0] burst,input [axi_lock_width-1:0] lck,input [axi_cache_width-1:0] cache,input [axi_prot_width-1:0] prot,input [(axi_mgp_data_width*axi_burst_len)-1:0] data,input integer datasize, output [axi_rsp_width-1:0] response);
|
||||||
|
if(enable_this_port)begin
|
||||||
|
if(lck !== AXI_NRML)
|
||||||
|
master.WRITE_BURST(EXCL_ID,addr,len,siz,burst,lck,cache,prot,data,datasize,response);
|
||||||
|
else
|
||||||
|
master.WRITE_BURST(get_id(1),addr,len,siz,burst,lck,cache,prot,data,datasize,response);
|
||||||
|
end else begin
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. 'write_burst' will not be executed...",$time, DISP_ERR, master_name);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
task automatic write_burst_concurrent(input [address_bus_width-1:0] addr,input [axi_len_width-1:0] len,input [axi_size_width-1:0] siz,input [axi_brst_type_width-1:0] burst,input [axi_lock_width-1:0] lck,input [axi_cache_width-1:0] cache,input [axi_prot_width-1:0] prot,input [(axi_mgp_data_width*axi_burst_len)-1:0] data,input integer datasize, output [axi_rsp_width-1:0] response);
|
||||||
|
if(enable_this_port)begin
|
||||||
|
if(lck !== AXI_NRML)
|
||||||
|
master.WRITE_BURST_CONCURRENT(EXCL_ID,addr,len,siz,burst,lck,cache,prot,data,datasize,response);
|
||||||
|
else
|
||||||
|
master.WRITE_BURST_CONCURRENT(get_id(1),addr,len,siz,burst,lck,cache,prot,data,datasize,response);
|
||||||
|
end else begin
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. 'write_burst_concurrent' will not be executed...",$time, DISP_ERR, master_name);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* local */
|
||||||
|
function automatic[id_bus_width-1:0] get_id;
|
||||||
|
input dummy;
|
||||||
|
begin
|
||||||
|
case(use_id_no)
|
||||||
|
// l2m1 (CPU000)
|
||||||
|
0 : get_id = 12'b11_000_000_00_00;
|
||||||
|
1 : get_id = 12'b11_010_000_00_00;
|
||||||
|
2 : get_id = 12'b11_011_000_00_00;
|
||||||
|
3 : get_id = 12'b11_100_000_00_00;
|
||||||
|
4 : get_id = 12'b11_101_000_00_00;
|
||||||
|
5 : get_id = 12'b11_110_000_00_00;
|
||||||
|
6 : get_id = 12'b11_111_000_00_00;
|
||||||
|
// l2m1 (CPU001)
|
||||||
|
7 : get_id = 12'b11_000_001_00_00;
|
||||||
|
8 : get_id = 12'b11_010_001_00_00;
|
||||||
|
9 : get_id = 12'b11_011_001_00_00;
|
||||||
|
10 : get_id = 12'b11_100_001_00_00;
|
||||||
|
11 : get_id = 12'b11_101_001_00_00;
|
||||||
|
12 : get_id = 12'b11_110_001_00_00;
|
||||||
|
13 : get_id = 12'b11_111_001_00_00;
|
||||||
|
endcase
|
||||||
|
if(use_id_no == 13)
|
||||||
|
use_id_no = 0;
|
||||||
|
else
|
||||||
|
use_id_no = use_id_no+1;
|
||||||
|
end
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
/* Write data from file */
|
||||||
|
task automatic write_from_file;
|
||||||
|
input [(max_chars*8)-1:0] file_name;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [int_width-1:0] wr_size;
|
||||||
|
output [axi_rsp_width-1:0] response;
|
||||||
|
reg [axi_rsp_width-1:0] wresp,rwrsp;
|
||||||
|
reg [addr_width-1:0] addr;
|
||||||
|
reg [(axi_burst_len*data_bus_width)-1 : 0] wr_data;
|
||||||
|
integer bytes;
|
||||||
|
integer trnsfr_bytes;
|
||||||
|
integer wr_fd;
|
||||||
|
integer succ;
|
||||||
|
integer trnsfr_lngth;
|
||||||
|
reg concurrent;
|
||||||
|
|
||||||
|
reg [id_bus_width-1:0] wr_id;
|
||||||
|
reg [axi_size_width-1:0] siz;
|
||||||
|
reg [axi_brst_type_width-1:0] burst;
|
||||||
|
reg [axi_lock_width-1:0] lck;
|
||||||
|
reg [axi_cache_width-1:0] cache;
|
||||||
|
reg [axi_prot_width-1:0] prot;
|
||||||
|
begin
|
||||||
|
if(!enable_this_port) begin
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. 'write_from_file' will not be executed...",$time, DISP_ERR, master_name);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else begin
|
||||||
|
siz = 2;
|
||||||
|
burst = 1;
|
||||||
|
lck = 0;
|
||||||
|
cache = 0;
|
||||||
|
prot = 0;
|
||||||
|
|
||||||
|
addr = start_addr;
|
||||||
|
bytes = wr_size;
|
||||||
|
wresp = 0;
|
||||||
|
concurrent = $random;
|
||||||
|
if(bytes > (axi_burst_len * data_bus_width/8))
|
||||||
|
trnsfr_bytes = (axi_burst_len * data_bus_width/8);
|
||||||
|
else
|
||||||
|
trnsfr_bytes = bytes;
|
||||||
|
|
||||||
|
if(bytes > (axi_burst_len * data_bus_width/8))
|
||||||
|
trnsfr_lngth = axi_burst_len-1;
|
||||||
|
else if(bytes%(data_bus_width/8) == 0)
|
||||||
|
trnsfr_lngth = bytes/(data_bus_width/8) - 1;
|
||||||
|
else
|
||||||
|
trnsfr_lngth = bytes/(data_bus_width/8);
|
||||||
|
|
||||||
|
wr_id = get_id(1);
|
||||||
|
wr_fd = $fopen(file_name,"r");
|
||||||
|
|
||||||
|
while (bytes > 0) begin
|
||||||
|
repeat(axi_burst_len) begin /// get the data for 1 AXI burst transaction
|
||||||
|
wr_data = wr_data >> data_bus_width;
|
||||||
|
succ = $fscanf(wr_fd,"%h",wr_data[(axi_burst_len*data_bus_width)-1 :(axi_burst_len*data_bus_width)-data_bus_width ]); /// write as 4 bytes (data_bus_width) ..
|
||||||
|
end
|
||||||
|
if(concurrent)
|
||||||
|
master.WRITE_BURST_CONCURRENT(wr_id, addr, trnsfr_lngth, siz, burst, lck, cache, prot, wr_data, trnsfr_bytes, rwrsp);
|
||||||
|
else
|
||||||
|
master.WRITE_BURST(wr_id, addr, trnsfr_lngth, siz, burst, lck, cache, prot, wr_data, trnsfr_bytes, rwrsp);
|
||||||
|
bytes = bytes - trnsfr_bytes;
|
||||||
|
addr = addr + trnsfr_bytes;
|
||||||
|
if(bytes >= (axi_burst_len * data_bus_width/8) )
|
||||||
|
trnsfr_bytes = (axi_burst_len * data_bus_width/8); //
|
||||||
|
else
|
||||||
|
trnsfr_bytes = bytes;
|
||||||
|
|
||||||
|
if(bytes > (axi_burst_len * data_bus_width/8))
|
||||||
|
trnsfr_lngth = axi_burst_len-1;
|
||||||
|
else if(bytes%(data_bus_width/8) == 0)
|
||||||
|
trnsfr_lngth = bytes/(data_bus_width/8) - 1;
|
||||||
|
else
|
||||||
|
trnsfr_lngth = bytes/(data_bus_width/8);
|
||||||
|
|
||||||
|
wresp = wresp | rwrsp;
|
||||||
|
end /// while
|
||||||
|
response = wresp;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* Read data to file */
|
||||||
|
task automatic read_to_file;
|
||||||
|
input [(max_chars*8)-1:0] file_name;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [int_width-1:0] rd_size;
|
||||||
|
output [axi_rsp_width-1:0] response;
|
||||||
|
reg [axi_rsp_width-1:0] rresp, rrrsp;
|
||||||
|
reg [addr_width-1:0] addr;
|
||||||
|
integer bytes;
|
||||||
|
integer trnsfr_lngth;
|
||||||
|
reg [(axi_burst_len*data_bus_width)-1 :0] rd_data;
|
||||||
|
integer rd_fd;
|
||||||
|
reg [id_bus_width-1:0] rd_id;
|
||||||
|
|
||||||
|
reg [axi_size_width-1:0] siz;
|
||||||
|
reg [axi_brst_type_width-1:0] burst;
|
||||||
|
reg [axi_lock_width-1:0] lck;
|
||||||
|
reg [axi_cache_width-1:0] cache;
|
||||||
|
reg [axi_prot_width-1:0] prot;
|
||||||
|
begin
|
||||||
|
if(!enable_this_port) begin
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. 'read_to_file' will not be executed...",$time, DISP_ERR, master_name);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else begin
|
||||||
|
siz = 2;
|
||||||
|
burst = 1;
|
||||||
|
lck = 0;
|
||||||
|
cache = 0;
|
||||||
|
prot = 0;
|
||||||
|
|
||||||
|
addr = start_addr;
|
||||||
|
rresp = 0;
|
||||||
|
bytes = rd_size;
|
||||||
|
|
||||||
|
rd_id = get_id(1'b1);
|
||||||
|
|
||||||
|
if(bytes > (axi_burst_len * data_bus_width/8))
|
||||||
|
trnsfr_lngth = axi_burst_len-1;
|
||||||
|
else if(bytes%(data_bus_width/8) == 0)
|
||||||
|
trnsfr_lngth = bytes/(data_bus_width/8) - 1;
|
||||||
|
else
|
||||||
|
trnsfr_lngth = bytes/(data_bus_width/8);
|
||||||
|
|
||||||
|
rd_fd = $fopen(file_name,"w");
|
||||||
|
|
||||||
|
while (bytes > 0) begin
|
||||||
|
master.READ_BURST(rd_id, addr, trnsfr_lngth, siz, burst, lck, cache, prot, rd_data, rrrsp);
|
||||||
|
repeat(trnsfr_lngth+1) begin
|
||||||
|
$fdisplayh(rd_fd,rd_data[data_bus_width-1:0]);
|
||||||
|
rd_data = rd_data >> data_bus_width;
|
||||||
|
end
|
||||||
|
|
||||||
|
addr = addr + (trnsfr_lngth+1)*4;
|
||||||
|
|
||||||
|
if(bytes >= (axi_burst_len * data_bus_width/8) )
|
||||||
|
bytes = bytes - (axi_burst_len * data_bus_width/8); //
|
||||||
|
else
|
||||||
|
bytes = 0;
|
||||||
|
|
||||||
|
if(bytes > (axi_burst_len * data_bus_width/8))
|
||||||
|
trnsfr_lngth = axi_burst_len-1;
|
||||||
|
else if(bytes%(data_bus_width/8) == 0)
|
||||||
|
trnsfr_lngth = bytes/(data_bus_width/8) - 1;
|
||||||
|
else
|
||||||
|
trnsfr_lngth = bytes/(data_bus_width/8);
|
||||||
|
|
||||||
|
rresp = rresp | rrrsp;
|
||||||
|
end /// while
|
||||||
|
response = rresp;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* Write data (used for transfer size <= 128 Bytes */
|
||||||
|
task automatic write_data;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [max_transfer_bytes_width:0] wr_size;
|
||||||
|
input [(max_transfer_bytes*8)-1:0] w_data;
|
||||||
|
output [axi_rsp_width-1:0] response;
|
||||||
|
reg [axi_rsp_width-1:0] wresp,rwrsp;
|
||||||
|
reg [addr_width-1:0] addr;
|
||||||
|
reg [7:0] bytes,tmp_bytes;
|
||||||
|
integer trnsfr_bytes;
|
||||||
|
reg [(max_transfer_bytes*8)-1:0] wr_data;
|
||||||
|
integer trnsfr_lngth;
|
||||||
|
reg concurrent;
|
||||||
|
|
||||||
|
reg [id_bus_width-1:0] wr_id;
|
||||||
|
reg [axi_size_width-1:0] siz;
|
||||||
|
reg [axi_brst_type_width-1:0] burst;
|
||||||
|
reg [axi_lock_width-1:0] lck;
|
||||||
|
reg [axi_cache_width-1:0] cache;
|
||||||
|
reg [axi_prot_width-1:0] prot;
|
||||||
|
|
||||||
|
integer pad_bytes;
|
||||||
|
begin
|
||||||
|
if(!enable_this_port) begin
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. 'write_data' will not be executed...",$time, DISP_ERR, master_name);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else begin
|
||||||
|
addr = start_addr;
|
||||||
|
bytes = wr_size;
|
||||||
|
wresp = 0;
|
||||||
|
wr_data = w_data;
|
||||||
|
concurrent = $random;
|
||||||
|
siz = 2;
|
||||||
|
burst = 1;
|
||||||
|
lck = 0;
|
||||||
|
cache = 0;
|
||||||
|
prot = 0;
|
||||||
|
pad_bytes = start_addr[clogb2(data_bus_width/8)-1:0];
|
||||||
|
wr_id = get_id(1);
|
||||||
|
if(bytes+pad_bytes > (data_bus_width/8*axi_burst_len)) begin /// for unaligned address
|
||||||
|
trnsfr_bytes = (data_bus_width*axi_burst_len)/8 - pad_bytes;//start_addr[1:0];
|
||||||
|
trnsfr_lngth = axi_burst_len-1;
|
||||||
|
end else begin
|
||||||
|
trnsfr_bytes = bytes;
|
||||||
|
tmp_bytes = bytes + pad_bytes;//start_addr[1:0];
|
||||||
|
if(tmp_bytes%(data_bus_width/8) == 0)
|
||||||
|
trnsfr_lngth = tmp_bytes/(data_bus_width/8) - 1;
|
||||||
|
else
|
||||||
|
trnsfr_lngth = tmp_bytes/(data_bus_width/8);
|
||||||
|
end
|
||||||
|
|
||||||
|
while (bytes > 0) begin
|
||||||
|
if(concurrent)
|
||||||
|
master.WRITE_BURST_CONCURRENT(wr_id, addr, trnsfr_lngth, siz, burst, lck, cache, prot, wr_data[(axi_burst_len*data_bus_width)-1:0], trnsfr_bytes, rwrsp);
|
||||||
|
else
|
||||||
|
master.WRITE_BURST(wr_id, addr, trnsfr_lngth, siz, burst, lck, cache, prot, wr_data[(axi_burst_len*data_bus_width)-1:0], trnsfr_bytes, rwrsp);
|
||||||
|
wr_data = wr_data >> (trnsfr_bytes*8);
|
||||||
|
bytes = bytes - trnsfr_bytes;
|
||||||
|
addr = addr + trnsfr_bytes;
|
||||||
|
if(bytes > (axi_burst_len * data_bus_width/8)) begin
|
||||||
|
trnsfr_bytes = (axi_burst_len * data_bus_width/8) - pad_bytes;//start_addr[1:0];
|
||||||
|
trnsfr_lngth = axi_burst_len-1;
|
||||||
|
end else begin
|
||||||
|
trnsfr_bytes = bytes;
|
||||||
|
tmp_bytes = bytes + pad_bytes;//start_addr[1:0];
|
||||||
|
if(tmp_bytes%(data_bus_width/8) == 0)
|
||||||
|
trnsfr_lngth = tmp_bytes/(data_bus_width/8) - 1;
|
||||||
|
else
|
||||||
|
trnsfr_lngth = tmp_bytes/(data_bus_width/8);
|
||||||
|
end
|
||||||
|
wresp = wresp | rwrsp;
|
||||||
|
end /// while
|
||||||
|
response = wresp;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* Read data (used for transfer size <= 128 Bytes */
|
||||||
|
task automatic read_data;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [max_transfer_bytes_width:0] rd_size;
|
||||||
|
output [(max_transfer_bytes*8)-1:0] r_data;
|
||||||
|
output [axi_rsp_width-1:0] response;
|
||||||
|
reg [axi_rsp_width-1:0] rresp,rdrsp;
|
||||||
|
reg [addr_width-1:0] addr;
|
||||||
|
reg [max_transfer_bytes_width:0] bytes,tmp_bytes;
|
||||||
|
integer trnsfr_bytes;
|
||||||
|
reg [(max_transfer_bytes*8)-1 : 0] rd_data;
|
||||||
|
reg [(axi_burst_len*data_bus_width)-1:0] rcv_rd_data;
|
||||||
|
integer total_rcvd_bytes;
|
||||||
|
integer trnsfr_lngth;
|
||||||
|
integer i;
|
||||||
|
reg [id_bus_width-1:0] rd_id;
|
||||||
|
|
||||||
|
reg [axi_size_width-1:0] siz;
|
||||||
|
reg [axi_brst_type_width-1:0] burst;
|
||||||
|
reg [axi_lock_width-1:0] lck;
|
||||||
|
reg [axi_cache_width-1:0] cache;
|
||||||
|
reg [axi_prot_width-1:0] prot;
|
||||||
|
|
||||||
|
integer pad_bytes;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if(!enable_this_port) begin
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. 'read_data' will not be executed...",$time, DISP_ERR, master_name);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else begin
|
||||||
|
addr = start_addr;
|
||||||
|
bytes = rd_size;
|
||||||
|
rresp = 0;
|
||||||
|
total_rcvd_bytes = 0;
|
||||||
|
rd_data = 0;
|
||||||
|
rd_id = get_id(1'b1);
|
||||||
|
|
||||||
|
siz = 2;
|
||||||
|
burst = 1;
|
||||||
|
lck = 0;
|
||||||
|
cache = 0;
|
||||||
|
prot = 0;
|
||||||
|
pad_bytes = start_addr[clogb2(data_bus_width/8)-1:0];
|
||||||
|
|
||||||
|
if(bytes+ pad_bytes > (axi_burst_len * data_bus_width/8)) begin /// for unaligned address
|
||||||
|
trnsfr_bytes = (axi_burst_len * data_bus_width/8) - pad_bytes;//start_addr[1:0];
|
||||||
|
trnsfr_lngth = axi_burst_len-1;
|
||||||
|
end else begin
|
||||||
|
trnsfr_bytes = bytes;
|
||||||
|
tmp_bytes = bytes + pad_bytes;//start_addr[1:0];
|
||||||
|
if(tmp_bytes%(data_bus_width/8) == 0)
|
||||||
|
trnsfr_lngth = tmp_bytes/(data_bus_width/8) - 1;
|
||||||
|
else
|
||||||
|
trnsfr_lngth = tmp_bytes/(data_bus_width/8);
|
||||||
|
end
|
||||||
|
while (bytes > 0) begin
|
||||||
|
master.READ_BURST(rd_id,addr, trnsfr_lngth, siz, burst, lck, cache, prot, rcv_rd_data, rdrsp);
|
||||||
|
for(i = 0; i < trnsfr_bytes; i = i+1) begin
|
||||||
|
rd_data = rd_data >> 8;
|
||||||
|
rd_data[(max_transfer_bytes*8)-1 : (max_transfer_bytes*8)-8] = rcv_rd_data[7:0];
|
||||||
|
rcv_rd_data = rcv_rd_data >> 8;
|
||||||
|
total_rcvd_bytes = total_rcvd_bytes+1;
|
||||||
|
end
|
||||||
|
bytes = bytes - trnsfr_bytes;
|
||||||
|
addr = addr + trnsfr_bytes;
|
||||||
|
if(bytes > (axi_burst_len * data_bus_width/8)) begin
|
||||||
|
trnsfr_bytes = (axi_burst_len * data_bus_width/8) - pad_bytes;//start_addr[1:0];
|
||||||
|
trnsfr_lngth = 15;
|
||||||
|
end else begin
|
||||||
|
trnsfr_bytes = bytes;
|
||||||
|
tmp_bytes = bytes + pad_bytes;//start_addr[1:0];
|
||||||
|
if(tmp_bytes%(data_bus_width/8) == 0)
|
||||||
|
trnsfr_lngth = tmp_bytes/(data_bus_width/8) - 1;
|
||||||
|
else
|
||||||
|
trnsfr_lngth = tmp_bytes/(data_bus_width/8);
|
||||||
|
end
|
||||||
|
rresp = rresp | rdrsp;
|
||||||
|
end /// while
|
||||||
|
rd_data = rd_data >> (max_transfer_bytes - total_rcvd_bytes)*8;
|
||||||
|
r_data = rd_data;
|
||||||
|
response = rresp;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
|
||||||
|
/* Wait Register Update in PL */
|
||||||
|
/* Issue a series of 1 burst length reads until the expected data pattern is received */
|
||||||
|
|
||||||
|
task automatic wait_reg_update;
|
||||||
|
input [addr_width-1:0] addri;
|
||||||
|
input [data_width-1:0] datai;
|
||||||
|
input [data_width-1:0] maski;
|
||||||
|
input [int_width-1:0] time_interval;
|
||||||
|
input [int_width-1:0] time_out;
|
||||||
|
output [data_width-1:0] data_o;
|
||||||
|
output upd_done;
|
||||||
|
|
||||||
|
reg [addr_width-1:0] addr;
|
||||||
|
reg [data_width-1:0] data_i;
|
||||||
|
reg [data_width-1:0] mask_i;
|
||||||
|
integer time_int;
|
||||||
|
integer timeout;
|
||||||
|
|
||||||
|
reg [axi_rsp_width-1:0] rdrsp;
|
||||||
|
reg [id_bus_width-1:0] rd_id;
|
||||||
|
reg [axi_size_width-1:0] siz;
|
||||||
|
reg [axi_brst_type_width-1:0] burst;
|
||||||
|
reg [axi_lock_width-1:0] lck;
|
||||||
|
reg [axi_cache_width-1:0] cache;
|
||||||
|
reg [axi_prot_width-1:0] prot;
|
||||||
|
reg [data_width-1:0] rcv_data;
|
||||||
|
integer trnsfr_lngth;
|
||||||
|
reg rd_loop;
|
||||||
|
reg timed_out;
|
||||||
|
integer i;
|
||||||
|
integer cycle_cnt;
|
||||||
|
|
||||||
|
begin
|
||||||
|
addr = addri;
|
||||||
|
data_i = datai;
|
||||||
|
mask_i = maski;
|
||||||
|
time_int = time_interval;
|
||||||
|
timeout = time_out;
|
||||||
|
timed_out = 0;
|
||||||
|
cycle_cnt = 0;
|
||||||
|
|
||||||
|
if(!enable_this_port) begin
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. 'wait_reg_update' will not be executed...",$time, DISP_ERR, master_name);
|
||||||
|
upd_done = 0;
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else begin
|
||||||
|
rd_id = get_id(1'b1);
|
||||||
|
siz = 2;
|
||||||
|
burst = 1;
|
||||||
|
lck = 0;
|
||||||
|
cache = 0;
|
||||||
|
prot = 0;
|
||||||
|
trnsfr_lngth = 0;
|
||||||
|
rd_loop = 1;
|
||||||
|
fork
|
||||||
|
begin
|
||||||
|
while(!timed_out & rd_loop) begin
|
||||||
|
cycle_cnt = cycle_cnt + 1;
|
||||||
|
if(cycle_cnt >= timeout) timed_out = 1;
|
||||||
|
@(posedge M_ACLK);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
begin
|
||||||
|
while (rd_loop) begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : %0s : Reading Register mapped at Address(0x%0h) ",$time, master_name, DISP_INFO, addr);
|
||||||
|
master.READ_BURST(rd_id,addr, trnsfr_lngth, siz, burst, lck, cache, prot, rcv_data, rdrsp);
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : %0s : Reading Register returned (0x%0h) ",$time, master_name, DISP_INFO, rcv_data);
|
||||||
|
if(((rcv_data & ~mask_i) === (data_i & ~mask_i)) | timed_out)
|
||||||
|
rd_loop = 0;
|
||||||
|
else
|
||||||
|
repeat(time_int) @(posedge M_ACLK);
|
||||||
|
end /// while
|
||||||
|
end
|
||||||
|
join
|
||||||
|
data_o = rcv_data & ~mask_i;
|
||||||
|
if(timed_out) begin
|
||||||
|
$display("[%0d] : %0s : %0s : 'wait_reg_update' timed out ... Register is not updated ",$time, DISP_ERR, master_name);
|
||||||
|
if(STOP_ON_ERROR) $stop;
|
||||||
|
end else
|
||||||
|
upd_done = 1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
endmodule
|
@ -0,0 +1,935 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_axi_slave.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Model that acts as PS AXI Slave port interface.
|
||||||
|
* It uses AXI3 Slave BFM
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_axi_slave (
|
||||||
|
S_RESETN,
|
||||||
|
|
||||||
|
S_ARREADY,
|
||||||
|
S_AWREADY,
|
||||||
|
S_BVALID,
|
||||||
|
S_RLAST,
|
||||||
|
S_RVALID,
|
||||||
|
S_WREADY,
|
||||||
|
S_BRESP,
|
||||||
|
S_RRESP,
|
||||||
|
S_RDATA,
|
||||||
|
S_BID,
|
||||||
|
S_RID,
|
||||||
|
S_ACLK,
|
||||||
|
S_ARVALID,
|
||||||
|
S_AWVALID,
|
||||||
|
S_BREADY,
|
||||||
|
S_RREADY,
|
||||||
|
S_WLAST,
|
||||||
|
S_WVALID,
|
||||||
|
S_ARBURST,
|
||||||
|
S_ARLOCK,
|
||||||
|
S_ARSIZE,
|
||||||
|
S_AWBURST,
|
||||||
|
S_AWLOCK,
|
||||||
|
S_AWSIZE,
|
||||||
|
S_ARPROT,
|
||||||
|
S_AWPROT,
|
||||||
|
S_ARADDR,
|
||||||
|
S_AWADDR,
|
||||||
|
S_WDATA,
|
||||||
|
S_ARCACHE,
|
||||||
|
S_ARLEN,
|
||||||
|
S_AWCACHE,
|
||||||
|
S_AWLEN,
|
||||||
|
S_WSTRB,
|
||||||
|
S_ARID,
|
||||||
|
S_AWID,
|
||||||
|
S_WID,
|
||||||
|
|
||||||
|
S_AWQOS,
|
||||||
|
S_ARQOS,
|
||||||
|
|
||||||
|
SW_CLK,
|
||||||
|
WR_DATA_ACK_OCM,
|
||||||
|
WR_DATA_ACK_DDR,
|
||||||
|
WR_ADDR,
|
||||||
|
WR_DATA,
|
||||||
|
WR_BYTES,
|
||||||
|
WR_DATA_VALID_OCM,
|
||||||
|
WR_DATA_VALID_DDR,
|
||||||
|
WR_QOS,
|
||||||
|
|
||||||
|
RD_QOS,
|
||||||
|
RD_REQ_DDR,
|
||||||
|
RD_REQ_OCM,
|
||||||
|
RD_REQ_REG,
|
||||||
|
RD_ADDR,
|
||||||
|
RD_DATA_OCM,
|
||||||
|
RD_DATA_DDR,
|
||||||
|
RD_DATA_REG,
|
||||||
|
RD_BYTES,
|
||||||
|
RD_DATA_VALID_OCM,
|
||||||
|
RD_DATA_VALID_DDR,
|
||||||
|
RD_DATA_VALID_REG
|
||||||
|
|
||||||
|
);
|
||||||
|
parameter enable_this_port = 0;
|
||||||
|
parameter slave_name = "Slave";
|
||||||
|
parameter data_bus_width = 32;
|
||||||
|
parameter address_bus_width = 32;
|
||||||
|
parameter id_bus_width = 6;
|
||||||
|
parameter slave_base_address = 0;
|
||||||
|
parameter slave_high_address = 4;
|
||||||
|
parameter max_outstanding_transactions = 8;
|
||||||
|
parameter exclusive_access_supported = 0;
|
||||||
|
parameter max_wr_outstanding_transactions = 8;
|
||||||
|
parameter max_rd_outstanding_transactions = 8;
|
||||||
|
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
|
||||||
|
/* Local parameters only for this module */
|
||||||
|
/* Internal counters that are used as Read/Write pointers to the fifo's that store all the transaction info on all channles.
|
||||||
|
This parameter is used to define the width of these pointers --> depending on Maximum outstanding transactions supported.
|
||||||
|
1-bit extra width than the no.of.bits needed to represent the outstanding transactions
|
||||||
|
Extra bit helps in generating the empty and full flags
|
||||||
|
*/
|
||||||
|
parameter int_wr_cntr_width = clogb2(max_wr_outstanding_transactions+1);
|
||||||
|
parameter int_rd_cntr_width = clogb2(max_rd_outstanding_transactions+1);
|
||||||
|
|
||||||
|
/* RESP data */
|
||||||
|
parameter rsp_fifo_bits = axi_rsp_width+id_bus_width;
|
||||||
|
parameter rsp_lsb = 0;
|
||||||
|
parameter rsp_msb = axi_rsp_width-1;
|
||||||
|
parameter rsp_id_lsb = rsp_msb + 1;
|
||||||
|
parameter rsp_id_msb = rsp_id_lsb + id_bus_width-1;
|
||||||
|
|
||||||
|
input S_RESETN;
|
||||||
|
|
||||||
|
output S_ARREADY;
|
||||||
|
output S_AWREADY;
|
||||||
|
output S_BVALID;
|
||||||
|
output S_RLAST;
|
||||||
|
output S_RVALID;
|
||||||
|
output S_WREADY;
|
||||||
|
output [axi_rsp_width-1:0] S_BRESP;
|
||||||
|
output [axi_rsp_width-1:0] S_RRESP;
|
||||||
|
output [data_bus_width-1:0] S_RDATA;
|
||||||
|
output [id_bus_width-1:0] S_BID;
|
||||||
|
output [id_bus_width-1:0] S_RID;
|
||||||
|
input S_ACLK;
|
||||||
|
input S_ARVALID;
|
||||||
|
input S_AWVALID;
|
||||||
|
input S_BREADY;
|
||||||
|
input S_RREADY;
|
||||||
|
input S_WLAST;
|
||||||
|
input S_WVALID;
|
||||||
|
input [axi_brst_type_width-1:0] S_ARBURST;
|
||||||
|
input [axi_lock_width-1:0] S_ARLOCK;
|
||||||
|
input [axi_size_width-1:0] S_ARSIZE;
|
||||||
|
input [axi_brst_type_width-1:0] S_AWBURST;
|
||||||
|
input [axi_lock_width-1:0] S_AWLOCK;
|
||||||
|
input [axi_size_width-1:0] S_AWSIZE;
|
||||||
|
input [axi_prot_width-1:0] S_ARPROT;
|
||||||
|
input [axi_prot_width-1:0] S_AWPROT;
|
||||||
|
input [address_bus_width-1:0] S_ARADDR;
|
||||||
|
input [address_bus_width-1:0] S_AWADDR;
|
||||||
|
input [data_bus_width-1:0] S_WDATA;
|
||||||
|
input [axi_cache_width-1:0] S_ARCACHE;
|
||||||
|
input [axi_cache_width-1:0] S_ARLEN;
|
||||||
|
|
||||||
|
input [axi_qos_width-1:0] S_ARQOS;
|
||||||
|
|
||||||
|
input [axi_cache_width-1:0] S_AWCACHE;
|
||||||
|
input [axi_len_width-1:0] S_AWLEN;
|
||||||
|
|
||||||
|
input [axi_qos_width-1:0] S_AWQOS;
|
||||||
|
input [(data_bus_width/8)-1:0] S_WSTRB;
|
||||||
|
input [id_bus_width-1:0] S_ARID;
|
||||||
|
input [id_bus_width-1:0] S_AWID;
|
||||||
|
input [id_bus_width-1:0] S_WID;
|
||||||
|
|
||||||
|
input SW_CLK;
|
||||||
|
input WR_DATA_ACK_DDR, WR_DATA_ACK_OCM;
|
||||||
|
output reg WR_DATA_VALID_DDR, WR_DATA_VALID_OCM;
|
||||||
|
output reg [max_burst_bits-1:0] WR_DATA;
|
||||||
|
output reg [addr_width-1:0] WR_ADDR;
|
||||||
|
output reg [max_burst_bytes_width:0] WR_BYTES;
|
||||||
|
output reg RD_REQ_OCM, RD_REQ_DDR, RD_REQ_REG;
|
||||||
|
output reg [addr_width-1:0] RD_ADDR;
|
||||||
|
input [max_burst_bits-1:0] RD_DATA_DDR,RD_DATA_OCM, RD_DATA_REG;
|
||||||
|
output reg[max_burst_bytes_width:0] RD_BYTES;
|
||||||
|
input RD_DATA_VALID_OCM,RD_DATA_VALID_DDR, RD_DATA_VALID_REG;
|
||||||
|
output reg [axi_qos_width-1:0] WR_QOS, RD_QOS;
|
||||||
|
wire net_ARVALID;
|
||||||
|
wire net_AWVALID;
|
||||||
|
wire net_WVALID;
|
||||||
|
|
||||||
|
real s_aclk_period;
|
||||||
|
|
||||||
|
cdn_axi3_slave_bfm #(slave_name,
|
||||||
|
data_bus_width,
|
||||||
|
address_bus_width,
|
||||||
|
id_bus_width,
|
||||||
|
slave_base_address,
|
||||||
|
(slave_high_address- slave_base_address),
|
||||||
|
max_outstanding_transactions,
|
||||||
|
0, ///MEMORY_MODEL_MODE,
|
||||||
|
exclusive_access_supported)
|
||||||
|
slave (.ACLK (S_ACLK),
|
||||||
|
.ARESETn (S_RESETN), /// confirm this
|
||||||
|
// Write Address Channel
|
||||||
|
.AWID (S_AWID),
|
||||||
|
.AWADDR (S_AWADDR),
|
||||||
|
.AWLEN (S_AWLEN),
|
||||||
|
.AWSIZE (S_AWSIZE),
|
||||||
|
.AWBURST (S_AWBURST),
|
||||||
|
.AWLOCK (S_AWLOCK),
|
||||||
|
.AWCACHE (S_AWCACHE),
|
||||||
|
.AWPROT (S_AWPROT),
|
||||||
|
.AWVALID (net_AWVALID),
|
||||||
|
.AWREADY (S_AWREADY),
|
||||||
|
// Write Data Channel Signals.
|
||||||
|
.WID (S_WID),
|
||||||
|
.WDATA (S_WDATA),
|
||||||
|
.WSTRB (S_WSTRB),
|
||||||
|
.WLAST (S_WLAST),
|
||||||
|
.WVALID (net_WVALID),
|
||||||
|
.WREADY (S_WREADY),
|
||||||
|
// Write Response Channel Signals.
|
||||||
|
.BID (S_BID),
|
||||||
|
.BRESP (S_BRESP),
|
||||||
|
.BVALID (S_BVALID),
|
||||||
|
.BREADY (S_BREADY),
|
||||||
|
// Read Address Channel Signals.
|
||||||
|
.ARID (S_ARID),
|
||||||
|
.ARADDR (S_ARADDR),
|
||||||
|
.ARLEN (S_ARLEN),
|
||||||
|
.ARSIZE (S_ARSIZE),
|
||||||
|
.ARBURST (S_ARBURST),
|
||||||
|
.ARLOCK (S_ARLOCK),
|
||||||
|
.ARCACHE (S_ARCACHE),
|
||||||
|
.ARPROT (S_ARPROT),
|
||||||
|
.ARVALID (net_ARVALID),
|
||||||
|
.ARREADY (S_ARREADY),
|
||||||
|
// Read Data Channel Signals.
|
||||||
|
.RID (S_RID),
|
||||||
|
.RDATA (S_RDATA),
|
||||||
|
.RRESP (S_RRESP),
|
||||||
|
.RLAST (S_RLAST),
|
||||||
|
.RVALID (S_RVALID),
|
||||||
|
.RREADY (S_RREADY));
|
||||||
|
|
||||||
|
/* Latency type and Debug/Error Control */
|
||||||
|
reg[1:0] latency_type = RANDOM_CASE;
|
||||||
|
reg DEBUG_INFO = 1;
|
||||||
|
reg STOP_ON_ERROR = 1'b1;
|
||||||
|
|
||||||
|
/* WR_FIFO stores 32-bit address, valid data and valid bytes for each AXI Write burst transaction */
|
||||||
|
reg [wr_fifo_data_bits-1:0] wr_fifo [0:max_wr_outstanding_transactions-1];
|
||||||
|
reg [int_wr_cntr_width-1:0] wr_fifo_wr_ptr = 0, wr_fifo_rd_ptr = 0;
|
||||||
|
wire wr_fifo_empty;
|
||||||
|
|
||||||
|
/* Store the awvalid receive time --- necessary for calculating the latency in sending the bresp*/
|
||||||
|
reg [7:0] aw_time_cnt = 0, bresp_time_cnt = 0;
|
||||||
|
real awvalid_receive_time[0:max_wr_outstanding_transactions]; // store the time when a new awvalid is received
|
||||||
|
reg awvalid_flag[0:max_wr_outstanding_transactions]; // indicates awvalid is received
|
||||||
|
|
||||||
|
/* Address Write Channel handshake*/
|
||||||
|
reg[int_wr_cntr_width-1:0] aw_cnt = 0;// count of awvalid
|
||||||
|
|
||||||
|
/* various FIFOs for storing the ADDR channel info */
|
||||||
|
reg [axi_size_width-1:0] awsize [0:max_wr_outstanding_transactions-1];
|
||||||
|
reg [axi_prot_width-1:0] awprot [0:max_wr_outstanding_transactions-1];
|
||||||
|
reg [axi_lock_width-1:0] awlock [0:max_wr_outstanding_transactions-1];
|
||||||
|
reg [axi_cache_width-1:0] awcache [0:max_wr_outstanding_transactions-1];
|
||||||
|
reg [axi_brst_type_width-1:0] awbrst [0:max_wr_outstanding_transactions-1];
|
||||||
|
reg [axi_len_width-1:0] awlen [0:max_wr_outstanding_transactions-1];
|
||||||
|
reg aw_flag [0:max_wr_outstanding_transactions-1];
|
||||||
|
reg [addr_width-1:0] awaddr [0:max_wr_outstanding_transactions-1];
|
||||||
|
reg [id_bus_width-1:0] awid [0:max_wr_outstanding_transactions-1];
|
||||||
|
reg [axi_qos_width-1:0] awqos [0:max_wr_outstanding_transactions-1];
|
||||||
|
wire aw_fifo_full; // indicates awvalid_fifo is full (max outstanding transactions reached)
|
||||||
|
|
||||||
|
/* internal fifos to store burst write data, ID & strobes*/
|
||||||
|
reg [(data_bus_width*axi_burst_len)-1:0] burst_data [0:max_wr_outstanding_transactions-1];
|
||||||
|
reg [max_burst_bytes_width:0] burst_valid_bytes [0:max_wr_outstanding_transactions-1]; /// total valid bytes received in a complete burst transfer
|
||||||
|
reg wlast_flag [0:max_wr_outstanding_transactions-1]; // flag to indicate WLAST received
|
||||||
|
wire wd_fifo_full;
|
||||||
|
|
||||||
|
/* Write Data Channel and Write Response handshake signals*/
|
||||||
|
reg [int_wr_cntr_width-1:0] wd_cnt = 0;
|
||||||
|
reg [(data_bus_width*axi_burst_len)-1:0] aligned_wr_data;
|
||||||
|
reg [addr_width-1:0] aligned_wr_addr;
|
||||||
|
reg [max_burst_bytes_width:0] valid_data_bytes;
|
||||||
|
reg [int_wr_cntr_width-1:0] wr_bresp_cnt = 0;
|
||||||
|
reg [axi_rsp_width-1:0] bresp;
|
||||||
|
reg [rsp_fifo_bits-1:0] fifo_bresp [0:max_wr_outstanding_transactions-1]; // store the ID and its corresponding response
|
||||||
|
reg enable_write_bresp;
|
||||||
|
reg [int_wr_cntr_width-1:0] rd_bresp_cnt = 0;
|
||||||
|
integer wr_latency_count;
|
||||||
|
reg wr_delayed;
|
||||||
|
wire bresp_fifo_empty;
|
||||||
|
|
||||||
|
/* states for managing read/write to WR_FIFO */
|
||||||
|
parameter SEND_DATA = 0, WAIT_ACK = 1;
|
||||||
|
reg state;
|
||||||
|
|
||||||
|
/* Qos*/
|
||||||
|
reg [axi_qos_width-1:0] ar_qos, aw_qos;
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
if(DEBUG_INFO) begin
|
||||||
|
if(enable_this_port)
|
||||||
|
$display("[%0d] : %0s : %0s : Port is ENABLED.",$time, DISP_INFO, slave_name);
|
||||||
|
else
|
||||||
|
$display("[%0d] : %0s : %0s : Port is DISABLED.",$time, DISP_INFO, slave_name);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
initial slave.set_disable_reset_value_checks(1);
|
||||||
|
initial begin
|
||||||
|
repeat(2) @(posedge S_ACLK);
|
||||||
|
if(!enable_this_port) begin
|
||||||
|
slave.set_channel_level_info(0);
|
||||||
|
slave.set_function_level_info(0);
|
||||||
|
end
|
||||||
|
slave.RESPONSE_TIMEOUT = 0;
|
||||||
|
end
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Set Latency type to be used */
|
||||||
|
task set_latency_type;
|
||||||
|
input[1:0] lat;
|
||||||
|
begin
|
||||||
|
if(enable_this_port)
|
||||||
|
latency_type = lat;
|
||||||
|
else begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. 'Latency Profile' will not be set...",$time, DISP_WARN, slave_name);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Set ARQoS to be used */
|
||||||
|
task set_arqos;
|
||||||
|
input[axi_qos_width-1:0] qos;
|
||||||
|
begin
|
||||||
|
if(enable_this_port)
|
||||||
|
ar_qos = qos;
|
||||||
|
else begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. 'ARQOS' will not be set...",$time, DISP_WARN, slave_name);
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Set AWQoS to be used */
|
||||||
|
task set_awqos;
|
||||||
|
input[axi_qos_width-1:0] qos;
|
||||||
|
begin
|
||||||
|
if(enable_this_port)
|
||||||
|
aw_qos = qos;
|
||||||
|
else begin
|
||||||
|
if(DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. 'AWQOS' will not be set...",$time, DISP_WARN, slave_name);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
/* get the wr latency number */
|
||||||
|
function [31:0] get_wr_lat_number;
|
||||||
|
input dummy;
|
||||||
|
reg[1:0] temp;
|
||||||
|
begin
|
||||||
|
case(latency_type)
|
||||||
|
BEST_CASE : if(slave_name == axi_acp_name) get_wr_lat_number = acp_wr_min; else get_wr_lat_number = gp_wr_min;
|
||||||
|
AVG_CASE : if(slave_name == axi_acp_name) get_wr_lat_number = acp_wr_avg; else get_wr_lat_number = gp_wr_avg;
|
||||||
|
WORST_CASE : if(slave_name == axi_acp_name) get_wr_lat_number = acp_wr_max; else get_wr_lat_number = gp_wr_max;
|
||||||
|
default : begin // RANDOM_CASE
|
||||||
|
temp = $random;
|
||||||
|
case(temp)
|
||||||
|
2'b00 : if(slave_name == axi_acp_name) get_wr_lat_number = ($random()%10+ acp_wr_min); else get_wr_lat_number = ($random()%10+ gp_wr_min);
|
||||||
|
2'b01 : if(slave_name == axi_acp_name) get_wr_lat_number = ($random()%40+ acp_wr_avg); else get_wr_lat_number = ($random()%40+ gp_wr_avg);
|
||||||
|
default : if(slave_name == axi_acp_name) get_wr_lat_number = ($random()%60+ acp_wr_max); else get_wr_lat_number = ($random()%60+ gp_wr_max);
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
endfunction
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* get the rd latency number */
|
||||||
|
function [31:0] get_rd_lat_number;
|
||||||
|
input dummy;
|
||||||
|
reg[1:0] temp;
|
||||||
|
begin
|
||||||
|
case(latency_type)
|
||||||
|
BEST_CASE : if(slave_name == axi_acp_name) get_rd_lat_number = acp_rd_min; else get_rd_lat_number = gp_rd_min;
|
||||||
|
AVG_CASE : if(slave_name == axi_acp_name) get_rd_lat_number = acp_rd_avg; else get_rd_lat_number = gp_rd_avg;
|
||||||
|
WORST_CASE : if(slave_name == axi_acp_name) get_rd_lat_number = acp_rd_max; else get_rd_lat_number = gp_rd_max;
|
||||||
|
default : begin // RANDOM_CASE
|
||||||
|
temp = $random;
|
||||||
|
case(temp)
|
||||||
|
2'b00 : if(slave_name == axi_acp_name) get_rd_lat_number = ($random()%10+ acp_rd_min); else get_rd_lat_number = ($random()%10+ gp_rd_min);
|
||||||
|
2'b01 : if(slave_name == axi_acp_name) get_rd_lat_number = ($random()%40+ acp_rd_avg); else get_rd_lat_number = ($random()%40+ gp_rd_avg);
|
||||||
|
default : if(slave_name == axi_acp_name) get_rd_lat_number = ($random()%60+ acp_rd_max); else get_rd_lat_number = ($random()%60+ gp_rd_max);
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
endfunction
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Store the Clock cycle time period */
|
||||||
|
always@(S_RESETN)
|
||||||
|
begin
|
||||||
|
if(S_RESETN) begin
|
||||||
|
@(posedge S_ACLK);
|
||||||
|
s_aclk_period = $time;
|
||||||
|
@(posedge S_ACLK);
|
||||||
|
s_aclk_period = $time - s_aclk_period;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Check for any WRITE/READs when this port is disabled */
|
||||||
|
always@(S_AWVALID or S_WVALID or S_ARVALID)
|
||||||
|
begin
|
||||||
|
if((S_AWVALID | S_WVALID | S_ARVALID) && !enable_this_port) begin
|
||||||
|
$display("[%0d] : %0s : %0s : Port is disabled. AXI transaction is initiated on this port ...\nSimulation will halt ..",$time, DISP_ERR, slave_name);
|
||||||
|
$stop;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
assign net_ARVALID = enable_this_port ? S_ARVALID : 1'b0;
|
||||||
|
assign net_AWVALID = enable_this_port ? S_AWVALID : 1'b0;
|
||||||
|
assign net_WVALID = enable_this_port ? S_WVALID : 1'b0;
|
||||||
|
|
||||||
|
assign wr_fifo_empty = (wr_fifo_wr_ptr === wr_fifo_rd_ptr)?1'b1: 1'b0;
|
||||||
|
assign aw_fifo_full = ((aw_cnt[int_wr_cntr_width-1] !== rd_bresp_cnt[int_wr_cntr_width-1]) && (aw_cnt[int_wr_cntr_width-2:0] === rd_bresp_cnt[int_wr_cntr_width-2:0]))?1'b1 :1'b0; /// complete this
|
||||||
|
assign wd_fifo_full = ((wd_cnt[int_wr_cntr_width-1] !== rd_bresp_cnt[int_wr_cntr_width-1]) && (wd_cnt[int_wr_cntr_width-2:0] === rd_bresp_cnt[int_wr_cntr_width-2:0]))?1'b1 :1'b0; /// complete this
|
||||||
|
assign bresp_fifo_empty = (wr_bresp_cnt === rd_bresp_cnt)?1'b1:1'b0;
|
||||||
|
|
||||||
|
|
||||||
|
/* Store the awvalid receive time --- necessary for calculating the bresp latency */
|
||||||
|
always@(negedge S_RESETN or S_AWID or S_AWADDR or S_AWVALID )
|
||||||
|
begin
|
||||||
|
if(!S_RESETN)
|
||||||
|
aw_time_cnt = 0;
|
||||||
|
else begin
|
||||||
|
if(S_AWVALID) begin
|
||||||
|
awvalid_receive_time[aw_time_cnt] = $time;
|
||||||
|
awvalid_flag[aw_time_cnt] = 1'b1;
|
||||||
|
aw_time_cnt = aw_time_cnt + 1;
|
||||||
|
if(aw_time_cnt === max_wr_outstanding_transactions) aw_time_cnt = 0;
|
||||||
|
end
|
||||||
|
end // else
|
||||||
|
end /// always
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
always@(posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(net_AWVALID && S_AWREADY) begin
|
||||||
|
if(S_AWQOS === 0) awqos[aw_cnt[int_wr_cntr_width-2:0]] = aw_qos;
|
||||||
|
else awqos[aw_cnt[int_wr_cntr_width-2:0]] = S_AWQOS;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
always@(aw_fifo_full)
|
||||||
|
begin
|
||||||
|
if(aw_fifo_full && DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : %0s : Reached the maximum outstanding Write transactions limit (%0d). Blocking all future Write transactions until at least 1 of the outstanding Write transaction has completed.",$time, DISP_INFO, slave_name,max_wr_outstanding_transactions);
|
||||||
|
end
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Address Write Channel handshake*/
|
||||||
|
always@(negedge S_RESETN or posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN) begin
|
||||||
|
aw_cnt = 0;
|
||||||
|
end else begin
|
||||||
|
if(!aw_fifo_full) begin
|
||||||
|
slave.RECEIVE_WRITE_ADDRESS(0,
|
||||||
|
id_invalid,
|
||||||
|
awaddr[aw_cnt[int_wr_cntr_width-2:0]],
|
||||||
|
awlen[aw_cnt[int_wr_cntr_width-2:0]],
|
||||||
|
awsize[aw_cnt[int_wr_cntr_width-2:0]],
|
||||||
|
awbrst[aw_cnt[int_wr_cntr_width-2:0]],
|
||||||
|
awlock[aw_cnt[int_wr_cntr_width-2:0]],
|
||||||
|
awcache[aw_cnt[int_wr_cntr_width-2:0]],
|
||||||
|
awprot[aw_cnt[int_wr_cntr_width-2:0]],
|
||||||
|
awid[aw_cnt[int_wr_cntr_width-2:0]]); /// sampled valid ID.
|
||||||
|
aw_flag[aw_cnt[int_wr_cntr_width-2:0]] = 1;
|
||||||
|
aw_cnt = aw_cnt + 1;
|
||||||
|
if(aw_cnt[int_wr_cntr_width-2:0] === (max_wr_outstanding_transactions-1)) begin
|
||||||
|
aw_cnt[int_wr_cntr_width-1] = ~aw_cnt[int_wr_cntr_width-1];
|
||||||
|
aw_cnt[int_wr_cntr_width-2:0] = 0;
|
||||||
|
end
|
||||||
|
end // if (!aw_fifo_full)
|
||||||
|
end /// if else
|
||||||
|
end /// always
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Write Data Channel Handshake */
|
||||||
|
always@(negedge S_RESETN or posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN) begin
|
||||||
|
wd_cnt = 0;
|
||||||
|
end else begin
|
||||||
|
if(!wd_fifo_full && S_WVALID) begin
|
||||||
|
slave.RECEIVE_WRITE_BURST_NO_CHECKS(S_WID,
|
||||||
|
burst_data[wd_cnt[int_wr_cntr_width-2:0]],
|
||||||
|
burst_valid_bytes[wd_cnt[int_wr_cntr_width-2:0]]);
|
||||||
|
wlast_flag[wd_cnt[int_wr_cntr_width-2:0]] = 1'b1;
|
||||||
|
wd_cnt = wd_cnt + 1;
|
||||||
|
if(wd_cnt[int_wr_cntr_width-2:0] === (max_wr_outstanding_transactions-1)) begin
|
||||||
|
wd_cnt[int_wr_cntr_width-1] = ~wd_cnt[int_wr_cntr_width-1];
|
||||||
|
wd_cnt[int_wr_cntr_width-2:0] = 0;
|
||||||
|
end
|
||||||
|
end /// if
|
||||||
|
end /// else
|
||||||
|
end /// always
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Align the wrap data for write transaction */
|
||||||
|
task automatic get_wrap_aligned_wr_data;
|
||||||
|
output [(data_bus_width*axi_burst_len)-1:0] aligned_data;
|
||||||
|
output [addr_width-1:0] start_addr; /// aligned start address
|
||||||
|
input [addr_width-1:0] addr;
|
||||||
|
input [(data_bus_width*axi_burst_len)-1:0] b_data;
|
||||||
|
input [max_burst_bytes_width:0] v_bytes;
|
||||||
|
reg [(data_bus_width*axi_burst_len)-1:0] temp_data, wrp_data;
|
||||||
|
integer wrp_bytes;
|
||||||
|
integer i;
|
||||||
|
begin
|
||||||
|
start_addr = (addr/v_bytes) * v_bytes;
|
||||||
|
wrp_bytes = addr - start_addr;
|
||||||
|
wrp_data = b_data;
|
||||||
|
temp_data = 0;
|
||||||
|
wrp_data = wrp_data << ((data_bus_width*axi_burst_len) - (v_bytes*8));
|
||||||
|
while(wrp_bytes > 0) begin /// get the data that is wrapped
|
||||||
|
temp_data = temp_data << 8;
|
||||||
|
temp_data[7:0] = wrp_data[(data_bus_width*axi_burst_len)-1 : (data_bus_width*axi_burst_len)-8];
|
||||||
|
wrp_data = wrp_data << 8;
|
||||||
|
wrp_bytes = wrp_bytes - 1;
|
||||||
|
end
|
||||||
|
wrp_bytes = addr - start_addr;
|
||||||
|
wrp_data = b_data << (wrp_bytes*8);
|
||||||
|
|
||||||
|
aligned_data = (temp_data | wrp_data);
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Calculate the Response for each read/write transaction */
|
||||||
|
function [axi_rsp_width-1:0] calculate_resp;
|
||||||
|
input rd_wr; // indicates Read(1) or Write(0) transaction
|
||||||
|
input [addr_width-1:0] awaddr;
|
||||||
|
input [axi_prot_width-1:0] awprot;
|
||||||
|
reg [axi_rsp_width-1:0] rsp;
|
||||||
|
begin
|
||||||
|
rsp = AXI_OK;
|
||||||
|
/* Address Decode */
|
||||||
|
if(decode_address(awaddr) === INVALID_MEM_TYPE) begin
|
||||||
|
rsp = AXI_SLV_ERR; //slave error
|
||||||
|
$display("[%0d] : %0s : %0s : AXI Access to Invalid location(0x%0h) ",$time, DISP_ERR, slave_name, awaddr);
|
||||||
|
end
|
||||||
|
if(!rd_wr && decode_address(awaddr) === REG_MEM) begin
|
||||||
|
rsp = AXI_SLV_ERR; //slave error
|
||||||
|
$display("[%0d] : %0s : %0s : AXI Write to Register Map(0x%0h) is not supported ",$time, DISP_ERR, slave_name, awaddr);
|
||||||
|
end
|
||||||
|
if(secure_access_enabled && awprot[1])
|
||||||
|
rsp = AXI_DEC_ERR; // decode error
|
||||||
|
calculate_resp = rsp;
|
||||||
|
end
|
||||||
|
endfunction
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Store the Write response for each write transaction */
|
||||||
|
always@(negedge S_RESETN or posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN) begin
|
||||||
|
wr_bresp_cnt = 0;
|
||||||
|
wr_fifo_wr_ptr = 0;
|
||||||
|
end else begin
|
||||||
|
enable_write_bresp = aw_flag[wr_bresp_cnt[int_wr_cntr_width-2:0]] && wlast_flag[wr_bresp_cnt[int_wr_cntr_width-2:0]];
|
||||||
|
/* calculate bresp only when AWVALID && WLAST is received */
|
||||||
|
if(enable_write_bresp) begin
|
||||||
|
aw_flag[wr_bresp_cnt[int_wr_cntr_width-2:0]] = 0;
|
||||||
|
wlast_flag[wr_bresp_cnt[int_wr_cntr_width-2:0]] = 0;
|
||||||
|
|
||||||
|
bresp = calculate_resp(1'b0, awaddr[wr_bresp_cnt[int_wr_cntr_width-2:0]],awprot[wr_bresp_cnt[int_wr_cntr_width-2:0]]);
|
||||||
|
fifo_bresp[wr_bresp_cnt[int_wr_cntr_width-2:0]] = {awid[wr_bresp_cnt[int_wr_cntr_width-2:0]],bresp};
|
||||||
|
/* Fill WR data FIFO */
|
||||||
|
if(bresp === AXI_OK) begin
|
||||||
|
if(awbrst[wr_bresp_cnt[int_wr_cntr_width-2:0]] === AXI_WRAP) begin /// wrap type? then align the data
|
||||||
|
get_wrap_aligned_wr_data(aligned_wr_data,aligned_wr_addr, awaddr[wr_bresp_cnt[int_wr_cntr_width-2:0]],burst_data[wr_bresp_cnt[int_wr_cntr_width-2:0]],burst_valid_bytes[wr_bresp_cnt[int_wr_cntr_width-2:0]]); /// gives wrapped start address
|
||||||
|
end else begin
|
||||||
|
aligned_wr_data = burst_data[wr_bresp_cnt[int_wr_cntr_width-2:0]];
|
||||||
|
aligned_wr_addr = awaddr[wr_bresp_cnt[int_wr_cntr_width-2:0]] ;
|
||||||
|
end
|
||||||
|
valid_data_bytes = burst_valid_bytes[wr_bresp_cnt[int_wr_cntr_width-2:0]];
|
||||||
|
end else
|
||||||
|
valid_data_bytes = 0;
|
||||||
|
|
||||||
|
wr_fifo[wr_fifo_wr_ptr[int_wr_cntr_width-2:0]] = {awqos[wr_bresp_cnt[int_wr_cntr_width-2:0]], aligned_wr_data, aligned_wr_addr, valid_data_bytes};
|
||||||
|
wr_fifo_wr_ptr = wr_fifo_wr_ptr + 1;
|
||||||
|
wr_bresp_cnt = wr_bresp_cnt+1;
|
||||||
|
if(wr_bresp_cnt[int_wr_cntr_width-2:0] === (max_wr_outstanding_transactions-1)) begin
|
||||||
|
wr_bresp_cnt[int_wr_cntr_width-1] = ~ wr_bresp_cnt[int_wr_cntr_width-1];
|
||||||
|
wr_bresp_cnt[int_wr_cntr_width-2:0] = 0;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end // else
|
||||||
|
end // always
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Send Write Response Channel handshake */
|
||||||
|
always@(negedge S_RESETN or posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN) begin
|
||||||
|
rd_bresp_cnt = 0;
|
||||||
|
wr_latency_count = get_wr_lat_number(1);
|
||||||
|
wr_delayed = 0;
|
||||||
|
bresp_time_cnt = 0;
|
||||||
|
end else begin
|
||||||
|
wr_delayed = 1'b0;
|
||||||
|
if(awvalid_flag[bresp_time_cnt] && (($time - awvalid_receive_time[bresp_time_cnt])/s_aclk_period >= wr_latency_count))
|
||||||
|
wr_delayed = 1;
|
||||||
|
if(!bresp_fifo_empty && wr_delayed) begin
|
||||||
|
slave.SEND_WRITE_RESPONSE(fifo_bresp[rd_bresp_cnt[int_wr_cntr_width-2:0]][rsp_id_msb : rsp_id_lsb], // ID
|
||||||
|
fifo_bresp[rd_bresp_cnt[int_wr_cntr_width-2:0]][rsp_msb : rsp_lsb] // Response
|
||||||
|
);
|
||||||
|
wr_delayed = 0;
|
||||||
|
awvalid_flag[bresp_time_cnt] = 1'b0;
|
||||||
|
bresp_time_cnt = bresp_time_cnt+1;
|
||||||
|
rd_bresp_cnt = rd_bresp_cnt + 1;
|
||||||
|
if(rd_bresp_cnt[int_wr_cntr_width-2:0] === (max_wr_outstanding_transactions-1)) begin
|
||||||
|
rd_bresp_cnt[int_wr_cntr_width-1] = ~ rd_bresp_cnt[int_wr_cntr_width-1];
|
||||||
|
rd_bresp_cnt[int_wr_cntr_width-2:0] = 0;
|
||||||
|
end
|
||||||
|
if(bresp_time_cnt === max_wr_outstanding_transactions) begin
|
||||||
|
bresp_time_cnt = 0;
|
||||||
|
end
|
||||||
|
wr_latency_count = get_wr_lat_number(1);
|
||||||
|
end
|
||||||
|
end // else
|
||||||
|
end//always
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Reading from the wr_fifo */
|
||||||
|
always@(negedge S_RESETN or posedge SW_CLK) begin
|
||||||
|
if(!S_RESETN) begin
|
||||||
|
WR_DATA_VALID_DDR = 1'b0;
|
||||||
|
WR_DATA_VALID_OCM = 1'b0;
|
||||||
|
wr_fifo_rd_ptr = 0;
|
||||||
|
state = SEND_DATA;
|
||||||
|
WR_QOS = 0;
|
||||||
|
end else begin
|
||||||
|
case(state)
|
||||||
|
SEND_DATA :begin
|
||||||
|
state = SEND_DATA;
|
||||||
|
WR_DATA_VALID_OCM = 0;
|
||||||
|
WR_DATA_VALID_DDR = 0;
|
||||||
|
if(!wr_fifo_empty) begin
|
||||||
|
WR_DATA = wr_fifo[wr_fifo_rd_ptr[int_wr_cntr_width-2:0]][wr_data_msb : wr_data_lsb];
|
||||||
|
WR_ADDR = wr_fifo[wr_fifo_rd_ptr[int_wr_cntr_width-2:0]][wr_addr_msb : wr_addr_lsb];
|
||||||
|
WR_BYTES = wr_fifo[wr_fifo_rd_ptr[int_wr_cntr_width-2:0]][wr_bytes_msb : wr_bytes_lsb];
|
||||||
|
WR_QOS = wr_fifo[wr_fifo_rd_ptr[int_wr_cntr_width-2:0]][wr_qos_msb : wr_qos_lsb];
|
||||||
|
state = WAIT_ACK;
|
||||||
|
case (decode_address(wr_fifo[wr_fifo_rd_ptr[int_wr_cntr_width-2:0]][wr_addr_msb : wr_addr_lsb]))
|
||||||
|
OCM_MEM : WR_DATA_VALID_OCM = 1;
|
||||||
|
DDR_MEM : WR_DATA_VALID_DDR = 1;
|
||||||
|
default : state = SEND_DATA;
|
||||||
|
endcase
|
||||||
|
wr_fifo_rd_ptr = wr_fifo_rd_ptr+1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
WAIT_ACK :begin
|
||||||
|
state = WAIT_ACK;
|
||||||
|
if(WR_DATA_ACK_OCM | WR_DATA_ACK_DDR) begin
|
||||||
|
WR_DATA_VALID_OCM = 1'b0;
|
||||||
|
WR_DATA_VALID_DDR = 1'b0;
|
||||||
|
state = SEND_DATA;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
end
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
/*-------------------------------- WRITE HANDSHAKE END ----------------------------------------*/
|
||||||
|
|
||||||
|
/*-------------------------------- READ HANDSHAKE ---------------------------------------------*/
|
||||||
|
|
||||||
|
/* READ CHANNELS */
|
||||||
|
/* Store the arvalid receive time --- necessary for calculating latency in sending the rresp latency */
|
||||||
|
reg [7:0] ar_time_cnt = 0,rresp_time_cnt = 0;
|
||||||
|
real arvalid_receive_time[0:max_rd_outstanding_transactions]; // store the time when a new arvalid is received
|
||||||
|
reg arvalid_flag[0:max_rd_outstanding_transactions]; // store the time when a new arvalid is received
|
||||||
|
reg [int_rd_cntr_width-1:0] ar_cnt = 0; // counter for arvalid info
|
||||||
|
|
||||||
|
/* various FIFOs for storing the ADDR channel info */
|
||||||
|
reg [axi_size_width-1:0] arsize [0:max_rd_outstanding_transactions-1];
|
||||||
|
reg [axi_prot_width-1:0] arprot [0:max_rd_outstanding_transactions-1];
|
||||||
|
reg [axi_brst_type_width-1:0] arbrst [0:max_rd_outstanding_transactions-1];
|
||||||
|
reg [axi_len_width-1:0] arlen [0:max_rd_outstanding_transactions-1];
|
||||||
|
reg [axi_cache_width-1:0] arcache [0:max_rd_outstanding_transactions-1];
|
||||||
|
reg [axi_lock_width-1:0] arlock [0:max_rd_outstanding_transactions-1];
|
||||||
|
reg ar_flag [0:max_rd_outstanding_transactions-1];
|
||||||
|
reg [addr_width-1:0] araddr [0:max_rd_outstanding_transactions-1];
|
||||||
|
reg [id_bus_width-1:0] arid [0:max_rd_outstanding_transactions-1];
|
||||||
|
reg [axi_qos_width-1:0] arqos [0:max_rd_outstanding_transactions-1];
|
||||||
|
wire ar_fifo_full; // indicates arvalid_fifo is full (max outstanding transactions reached)
|
||||||
|
|
||||||
|
reg [int_rd_cntr_width-1:0] rd_cnt = 0;
|
||||||
|
reg [int_rd_cntr_width-1:0] wr_rresp_cnt = 0;
|
||||||
|
reg [axi_rsp_width-1:0] rresp;
|
||||||
|
reg [rsp_fifo_bits-1:0] fifo_rresp [0:max_rd_outstanding_transactions-1]; // store the ID and its corresponding response
|
||||||
|
|
||||||
|
/* Send Read Response & Data Channel handshake */
|
||||||
|
integer rd_latency_count;
|
||||||
|
reg rd_delayed;
|
||||||
|
|
||||||
|
reg [max_burst_bits-1:0] read_fifo [0:max_rd_outstanding_transactions-1]; /// Store only AXI Burst Data ..
|
||||||
|
reg [int_rd_cntr_width-1:0] rd_fifo_wr_ptr = 0, rd_fifo_rd_ptr = 0;
|
||||||
|
wire read_fifo_full;
|
||||||
|
|
||||||
|
assign read_fifo_full = (rd_fifo_wr_ptr[int_rd_cntr_width-1] !== rd_fifo_rd_ptr[int_rd_cntr_width-1] && rd_fifo_wr_ptr[int_rd_cntr_width-2:0] === rd_fifo_rd_ptr[int_rd_cntr_width-2:0])?1'b1: 1'b0;
|
||||||
|
assign read_fifo_empty = (rd_fifo_wr_ptr === rd_fifo_rd_ptr)?1'b1: 1'b0;
|
||||||
|
assign ar_fifo_full = ((ar_cnt[int_rd_cntr_width-1] !== rd_cnt[int_rd_cntr_width-1]) && (ar_cnt[int_rd_cntr_width-2:0] === rd_cnt[int_rd_cntr_width-2:0]))?1'b1 :1'b0;
|
||||||
|
|
||||||
|
/* Store the arvalid receive time --- necessary for calculating the bresp latency */
|
||||||
|
always@(negedge S_RESETN or S_ARID or S_ARADDR or S_ARVALID )
|
||||||
|
begin
|
||||||
|
if(!S_RESETN)
|
||||||
|
ar_time_cnt = 0;
|
||||||
|
else begin
|
||||||
|
if(S_ARVALID) begin
|
||||||
|
arvalid_receive_time[ar_time_cnt] = $time;
|
||||||
|
arvalid_flag[ar_time_cnt] = 1'b1;
|
||||||
|
ar_time_cnt = ar_time_cnt + 1;
|
||||||
|
if(ar_time_cnt === max_rd_outstanding_transactions)
|
||||||
|
ar_time_cnt = 0;
|
||||||
|
end
|
||||||
|
end // else
|
||||||
|
end /// always
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
always@(posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(net_ARVALID && S_ARREADY) begin
|
||||||
|
if(S_ARQOS === 0) arqos[aw_cnt[int_rd_cntr_width-2:0]] = ar_qos;
|
||||||
|
else arqos[aw_cnt[int_rd_cntr_width-2:0]] = S_ARQOS;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
always@(ar_fifo_full)
|
||||||
|
begin
|
||||||
|
if(ar_fifo_full && DEBUG_INFO)
|
||||||
|
$display("[%0d] : %0s : %0s : Reached the maximum outstanding Read transactions limit (%0d). Blocking all future Read transactions until at least 1 of the outstanding Read transaction has completed.",$time, DISP_INFO, slave_name,max_rd_outstanding_transactions);
|
||||||
|
end
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Address Read Channel handshake*/
|
||||||
|
always@(negedge S_RESETN or posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN) begin
|
||||||
|
ar_cnt = 0;
|
||||||
|
end else begin
|
||||||
|
if(!ar_fifo_full) begin
|
||||||
|
slave.RECEIVE_READ_ADDRESS(0,
|
||||||
|
id_invalid,
|
||||||
|
araddr[ar_cnt[int_rd_cntr_width-2:0]],
|
||||||
|
arlen[ar_cnt[int_rd_cntr_width-2:0]],
|
||||||
|
arsize[ar_cnt[int_rd_cntr_width-2:0]],
|
||||||
|
arbrst[ar_cnt[int_rd_cntr_width-2:0]],
|
||||||
|
arlock[ar_cnt[int_rd_cntr_width-2:0]],
|
||||||
|
arcache[ar_cnt[int_rd_cntr_width-2:0]],
|
||||||
|
arprot[ar_cnt[int_rd_cntr_width-2:0]],
|
||||||
|
arid[ar_cnt[int_rd_cntr_width-2:0]]); /// sampled valid ID.
|
||||||
|
ar_flag[ar_cnt[int_rd_cntr_width-2:0]] = 1'b1;
|
||||||
|
ar_cnt = ar_cnt+1;
|
||||||
|
if(ar_cnt[int_rd_cntr_width-2:0] === max_rd_outstanding_transactions-1) begin
|
||||||
|
ar_cnt[int_rd_cntr_width-1] = ~ ar_cnt[int_rd_cntr_width-1];
|
||||||
|
ar_cnt[int_rd_cntr_width-2:0] = 0;
|
||||||
|
end
|
||||||
|
end /// if(!ar_fifo_full)
|
||||||
|
end /// if else
|
||||||
|
end /// always*/
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Align Wrap data for read transaction*/
|
||||||
|
task automatic get_wrap_aligned_rd_data;
|
||||||
|
output [(data_bus_width*axi_burst_len)-1:0] aligned_data;
|
||||||
|
input [addr_width-1:0] addr;
|
||||||
|
input [(data_bus_width*axi_burst_len)-1:0] b_data;
|
||||||
|
input [max_burst_bytes_width:0] v_bytes;
|
||||||
|
reg [addr_width-1:0] start_addr;
|
||||||
|
reg [(data_bus_width*axi_burst_len)-1:0] temp_data, wrp_data;
|
||||||
|
integer wrp_bytes;
|
||||||
|
integer i;
|
||||||
|
begin
|
||||||
|
start_addr = (addr/v_bytes) * v_bytes;
|
||||||
|
wrp_bytes = addr - start_addr;
|
||||||
|
wrp_data = b_data;
|
||||||
|
temp_data = 0;
|
||||||
|
while(wrp_bytes > 0) begin /// get the data that is wrapped
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
temp_data[(data_bus_width*axi_burst_len)-1 : (data_bus_width*axi_burst_len)-8] = wrp_data[7:0];
|
||||||
|
wrp_data = wrp_data >> 8;
|
||||||
|
wrp_bytes = wrp_bytes - 1;
|
||||||
|
end
|
||||||
|
temp_data = temp_data >> ((data_bus_width*axi_burst_len) - (v_bytes*8));
|
||||||
|
wrp_bytes = addr - start_addr;
|
||||||
|
wrp_data = b_data >> (wrp_bytes*8);
|
||||||
|
|
||||||
|
aligned_data = (temp_data | wrp_data);
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
parameter RD_DATA_REQ = 1'b0, WAIT_RD_VALID = 1'b1;
|
||||||
|
reg [addr_width-1:0] temp_read_address;
|
||||||
|
reg [max_burst_bytes_width:0] temp_rd_valid_bytes;
|
||||||
|
reg rd_fifo_state;
|
||||||
|
reg invalid_rd_req;
|
||||||
|
/* get the data from memory && also calculate the rresp*/
|
||||||
|
always@(negedge S_RESETN or posedge SW_CLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN)begin
|
||||||
|
rd_fifo_wr_ptr = 0;
|
||||||
|
wr_rresp_cnt =0;
|
||||||
|
rd_fifo_state = RD_DATA_REQ;
|
||||||
|
temp_rd_valid_bytes = 0;
|
||||||
|
temp_read_address = 0;
|
||||||
|
RD_REQ_DDR = 0;
|
||||||
|
RD_REQ_OCM = 0;
|
||||||
|
RD_REQ_REG = 0;
|
||||||
|
RD_QOS = 0;
|
||||||
|
invalid_rd_req = 0;
|
||||||
|
end else begin
|
||||||
|
case(rd_fifo_state)
|
||||||
|
RD_DATA_REQ : begin
|
||||||
|
rd_fifo_state = RD_DATA_REQ;
|
||||||
|
RD_REQ_DDR = 0;
|
||||||
|
RD_REQ_OCM = 0;
|
||||||
|
RD_REQ_REG = 0;
|
||||||
|
RD_QOS = 0;
|
||||||
|
if(ar_flag[wr_rresp_cnt[int_rd_cntr_width-2:0]] && !read_fifo_full) begin
|
||||||
|
ar_flag[wr_rresp_cnt[int_rd_cntr_width-2:0]] = 0;
|
||||||
|
rresp = calculate_resp(1'b1, araddr[wr_rresp_cnt[int_rd_cntr_width-2:0]],arprot[wr_rresp_cnt[int_rd_cntr_width-2:0]]);
|
||||||
|
fifo_rresp[wr_rresp_cnt[int_rd_cntr_width-2:0]] = {arid[wr_rresp_cnt[int_rd_cntr_width-2:0]],rresp};
|
||||||
|
temp_rd_valid_bytes = (arlen[wr_rresp_cnt[int_rd_cntr_width-2:0]]+1)*(2**arsize[wr_rresp_cnt[int_rd_cntr_width-2:0]]);//data_bus_width/8;
|
||||||
|
|
||||||
|
if(arbrst[wr_rresp_cnt[int_rd_cntr_width-2:0]] === AXI_WRAP) /// wrap begin
|
||||||
|
temp_read_address = (araddr[wr_rresp_cnt[int_rd_cntr_width-2:0]]/temp_rd_valid_bytes) * temp_rd_valid_bytes;
|
||||||
|
else
|
||||||
|
temp_read_address = araddr[wr_rresp_cnt[int_rd_cntr_width-2:0]];
|
||||||
|
if(rresp === AXI_OK) begin
|
||||||
|
case(decode_address(temp_read_address))//decode_address(araddr[wr_rresp_cnt[int_rd_cntr_width-2:0]]);
|
||||||
|
OCM_MEM : RD_REQ_OCM = 1;
|
||||||
|
DDR_MEM : RD_REQ_DDR = 1;
|
||||||
|
REG_MEM : RD_REQ_REG = 1;
|
||||||
|
default : invalid_rd_req = 1;
|
||||||
|
endcase
|
||||||
|
end else
|
||||||
|
invalid_rd_req = 1;
|
||||||
|
|
||||||
|
RD_QOS = arqos[wr_rresp_cnt[int_rd_cntr_width-2:0]];
|
||||||
|
RD_ADDR = temp_read_address; ///araddr[wr_rresp_cnt[int_rd_cntr_width-2:0]];
|
||||||
|
RD_BYTES = temp_rd_valid_bytes;
|
||||||
|
rd_fifo_state = WAIT_RD_VALID;
|
||||||
|
wr_rresp_cnt = wr_rresp_cnt + 1;
|
||||||
|
if(wr_rresp_cnt[int_rd_cntr_width-2:0] === max_rd_outstanding_transactions-1) begin
|
||||||
|
wr_rresp_cnt[int_rd_cntr_width-1] = ~ wr_rresp_cnt[int_rd_cntr_width-1];
|
||||||
|
wr_rresp_cnt[int_rd_cntr_width-2:0] = 0;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
WAIT_RD_VALID : begin
|
||||||
|
rd_fifo_state = WAIT_RD_VALID;
|
||||||
|
if(RD_DATA_VALID_OCM | RD_DATA_VALID_DDR | RD_DATA_VALID_REG | invalid_rd_req) begin ///temp_dec == 2'b11) begin
|
||||||
|
if(RD_DATA_VALID_DDR)
|
||||||
|
read_fifo[rd_fifo_wr_ptr[int_rd_cntr_width-2:0]] = RD_DATA_DDR;
|
||||||
|
else if(RD_DATA_VALID_OCM)
|
||||||
|
read_fifo[rd_fifo_wr_ptr[int_rd_cntr_width-2:0]] = RD_DATA_OCM;
|
||||||
|
else if(RD_DATA_VALID_REG)
|
||||||
|
read_fifo[rd_fifo_wr_ptr[int_rd_cntr_width-2:0]] = RD_DATA_REG;
|
||||||
|
else
|
||||||
|
read_fifo[rd_fifo_wr_ptr[int_rd_cntr_width-2:0]] = 0;
|
||||||
|
rd_fifo_wr_ptr = rd_fifo_wr_ptr + 1;
|
||||||
|
RD_REQ_DDR = 0;
|
||||||
|
RD_REQ_OCM = 0;
|
||||||
|
RD_REQ_REG = 0;
|
||||||
|
RD_QOS = 0;
|
||||||
|
invalid_rd_req = 0;
|
||||||
|
rd_fifo_state = RD_DATA_REQ;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end /// else
|
||||||
|
end /// always
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------------*/
|
||||||
|
reg[max_burst_bytes_width:0] rd_v_b;
|
||||||
|
reg [(data_bus_width*axi_burst_len)-1:0] temp_read_data;
|
||||||
|
reg [(data_bus_width*axi_burst_len)-1:0] temp_wrap_data;
|
||||||
|
reg[(axi_rsp_width*axi_burst_len)-1:0] temp_read_rsp;
|
||||||
|
|
||||||
|
/* Read Data Channel handshake */
|
||||||
|
always@(negedge S_RESETN or posedge S_ACLK)
|
||||||
|
begin
|
||||||
|
if(!S_RESETN)begin
|
||||||
|
rd_fifo_rd_ptr = 0;
|
||||||
|
rd_cnt = 0;
|
||||||
|
rd_latency_count = get_rd_lat_number(1);
|
||||||
|
rd_delayed = 0;
|
||||||
|
rresp_time_cnt = 0;
|
||||||
|
rd_v_b = 0;
|
||||||
|
end else begin
|
||||||
|
if(arvalid_flag[rresp_time_cnt] && ((($time - arvalid_receive_time[rresp_time_cnt])/s_aclk_period) >= rd_latency_count))
|
||||||
|
rd_delayed = 1;
|
||||||
|
if(!read_fifo_empty && rd_delayed)begin
|
||||||
|
rd_delayed = 0;
|
||||||
|
arvalid_flag[rresp_time_cnt] = 1'b0;
|
||||||
|
rd_v_b = ((arlen[rd_cnt[int_rd_cntr_width-2:0]]+1)*(2**arsize[rd_cnt[int_rd_cntr_width-2:0]]));
|
||||||
|
temp_read_data = read_fifo[rd_fifo_rd_ptr[int_rd_cntr_width-2:0]];
|
||||||
|
rd_fifo_rd_ptr = rd_fifo_rd_ptr+1;
|
||||||
|
|
||||||
|
if(arbrst[rd_cnt[int_rd_cntr_width-2:0]]=== AXI_WRAP) begin
|
||||||
|
get_wrap_aligned_rd_data(temp_wrap_data, araddr[rd_cnt[int_rd_cntr_width-2:0]], temp_read_data, rd_v_b);
|
||||||
|
temp_read_data = temp_wrap_data;
|
||||||
|
end
|
||||||
|
temp_read_rsp = 0;
|
||||||
|
repeat(axi_burst_len) begin
|
||||||
|
temp_read_rsp = temp_read_rsp >> axi_rsp_width;
|
||||||
|
temp_read_rsp[(axi_rsp_width*axi_burst_len)-1:(axi_rsp_width*axi_burst_len)-axi_rsp_width] = fifo_rresp[rd_cnt[int_rd_cntr_width-2:0]][rsp_msb : rsp_lsb];
|
||||||
|
end
|
||||||
|
slave.SEND_READ_BURST_RESP_CTRL(arid[rd_cnt[int_rd_cntr_width-2:0]],
|
||||||
|
araddr[rd_cnt[int_rd_cntr_width-2:0]],
|
||||||
|
arlen[rd_cnt[int_rd_cntr_width-2:0]],
|
||||||
|
arsize[rd_cnt[int_rd_cntr_width-2:0]],
|
||||||
|
arbrst[rd_cnt[int_rd_cntr_width-2:0]],
|
||||||
|
temp_read_data,
|
||||||
|
temp_read_rsp);
|
||||||
|
rd_cnt = rd_cnt + 1;
|
||||||
|
rresp_time_cnt = rresp_time_cnt+1;
|
||||||
|
if(rresp_time_cnt === max_rd_outstanding_transactions) rresp_time_cnt = 0;
|
||||||
|
if(rd_cnt[int_rd_cntr_width-2:0] === (max_rd_outstanding_transactions-1)) begin
|
||||||
|
rd_cnt[int_rd_cntr_width-1] = ~ rd_cnt[int_rd_cntr_width-1];
|
||||||
|
rd_cnt[int_rd_cntr_width-2:0] = 0;
|
||||||
|
end
|
||||||
|
rd_latency_count = get_rd_lat_number(1);
|
||||||
|
end
|
||||||
|
end /// else
|
||||||
|
end /// always
|
||||||
|
endmodule
|
@ -0,0 +1,268 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_ddrc.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Module that acts as controller for sparse memory (DDR).
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_ddrc(
|
||||||
|
rstn,
|
||||||
|
sw_clk,
|
||||||
|
|
||||||
|
/* Goes to port 0 of DDR */
|
||||||
|
ddr_wr_ack_port0,
|
||||||
|
ddr_wr_dv_port0,
|
||||||
|
ddr_rd_req_port0,
|
||||||
|
ddr_rd_dv_port0,
|
||||||
|
ddr_wr_addr_port0,
|
||||||
|
ddr_wr_data_port0,
|
||||||
|
ddr_wr_bytes_port0,
|
||||||
|
ddr_rd_addr_port0,
|
||||||
|
ddr_rd_data_port0,
|
||||||
|
ddr_rd_bytes_port0,
|
||||||
|
ddr_wr_qos_port0,
|
||||||
|
ddr_rd_qos_port0,
|
||||||
|
|
||||||
|
|
||||||
|
/* Goes to port 1 of DDR */
|
||||||
|
ddr_wr_ack_port1,
|
||||||
|
ddr_wr_dv_port1,
|
||||||
|
ddr_rd_req_port1,
|
||||||
|
ddr_rd_dv_port1,
|
||||||
|
ddr_wr_addr_port1,
|
||||||
|
ddr_wr_data_port1,
|
||||||
|
ddr_wr_bytes_port1,
|
||||||
|
ddr_rd_addr_port1,
|
||||||
|
ddr_rd_data_port1,
|
||||||
|
ddr_rd_bytes_port1,
|
||||||
|
ddr_wr_qos_port1,
|
||||||
|
ddr_rd_qos_port1,
|
||||||
|
|
||||||
|
/* Goes to port2 of DDR */
|
||||||
|
ddr_wr_ack_port2,
|
||||||
|
ddr_wr_dv_port2,
|
||||||
|
ddr_rd_req_port2,
|
||||||
|
ddr_rd_dv_port2,
|
||||||
|
ddr_wr_addr_port2,
|
||||||
|
ddr_wr_data_port2,
|
||||||
|
ddr_wr_bytes_port2,
|
||||||
|
ddr_rd_addr_port2,
|
||||||
|
ddr_rd_data_port2,
|
||||||
|
ddr_rd_bytes_port2,
|
||||||
|
ddr_wr_qos_port2,
|
||||||
|
ddr_rd_qos_port2,
|
||||||
|
|
||||||
|
/* Goes to port3 of DDR */
|
||||||
|
ddr_wr_ack_port3,
|
||||||
|
ddr_wr_dv_port3,
|
||||||
|
ddr_rd_req_port3,
|
||||||
|
ddr_rd_dv_port3,
|
||||||
|
ddr_wr_addr_port3,
|
||||||
|
ddr_wr_data_port3,
|
||||||
|
ddr_wr_bytes_port3,
|
||||||
|
ddr_rd_addr_port3,
|
||||||
|
ddr_rd_data_port3,
|
||||||
|
ddr_rd_bytes_port3,
|
||||||
|
ddr_wr_qos_port3,
|
||||||
|
ddr_rd_qos_port3
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
|
||||||
|
input rstn;
|
||||||
|
input sw_clk;
|
||||||
|
|
||||||
|
output ddr_wr_ack_port0;
|
||||||
|
input ddr_wr_dv_port0;
|
||||||
|
input ddr_rd_req_port0;
|
||||||
|
output ddr_rd_dv_port0;
|
||||||
|
input[addr_width-1:0] ddr_wr_addr_port0;
|
||||||
|
input[max_burst_bits-1:0] ddr_wr_data_port0;
|
||||||
|
input[max_burst_bytes_width:0] ddr_wr_bytes_port0;
|
||||||
|
input[addr_width-1:0] ddr_rd_addr_port0;
|
||||||
|
output[max_burst_bits-1:0] ddr_rd_data_port0;
|
||||||
|
input[max_burst_bytes_width:0] ddr_rd_bytes_port0;
|
||||||
|
input [axi_qos_width-1:0] ddr_wr_qos_port0;
|
||||||
|
input [axi_qos_width-1:0] ddr_rd_qos_port0;
|
||||||
|
|
||||||
|
output ddr_wr_ack_port1;
|
||||||
|
input ddr_wr_dv_port1;
|
||||||
|
input ddr_rd_req_port1;
|
||||||
|
output ddr_rd_dv_port1;
|
||||||
|
input[addr_width-1:0] ddr_wr_addr_port1;
|
||||||
|
input[max_burst_bits-1:0] ddr_wr_data_port1;
|
||||||
|
input[max_burst_bytes_width:0] ddr_wr_bytes_port1;
|
||||||
|
input[addr_width-1:0] ddr_rd_addr_port1;
|
||||||
|
output[max_burst_bits-1:0] ddr_rd_data_port1;
|
||||||
|
input[max_burst_bytes_width:0] ddr_rd_bytes_port1;
|
||||||
|
input[axi_qos_width-1:0] ddr_wr_qos_port1;
|
||||||
|
input[axi_qos_width-1:0] ddr_rd_qos_port1;
|
||||||
|
|
||||||
|
output ddr_wr_ack_port2;
|
||||||
|
input ddr_wr_dv_port2;
|
||||||
|
input ddr_rd_req_port2;
|
||||||
|
output ddr_rd_dv_port2;
|
||||||
|
input[addr_width-1:0] ddr_wr_addr_port2;
|
||||||
|
input[max_burst_bits-1:0] ddr_wr_data_port2;
|
||||||
|
input[max_burst_bytes_width:0] ddr_wr_bytes_port2;
|
||||||
|
input[addr_width-1:0] ddr_rd_addr_port2;
|
||||||
|
output[max_burst_bits-1:0] ddr_rd_data_port2;
|
||||||
|
input[max_burst_bytes_width:0] ddr_rd_bytes_port2;
|
||||||
|
input[axi_qos_width-1:0] ddr_wr_qos_port2;
|
||||||
|
input[axi_qos_width-1:0] ddr_rd_qos_port2;
|
||||||
|
|
||||||
|
output ddr_wr_ack_port3;
|
||||||
|
input ddr_wr_dv_port3;
|
||||||
|
input ddr_rd_req_port3;
|
||||||
|
output ddr_rd_dv_port3;
|
||||||
|
input[addr_width-1:0] ddr_wr_addr_port3;
|
||||||
|
input[max_burst_bits-1:0] ddr_wr_data_port3;
|
||||||
|
input[max_burst_bytes_width:0] ddr_wr_bytes_port3;
|
||||||
|
input[addr_width-1:0] ddr_rd_addr_port3;
|
||||||
|
output[max_burst_bits-1:0] ddr_rd_data_port3;
|
||||||
|
input[max_burst_bytes_width:0] ddr_rd_bytes_port3;
|
||||||
|
input[axi_qos_width-1:0] ddr_wr_qos_port3;
|
||||||
|
input[axi_qos_width-1:0] ddr_rd_qos_port3;
|
||||||
|
|
||||||
|
wire [axi_qos_width-1:0] wr_qos;
|
||||||
|
wire wr_req;
|
||||||
|
wire [max_burst_bits-1:0] wr_data;
|
||||||
|
wire [addr_width-1:0] wr_addr;
|
||||||
|
wire [max_burst_bytes_width:0] wr_bytes;
|
||||||
|
reg wr_ack;
|
||||||
|
|
||||||
|
wire [axi_qos_width-1:0] rd_qos;
|
||||||
|
reg [max_burst_bits-1:0] rd_data;
|
||||||
|
wire [addr_width-1:0] rd_addr;
|
||||||
|
wire [max_burst_bytes_width:0] rd_bytes;
|
||||||
|
reg rd_dv;
|
||||||
|
wire rd_req;
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_wr_4 ddr_write_ports (
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
|
||||||
|
.qos1(ddr_wr_qos_port0),
|
||||||
|
.qos2(ddr_wr_qos_port1),
|
||||||
|
.qos3(ddr_wr_qos_port2),
|
||||||
|
.qos4(ddr_wr_qos_port3),
|
||||||
|
|
||||||
|
.prt_dv1(ddr_wr_dv_port0),
|
||||||
|
.prt_dv2(ddr_wr_dv_port1),
|
||||||
|
.prt_dv3(ddr_wr_dv_port2),
|
||||||
|
.prt_dv4(ddr_wr_dv_port3),
|
||||||
|
|
||||||
|
.prt_data1(ddr_wr_data_port0),
|
||||||
|
.prt_data2(ddr_wr_data_port1),
|
||||||
|
.prt_data3(ddr_wr_data_port2),
|
||||||
|
.prt_data4(ddr_wr_data_port3),
|
||||||
|
|
||||||
|
.prt_addr1(ddr_wr_addr_port0),
|
||||||
|
.prt_addr2(ddr_wr_addr_port1),
|
||||||
|
.prt_addr3(ddr_wr_addr_port2),
|
||||||
|
.prt_addr4(ddr_wr_addr_port3),
|
||||||
|
|
||||||
|
.prt_bytes1(ddr_wr_bytes_port0),
|
||||||
|
.prt_bytes2(ddr_wr_bytes_port1),
|
||||||
|
.prt_bytes3(ddr_wr_bytes_port2),
|
||||||
|
.prt_bytes4(ddr_wr_bytes_port3),
|
||||||
|
|
||||||
|
.prt_ack1(ddr_wr_ack_port0),
|
||||||
|
.prt_ack2(ddr_wr_ack_port1),
|
||||||
|
.prt_ack3(ddr_wr_ack_port2),
|
||||||
|
.prt_ack4(ddr_wr_ack_port3),
|
||||||
|
|
||||||
|
.prt_qos(wr_qos),
|
||||||
|
.prt_req(wr_req),
|
||||||
|
.prt_data(wr_data),
|
||||||
|
.prt_addr(wr_addr),
|
||||||
|
.prt_bytes(wr_bytes),
|
||||||
|
.prt_ack(wr_ack)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_rd_4 ddr_read_ports (
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
|
||||||
|
.qos1(ddr_rd_qos_port0),
|
||||||
|
.qos2(ddr_rd_qos_port1),
|
||||||
|
.qos3(ddr_rd_qos_port2),
|
||||||
|
.qos4(ddr_rd_qos_port3),
|
||||||
|
|
||||||
|
.prt_req1(ddr_rd_req_port0),
|
||||||
|
.prt_req2(ddr_rd_req_port1),
|
||||||
|
.prt_req3(ddr_rd_req_port2),
|
||||||
|
.prt_req4(ddr_rd_req_port3),
|
||||||
|
|
||||||
|
.prt_data1(ddr_rd_data_port0),
|
||||||
|
.prt_data2(ddr_rd_data_port1),
|
||||||
|
.prt_data3(ddr_rd_data_port2),
|
||||||
|
.prt_data4(ddr_rd_data_port3),
|
||||||
|
|
||||||
|
.prt_addr1(ddr_rd_addr_port0),
|
||||||
|
.prt_addr2(ddr_rd_addr_port1),
|
||||||
|
.prt_addr3(ddr_rd_addr_port2),
|
||||||
|
.prt_addr4(ddr_rd_addr_port3),
|
||||||
|
|
||||||
|
.prt_bytes1(ddr_rd_bytes_port0),
|
||||||
|
.prt_bytes2(ddr_rd_bytes_port1),
|
||||||
|
.prt_bytes3(ddr_rd_bytes_port2),
|
||||||
|
.prt_bytes4(ddr_rd_bytes_port3),
|
||||||
|
|
||||||
|
.prt_dv1(ddr_rd_dv_port0),
|
||||||
|
.prt_dv2(ddr_rd_dv_port1),
|
||||||
|
.prt_dv3(ddr_rd_dv_port2),
|
||||||
|
.prt_dv4(ddr_rd_dv_port3),
|
||||||
|
|
||||||
|
.prt_qos(rd_qos),
|
||||||
|
.prt_req(rd_req),
|
||||||
|
.prt_data(rd_data),
|
||||||
|
.prt_addr(rd_addr),
|
||||||
|
.prt_bytes(rd_bytes),
|
||||||
|
.prt_dv(rd_dv)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_sparse_mem ddr();
|
||||||
|
|
||||||
|
reg [1:0] state;
|
||||||
|
always@(posedge sw_clk or negedge rstn)
|
||||||
|
begin
|
||||||
|
if(!rstn) begin
|
||||||
|
wr_ack <= 0;
|
||||||
|
rd_dv <= 0;
|
||||||
|
state <= 2'd0;
|
||||||
|
end else begin
|
||||||
|
case(state)
|
||||||
|
0:begin
|
||||||
|
state <= 0;
|
||||||
|
wr_ack <= 0;
|
||||||
|
rd_dv <= 0;
|
||||||
|
if(wr_req) begin
|
||||||
|
ddr.write_mem(wr_data , wr_addr, wr_bytes);
|
||||||
|
wr_ack <= 1;
|
||||||
|
state <= 1;
|
||||||
|
end
|
||||||
|
if(rd_req) begin
|
||||||
|
ddr.read_mem(rd_data,rd_addr, rd_bytes);
|
||||||
|
rd_dv <= 1;
|
||||||
|
state <= 1;
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
1:begin
|
||||||
|
wr_ack <= 0;
|
||||||
|
rd_dv <= 0;
|
||||||
|
state <= 0;
|
||||||
|
end
|
||||||
|
|
||||||
|
endcase
|
||||||
|
end /// if
|
||||||
|
end// always
|
||||||
|
|
||||||
|
endmodule
|
@ -0,0 +1,300 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_fmsw_gp.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Mimics FMSW switch.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_fmsw_gp(
|
||||||
|
sw_clk,
|
||||||
|
rstn,
|
||||||
|
|
||||||
|
w_qos_gp0,
|
||||||
|
r_qos_gp0,
|
||||||
|
wr_ack_ocm_gp0,
|
||||||
|
wr_ack_ddr_gp0,
|
||||||
|
wr_data_gp0,
|
||||||
|
wr_addr_gp0,
|
||||||
|
wr_bytes_gp0,
|
||||||
|
wr_dv_ocm_gp0,
|
||||||
|
wr_dv_ddr_gp0,
|
||||||
|
rd_req_ocm_gp0,
|
||||||
|
rd_req_ddr_gp0,
|
||||||
|
rd_req_reg_gp0,
|
||||||
|
rd_addr_gp0,
|
||||||
|
rd_bytes_gp0,
|
||||||
|
rd_data_ocm_gp0,
|
||||||
|
rd_data_ddr_gp0,
|
||||||
|
rd_data_reg_gp0,
|
||||||
|
rd_dv_ocm_gp0,
|
||||||
|
rd_dv_ddr_gp0,
|
||||||
|
rd_dv_reg_gp0,
|
||||||
|
|
||||||
|
w_qos_gp1,
|
||||||
|
r_qos_gp1,
|
||||||
|
wr_ack_ocm_gp1,
|
||||||
|
wr_ack_ddr_gp1,
|
||||||
|
wr_data_gp1,
|
||||||
|
wr_addr_gp1,
|
||||||
|
wr_bytes_gp1,
|
||||||
|
wr_dv_ocm_gp1,
|
||||||
|
wr_dv_ddr_gp1,
|
||||||
|
rd_req_ocm_gp1,
|
||||||
|
rd_req_ddr_gp1,
|
||||||
|
rd_req_reg_gp1,
|
||||||
|
rd_addr_gp1,
|
||||||
|
rd_bytes_gp1,
|
||||||
|
rd_data_ocm_gp1,
|
||||||
|
rd_data_ddr_gp1,
|
||||||
|
rd_data_reg_gp1,
|
||||||
|
rd_dv_ocm_gp1,
|
||||||
|
rd_dv_ddr_gp1,
|
||||||
|
rd_dv_reg_gp1,
|
||||||
|
|
||||||
|
ocm_wr_ack,
|
||||||
|
ocm_wr_dv,
|
||||||
|
ocm_rd_req,
|
||||||
|
ocm_rd_dv,
|
||||||
|
ddr_wr_ack,
|
||||||
|
ddr_wr_dv,
|
||||||
|
ddr_rd_req,
|
||||||
|
ddr_rd_dv,
|
||||||
|
|
||||||
|
reg_rd_req,
|
||||||
|
reg_rd_dv,
|
||||||
|
|
||||||
|
ocm_wr_qos,
|
||||||
|
ddr_wr_qos,
|
||||||
|
ocm_rd_qos,
|
||||||
|
ddr_rd_qos,
|
||||||
|
reg_rd_qos,
|
||||||
|
|
||||||
|
ocm_wr_addr,
|
||||||
|
ocm_wr_data,
|
||||||
|
ocm_wr_bytes,
|
||||||
|
ocm_rd_addr,
|
||||||
|
ocm_rd_data,
|
||||||
|
ocm_rd_bytes,
|
||||||
|
|
||||||
|
ddr_wr_addr,
|
||||||
|
ddr_wr_data,
|
||||||
|
ddr_wr_bytes,
|
||||||
|
ddr_rd_addr,
|
||||||
|
ddr_rd_data,
|
||||||
|
ddr_rd_bytes,
|
||||||
|
|
||||||
|
reg_rd_addr,
|
||||||
|
reg_rd_data,
|
||||||
|
reg_rd_bytes
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
|
||||||
|
input sw_clk;
|
||||||
|
input rstn;
|
||||||
|
|
||||||
|
input [axi_qos_width-1:0]w_qos_gp0;
|
||||||
|
input [axi_qos_width-1:0]r_qos_gp0;
|
||||||
|
input [axi_qos_width-1:0]w_qos_gp1;
|
||||||
|
input [axi_qos_width-1:0]r_qos_gp1;
|
||||||
|
|
||||||
|
output [axi_qos_width-1:0]ocm_wr_qos;
|
||||||
|
output [axi_qos_width-1:0]ocm_rd_qos;
|
||||||
|
output [axi_qos_width-1:0]ddr_wr_qos;
|
||||||
|
output [axi_qos_width-1:0]ddr_rd_qos;
|
||||||
|
output [axi_qos_width-1:0]reg_rd_qos;
|
||||||
|
|
||||||
|
output wr_ack_ocm_gp0;
|
||||||
|
output wr_ack_ddr_gp0;
|
||||||
|
input [max_burst_bits-1:0] wr_data_gp0;
|
||||||
|
input [addr_width-1:0] wr_addr_gp0;
|
||||||
|
input [max_burst_bytes_width:0] wr_bytes_gp0;
|
||||||
|
output wr_dv_ocm_gp0;
|
||||||
|
output wr_dv_ddr_gp0;
|
||||||
|
|
||||||
|
input rd_req_ocm_gp0;
|
||||||
|
input rd_req_ddr_gp0;
|
||||||
|
input rd_req_reg_gp0;
|
||||||
|
input [addr_width-1:0] rd_addr_gp0;
|
||||||
|
input [max_burst_bytes_width:0] rd_bytes_gp0;
|
||||||
|
output [max_burst_bits-1:0] rd_data_ocm_gp0;
|
||||||
|
output [max_burst_bits-1:0] rd_data_ddr_gp0;
|
||||||
|
output [max_burst_bits-1:0] rd_data_reg_gp0;
|
||||||
|
output rd_dv_ocm_gp0;
|
||||||
|
output rd_dv_ddr_gp0;
|
||||||
|
output rd_dv_reg_gp0;
|
||||||
|
|
||||||
|
output wr_ack_ocm_gp1;
|
||||||
|
output wr_ack_ddr_gp1;
|
||||||
|
input [max_burst_bits-1:0] wr_data_gp1;
|
||||||
|
input [addr_width-1:0] wr_addr_gp1;
|
||||||
|
input [max_burst_bytes_width:0] wr_bytes_gp1;
|
||||||
|
output wr_dv_ocm_gp1;
|
||||||
|
output wr_dv_ddr_gp1;
|
||||||
|
|
||||||
|
input rd_req_ocm_gp1;
|
||||||
|
input rd_req_ddr_gp1;
|
||||||
|
input rd_req_reg_gp1;
|
||||||
|
input [addr_width-1:0] rd_addr_gp1;
|
||||||
|
input [max_burst_bytes_width:0] rd_bytes_gp1;
|
||||||
|
output [max_burst_bits-1:0] rd_data_ocm_gp1;
|
||||||
|
output [max_burst_bits-1:0] rd_data_ddr_gp1;
|
||||||
|
output [max_burst_bits-1:0] rd_data_reg_gp1;
|
||||||
|
output rd_dv_ocm_gp1;
|
||||||
|
output rd_dv_ddr_gp1;
|
||||||
|
output rd_dv_reg_gp1;
|
||||||
|
|
||||||
|
|
||||||
|
input ocm_wr_ack;
|
||||||
|
output ocm_wr_dv;
|
||||||
|
output [addr_width-1:0]ocm_wr_addr;
|
||||||
|
output [max_burst_bits-1:0]ocm_wr_data;
|
||||||
|
output [max_burst_bytes_width:0]ocm_wr_bytes;
|
||||||
|
|
||||||
|
input ocm_rd_dv;
|
||||||
|
input [max_burst_bits-1:0] ocm_rd_data;
|
||||||
|
output ocm_rd_req;
|
||||||
|
output [addr_width-1:0] ocm_rd_addr;
|
||||||
|
output [max_burst_bytes_width:0] ocm_rd_bytes;
|
||||||
|
|
||||||
|
input ddr_wr_ack;
|
||||||
|
output ddr_wr_dv;
|
||||||
|
output [addr_width-1:0]ddr_wr_addr;
|
||||||
|
output [max_burst_bits-1:0]ddr_wr_data;
|
||||||
|
output [max_burst_bytes_width:0]ddr_wr_bytes;
|
||||||
|
|
||||||
|
input ddr_rd_dv;
|
||||||
|
input [max_burst_bits-1:0] ddr_rd_data;
|
||||||
|
output ddr_rd_req;
|
||||||
|
output [addr_width-1:0] ddr_rd_addr;
|
||||||
|
output [max_burst_bytes_width:0] ddr_rd_bytes;
|
||||||
|
|
||||||
|
input reg_rd_dv;
|
||||||
|
input [max_burst_bits-1:0] reg_rd_data;
|
||||||
|
output reg_rd_req;
|
||||||
|
output [addr_width-1:0] reg_rd_addr;
|
||||||
|
output [max_burst_bytes_width:0] reg_rd_bytes;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_wr ocm_gp_wr(
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
.qos1(w_qos_gp0),
|
||||||
|
.qos2(w_qos_gp1),
|
||||||
|
.prt_dv1(wr_dv_ocm_gp0),
|
||||||
|
.prt_dv2(wr_dv_ocm_gp1),
|
||||||
|
.prt_data1(wr_data_gp0),
|
||||||
|
.prt_data2(wr_data_gp1),
|
||||||
|
.prt_addr1(wr_addr_gp0),
|
||||||
|
.prt_addr2(wr_addr_gp1),
|
||||||
|
.prt_bytes1(wr_bytes_gp0),
|
||||||
|
.prt_bytes2(wr_bytes_gp1),
|
||||||
|
.prt_ack1(wr_ack_ocm_gp0),
|
||||||
|
.prt_ack2(wr_ack_ocm_gp1),
|
||||||
|
.prt_req(ocm_wr_dv),
|
||||||
|
.prt_qos(ocm_wr_qos),
|
||||||
|
.prt_data(ocm_wr_data),
|
||||||
|
.prt_addr(ocm_wr_addr),
|
||||||
|
.prt_bytes(ocm_wr_bytes),
|
||||||
|
.prt_ack(ocm_wr_ack)
|
||||||
|
);
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_wr ddr_gp_wr(
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
.qos1(w_qos_gp0),
|
||||||
|
.qos2(w_qos_gp1),
|
||||||
|
.prt_dv1(wr_dv_ddr_gp0),
|
||||||
|
.prt_dv2(wr_dv_ddr_gp1),
|
||||||
|
.prt_data1(wr_data_gp0),
|
||||||
|
.prt_data2(wr_data_gp1),
|
||||||
|
.prt_addr1(wr_addr_gp0),
|
||||||
|
.prt_addr2(wr_addr_gp1),
|
||||||
|
.prt_bytes1(wr_bytes_gp0),
|
||||||
|
.prt_bytes2(wr_bytes_gp1),
|
||||||
|
.prt_ack1(wr_ack_ddr_gp0),
|
||||||
|
.prt_ack2(wr_ack_ddr_gp1),
|
||||||
|
.prt_req(ddr_wr_dv),
|
||||||
|
.prt_qos(ddr_wr_qos),
|
||||||
|
.prt_data(ddr_wr_data),
|
||||||
|
.prt_addr(ddr_wr_addr),
|
||||||
|
.prt_bytes(ddr_wr_bytes),
|
||||||
|
.prt_ack(ddr_wr_ack)
|
||||||
|
);
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_rd ocm_gp_rd(
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
.qos1(r_qos_gp0),
|
||||||
|
.qos2(r_qos_gp1),
|
||||||
|
.prt_req1(rd_req_ocm_gp0),
|
||||||
|
.prt_req2(rd_req_ocm_gp1),
|
||||||
|
.prt_data1(rd_data_ocm_gp0),
|
||||||
|
.prt_data2(rd_data_ocm_gp1),
|
||||||
|
.prt_addr1(rd_addr_gp0),
|
||||||
|
.prt_addr2(rd_addr_gp1),
|
||||||
|
.prt_bytes1(rd_bytes_gp0),
|
||||||
|
.prt_bytes2(rd_bytes_gp1),
|
||||||
|
.prt_dv1(rd_dv_ocm_gp0),
|
||||||
|
.prt_dv2(rd_dv_ocm_gp1),
|
||||||
|
.prt_req(ocm_rd_req),
|
||||||
|
.prt_qos(ocm_rd_qos),
|
||||||
|
.prt_data(ocm_rd_data),
|
||||||
|
.prt_addr(ocm_rd_addr),
|
||||||
|
.prt_bytes(ocm_rd_bytes),
|
||||||
|
.prt_dv(ocm_rd_dv)
|
||||||
|
);
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_rd ddr_gp_rd(
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
.qos1(r_qos_gp0),
|
||||||
|
.qos2(r_qos_gp1),
|
||||||
|
.prt_req1(rd_req_ddr_gp0),
|
||||||
|
.prt_req2(rd_req_ddr_gp1),
|
||||||
|
.prt_data1(rd_data_ddr_gp0),
|
||||||
|
.prt_data2(rd_data_ddr_gp1),
|
||||||
|
.prt_addr1(rd_addr_gp0),
|
||||||
|
.prt_addr2(rd_addr_gp1),
|
||||||
|
.prt_bytes1(rd_bytes_gp0),
|
||||||
|
.prt_bytes2(rd_bytes_gp1),
|
||||||
|
.prt_dv1(rd_dv_ddr_gp0),
|
||||||
|
.prt_dv2(rd_dv_ddr_gp1),
|
||||||
|
.prt_req(ddr_rd_req),
|
||||||
|
.prt_qos(ddr_rd_qos),
|
||||||
|
.prt_data(ddr_rd_data),
|
||||||
|
.prt_addr(ddr_rd_addr),
|
||||||
|
.prt_bytes(ddr_rd_bytes),
|
||||||
|
.prt_dv(ddr_rd_dv)
|
||||||
|
);
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_rd reg_gp_rd(
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
.qos1(r_qos_gp0),
|
||||||
|
.qos2(r_qos_gp1),
|
||||||
|
.prt_req1(rd_req_reg_gp0),
|
||||||
|
.prt_req2(rd_req_reg_gp1),
|
||||||
|
.prt_data1(rd_data_reg_gp0),
|
||||||
|
.prt_data2(rd_data_reg_gp1),
|
||||||
|
.prt_addr1(rd_addr_gp0),
|
||||||
|
.prt_addr2(rd_addr_gp1),
|
||||||
|
.prt_bytes1(rd_bytes_gp0),
|
||||||
|
.prt_bytes2(rd_bytes_gp1),
|
||||||
|
.prt_dv1(rd_dv_reg_gp0),
|
||||||
|
.prt_dv2(rd_dv_reg_gp1),
|
||||||
|
.prt_req(reg_rd_req),
|
||||||
|
.prt_qos(reg_rd_qos),
|
||||||
|
.prt_data(reg_rd_data),
|
||||||
|
.prt_addr(reg_rd_addr),
|
||||||
|
.prt_bytes(reg_rd_bytes),
|
||||||
|
.prt_dv(reg_rd_dv)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
endmodule
|
@ -0,0 +1,58 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_gen_clock.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Module that generates FCLK clocks and internal clock for Zynq BFM.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_gen_clock(
|
||||||
|
ps_clk,
|
||||||
|
sw_clk,
|
||||||
|
|
||||||
|
fclk_clk3,
|
||||||
|
fclk_clk2,
|
||||||
|
fclk_clk1,
|
||||||
|
fclk_clk0
|
||||||
|
);
|
||||||
|
|
||||||
|
input ps_clk;
|
||||||
|
output sw_clk;
|
||||||
|
|
||||||
|
output fclk_clk3;
|
||||||
|
output fclk_clk2;
|
||||||
|
output fclk_clk1;
|
||||||
|
output fclk_clk0;
|
||||||
|
|
||||||
|
parameter freq_clk3 = 50;
|
||||||
|
parameter freq_clk2 = 50;
|
||||||
|
parameter freq_clk1 = 50;
|
||||||
|
parameter freq_clk0 = 50;
|
||||||
|
|
||||||
|
reg clk0 = 1'b0;
|
||||||
|
reg clk1 = 1'b0;
|
||||||
|
reg clk2 = 1'b0;
|
||||||
|
reg clk3 = 1'b0;
|
||||||
|
reg sw_clk = 1'b0;
|
||||||
|
|
||||||
|
assign fclk_clk0 = clk0;
|
||||||
|
assign fclk_clk1 = clk1;
|
||||||
|
assign fclk_clk2 = clk2;
|
||||||
|
assign fclk_clk3 = clk3;
|
||||||
|
|
||||||
|
real clk3_p = (1000.00/freq_clk3)/2;
|
||||||
|
real clk2_p = (1000.00/freq_clk2)/2;
|
||||||
|
real clk1_p = (1000.00/freq_clk1)/2;
|
||||||
|
real clk0_p = (1000.00/freq_clk0)/2;
|
||||||
|
|
||||||
|
always #(clk3_p) clk3 = !clk3;
|
||||||
|
always #(clk2_p) clk2 = !clk2;
|
||||||
|
always #(clk1_p) clk1 = !clk1;
|
||||||
|
always #(clk0_p) clk0 = !clk0;
|
||||||
|
|
||||||
|
always #(0.5) sw_clk = !sw_clk;
|
||||||
|
|
||||||
|
|
||||||
|
endmodule
|
@ -0,0 +1,225 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_gen_reset.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Module that generates FPGA_RESETs and synchronizes RESETs to the
|
||||||
|
* respective clocks.
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
module processing_system7_bfm_v2_0_5_gen_reset(
|
||||||
|
por_rst_n,
|
||||||
|
sys_rst_n,
|
||||||
|
rst_out_n,
|
||||||
|
|
||||||
|
m_axi_gp0_clk,
|
||||||
|
m_axi_gp1_clk,
|
||||||
|
s_axi_gp0_clk,
|
||||||
|
s_axi_gp1_clk,
|
||||||
|
s_axi_hp0_clk,
|
||||||
|
s_axi_hp1_clk,
|
||||||
|
s_axi_hp2_clk,
|
||||||
|
s_axi_hp3_clk,
|
||||||
|
s_axi_acp_clk,
|
||||||
|
|
||||||
|
m_axi_gp0_rstn,
|
||||||
|
m_axi_gp1_rstn,
|
||||||
|
s_axi_gp0_rstn,
|
||||||
|
s_axi_gp1_rstn,
|
||||||
|
s_axi_hp0_rstn,
|
||||||
|
s_axi_hp1_rstn,
|
||||||
|
s_axi_hp2_rstn,
|
||||||
|
s_axi_hp3_rstn,
|
||||||
|
s_axi_acp_rstn,
|
||||||
|
|
||||||
|
fclk_reset3_n,
|
||||||
|
fclk_reset2_n,
|
||||||
|
fclk_reset1_n,
|
||||||
|
fclk_reset0_n,
|
||||||
|
|
||||||
|
fpga_acp_reset_n,
|
||||||
|
fpga_gp_m0_reset_n,
|
||||||
|
fpga_gp_m1_reset_n,
|
||||||
|
fpga_gp_s0_reset_n,
|
||||||
|
fpga_gp_s1_reset_n,
|
||||||
|
fpga_hp_s0_reset_n,
|
||||||
|
fpga_hp_s1_reset_n,
|
||||||
|
fpga_hp_s2_reset_n,
|
||||||
|
fpga_hp_s3_reset_n
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
input por_rst_n;
|
||||||
|
input sys_rst_n;
|
||||||
|
input m_axi_gp0_clk;
|
||||||
|
input m_axi_gp1_clk;
|
||||||
|
input s_axi_gp0_clk;
|
||||||
|
input s_axi_gp1_clk;
|
||||||
|
input s_axi_hp0_clk;
|
||||||
|
input s_axi_hp1_clk;
|
||||||
|
input s_axi_hp2_clk;
|
||||||
|
input s_axi_hp3_clk;
|
||||||
|
input s_axi_acp_clk;
|
||||||
|
|
||||||
|
output reg m_axi_gp0_rstn;
|
||||||
|
output reg m_axi_gp1_rstn;
|
||||||
|
output reg s_axi_gp0_rstn;
|
||||||
|
output reg s_axi_gp1_rstn;
|
||||||
|
output reg s_axi_hp0_rstn;
|
||||||
|
output reg s_axi_hp1_rstn;
|
||||||
|
output reg s_axi_hp2_rstn;
|
||||||
|
output reg s_axi_hp3_rstn;
|
||||||
|
output reg s_axi_acp_rstn;
|
||||||
|
|
||||||
|
output rst_out_n;
|
||||||
|
output fclk_reset3_n;
|
||||||
|
output fclk_reset2_n;
|
||||||
|
output fclk_reset1_n;
|
||||||
|
output fclk_reset0_n;
|
||||||
|
|
||||||
|
output fpga_acp_reset_n;
|
||||||
|
output fpga_gp_m0_reset_n;
|
||||||
|
output fpga_gp_m1_reset_n;
|
||||||
|
output fpga_gp_s0_reset_n;
|
||||||
|
output fpga_gp_s1_reset_n;
|
||||||
|
output fpga_hp_s0_reset_n;
|
||||||
|
output fpga_hp_s1_reset_n;
|
||||||
|
output fpga_hp_s2_reset_n;
|
||||||
|
output fpga_hp_s3_reset_n;
|
||||||
|
|
||||||
|
reg [31:0] fabric_rst_n;
|
||||||
|
|
||||||
|
reg r_m_axi_gp0_rstn;
|
||||||
|
reg r_m_axi_gp1_rstn;
|
||||||
|
reg r_s_axi_gp0_rstn;
|
||||||
|
reg r_s_axi_gp1_rstn;
|
||||||
|
reg r_s_axi_hp0_rstn;
|
||||||
|
reg r_s_axi_hp1_rstn;
|
||||||
|
reg r_s_axi_hp2_rstn;
|
||||||
|
reg r_s_axi_hp3_rstn;
|
||||||
|
reg r_s_axi_acp_rstn;
|
||||||
|
|
||||||
|
assign rst_out_n = por_rst_n & sys_rst_n;
|
||||||
|
|
||||||
|
assign fclk_reset0_n = !fabric_rst_n[0];
|
||||||
|
assign fclk_reset1_n = !fabric_rst_n[1];
|
||||||
|
assign fclk_reset2_n = !fabric_rst_n[2];
|
||||||
|
assign fclk_reset3_n = !fabric_rst_n[3];
|
||||||
|
|
||||||
|
assign fpga_acp_reset_n = !fabric_rst_n[24];
|
||||||
|
|
||||||
|
assign fpga_hp_s3_reset_n = !fabric_rst_n[23];
|
||||||
|
assign fpga_hp_s2_reset_n = !fabric_rst_n[22];
|
||||||
|
assign fpga_hp_s1_reset_n = !fabric_rst_n[21];
|
||||||
|
assign fpga_hp_s0_reset_n = !fabric_rst_n[20];
|
||||||
|
|
||||||
|
assign fpga_gp_s1_reset_n = !fabric_rst_n[17];
|
||||||
|
assign fpga_gp_s0_reset_n = !fabric_rst_n[16];
|
||||||
|
assign fpga_gp_m1_reset_n = !fabric_rst_n[13];
|
||||||
|
assign fpga_gp_m0_reset_n = !fabric_rst_n[12];
|
||||||
|
|
||||||
|
task fpga_soft_reset;
|
||||||
|
input[31:0] reset_ctrl;
|
||||||
|
begin
|
||||||
|
fabric_rst_n[0] = reset_ctrl[0];
|
||||||
|
fabric_rst_n[1] = reset_ctrl[1];
|
||||||
|
fabric_rst_n[2] = reset_ctrl[2];
|
||||||
|
fabric_rst_n[3] = reset_ctrl[3];
|
||||||
|
|
||||||
|
fabric_rst_n[12] = reset_ctrl[12];
|
||||||
|
fabric_rst_n[13] = reset_ctrl[13];
|
||||||
|
fabric_rst_n[16] = reset_ctrl[16];
|
||||||
|
fabric_rst_n[17] = reset_ctrl[17];
|
||||||
|
|
||||||
|
fabric_rst_n[20] = reset_ctrl[20];
|
||||||
|
fabric_rst_n[21] = reset_ctrl[21];
|
||||||
|
fabric_rst_n[22] = reset_ctrl[22];
|
||||||
|
fabric_rst_n[23] = reset_ctrl[23];
|
||||||
|
|
||||||
|
fabric_rst_n[24] = reset_ctrl[24];
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
always@(negedge por_rst_n or negedge sys_rst_n) fabric_rst_n = 32'h01f3_300f;
|
||||||
|
|
||||||
|
always@(posedge m_axi_gp0_clk or negedge (por_rst_n & sys_rst_n))
|
||||||
|
begin
|
||||||
|
if (!(por_rst_n & sys_rst_n))
|
||||||
|
m_axi_gp0_rstn = 1'b0;
|
||||||
|
else
|
||||||
|
m_axi_gp0_rstn = 1'b1;
|
||||||
|
end
|
||||||
|
|
||||||
|
always@(posedge m_axi_gp1_clk or negedge (por_rst_n & sys_rst_n))
|
||||||
|
begin
|
||||||
|
if (!(por_rst_n & sys_rst_n))
|
||||||
|
m_axi_gp1_rstn = 1'b0;
|
||||||
|
else
|
||||||
|
m_axi_gp1_rstn = 1'b1;
|
||||||
|
end
|
||||||
|
|
||||||
|
always@(posedge s_axi_gp0_clk or negedge (por_rst_n & sys_rst_n))
|
||||||
|
begin
|
||||||
|
if (!(por_rst_n & sys_rst_n))
|
||||||
|
s_axi_gp0_rstn = 1'b0;
|
||||||
|
else
|
||||||
|
s_axi_gp0_rstn = 1'b1;
|
||||||
|
end
|
||||||
|
|
||||||
|
always@(posedge s_axi_gp1_clk or negedge (por_rst_n & sys_rst_n))
|
||||||
|
begin
|
||||||
|
if (!(por_rst_n & sys_rst_n))
|
||||||
|
s_axi_gp1_rstn = 1'b0;
|
||||||
|
else
|
||||||
|
s_axi_gp1_rstn = 1'b1;
|
||||||
|
end
|
||||||
|
|
||||||
|
always@(posedge s_axi_hp0_clk or negedge (por_rst_n & sys_rst_n))
|
||||||
|
begin
|
||||||
|
if (!(por_rst_n & sys_rst_n))
|
||||||
|
s_axi_hp0_rstn = 1'b0;
|
||||||
|
else
|
||||||
|
s_axi_hp0_rstn = 1'b1;
|
||||||
|
end
|
||||||
|
|
||||||
|
always@(posedge s_axi_hp1_clk or negedge (por_rst_n & sys_rst_n))
|
||||||
|
begin
|
||||||
|
if (!(por_rst_n & sys_rst_n))
|
||||||
|
s_axi_hp1_rstn = 1'b0;
|
||||||
|
else
|
||||||
|
s_axi_hp1_rstn = 1'b1;
|
||||||
|
end
|
||||||
|
|
||||||
|
always@(posedge s_axi_hp2_clk or negedge (por_rst_n & sys_rst_n))
|
||||||
|
begin
|
||||||
|
if (!(por_rst_n & sys_rst_n))
|
||||||
|
s_axi_hp2_rstn = 1'b0;
|
||||||
|
else
|
||||||
|
s_axi_hp2_rstn = 1'b1;
|
||||||
|
end
|
||||||
|
|
||||||
|
always@(posedge s_axi_hp3_clk or negedge (por_rst_n & sys_rst_n))
|
||||||
|
begin
|
||||||
|
if (!(por_rst_n & sys_rst_n))
|
||||||
|
s_axi_hp3_rstn = 1'b0;
|
||||||
|
else
|
||||||
|
s_axi_hp3_rstn = 1'b1;
|
||||||
|
end
|
||||||
|
|
||||||
|
always@(posedge s_axi_acp_clk or negedge (por_rst_n & sys_rst_n))
|
||||||
|
begin
|
||||||
|
if (!(por_rst_n & sys_rst_n))
|
||||||
|
s_axi_acp_rstn = 1'b0;
|
||||||
|
else
|
||||||
|
s_axi_acp_rstn = 1'b1;
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
always@(*) begin
|
||||||
|
if ((por_rst_n!= 1'b0) && (por_rst_n!= 1'b1) && (sys_rst_n != 1'b0) && (sys_rst_n != 1'b1)) begin
|
||||||
|
$display(" Error:processing_system7_bfm_v2_0_5_gen_reset. PS_PORB and PS_SRSTB must be driven to known state");
|
||||||
|
$finish();
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
@ -0,0 +1,662 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_interconnect_model.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Mimics Top_interconnect Switch.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_interconnect_model (
|
||||||
|
rstn,
|
||||||
|
sw_clk,
|
||||||
|
|
||||||
|
w_qos_gp0,
|
||||||
|
w_qos_gp1,
|
||||||
|
w_qos_hp0,
|
||||||
|
w_qos_hp1,
|
||||||
|
w_qos_hp2,
|
||||||
|
w_qos_hp3,
|
||||||
|
|
||||||
|
r_qos_gp0,
|
||||||
|
r_qos_gp1,
|
||||||
|
r_qos_hp0,
|
||||||
|
r_qos_hp1,
|
||||||
|
r_qos_hp2,
|
||||||
|
r_qos_hp3,
|
||||||
|
|
||||||
|
wr_ack_ddr_gp0,
|
||||||
|
wr_ack_ocm_gp0,
|
||||||
|
wr_data_gp0,
|
||||||
|
wr_addr_gp0,
|
||||||
|
wr_bytes_gp0,
|
||||||
|
wr_dv_ddr_gp0,
|
||||||
|
wr_dv_ocm_gp0,
|
||||||
|
|
||||||
|
rd_req_ddr_gp0,
|
||||||
|
rd_req_ocm_gp0,
|
||||||
|
rd_req_reg_gp0,
|
||||||
|
rd_addr_gp0,
|
||||||
|
rd_bytes_gp0,
|
||||||
|
rd_data_ddr_gp0,
|
||||||
|
rd_data_ocm_gp0,
|
||||||
|
rd_data_reg_gp0,
|
||||||
|
rd_dv_ddr_gp0,
|
||||||
|
rd_dv_ocm_gp0,
|
||||||
|
rd_dv_reg_gp0,
|
||||||
|
|
||||||
|
wr_ack_ddr_gp1,
|
||||||
|
wr_ack_ocm_gp1,
|
||||||
|
wr_data_gp1,
|
||||||
|
wr_addr_gp1,
|
||||||
|
wr_bytes_gp1,
|
||||||
|
wr_dv_ddr_gp1,
|
||||||
|
wr_dv_ocm_gp1,
|
||||||
|
rd_req_ddr_gp1,
|
||||||
|
rd_req_ocm_gp1,
|
||||||
|
rd_req_reg_gp1,
|
||||||
|
rd_addr_gp1,
|
||||||
|
rd_bytes_gp1,
|
||||||
|
rd_data_ddr_gp1,
|
||||||
|
rd_data_ocm_gp1,
|
||||||
|
rd_data_reg_gp1,
|
||||||
|
rd_dv_ddr_gp1,
|
||||||
|
rd_dv_ocm_gp1,
|
||||||
|
rd_dv_reg_gp1,
|
||||||
|
|
||||||
|
wr_ack_ddr_hp0,
|
||||||
|
wr_ack_ocm_hp0,
|
||||||
|
wr_data_hp0,
|
||||||
|
wr_addr_hp0,
|
||||||
|
wr_bytes_hp0,
|
||||||
|
wr_dv_ddr_hp0,
|
||||||
|
wr_dv_ocm_hp0,
|
||||||
|
rd_req_ddr_hp0,
|
||||||
|
rd_req_ocm_hp0,
|
||||||
|
rd_addr_hp0,
|
||||||
|
rd_bytes_hp0,
|
||||||
|
rd_data_ddr_hp0,
|
||||||
|
rd_data_ocm_hp0,
|
||||||
|
rd_dv_ddr_hp0,
|
||||||
|
rd_dv_ocm_hp0,
|
||||||
|
|
||||||
|
wr_ack_ddr_hp1,
|
||||||
|
wr_ack_ocm_hp1,
|
||||||
|
wr_data_hp1,
|
||||||
|
wr_addr_hp1,
|
||||||
|
wr_bytes_hp1,
|
||||||
|
wr_dv_ddr_hp1,
|
||||||
|
wr_dv_ocm_hp1,
|
||||||
|
rd_req_ddr_hp1,
|
||||||
|
rd_req_ocm_hp1,
|
||||||
|
rd_addr_hp1,
|
||||||
|
rd_bytes_hp1,
|
||||||
|
rd_data_ddr_hp1,
|
||||||
|
rd_data_ocm_hp1,
|
||||||
|
rd_dv_ddr_hp1,
|
||||||
|
rd_dv_ocm_hp1,
|
||||||
|
|
||||||
|
wr_ack_ddr_hp2,
|
||||||
|
wr_ack_ocm_hp2,
|
||||||
|
wr_data_hp2,
|
||||||
|
wr_addr_hp2,
|
||||||
|
wr_bytes_hp2,
|
||||||
|
wr_dv_ddr_hp2,
|
||||||
|
wr_dv_ocm_hp2,
|
||||||
|
rd_req_ddr_hp2,
|
||||||
|
rd_req_ocm_hp2,
|
||||||
|
rd_addr_hp2,
|
||||||
|
rd_bytes_hp2,
|
||||||
|
rd_data_ddr_hp2,
|
||||||
|
rd_data_ocm_hp2,
|
||||||
|
rd_dv_ddr_hp2,
|
||||||
|
rd_dv_ocm_hp2,
|
||||||
|
|
||||||
|
wr_ack_ddr_hp3,
|
||||||
|
wr_ack_ocm_hp3,
|
||||||
|
wr_data_hp3,
|
||||||
|
wr_addr_hp3,
|
||||||
|
wr_bytes_hp3,
|
||||||
|
wr_dv_ddr_hp3,
|
||||||
|
wr_dv_ocm_hp3,
|
||||||
|
rd_req_ddr_hp3,
|
||||||
|
rd_req_ocm_hp3,
|
||||||
|
rd_addr_hp3,
|
||||||
|
rd_bytes_hp3,
|
||||||
|
rd_data_ddr_hp3,
|
||||||
|
rd_data_ocm_hp3,
|
||||||
|
rd_dv_ddr_hp3,
|
||||||
|
rd_dv_ocm_hp3,
|
||||||
|
|
||||||
|
/* Goes to port 1 of DDR */
|
||||||
|
ddr_wr_ack_port1,
|
||||||
|
ddr_wr_dv_port1,
|
||||||
|
ddr_rd_req_port1,
|
||||||
|
ddr_rd_dv_port1,
|
||||||
|
ddr_wr_addr_port1,
|
||||||
|
ddr_wr_data_port1,
|
||||||
|
ddr_wr_bytes_port1,
|
||||||
|
ddr_rd_addr_port1,
|
||||||
|
ddr_rd_data_port1,
|
||||||
|
ddr_rd_bytes_port1,
|
||||||
|
ddr_wr_qos_port1,
|
||||||
|
ddr_rd_qos_port1,
|
||||||
|
|
||||||
|
/* Goes to port2 of DDR */
|
||||||
|
ddr_wr_ack_port2,
|
||||||
|
ddr_wr_dv_port2,
|
||||||
|
ddr_rd_req_port2,
|
||||||
|
ddr_rd_dv_port2,
|
||||||
|
ddr_wr_addr_port2,
|
||||||
|
ddr_wr_data_port2,
|
||||||
|
ddr_wr_bytes_port2,
|
||||||
|
ddr_rd_addr_port2,
|
||||||
|
ddr_rd_data_port2,
|
||||||
|
ddr_rd_bytes_port2,
|
||||||
|
ddr_wr_qos_port2,
|
||||||
|
ddr_rd_qos_port2,
|
||||||
|
|
||||||
|
/* Goes to port3 of DDR */
|
||||||
|
ddr_wr_ack_port3,
|
||||||
|
ddr_wr_dv_port3,
|
||||||
|
ddr_rd_req_port3,
|
||||||
|
ddr_rd_dv_port3,
|
||||||
|
ddr_wr_addr_port3,
|
||||||
|
ddr_wr_data_port3,
|
||||||
|
ddr_wr_bytes_port3,
|
||||||
|
ddr_rd_addr_port3,
|
||||||
|
ddr_rd_data_port3,
|
||||||
|
ddr_rd_bytes_port3,
|
||||||
|
ddr_wr_qos_port3,
|
||||||
|
ddr_rd_qos_port3,
|
||||||
|
|
||||||
|
/* Goes to port1 of OCM */
|
||||||
|
ocm_wr_qos_port1,
|
||||||
|
ocm_rd_qos_port1,
|
||||||
|
ocm_wr_dv_port1,
|
||||||
|
ocm_wr_data_port1,
|
||||||
|
ocm_wr_addr_port1,
|
||||||
|
ocm_wr_bytes_port1,
|
||||||
|
ocm_wr_ack_port1,
|
||||||
|
ocm_rd_req_port1,
|
||||||
|
ocm_rd_data_port1,
|
||||||
|
ocm_rd_addr_port1,
|
||||||
|
ocm_rd_bytes_port1,
|
||||||
|
ocm_rd_dv_port1,
|
||||||
|
|
||||||
|
/* Goes to port1 for RegMap */
|
||||||
|
reg_rd_qos_port1,
|
||||||
|
reg_rd_req_port1,
|
||||||
|
reg_rd_data_port1,
|
||||||
|
reg_rd_addr_port1,
|
||||||
|
reg_rd_bytes_port1,
|
||||||
|
reg_rd_dv_port1
|
||||||
|
|
||||||
|
);
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
|
||||||
|
input rstn;
|
||||||
|
input sw_clk;
|
||||||
|
|
||||||
|
input [axi_qos_width-1:0] w_qos_gp0;
|
||||||
|
input [axi_qos_width-1:0] w_qos_gp1;
|
||||||
|
input [axi_qos_width-1:0] w_qos_hp0;
|
||||||
|
input [axi_qos_width-1:0] w_qos_hp1;
|
||||||
|
input [axi_qos_width-1:0] w_qos_hp2;
|
||||||
|
input [axi_qos_width-1:0] w_qos_hp3;
|
||||||
|
|
||||||
|
input [axi_qos_width-1:0] r_qos_gp0;
|
||||||
|
input [axi_qos_width-1:0] r_qos_gp1;
|
||||||
|
input [axi_qos_width-1:0] r_qos_hp0;
|
||||||
|
input [axi_qos_width-1:0] r_qos_hp1;
|
||||||
|
input [axi_qos_width-1:0] r_qos_hp2;
|
||||||
|
input [axi_qos_width-1:0] r_qos_hp3;
|
||||||
|
|
||||||
|
output [axi_qos_width-1:0] ocm_wr_qos_port1;
|
||||||
|
output [axi_qos_width-1:0] ocm_rd_qos_port1;
|
||||||
|
|
||||||
|
output wr_ack_ddr_gp0;
|
||||||
|
output wr_ack_ocm_gp0;
|
||||||
|
input[max_burst_bits-1:0] wr_data_gp0;
|
||||||
|
input[addr_width-1:0] wr_addr_gp0;
|
||||||
|
input[max_burst_bytes_width:0] wr_bytes_gp0;
|
||||||
|
input wr_dv_ddr_gp0;
|
||||||
|
input wr_dv_ocm_gp0;
|
||||||
|
input rd_req_ddr_gp0;
|
||||||
|
input rd_req_ocm_gp0;
|
||||||
|
input rd_req_reg_gp0;
|
||||||
|
input[addr_width-1:0] rd_addr_gp0;
|
||||||
|
input[max_burst_bytes_width:0] rd_bytes_gp0;
|
||||||
|
output[max_burst_bits-1:0] rd_data_ddr_gp0;
|
||||||
|
output[max_burst_bits-1:0] rd_data_ocm_gp0;
|
||||||
|
output[max_burst_bits-1:0] rd_data_reg_gp0;
|
||||||
|
output rd_dv_ddr_gp0;
|
||||||
|
output rd_dv_ocm_gp0;
|
||||||
|
output rd_dv_reg_gp0;
|
||||||
|
|
||||||
|
output wr_ack_ddr_gp1;
|
||||||
|
output wr_ack_ocm_gp1;
|
||||||
|
input[max_burst_bits-1:0] wr_data_gp1;
|
||||||
|
input[addr_width-1:0] wr_addr_gp1;
|
||||||
|
input[max_burst_bytes_width:0] wr_bytes_gp1;
|
||||||
|
input wr_dv_ddr_gp1;
|
||||||
|
input wr_dv_ocm_gp1;
|
||||||
|
input rd_req_ddr_gp1;
|
||||||
|
input rd_req_ocm_gp1;
|
||||||
|
input rd_req_reg_gp1;
|
||||||
|
input[addr_width-1:0] rd_addr_gp1;
|
||||||
|
input[max_burst_bytes_width:0] rd_bytes_gp1;
|
||||||
|
output[max_burst_bits-1:0] rd_data_ddr_gp1;
|
||||||
|
output[max_burst_bits-1:0] rd_data_ocm_gp1;
|
||||||
|
output[max_burst_bits-1:0] rd_data_reg_gp1;
|
||||||
|
output rd_dv_ddr_gp1;
|
||||||
|
output rd_dv_ocm_gp1;
|
||||||
|
output rd_dv_reg_gp1;
|
||||||
|
|
||||||
|
output wr_ack_ddr_hp0;
|
||||||
|
output wr_ack_ocm_hp0;
|
||||||
|
input[max_burst_bits-1:0] wr_data_hp0;
|
||||||
|
input[addr_width-1:0] wr_addr_hp0;
|
||||||
|
input[max_burst_bytes_width:0] wr_bytes_hp0;
|
||||||
|
input wr_dv_ddr_hp0;
|
||||||
|
input wr_dv_ocm_hp0;
|
||||||
|
input rd_req_ddr_hp0;
|
||||||
|
input rd_req_ocm_hp0;
|
||||||
|
input[addr_width-1:0] rd_addr_hp0;
|
||||||
|
input[max_burst_bytes_width:0] rd_bytes_hp0;
|
||||||
|
output[max_burst_bits-1:0] rd_data_ddr_hp0;
|
||||||
|
output[max_burst_bits-1:0] rd_data_ocm_hp0;
|
||||||
|
output rd_dv_ddr_hp0;
|
||||||
|
output rd_dv_ocm_hp0;
|
||||||
|
|
||||||
|
output wr_ack_ddr_hp1;
|
||||||
|
output wr_ack_ocm_hp1;
|
||||||
|
input[max_burst_bits-1:0] wr_data_hp1;
|
||||||
|
input[addr_width-1:0] wr_addr_hp1;
|
||||||
|
input[max_burst_bytes_width:0] wr_bytes_hp1;
|
||||||
|
input wr_dv_ddr_hp1;
|
||||||
|
input wr_dv_ocm_hp1;
|
||||||
|
input rd_req_ddr_hp1;
|
||||||
|
input rd_req_ocm_hp1;
|
||||||
|
input[addr_width-1:0] rd_addr_hp1;
|
||||||
|
input[max_burst_bytes_width:0] rd_bytes_hp1;
|
||||||
|
output[max_burst_bits-1:0] rd_data_ddr_hp1;
|
||||||
|
output[max_burst_bits-1:0] rd_data_ocm_hp1;
|
||||||
|
output rd_dv_ddr_hp1;
|
||||||
|
output rd_dv_ocm_hp1;
|
||||||
|
|
||||||
|
output wr_ack_ddr_hp2;
|
||||||
|
output wr_ack_ocm_hp2;
|
||||||
|
input[max_burst_bits-1:0] wr_data_hp2;
|
||||||
|
input[addr_width-1:0] wr_addr_hp2;
|
||||||
|
input[max_burst_bytes_width:0] wr_bytes_hp2;
|
||||||
|
input wr_dv_ddr_hp2;
|
||||||
|
input wr_dv_ocm_hp2;
|
||||||
|
input rd_req_ddr_hp2;
|
||||||
|
input rd_req_ocm_hp2;
|
||||||
|
input[addr_width-1:0] rd_addr_hp2;
|
||||||
|
input[max_burst_bytes_width:0] rd_bytes_hp2;
|
||||||
|
output[max_burst_bits-1:0] rd_data_ddr_hp2;
|
||||||
|
output[max_burst_bits-1:0] rd_data_ocm_hp2;
|
||||||
|
output rd_dv_ddr_hp2;
|
||||||
|
output rd_dv_ocm_hp2;
|
||||||
|
|
||||||
|
output wr_ack_ddr_hp3;
|
||||||
|
output wr_ack_ocm_hp3;
|
||||||
|
input[max_burst_bits-1:0] wr_data_hp3;
|
||||||
|
input[addr_width-1:0] wr_addr_hp3;
|
||||||
|
input[max_burst_bytes_width:0] wr_bytes_hp3;
|
||||||
|
input wr_dv_ddr_hp3;
|
||||||
|
input wr_dv_ocm_hp3;
|
||||||
|
input rd_req_ddr_hp3;
|
||||||
|
input rd_req_ocm_hp3;
|
||||||
|
input[addr_width-1:0] rd_addr_hp3;
|
||||||
|
input[max_burst_bytes_width:0] rd_bytes_hp3;
|
||||||
|
output[max_burst_bits-1:0] rd_data_ddr_hp3;
|
||||||
|
output[max_burst_bits-1:0] rd_data_ocm_hp3;
|
||||||
|
output rd_dv_ddr_hp3;
|
||||||
|
output rd_dv_ocm_hp3;
|
||||||
|
|
||||||
|
/* Goes to port 1 of DDR */
|
||||||
|
input ddr_wr_ack_port1;
|
||||||
|
output ddr_wr_dv_port1;
|
||||||
|
output ddr_rd_req_port1;
|
||||||
|
input ddr_rd_dv_port1;
|
||||||
|
output[addr_width-1:0] ddr_wr_addr_port1;
|
||||||
|
output[max_burst_bits-1:0] ddr_wr_data_port1;
|
||||||
|
output[max_burst_bytes_width:0] ddr_wr_bytes_port1;
|
||||||
|
output[addr_width-1:0] ddr_rd_addr_port1;
|
||||||
|
input[max_burst_bits-1:0] ddr_rd_data_port1;
|
||||||
|
output[max_burst_bytes_width:0] ddr_rd_bytes_port1;
|
||||||
|
output [axi_qos_width-1:0] ddr_wr_qos_port1;
|
||||||
|
output [axi_qos_width-1:0] ddr_rd_qos_port1;
|
||||||
|
|
||||||
|
/* Goes to port2 of DDR */
|
||||||
|
input ddr_wr_ack_port2;
|
||||||
|
output ddr_wr_dv_port2;
|
||||||
|
output ddr_rd_req_port2;
|
||||||
|
input ddr_rd_dv_port2;
|
||||||
|
output[addr_width-1:0] ddr_wr_addr_port2;
|
||||||
|
output[max_burst_bits-1:0] ddr_wr_data_port2;
|
||||||
|
output[max_burst_bytes_width:0] ddr_wr_bytes_port2;
|
||||||
|
output[addr_width-1:0] ddr_rd_addr_port2;
|
||||||
|
input[max_burst_bits-1:0] ddr_rd_data_port2;
|
||||||
|
output[max_burst_bytes_width:0] ddr_rd_bytes_port2;
|
||||||
|
output [axi_qos_width-1:0] ddr_wr_qos_port2;
|
||||||
|
output [axi_qos_width-1:0] ddr_rd_qos_port2;
|
||||||
|
|
||||||
|
/* Goes to port3 of DDR */
|
||||||
|
input ddr_wr_ack_port3;
|
||||||
|
output ddr_wr_dv_port3;
|
||||||
|
output ddr_rd_req_port3;
|
||||||
|
input ddr_rd_dv_port3;
|
||||||
|
output[addr_width-1:0] ddr_wr_addr_port3;
|
||||||
|
output[max_burst_bits-1:0] ddr_wr_data_port3;
|
||||||
|
output[max_burst_bytes_width:0] ddr_wr_bytes_port3;
|
||||||
|
output[addr_width-1:0] ddr_rd_addr_port3;
|
||||||
|
input[max_burst_bits-1:0] ddr_rd_data_port3;
|
||||||
|
output[max_burst_bytes_width:0] ddr_rd_bytes_port3;
|
||||||
|
output [axi_qos_width-1:0] ddr_wr_qos_port3;
|
||||||
|
output [axi_qos_width-1:0] ddr_rd_qos_port3;
|
||||||
|
|
||||||
|
/* Goes to port1 of OCM */
|
||||||
|
input ocm_wr_ack_port1;
|
||||||
|
output ocm_wr_dv_port1;
|
||||||
|
output ocm_rd_req_port1;
|
||||||
|
input ocm_rd_dv_port1;
|
||||||
|
output[max_burst_bits-1:0] ocm_wr_data_port1;
|
||||||
|
output[addr_width-1:0] ocm_wr_addr_port1;
|
||||||
|
output[max_burst_bytes_width:0] ocm_wr_bytes_port1;
|
||||||
|
input[max_burst_bits-1:0] ocm_rd_data_port1;
|
||||||
|
output[addr_width-1:0] ocm_rd_addr_port1;
|
||||||
|
output[max_burst_bytes_width:0] ocm_rd_bytes_port1;
|
||||||
|
|
||||||
|
/* Goes to port1 of REG */
|
||||||
|
output [axi_qos_width-1:0] reg_rd_qos_port1;
|
||||||
|
output reg_rd_req_port1;
|
||||||
|
input reg_rd_dv_port1;
|
||||||
|
input[max_burst_bits-1:0] reg_rd_data_port1;
|
||||||
|
output[addr_width-1:0] reg_rd_addr_port1;
|
||||||
|
output[max_burst_bytes_width:0] reg_rd_bytes_port1;
|
||||||
|
|
||||||
|
wire ocm_wr_dv_osw0;
|
||||||
|
wire ocm_wr_dv_osw1;
|
||||||
|
wire[max_burst_bits-1:0] ocm_wr_data_osw0;
|
||||||
|
wire[max_burst_bits-1:0] ocm_wr_data_osw1;
|
||||||
|
wire[addr_width-1:0] ocm_wr_addr_osw0;
|
||||||
|
wire[addr_width-1:0] ocm_wr_addr_osw1;
|
||||||
|
wire[max_burst_bytes_width:0] ocm_wr_bytes_osw0;
|
||||||
|
wire[max_burst_bytes_width:0] ocm_wr_bytes_osw1;
|
||||||
|
wire ocm_wr_ack_osw0;
|
||||||
|
wire ocm_wr_ack_osw1;
|
||||||
|
wire ocm_rd_req_osw0;
|
||||||
|
wire ocm_rd_req_osw1;
|
||||||
|
wire[max_burst_bits-1:0] ocm_rd_data_osw0;
|
||||||
|
wire[max_burst_bits-1:0] ocm_rd_data_osw1;
|
||||||
|
wire[addr_width-1:0] ocm_rd_addr_osw0;
|
||||||
|
wire[addr_width-1:0] ocm_rd_addr_osw1;
|
||||||
|
wire[max_burst_bytes_width:0] ocm_rd_bytes_osw0;
|
||||||
|
wire[max_burst_bytes_width:0] ocm_rd_bytes_osw1;
|
||||||
|
wire ocm_rd_dv_osw0;
|
||||||
|
wire ocm_rd_dv_osw1;
|
||||||
|
|
||||||
|
wire [axi_qos_width-1:0] ocm_wr_qos_osw0;
|
||||||
|
wire [axi_qos_width-1:0] ocm_wr_qos_osw1;
|
||||||
|
wire [axi_qos_width-1:0] ocm_rd_qos_osw0;
|
||||||
|
wire [axi_qos_width-1:0] ocm_rd_qos_osw1;
|
||||||
|
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_fmsw_gp fmsw (
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
.rstn(rstn),
|
||||||
|
|
||||||
|
.w_qos_gp0(w_qos_gp0),
|
||||||
|
.r_qos_gp0(r_qos_gp0),
|
||||||
|
.wr_ack_ocm_gp0(wr_ack_ocm_gp0),
|
||||||
|
.wr_ack_ddr_gp0(wr_ack_ddr_gp0),
|
||||||
|
.wr_data_gp0(wr_data_gp0),
|
||||||
|
.wr_addr_gp0(wr_addr_gp0),
|
||||||
|
.wr_bytes_gp0(wr_bytes_gp0),
|
||||||
|
.wr_dv_ocm_gp0(wr_dv_ocm_gp0),
|
||||||
|
.wr_dv_ddr_gp0(wr_dv_ddr_gp0),
|
||||||
|
.rd_req_ocm_gp0(rd_req_ocm_gp0),
|
||||||
|
.rd_req_ddr_gp0(rd_req_ddr_gp0),
|
||||||
|
.rd_req_reg_gp0(rd_req_reg_gp0),
|
||||||
|
.rd_addr_gp0(rd_addr_gp0),
|
||||||
|
.rd_bytes_gp0(rd_bytes_gp0),
|
||||||
|
.rd_data_ddr_gp0(rd_data_ddr_gp0),
|
||||||
|
.rd_data_ocm_gp0(rd_data_ocm_gp0),
|
||||||
|
.rd_data_reg_gp0(rd_data_reg_gp0),
|
||||||
|
.rd_dv_ocm_gp0(rd_dv_ocm_gp0),
|
||||||
|
.rd_dv_ddr_gp0(rd_dv_ddr_gp0),
|
||||||
|
.rd_dv_reg_gp0(rd_dv_reg_gp0),
|
||||||
|
|
||||||
|
.w_qos_gp1(w_qos_gp1),
|
||||||
|
.r_qos_gp1(r_qos_gp1),
|
||||||
|
.wr_ack_ocm_gp1(wr_ack_ocm_gp1),
|
||||||
|
.wr_ack_ddr_gp1(wr_ack_ddr_gp1),
|
||||||
|
.wr_data_gp1(wr_data_gp1),
|
||||||
|
.wr_addr_gp1(wr_addr_gp1),
|
||||||
|
.wr_bytes_gp1(wr_bytes_gp1),
|
||||||
|
.wr_dv_ocm_gp1(wr_dv_ocm_gp1),
|
||||||
|
.wr_dv_ddr_gp1(wr_dv_ddr_gp1),
|
||||||
|
.rd_req_ocm_gp1(rd_req_ocm_gp1),
|
||||||
|
.rd_req_ddr_gp1(rd_req_ddr_gp1),
|
||||||
|
.rd_req_reg_gp1(rd_req_reg_gp1),
|
||||||
|
.rd_addr_gp1(rd_addr_gp1),
|
||||||
|
.rd_bytes_gp1(rd_bytes_gp1),
|
||||||
|
.rd_data_ddr_gp1(rd_data_ddr_gp1),
|
||||||
|
.rd_data_ocm_gp1(rd_data_ocm_gp1),
|
||||||
|
.rd_data_reg_gp1(rd_data_reg_gp1),
|
||||||
|
.rd_dv_ocm_gp1(rd_dv_ocm_gp1),
|
||||||
|
.rd_dv_ddr_gp1(rd_dv_ddr_gp1),
|
||||||
|
.rd_dv_reg_gp1(rd_dv_reg_gp1),
|
||||||
|
|
||||||
|
.ocm_wr_ack (ocm_wr_ack_osw0),
|
||||||
|
.ocm_wr_dv (ocm_wr_dv_osw0),
|
||||||
|
.ocm_rd_req (ocm_rd_req_osw0),
|
||||||
|
.ocm_rd_dv (ocm_rd_dv_osw0),
|
||||||
|
.ocm_wr_addr(ocm_wr_addr_osw0),
|
||||||
|
.ocm_wr_data(ocm_wr_data_osw0),
|
||||||
|
.ocm_wr_bytes(ocm_wr_bytes_osw0),
|
||||||
|
.ocm_rd_addr(ocm_rd_addr_osw0),
|
||||||
|
.ocm_rd_data(ocm_rd_data_osw0),
|
||||||
|
.ocm_rd_bytes(ocm_rd_bytes_osw0),
|
||||||
|
|
||||||
|
.ocm_wr_qos(ocm_wr_qos_osw0),
|
||||||
|
.ocm_rd_qos(ocm_rd_qos_osw0),
|
||||||
|
|
||||||
|
.ddr_wr_qos(ddr_wr_qos_port1),
|
||||||
|
.ddr_rd_qos(ddr_rd_qos_port1),
|
||||||
|
|
||||||
|
.reg_rd_qos(reg_rd_qos_port1),
|
||||||
|
|
||||||
|
.ddr_wr_ack(ddr_wr_ack_port1),
|
||||||
|
.ddr_wr_dv(ddr_wr_dv_port1),
|
||||||
|
.ddr_rd_req(ddr_rd_req_port1),
|
||||||
|
.ddr_rd_dv(ddr_rd_dv_port1),
|
||||||
|
.ddr_wr_addr(ddr_wr_addr_port1),
|
||||||
|
.ddr_wr_data(ddr_wr_data_port1),
|
||||||
|
.ddr_wr_bytes(ddr_wr_bytes_port1),
|
||||||
|
.ddr_rd_addr(ddr_rd_addr_port1),
|
||||||
|
.ddr_rd_data(ddr_rd_data_port1),
|
||||||
|
.ddr_rd_bytes(ddr_rd_bytes_port1),
|
||||||
|
|
||||||
|
.reg_rd_req(reg_rd_req_port1),
|
||||||
|
.reg_rd_dv(reg_rd_dv_port1),
|
||||||
|
.reg_rd_addr(reg_rd_addr_port1),
|
||||||
|
.reg_rd_data(reg_rd_data_port1),
|
||||||
|
.reg_rd_bytes(reg_rd_bytes_port1)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_ssw_hp ssw(
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
.rstn(rstn),
|
||||||
|
.w_qos_hp0(w_qos_hp0),
|
||||||
|
.r_qos_hp0(r_qos_hp0),
|
||||||
|
.w_qos_hp1(w_qos_hp1),
|
||||||
|
.r_qos_hp1(r_qos_hp1),
|
||||||
|
.w_qos_hp2(w_qos_hp2),
|
||||||
|
.r_qos_hp2(r_qos_hp2),
|
||||||
|
.w_qos_hp3(w_qos_hp3),
|
||||||
|
.r_qos_hp3(r_qos_hp3),
|
||||||
|
|
||||||
|
.wr_ack_ddr_hp0(wr_ack_ddr_hp0),
|
||||||
|
.wr_data_hp0(wr_data_hp0),
|
||||||
|
.wr_addr_hp0(wr_addr_hp0),
|
||||||
|
.wr_bytes_hp0(wr_bytes_hp0),
|
||||||
|
.wr_dv_ddr_hp0(wr_dv_ddr_hp0),
|
||||||
|
.rd_req_ddr_hp0(rd_req_ddr_hp0),
|
||||||
|
.rd_addr_hp0(rd_addr_hp0),
|
||||||
|
.rd_bytes_hp0(rd_bytes_hp0),
|
||||||
|
.rd_data_ddr_hp0(rd_data_ddr_hp0),
|
||||||
|
.rd_data_ocm_hp0(rd_data_ocm_hp0),
|
||||||
|
.rd_dv_ddr_hp0(rd_dv_ddr_hp0),
|
||||||
|
|
||||||
|
.wr_ack_ocm_hp0(wr_ack_ocm_hp0),
|
||||||
|
.wr_dv_ocm_hp0(wr_dv_ocm_hp0),
|
||||||
|
.rd_req_ocm_hp0(rd_req_ocm_hp0),
|
||||||
|
.rd_dv_ocm_hp0(rd_dv_ocm_hp0),
|
||||||
|
|
||||||
|
.wr_ack_ddr_hp1(wr_ack_ddr_hp1),
|
||||||
|
.wr_data_hp1(wr_data_hp1),
|
||||||
|
.wr_addr_hp1(wr_addr_hp1),
|
||||||
|
.wr_bytes_hp1(wr_bytes_hp1),
|
||||||
|
.wr_dv_ddr_hp1(wr_dv_ddr_hp1),
|
||||||
|
.rd_req_ddr_hp1(rd_req_ddr_hp1),
|
||||||
|
.rd_addr_hp1(rd_addr_hp1),
|
||||||
|
.rd_bytes_hp1(rd_bytes_hp1),
|
||||||
|
.rd_data_ddr_hp1(rd_data_ddr_hp1),
|
||||||
|
.rd_data_ocm_hp1(rd_data_ocm_hp1),
|
||||||
|
.rd_dv_ddr_hp1(rd_dv_ddr_hp1),
|
||||||
|
|
||||||
|
.wr_ack_ocm_hp1(wr_ack_ocm_hp1),
|
||||||
|
.wr_dv_ocm_hp1(wr_dv_ocm_hp1),
|
||||||
|
.rd_req_ocm_hp1(rd_req_ocm_hp1),
|
||||||
|
.rd_dv_ocm_hp1(rd_dv_ocm_hp1),
|
||||||
|
|
||||||
|
.wr_ack_ddr_hp2(wr_ack_ddr_hp2),
|
||||||
|
.wr_data_hp2(wr_data_hp2),
|
||||||
|
.wr_addr_hp2(wr_addr_hp2),
|
||||||
|
.wr_bytes_hp2(wr_bytes_hp2),
|
||||||
|
.wr_dv_ddr_hp2(wr_dv_ddr_hp2),
|
||||||
|
.rd_req_ddr_hp2(rd_req_ddr_hp2),
|
||||||
|
.rd_addr_hp2(rd_addr_hp2),
|
||||||
|
.rd_bytes_hp2(rd_bytes_hp2),
|
||||||
|
.rd_data_ddr_hp2(rd_data_ddr_hp2),
|
||||||
|
.rd_data_ocm_hp2(rd_data_ocm_hp2),
|
||||||
|
.rd_dv_ddr_hp2(rd_dv_ddr_hp2),
|
||||||
|
|
||||||
|
.wr_ack_ocm_hp2(wr_ack_ocm_hp2),
|
||||||
|
.wr_dv_ocm_hp2(wr_dv_ocm_hp2),
|
||||||
|
.rd_req_ocm_hp2(rd_req_ocm_hp2),
|
||||||
|
.rd_dv_ocm_hp2(rd_dv_ocm_hp2),
|
||||||
|
|
||||||
|
.wr_ack_ddr_hp3(wr_ack_ddr_hp3),
|
||||||
|
.wr_data_hp3(wr_data_hp3),
|
||||||
|
.wr_addr_hp3(wr_addr_hp3),
|
||||||
|
.wr_bytes_hp3(wr_bytes_hp3),
|
||||||
|
.wr_dv_ddr_hp3(wr_dv_ddr_hp3),
|
||||||
|
.rd_req_ddr_hp3(rd_req_ddr_hp3),
|
||||||
|
.rd_addr_hp3(rd_addr_hp3),
|
||||||
|
.rd_bytes_hp3(rd_bytes_hp3),
|
||||||
|
.rd_data_ddr_hp3(rd_data_ddr_hp3),
|
||||||
|
.rd_data_ocm_hp3(rd_data_ocm_hp3),
|
||||||
|
.rd_dv_ddr_hp3(rd_dv_ddr_hp3),
|
||||||
|
|
||||||
|
.wr_ack_ocm_hp3(wr_ack_ocm_hp3),
|
||||||
|
.wr_dv_ocm_hp3(wr_dv_ocm_hp3),
|
||||||
|
.rd_req_ocm_hp3(rd_req_ocm_hp3),
|
||||||
|
.rd_dv_ocm_hp3(rd_dv_ocm_hp3),
|
||||||
|
|
||||||
|
.ddr_wr_ack0(ddr_wr_ack_port2),
|
||||||
|
.ddr_wr_dv0(ddr_wr_dv_port2),
|
||||||
|
.ddr_rd_req0(ddr_rd_req_port2),
|
||||||
|
.ddr_rd_dv0(ddr_rd_dv_port2),
|
||||||
|
.ddr_wr_addr0(ddr_wr_addr_port2),
|
||||||
|
.ddr_wr_data0(ddr_wr_data_port2),
|
||||||
|
.ddr_wr_bytes0(ddr_wr_bytes_port2),
|
||||||
|
.ddr_rd_addr0(ddr_rd_addr_port2),
|
||||||
|
.ddr_rd_data0(ddr_rd_data_port2),
|
||||||
|
.ddr_rd_bytes0(ddr_rd_bytes_port2),
|
||||||
|
.ddr_wr_qos0(ddr_wr_qos_port2),
|
||||||
|
.ddr_rd_qos0(ddr_rd_qos_port2),
|
||||||
|
|
||||||
|
.ddr_wr_ack1(ddr_wr_ack_port3),
|
||||||
|
.ddr_wr_dv1(ddr_wr_dv_port3),
|
||||||
|
.ddr_rd_req1(ddr_rd_req_port3),
|
||||||
|
.ddr_rd_dv1(ddr_rd_dv_port3),
|
||||||
|
.ddr_wr_addr1(ddr_wr_addr_port3),
|
||||||
|
.ddr_wr_data1(ddr_wr_data_port3),
|
||||||
|
.ddr_wr_bytes1(ddr_wr_bytes_port3),
|
||||||
|
.ddr_rd_addr1(ddr_rd_addr_port3),
|
||||||
|
.ddr_rd_data1(ddr_rd_data_port3),
|
||||||
|
.ddr_rd_bytes1(ddr_rd_bytes_port3),
|
||||||
|
.ddr_wr_qos1(ddr_wr_qos_port3),
|
||||||
|
.ddr_rd_qos1(ddr_rd_qos_port3),
|
||||||
|
|
||||||
|
.ocm_wr_qos(ocm_wr_qos_osw1),
|
||||||
|
.ocm_rd_qos(ocm_rd_qos_osw1),
|
||||||
|
|
||||||
|
.ocm_wr_ack (ocm_wr_ack_osw1),
|
||||||
|
.ocm_wr_dv (ocm_wr_dv_osw1),
|
||||||
|
.ocm_rd_req (ocm_rd_req_osw1),
|
||||||
|
.ocm_rd_dv (ocm_rd_dv_osw1),
|
||||||
|
.ocm_wr_addr(ocm_wr_addr_osw1),
|
||||||
|
.ocm_wr_data(ocm_wr_data_osw1),
|
||||||
|
.ocm_wr_bytes(ocm_wr_bytes_osw1),
|
||||||
|
.ocm_rd_addr(ocm_rd_addr_osw1),
|
||||||
|
.ocm_rd_data(ocm_rd_data_osw1),
|
||||||
|
.ocm_rd_bytes(ocm_rd_bytes_osw1)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_wr osw_wr (
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
.qos1(ocm_wr_qos_osw0), /// chk
|
||||||
|
.qos2(ocm_wr_qos_osw1), /// chk
|
||||||
|
.prt_dv1(ocm_wr_dv_osw0),
|
||||||
|
.prt_dv2(ocm_wr_dv_osw1),
|
||||||
|
.prt_data1(ocm_wr_data_osw0),
|
||||||
|
.prt_data2(ocm_wr_data_osw1),
|
||||||
|
.prt_addr1(ocm_wr_addr_osw0),
|
||||||
|
.prt_addr2(ocm_wr_addr_osw1),
|
||||||
|
.prt_bytes1(ocm_wr_bytes_osw0),
|
||||||
|
.prt_bytes2(ocm_wr_bytes_osw1),
|
||||||
|
.prt_ack1(ocm_wr_ack_osw0),
|
||||||
|
.prt_ack2(ocm_wr_ack_osw1),
|
||||||
|
.prt_req(ocm_wr_dv_port1),
|
||||||
|
.prt_qos(ocm_wr_qos_port1),
|
||||||
|
.prt_data(ocm_wr_data_port1),
|
||||||
|
.prt_addr(ocm_wr_addr_port1),
|
||||||
|
.prt_bytes(ocm_wr_bytes_port1),
|
||||||
|
.prt_ack(ocm_wr_ack_port1)
|
||||||
|
);
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_rd osw_rd(
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
.qos1(ocm_rd_qos_osw0), // chk
|
||||||
|
.qos2(ocm_rd_qos_osw1), // chk
|
||||||
|
.prt_req1(ocm_rd_req_osw0),
|
||||||
|
.prt_req2(ocm_rd_req_osw1),
|
||||||
|
.prt_data1(ocm_rd_data_osw0),
|
||||||
|
.prt_data2(ocm_rd_data_osw1),
|
||||||
|
.prt_addr1(ocm_rd_addr_osw0),
|
||||||
|
.prt_addr2(ocm_rd_addr_osw1),
|
||||||
|
.prt_bytes1(ocm_rd_bytes_osw0),
|
||||||
|
.prt_bytes2(ocm_rd_bytes_osw1),
|
||||||
|
.prt_dv1(ocm_rd_dv_osw0),
|
||||||
|
.prt_dv2(ocm_rd_dv_osw1),
|
||||||
|
.prt_req(ocm_rd_req_port1),
|
||||||
|
.prt_qos(ocm_rd_qos_port1),
|
||||||
|
.prt_data(ocm_rd_data_port1),
|
||||||
|
.prt_addr(ocm_rd_addr_port1),
|
||||||
|
.prt_bytes(ocm_rd_bytes_port1),
|
||||||
|
.prt_dv(ocm_rd_dv_port1)
|
||||||
|
);
|
||||||
|
|
||||||
|
endmodule
|
@ -0,0 +1,99 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_intr_rd_mem.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Mimics interconnect for Reads between AFI and DDRC/OCM
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_intr_rd_mem(
|
||||||
|
sw_clk,
|
||||||
|
rstn,
|
||||||
|
|
||||||
|
full,
|
||||||
|
empty,
|
||||||
|
|
||||||
|
req,
|
||||||
|
invalid_rd_req,
|
||||||
|
rd_info,
|
||||||
|
|
||||||
|
RD_DATA_OCM,
|
||||||
|
RD_DATA_DDR,
|
||||||
|
RD_DATA_VALID_OCM,
|
||||||
|
RD_DATA_VALID_DDR
|
||||||
|
|
||||||
|
);
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
|
||||||
|
input sw_clk, rstn;
|
||||||
|
output full, empty;
|
||||||
|
|
||||||
|
input RD_DATA_VALID_DDR, RD_DATA_VALID_OCM;
|
||||||
|
input [max_burst_bits-1:0] RD_DATA_DDR, RD_DATA_OCM;
|
||||||
|
input req, invalid_rd_req;
|
||||||
|
input [rd_info_bits-1:0] rd_info;
|
||||||
|
|
||||||
|
reg [intr_cnt_width-1:0] wr_ptr = 0, rd_ptr = 0;
|
||||||
|
reg [rd_afi_fifo_bits-1:0] rd_fifo [0:intr_max_outstanding-1]; // Data, addr, size, burst, len, RID, RRESP, valid bytes
|
||||||
|
wire full, empty;
|
||||||
|
|
||||||
|
|
||||||
|
assign empty = (wr_ptr === rd_ptr)?1'b1: 1'b0;
|
||||||
|
assign full = ((wr_ptr[intr_cnt_width-1]!== rd_ptr[intr_cnt_width-1]) && (wr_ptr[intr_cnt_width-2:0] === rd_ptr[intr_cnt_width-2:0]))?1'b1 :1'b0;
|
||||||
|
|
||||||
|
/* read from the fifo */
|
||||||
|
task read_mem;
|
||||||
|
output [rd_afi_fifo_bits-1:0] data;
|
||||||
|
begin
|
||||||
|
data = rd_fifo[rd_ptr[intr_cnt_width-1:0]];
|
||||||
|
if(rd_ptr[intr_cnt_width-2:0] === intr_max_outstanding-1)
|
||||||
|
rd_ptr[intr_cnt_width-2:0] = 0;
|
||||||
|
else
|
||||||
|
rd_ptr = rd_ptr + 1;
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
reg state;
|
||||||
|
reg invalid_rd;
|
||||||
|
/* write in the fifo */
|
||||||
|
always@(negedge rstn or posedge sw_clk)
|
||||||
|
begin
|
||||||
|
if(!rstn) begin
|
||||||
|
wr_ptr = 0;
|
||||||
|
rd_ptr = 0;
|
||||||
|
state = 0;
|
||||||
|
invalid_rd = 0;
|
||||||
|
end else begin
|
||||||
|
case (state)
|
||||||
|
0 : begin
|
||||||
|
state = 0;
|
||||||
|
invalid_rd = 0;
|
||||||
|
if(req)begin
|
||||||
|
state = 1;
|
||||||
|
invalid_rd = invalid_rd_req;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
1 : begin
|
||||||
|
state = 1;
|
||||||
|
if(RD_DATA_VALID_OCM | RD_DATA_VALID_DDR | invalid_rd) begin
|
||||||
|
if(RD_DATA_VALID_DDR)
|
||||||
|
rd_fifo[wr_ptr[intr_cnt_width-2:0]] = {RD_DATA_DDR,rd_info};
|
||||||
|
else if(RD_DATA_VALID_OCM)
|
||||||
|
rd_fifo[wr_ptr[intr_cnt_width-2:0]] = {RD_DATA_OCM,rd_info};
|
||||||
|
else
|
||||||
|
rd_fifo[wr_ptr[intr_cnt_width-2:0]] = rd_info;
|
||||||
|
if(wr_ptr[intr_cnt_width-2:0] === intr_max_outstanding-1)
|
||||||
|
wr_ptr[intr_cnt_width-2:0] = 0;
|
||||||
|
else
|
||||||
|
wr_ptr = wr_ptr + 1;
|
||||||
|
state = 0;
|
||||||
|
invalid_rd = 0;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
@ -0,0 +1,105 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_intr_wr_mem.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Mimics interconnect for Writes between AFI and DDRC/OCM
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_intr_wr_mem(
|
||||||
|
sw_clk,
|
||||||
|
rstn,
|
||||||
|
|
||||||
|
full,
|
||||||
|
|
||||||
|
WR_DATA_ACK_OCM,
|
||||||
|
WR_DATA_ACK_DDR,
|
||||||
|
WR_ADDR,
|
||||||
|
WR_DATA,
|
||||||
|
WR_BYTES,
|
||||||
|
WR_QOS,
|
||||||
|
WR_DATA_VALID_OCM,
|
||||||
|
WR_DATA_VALID_DDR
|
||||||
|
);
|
||||||
|
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
/* local parameters for interconnect wr fifo model */
|
||||||
|
|
||||||
|
input sw_clk, rstn;
|
||||||
|
output full;
|
||||||
|
|
||||||
|
input WR_DATA_ACK_DDR, WR_DATA_ACK_OCM;
|
||||||
|
output reg WR_DATA_VALID_DDR, WR_DATA_VALID_OCM;
|
||||||
|
output reg [max_burst_bits-1:0] WR_DATA;
|
||||||
|
output reg [addr_width-1:0] WR_ADDR;
|
||||||
|
output reg [max_burst_bytes_width:0] WR_BYTES;
|
||||||
|
output reg [axi_qos_width-1:0] WR_QOS;
|
||||||
|
reg [intr_cnt_width-1:0] wr_ptr = 0, rd_ptr = 0;
|
||||||
|
reg [wr_fifo_data_bits-1:0] wr_fifo [0:intr_max_outstanding-1];
|
||||||
|
wire empty;
|
||||||
|
|
||||||
|
assign empty = (wr_ptr === rd_ptr)?1'b1: 1'b0;
|
||||||
|
assign full = ((wr_ptr[intr_cnt_width-1]!== rd_ptr[intr_cnt_width-1]) && (wr_ptr[intr_cnt_width-2:0] === rd_ptr[intr_cnt_width-2:0]))?1'b1 :1'b0;
|
||||||
|
|
||||||
|
parameter SEND_DATA = 0, WAIT_ACK = 1;
|
||||||
|
reg state;
|
||||||
|
|
||||||
|
task automatic write_mem;
|
||||||
|
input [wr_fifo_data_bits-1:0] data;
|
||||||
|
begin
|
||||||
|
wr_fifo[wr_ptr[intr_cnt_width-2:0]] = data;
|
||||||
|
if(wr_ptr[intr_cnt_width-2:0] === intr_max_outstanding-1)
|
||||||
|
wr_ptr[intr_cnt_width-2:0] = 0;
|
||||||
|
else
|
||||||
|
wr_ptr = wr_ptr + 1;
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
always@(negedge rstn or posedge sw_clk)
|
||||||
|
begin
|
||||||
|
if(!rstn) begin
|
||||||
|
wr_ptr = 0;
|
||||||
|
rd_ptr = 0;
|
||||||
|
WR_DATA_VALID_DDR = 1'b0;
|
||||||
|
WR_DATA_VALID_OCM = 1'b0;
|
||||||
|
WR_QOS = 0;
|
||||||
|
state = SEND_DATA;
|
||||||
|
end else begin
|
||||||
|
case(state)
|
||||||
|
SEND_DATA :begin
|
||||||
|
state = SEND_DATA;
|
||||||
|
WR_DATA_VALID_OCM = 1'b0;
|
||||||
|
WR_DATA_VALID_DDR = 1'b0;
|
||||||
|
if(!empty) begin
|
||||||
|
WR_DATA = wr_fifo[rd_ptr[intr_cnt_width-2:0]][wr_data_msb : wr_data_lsb];
|
||||||
|
WR_ADDR = wr_fifo[rd_ptr[intr_cnt_width-2:0]][wr_addr_msb : wr_addr_lsb];
|
||||||
|
WR_BYTES = wr_fifo[rd_ptr[intr_cnt_width-2:0]][wr_bytes_msb : wr_bytes_lsb];
|
||||||
|
WR_QOS = wr_fifo[rd_ptr[intr_cnt_width-2:0]][wr_qos_msb : wr_qos_lsb];
|
||||||
|
state = WAIT_ACK;
|
||||||
|
case(decode_address(wr_fifo[rd_ptr[intr_cnt_width-2:0]][wr_addr_msb : wr_addr_lsb]))
|
||||||
|
OCM_MEM : WR_DATA_VALID_OCM = 1;
|
||||||
|
DDR_MEM : WR_DATA_VALID_DDR = 1;
|
||||||
|
default : state = SEND_DATA;
|
||||||
|
endcase
|
||||||
|
if(rd_ptr[intr_cnt_width-2:0] === intr_max_outstanding-1) begin
|
||||||
|
rd_ptr[intr_cnt_width-2:0] = 0;
|
||||||
|
end else begin
|
||||||
|
rd_ptr = rd_ptr+1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
WAIT_ACK :begin
|
||||||
|
state = WAIT_ACK;
|
||||||
|
if(WR_DATA_ACK_OCM | WR_DATA_ACK_DDR) begin
|
||||||
|
WR_DATA_VALID_OCM = 1'b0;
|
||||||
|
WR_DATA_VALID_DDR = 1'b0;
|
||||||
|
state = SEND_DATA;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
@ -0,0 +1,223 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_ocm_mem.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Mimics OCM model
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_ocm_mem();
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
|
||||||
|
parameter mem_size = 32'h4_0000; /// 256 KB
|
||||||
|
parameter mem_addr_width = clogb2(mem_size/mem_width);
|
||||||
|
|
||||||
|
reg [data_width-1:0] ocm_memory [0:(mem_size/mem_width)-1]; /// 256 KB memory
|
||||||
|
|
||||||
|
/* preload memory from file */
|
||||||
|
task automatic pre_load_mem_from_file;
|
||||||
|
input [(max_chars*8)-1:0] file_name;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [int_width-1:0] no_of_bytes;
|
||||||
|
$readmemh(file_name,ocm_memory,start_addr>>shft_addr_bits);
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* preload memory with some random data */
|
||||||
|
task automatic pre_load_mem;
|
||||||
|
input [1:0] data_type;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [int_width-1:0] no_of_bytes;
|
||||||
|
integer i;
|
||||||
|
reg [mem_addr_width-1:0] addr;
|
||||||
|
begin
|
||||||
|
addr = start_addr >> shft_addr_bits;
|
||||||
|
|
||||||
|
for (i = 0; i < no_of_bytes; i = i + mem_width) begin
|
||||||
|
case(data_type)
|
||||||
|
ALL_RANDOM : ocm_memory[addr] = $random;
|
||||||
|
ALL_ZEROS : ocm_memory[addr] = 32'h0000_0000;
|
||||||
|
ALL_ONES : ocm_memory[addr] = 32'hFFFF_FFFF;
|
||||||
|
default : ocm_memory[addr] = $random;
|
||||||
|
endcase
|
||||||
|
addr = addr+1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* Write memory */
|
||||||
|
task write_mem;
|
||||||
|
input [max_burst_bits-1 :0] data;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [max_burst_bytes_width:0] no_of_bytes;
|
||||||
|
reg [mem_addr_width-1:0] addr;
|
||||||
|
reg [max_burst_bits-1 :0] wr_temp_data;
|
||||||
|
reg [data_width-1:0] pre_pad_data,post_pad_data,temp_data;
|
||||||
|
integer bytes_left;
|
||||||
|
integer pre_pad_bytes;
|
||||||
|
integer post_pad_bytes;
|
||||||
|
begin
|
||||||
|
addr = start_addr >> shft_addr_bits;
|
||||||
|
wr_temp_data = data;
|
||||||
|
|
||||||
|
`ifdef XLNX_INT_DBG
|
||||||
|
$display("[%0d] : %0s : Writing OCM Memory starting address (0x%0h) with %0d bytes.\n Data (0x%0h)",$time, DISP_INT_INFO, start_addr, no_of_bytes, data);
|
||||||
|
`endif
|
||||||
|
|
||||||
|
temp_data = wr_temp_data[data_width-1:0];
|
||||||
|
bytes_left = no_of_bytes;
|
||||||
|
/* when the no. of bytes to be updated is less than mem_width */
|
||||||
|
if(bytes_left < mem_width) begin
|
||||||
|
/* first data word in the burst , if unaligned address, the adjust the wr_data accordingly for first write*/
|
||||||
|
if(start_addr[shft_addr_bits-1:0] > 0) begin
|
||||||
|
temp_data = ocm_memory[addr];
|
||||||
|
pre_pad_bytes = mem_width - start_addr[shft_addr_bits-1:0];
|
||||||
|
repeat(pre_pad_bytes) temp_data = temp_data << 8;
|
||||||
|
repeat(pre_pad_bytes) begin
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
temp_data[data_width-1:data_width-8] = wr_temp_data[7:0];
|
||||||
|
wr_temp_data = wr_temp_data >> 8;
|
||||||
|
end
|
||||||
|
bytes_left = bytes_left + pre_pad_bytes;
|
||||||
|
end
|
||||||
|
/* This is needed for post padding the data ...*/
|
||||||
|
post_pad_bytes = mem_width - bytes_left;
|
||||||
|
post_pad_data = ocm_memory[addr];
|
||||||
|
repeat(post_pad_bytes) temp_data = temp_data << 8;
|
||||||
|
repeat(bytes_left) post_pad_data = post_pad_data >> 8;
|
||||||
|
repeat(post_pad_bytes) begin
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
temp_data[data_width-1:data_width-8] = post_pad_data[7:0];
|
||||||
|
post_pad_data = post_pad_data >> 8;
|
||||||
|
end
|
||||||
|
ocm_memory[addr] = temp_data;
|
||||||
|
end else begin
|
||||||
|
/* first data word in the burst , if unaligned address, the adjust the wr_data accordingly for first write*/
|
||||||
|
if(start_addr[shft_addr_bits-1:0] > 0) begin
|
||||||
|
temp_data = ocm_memory[addr];
|
||||||
|
pre_pad_bytes = mem_width - start_addr[shft_addr_bits-1:0];
|
||||||
|
repeat(pre_pad_bytes) temp_data = temp_data << 8;
|
||||||
|
repeat(pre_pad_bytes) begin
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
temp_data[data_width-1:data_width-8] = wr_temp_data[7:0];
|
||||||
|
wr_temp_data = wr_temp_data >> 8;
|
||||||
|
bytes_left = bytes_left -1;
|
||||||
|
end
|
||||||
|
end else begin
|
||||||
|
wr_temp_data = wr_temp_data >> data_width;
|
||||||
|
bytes_left = bytes_left - mem_width;
|
||||||
|
end
|
||||||
|
/* first data word end */
|
||||||
|
ocm_memory[addr] = temp_data;
|
||||||
|
addr = addr + 1;
|
||||||
|
while(bytes_left > (mem_width-1) ) begin /// for unaliged address necessary to check for mem_wd-1 , accordingly we have to pad post bytes.
|
||||||
|
ocm_memory[addr] = wr_temp_data[data_width-1:0];
|
||||||
|
addr = addr+1;
|
||||||
|
wr_temp_data = wr_temp_data >> data_width;
|
||||||
|
bytes_left = bytes_left - mem_width;
|
||||||
|
end
|
||||||
|
|
||||||
|
post_pad_data = ocm_memory[addr];
|
||||||
|
post_pad_bytes = mem_width - bytes_left;
|
||||||
|
/* This is needed for last transfer in unaliged burst */
|
||||||
|
if(bytes_left > 0) begin
|
||||||
|
temp_data = wr_temp_data[data_width-1:0];
|
||||||
|
repeat(post_pad_bytes) temp_data = temp_data << 8;
|
||||||
|
repeat(bytes_left) post_pad_data = post_pad_data >> 8;
|
||||||
|
repeat(post_pad_bytes) begin
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
temp_data[data_width-1:data_width-8] = post_pad_data[7:0];
|
||||||
|
post_pad_data = post_pad_data >> 8;
|
||||||
|
end
|
||||||
|
ocm_memory[addr] = temp_data;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
`ifdef XLNX_INT_DBG $display("[%0d] : %0s : DONE -> Writing OCM Memory starting address (0x%0h)",$time, DISP_INT_INFO, start_addr );
|
||||||
|
`endif
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* read_memory */
|
||||||
|
task read_mem;
|
||||||
|
output[max_burst_bits-1 :0] data;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [max_burst_bytes_width:0] no_of_bytes;
|
||||||
|
integer i;
|
||||||
|
reg [mem_addr_width-1:0] addr;
|
||||||
|
reg [data_width-1:0] temp_rd_data;
|
||||||
|
reg [max_burst_bits-1:0] temp_data;
|
||||||
|
integer pre_bytes;
|
||||||
|
integer bytes_left;
|
||||||
|
begin
|
||||||
|
addr = start_addr >> shft_addr_bits;
|
||||||
|
pre_bytes = start_addr[shft_addr_bits-1:0];
|
||||||
|
bytes_left = no_of_bytes;
|
||||||
|
|
||||||
|
`ifdef XLNX_INT_DBG
|
||||||
|
$display("[%0d] : %0s : Reading OCM Memory starting address (0x%0h) -> %0d bytes",$time, DISP_INT_INFO, start_addr,no_of_bytes );
|
||||||
|
`endif
|
||||||
|
|
||||||
|
/* Get first data ... if unaligned address */
|
||||||
|
temp_data[max_burst_bits-1 : max_burst_bits-data_width] = ocm_memory[addr];
|
||||||
|
|
||||||
|
if(no_of_bytes < mem_width ) begin
|
||||||
|
temp_data = temp_data >> (pre_bytes * 8);
|
||||||
|
repeat(max_burst_bytes - mem_width)
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
|
||||||
|
end else begin
|
||||||
|
bytes_left = bytes_left - (mem_width - pre_bytes);
|
||||||
|
addr = addr+1;
|
||||||
|
/* Got first data */
|
||||||
|
while (bytes_left > (mem_width-1) ) begin
|
||||||
|
temp_data = temp_data >> data_width;
|
||||||
|
temp_data[max_burst_bits-1 : max_burst_bits-data_width] = ocm_memory[addr];
|
||||||
|
addr = addr+1;
|
||||||
|
bytes_left = bytes_left - mem_width;
|
||||||
|
end
|
||||||
|
|
||||||
|
/* Get last valid data in the burst*/
|
||||||
|
temp_rd_data = ocm_memory[addr];
|
||||||
|
while(bytes_left > 0) begin
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
temp_data[max_burst_bits-1 : max_burst_bits-8] = temp_rd_data[7:0];
|
||||||
|
temp_rd_data = temp_rd_data >> 8;
|
||||||
|
bytes_left = bytes_left - 1;
|
||||||
|
end
|
||||||
|
/* align to the brst_byte length */
|
||||||
|
repeat(max_burst_bytes - no_of_bytes)
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
end
|
||||||
|
data = temp_data;
|
||||||
|
`ifdef XLNX_INT_DBG
|
||||||
|
$display("[%0d] : %0s : DONE -> Reading OCM Memory starting address (0x%0h), Data returned(0x%0h)",$time, DISP_INT_INFO, start_addr, data );
|
||||||
|
`endif
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* backdoor read to memory */
|
||||||
|
task peek_mem_to_file;
|
||||||
|
input [(max_chars*8)-1:0] file_name;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [int_width-1:0] no_of_bytes;
|
||||||
|
|
||||||
|
integer rd_fd;
|
||||||
|
integer bytes;
|
||||||
|
reg [addr_width-1:0] addr;
|
||||||
|
reg [data_width-1:0] rd_data;
|
||||||
|
begin
|
||||||
|
rd_fd = $fopen(file_name,"w");
|
||||||
|
bytes = no_of_bytes;
|
||||||
|
|
||||||
|
addr = start_addr >> shft_addr_bits;
|
||||||
|
while (bytes > 0) begin
|
||||||
|
rd_data = ocm_memory[addr];
|
||||||
|
$fdisplayh(rd_fd,rd_data);
|
||||||
|
bytes = bytes - 4;
|
||||||
|
addr = addr + 1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
endmodule
|
@ -0,0 +1,189 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_ocmc.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Controller for OCM model
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_ocmc(
|
||||||
|
rstn,
|
||||||
|
sw_clk,
|
||||||
|
|
||||||
|
/* Goes to port 0 of OCM */
|
||||||
|
ocm_wr_ack_port0,
|
||||||
|
ocm_wr_dv_port0,
|
||||||
|
ocm_rd_req_port0,
|
||||||
|
ocm_rd_dv_port0,
|
||||||
|
ocm_wr_addr_port0,
|
||||||
|
ocm_wr_data_port0,
|
||||||
|
ocm_wr_bytes_port0,
|
||||||
|
ocm_rd_addr_port0,
|
||||||
|
ocm_rd_data_port0,
|
||||||
|
ocm_rd_bytes_port0,
|
||||||
|
ocm_wr_qos_port0,
|
||||||
|
ocm_rd_qos_port0,
|
||||||
|
|
||||||
|
|
||||||
|
/* Goes to port 1 of OCM */
|
||||||
|
ocm_wr_ack_port1,
|
||||||
|
ocm_wr_dv_port1,
|
||||||
|
ocm_rd_req_port1,
|
||||||
|
ocm_rd_dv_port1,
|
||||||
|
ocm_wr_addr_port1,
|
||||||
|
ocm_wr_data_port1,
|
||||||
|
ocm_wr_bytes_port1,
|
||||||
|
ocm_rd_addr_port1,
|
||||||
|
ocm_rd_data_port1,
|
||||||
|
ocm_rd_bytes_port1,
|
||||||
|
ocm_wr_qos_port1,
|
||||||
|
ocm_rd_qos_port1
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
input rstn;
|
||||||
|
input sw_clk;
|
||||||
|
|
||||||
|
output ocm_wr_ack_port0;
|
||||||
|
input ocm_wr_dv_port0;
|
||||||
|
input ocm_rd_req_port0;
|
||||||
|
output ocm_rd_dv_port0;
|
||||||
|
input[addr_width-1:0] ocm_wr_addr_port0;
|
||||||
|
input[max_burst_bits-1:0] ocm_wr_data_port0;
|
||||||
|
input[max_burst_bytes_width:0] ocm_wr_bytes_port0;
|
||||||
|
input[addr_width-1:0] ocm_rd_addr_port0;
|
||||||
|
output[max_burst_bits-1:0] ocm_rd_data_port0;
|
||||||
|
input[max_burst_bytes_width:0] ocm_rd_bytes_port0;
|
||||||
|
input [axi_qos_width-1:0] ocm_wr_qos_port0;
|
||||||
|
input [axi_qos_width-1:0] ocm_rd_qos_port0;
|
||||||
|
|
||||||
|
output ocm_wr_ack_port1;
|
||||||
|
input ocm_wr_dv_port1;
|
||||||
|
input ocm_rd_req_port1;
|
||||||
|
output ocm_rd_dv_port1;
|
||||||
|
input[addr_width-1:0] ocm_wr_addr_port1;
|
||||||
|
input[max_burst_bits-1:0] ocm_wr_data_port1;
|
||||||
|
input[max_burst_bytes_width:0] ocm_wr_bytes_port1;
|
||||||
|
input[addr_width-1:0] ocm_rd_addr_port1;
|
||||||
|
output[max_burst_bits-1:0] ocm_rd_data_port1;
|
||||||
|
input[max_burst_bytes_width:0] ocm_rd_bytes_port1;
|
||||||
|
input[axi_qos_width-1:0] ocm_wr_qos_port1;
|
||||||
|
input[axi_qos_width-1:0] ocm_rd_qos_port1;
|
||||||
|
|
||||||
|
wire [axi_qos_width-1:0] wr_qos;
|
||||||
|
wire wr_req;
|
||||||
|
wire [max_burst_bits-1:0] wr_data;
|
||||||
|
wire [addr_width-1:0] wr_addr;
|
||||||
|
wire [max_burst_bytes_width:0] wr_bytes;
|
||||||
|
reg wr_ack;
|
||||||
|
|
||||||
|
wire [axi_qos_width-1:0] rd_qos;
|
||||||
|
reg [max_burst_bits-1:0] rd_data;
|
||||||
|
wire [addr_width-1:0] rd_addr;
|
||||||
|
wire [max_burst_bytes_width:0] rd_bytes;
|
||||||
|
reg rd_dv;
|
||||||
|
wire rd_req;
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_wr ocm_write_ports (
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
|
||||||
|
.qos1(ocm_wr_qos_port0),
|
||||||
|
.qos2(ocm_wr_qos_port1),
|
||||||
|
|
||||||
|
.prt_dv1(ocm_wr_dv_port0),
|
||||||
|
.prt_dv2(ocm_wr_dv_port1),
|
||||||
|
|
||||||
|
.prt_data1(ocm_wr_data_port0),
|
||||||
|
.prt_data2(ocm_wr_data_port1),
|
||||||
|
|
||||||
|
.prt_addr1(ocm_wr_addr_port0),
|
||||||
|
.prt_addr2(ocm_wr_addr_port1),
|
||||||
|
|
||||||
|
.prt_bytes1(ocm_wr_bytes_port0),
|
||||||
|
.prt_bytes2(ocm_wr_bytes_port1),
|
||||||
|
|
||||||
|
.prt_ack1(ocm_wr_ack_port0),
|
||||||
|
.prt_ack2(ocm_wr_ack_port1),
|
||||||
|
|
||||||
|
.prt_qos(wr_qos),
|
||||||
|
.prt_req(wr_req),
|
||||||
|
.prt_data(wr_data),
|
||||||
|
.prt_addr(wr_addr),
|
||||||
|
.prt_bytes(wr_bytes),
|
||||||
|
.prt_ack(wr_ack)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_rd ocm_read_ports (
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
|
||||||
|
.qos1(ocm_rd_qos_port0),
|
||||||
|
.qos2(ocm_rd_qos_port1),
|
||||||
|
|
||||||
|
.prt_req1(ocm_rd_req_port0),
|
||||||
|
.prt_req2(ocm_rd_req_port1),
|
||||||
|
|
||||||
|
.prt_data1(ocm_rd_data_port0),
|
||||||
|
.prt_data2(ocm_rd_data_port1),
|
||||||
|
|
||||||
|
.prt_addr1(ocm_rd_addr_port0),
|
||||||
|
.prt_addr2(ocm_rd_addr_port1),
|
||||||
|
|
||||||
|
.prt_bytes1(ocm_rd_bytes_port0),
|
||||||
|
.prt_bytes2(ocm_rd_bytes_port1),
|
||||||
|
|
||||||
|
.prt_dv1(ocm_rd_dv_port0),
|
||||||
|
.prt_dv2(ocm_rd_dv_port1),
|
||||||
|
|
||||||
|
.prt_qos(rd_qos),
|
||||||
|
.prt_req(rd_req),
|
||||||
|
.prt_data(rd_data),
|
||||||
|
.prt_addr(rd_addr),
|
||||||
|
.prt_bytes(rd_bytes),
|
||||||
|
.prt_dv(rd_dv)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_ocm_mem ocm();
|
||||||
|
|
||||||
|
reg [1:0] state;
|
||||||
|
always@(posedge sw_clk or negedge rstn)
|
||||||
|
begin
|
||||||
|
if(!rstn) begin
|
||||||
|
wr_ack <= 0;
|
||||||
|
rd_dv <= 0;
|
||||||
|
state <= 2'd0;
|
||||||
|
end else begin
|
||||||
|
case(state)
|
||||||
|
0:begin
|
||||||
|
state <= 0;
|
||||||
|
wr_ack <= 0;
|
||||||
|
rd_dv <= 0;
|
||||||
|
if(wr_req) begin
|
||||||
|
ocm.write_mem(wr_data , wr_addr, wr_bytes);
|
||||||
|
wr_ack <= 1;
|
||||||
|
state <= 1;
|
||||||
|
end
|
||||||
|
if(rd_req) begin
|
||||||
|
ocm.read_mem(rd_data,rd_addr, rd_bytes);
|
||||||
|
rd_dv <= 1;
|
||||||
|
state <= 1;
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
1:begin
|
||||||
|
wr_ack <= 0;
|
||||||
|
rd_dv <= 0;
|
||||||
|
state <= 0;
|
||||||
|
end
|
||||||
|
|
||||||
|
endcase
|
||||||
|
end /// if
|
||||||
|
end// always
|
||||||
|
|
||||||
|
endmodule
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,156 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_reg_map.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Controller for Register Map Memory
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
/*** WA for CR # 695818 ***/
|
||||||
|
`ifdef XILINX_SIMULATOR
|
||||||
|
`define XSIM_ISIM
|
||||||
|
`endif
|
||||||
|
`ifdef XILINX_ISIM
|
||||||
|
`define XSIM_ISIM
|
||||||
|
`endif
|
||||||
|
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_reg_map();
|
||||||
|
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
|
||||||
|
/* Register definitions */
|
||||||
|
`include "processing_system7_bfm_v2_0_5_reg_params.v"
|
||||||
|
|
||||||
|
parameter mem_size = 32'h2000_0000; ///as the memory is implemented 4 byte wide
|
||||||
|
parameter xsim_mem_size = 32'h1000_0000; ///as the memory is implemented 4 byte wide 256 MB
|
||||||
|
|
||||||
|
`ifdef XSIM_ISIM
|
||||||
|
reg [data_width-1:0] reg_mem0 [0:(xsim_mem_size/mem_width)-1]; // 256MB mem
|
||||||
|
reg [data_width-1:0] reg_mem1 [0:(xsim_mem_size/mem_width)-1]; // 256MB mem
|
||||||
|
parameter addr_offset_bits = 26;
|
||||||
|
`else
|
||||||
|
reg /*sparse*/ [data_width-1:0] reg_mem [0:(mem_size/mem_width)-1]; // 512 MB needed for reg space
|
||||||
|
parameter addr_offset_bits = 27;
|
||||||
|
`endif
|
||||||
|
|
||||||
|
/* preload reset_values from file */
|
||||||
|
task automatic pre_load_rst_values;
|
||||||
|
input dummy;
|
||||||
|
begin
|
||||||
|
`include "processing_system7_bfm_v2_0_5_reg_init.v" /* This file has list of set_reset_data() calls to set the reset value for each register*/
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* writes the reset data into the reg memory */
|
||||||
|
task automatic set_reset_data;
|
||||||
|
input [addr_width-1:0] address;
|
||||||
|
input [data_width-1:0] data;
|
||||||
|
reg [addr_width-1:0] addr;
|
||||||
|
begin
|
||||||
|
addr = address >> 2;
|
||||||
|
`ifdef XSIM_ISIM
|
||||||
|
case(addr[addr_width-1:addr_offset_bits])
|
||||||
|
14 : reg_mem0[addr[addr_offset_bits-1:0]] = data;
|
||||||
|
15 : reg_mem1[addr[addr_offset_bits-1:0]] = data;
|
||||||
|
endcase
|
||||||
|
`else
|
||||||
|
reg_mem[addr[addr_offset_bits-1:0]] = data;
|
||||||
|
`endif
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* writes the data into the reg memory */
|
||||||
|
task automatic set_data;
|
||||||
|
input [addr_width-1:0] addr;
|
||||||
|
input [data_width-1:0] data;
|
||||||
|
begin
|
||||||
|
`ifdef XSIM_ISIM
|
||||||
|
case(addr[addr_width-1:addr_offset_bits])
|
||||||
|
6'h0E : reg_mem0[addr[addr_offset_bits-1:0]] = data;
|
||||||
|
6'h0F : reg_mem1[addr[addr_offset_bits-1:0]] = data;
|
||||||
|
endcase
|
||||||
|
`else
|
||||||
|
reg_mem[addr[addr_offset_bits-1:0]] = data;
|
||||||
|
`endif
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* get the read data from reg mem */
|
||||||
|
task automatic get_data;
|
||||||
|
input [addr_width-1:0] addr;
|
||||||
|
output [data_width-1:0] data;
|
||||||
|
begin
|
||||||
|
`ifdef XSIM_ISIM
|
||||||
|
case(addr[addr_width-1:addr_offset_bits])
|
||||||
|
6'h0E : data = reg_mem0[addr[addr_offset_bits-1:0]];
|
||||||
|
6'h0F : data = reg_mem1[addr[addr_offset_bits-1:0]];
|
||||||
|
endcase
|
||||||
|
`else
|
||||||
|
data = reg_mem[addr[addr_offset_bits-1:0]];
|
||||||
|
`endif
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* read chunk of registers */
|
||||||
|
task read_reg_mem;
|
||||||
|
output[max_burst_bits-1 :0] data;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [max_burst_bytes_width:0] no_of_bytes;
|
||||||
|
integer i;
|
||||||
|
reg [addr_width-1:0] addr;
|
||||||
|
reg [data_width-1:0] temp_rd_data;
|
||||||
|
reg [max_burst_bits-1:0] temp_data;
|
||||||
|
integer bytes_left;
|
||||||
|
begin
|
||||||
|
addr = start_addr >> shft_addr_bits;
|
||||||
|
bytes_left = no_of_bytes;
|
||||||
|
|
||||||
|
`ifdef XLNX_INT_DBG
|
||||||
|
$display("[%0d] : %0s : Reading Register Map starting address (0x%0h) -> %0d bytes",$time, DISP_INT_INFO, start_addr,no_of_bytes );
|
||||||
|
`endif
|
||||||
|
|
||||||
|
/* Get first data ... if unaligned address */
|
||||||
|
get_data(addr,temp_data[max_burst_bits-1 : max_burst_bits- data_width]);
|
||||||
|
|
||||||
|
if(no_of_bytes < mem_width ) begin
|
||||||
|
repeat(max_burst_bytes - mem_width)
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
|
||||||
|
end else begin
|
||||||
|
bytes_left = bytes_left - mem_width;
|
||||||
|
addr = addr+1;
|
||||||
|
/* Got first data */
|
||||||
|
while (bytes_left > (mem_width-1) ) begin
|
||||||
|
temp_data = temp_data >> data_width;
|
||||||
|
get_data(addr,temp_data[max_burst_bits-1 : max_burst_bits-data_width]);
|
||||||
|
addr = addr+1;
|
||||||
|
bytes_left = bytes_left - mem_width;
|
||||||
|
end
|
||||||
|
|
||||||
|
/* Get last valid data in the burst*/
|
||||||
|
get_data(addr,temp_rd_data);
|
||||||
|
while(bytes_left > 0) begin
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
temp_data[max_burst_bits-1 : max_burst_bits-8] = temp_rd_data[7:0];
|
||||||
|
temp_rd_data = temp_rd_data >> 8;
|
||||||
|
bytes_left = bytes_left - 1;
|
||||||
|
end
|
||||||
|
/* align to the brst_byte length */
|
||||||
|
repeat(max_burst_bytes - no_of_bytes)
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
end
|
||||||
|
data = temp_data;
|
||||||
|
`ifdef XLNX_INT_DBG
|
||||||
|
$display("[%0d] : %0s : DONE -> Reading Register Map starting address (0x%0h), Data returned(0x%0h)",$time, DISP_INT_INFO, start_addr, data );
|
||||||
|
`endif
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
initial
|
||||||
|
begin
|
||||||
|
pre_load_rst_values(1);
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
@ -0,0 +1,118 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_regc.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Controller for Register Map Memory
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_regc(
|
||||||
|
rstn,
|
||||||
|
sw_clk,
|
||||||
|
|
||||||
|
/* Goes to port 0 of REG */
|
||||||
|
reg_rd_req_port0,
|
||||||
|
reg_rd_dv_port0,
|
||||||
|
reg_rd_addr_port0,
|
||||||
|
reg_rd_data_port0,
|
||||||
|
reg_rd_bytes_port0,
|
||||||
|
reg_rd_qos_port0,
|
||||||
|
|
||||||
|
|
||||||
|
/* Goes to port 1 of REG */
|
||||||
|
reg_rd_req_port1,
|
||||||
|
reg_rd_dv_port1,
|
||||||
|
reg_rd_addr_port1,
|
||||||
|
reg_rd_data_port1,
|
||||||
|
reg_rd_bytes_port1,
|
||||||
|
reg_rd_qos_port1
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
input rstn;
|
||||||
|
input sw_clk;
|
||||||
|
|
||||||
|
input reg_rd_req_port0;
|
||||||
|
output reg_rd_dv_port0;
|
||||||
|
input[31:0] reg_rd_addr_port0;
|
||||||
|
output[1023:0] reg_rd_data_port0;
|
||||||
|
input[7:0] reg_rd_bytes_port0;
|
||||||
|
input [3:0] reg_rd_qos_port0;
|
||||||
|
|
||||||
|
input reg_rd_req_port1;
|
||||||
|
output reg_rd_dv_port1;
|
||||||
|
input[31:0] reg_rd_addr_port1;
|
||||||
|
output[1023:0] reg_rd_data_port1;
|
||||||
|
input[7:0] reg_rd_bytes_port1;
|
||||||
|
input[3:0] reg_rd_qos_port1;
|
||||||
|
|
||||||
|
wire [3:0] rd_qos;
|
||||||
|
reg [1023:0] rd_data;
|
||||||
|
wire [31:0] rd_addr;
|
||||||
|
wire [7:0] rd_bytes;
|
||||||
|
reg rd_dv;
|
||||||
|
wire rd_req;
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_arb_rd reg_read_ports (
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
|
||||||
|
.qos1(reg_rd_qos_port0),
|
||||||
|
.qos2(reg_rd_qos_port1),
|
||||||
|
|
||||||
|
.prt_req1(reg_rd_req_port0),
|
||||||
|
.prt_req2(reg_rd_req_port1),
|
||||||
|
|
||||||
|
.prt_data1(reg_rd_data_port0),
|
||||||
|
.prt_data2(reg_rd_data_port1),
|
||||||
|
|
||||||
|
.prt_addr1(reg_rd_addr_port0),
|
||||||
|
.prt_addr2(reg_rd_addr_port1),
|
||||||
|
|
||||||
|
.prt_bytes1(reg_rd_bytes_port0),
|
||||||
|
.prt_bytes2(reg_rd_bytes_port1),
|
||||||
|
|
||||||
|
.prt_dv1(reg_rd_dv_port0),
|
||||||
|
.prt_dv2(reg_rd_dv_port1),
|
||||||
|
|
||||||
|
.prt_qos(rd_qos),
|
||||||
|
.prt_req(rd_req),
|
||||||
|
.prt_data(rd_data),
|
||||||
|
.prt_addr(rd_addr),
|
||||||
|
.prt_bytes(rd_bytes),
|
||||||
|
.prt_dv(rd_dv)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
processing_system7_bfm_v2_0_5_reg_map regm();
|
||||||
|
|
||||||
|
reg state;
|
||||||
|
always@(posedge sw_clk or negedge rstn)
|
||||||
|
begin
|
||||||
|
if(!rstn) begin
|
||||||
|
rd_dv <= 0;
|
||||||
|
state <= 0;
|
||||||
|
end else begin
|
||||||
|
case(state)
|
||||||
|
0:begin
|
||||||
|
state <= 0;
|
||||||
|
rd_dv <= 0;
|
||||||
|
if(rd_req) begin
|
||||||
|
regm.read_reg_mem(rd_data,rd_addr, rd_bytes);
|
||||||
|
rd_dv <= 1;
|
||||||
|
state <= 1;
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
1:begin
|
||||||
|
rd_dv <= 0;
|
||||||
|
state <= 0;
|
||||||
|
end
|
||||||
|
|
||||||
|
endcase
|
||||||
|
end /// if
|
||||||
|
end// always
|
||||||
|
|
||||||
|
endmodule
|
@ -0,0 +1,317 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_sparse_mem.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : Sparse Memory Model
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/*** WA for CR # 695818 ***/
|
||||||
|
`ifdef XILINX_SIMULATOR
|
||||||
|
`define XSIM_ISIM
|
||||||
|
`endif
|
||||||
|
`ifdef XILINX_ISIM
|
||||||
|
`define XSIM_ISIM
|
||||||
|
`endif
|
||||||
|
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
module processing_system7_bfm_v2_0_5_sparse_mem();
|
||||||
|
|
||||||
|
`include "processing_system7_bfm_v2_0_5_local_params.v"
|
||||||
|
|
||||||
|
parameter mem_size = 32'h4000_0000; /// 1GB mem size
|
||||||
|
parameter xsim_mem_size = 32'h1000_0000; ///256 MB mem size (x4 for XSIM/ISIM)
|
||||||
|
|
||||||
|
|
||||||
|
`ifdef XSIM_ISIM
|
||||||
|
reg [data_width-1:0] ddr_mem0 [0:(xsim_mem_size/mem_width)-1]; // 256MB mem
|
||||||
|
reg [data_width-1:0] ddr_mem1 [0:(xsim_mem_size/mem_width)-1]; // 256MB mem
|
||||||
|
reg [data_width-1:0] ddr_mem2 [0:(xsim_mem_size/mem_width)-1]; // 256MB mem
|
||||||
|
reg [data_width-1:0] ddr_mem3 [0:(xsim_mem_size/mem_width)-1]; // 256MB mem
|
||||||
|
`else
|
||||||
|
reg /*sparse*/ [data_width-1:0] ddr_mem [0:(mem_size/mem_width)-1]; // 'h10_0000 to 'h3FFF_FFFF - 1G mem
|
||||||
|
`endif
|
||||||
|
|
||||||
|
event mem_updated;
|
||||||
|
reg check_we;
|
||||||
|
reg [addr_width-1:0] check_up_add;
|
||||||
|
reg [data_width-1:0] updated_data;
|
||||||
|
|
||||||
|
/* preload memory from file */
|
||||||
|
task automatic pre_load_mem_from_file;
|
||||||
|
input [(max_chars*8)-1:0] file_name;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [int_width-1:0] no_of_bytes;
|
||||||
|
`ifdef XSIM_ISIM
|
||||||
|
case(start_addr[31:28])
|
||||||
|
4'd0 : $readmemh(file_name,ddr_mem0,start_addr>>shft_addr_bits);
|
||||||
|
4'd1 : $readmemh(file_name,ddr_mem1,start_addr>>shft_addr_bits);
|
||||||
|
4'd2 : $readmemh(file_name,ddr_mem2,start_addr>>shft_addr_bits);
|
||||||
|
4'd3 : $readmemh(file_name,ddr_mem3,start_addr>>shft_addr_bits);
|
||||||
|
endcase
|
||||||
|
`else
|
||||||
|
$readmemh(file_name,ddr_mem,start_addr>>shft_addr_bits);
|
||||||
|
`endif
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* preload memory with some random data */
|
||||||
|
task automatic pre_load_mem;
|
||||||
|
input [1:0] data_type;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [int_width-1:0] no_of_bytes;
|
||||||
|
integer i;
|
||||||
|
reg [addr_width-1:0] addr;
|
||||||
|
begin
|
||||||
|
addr = start_addr >> shft_addr_bits;
|
||||||
|
for (i = 0; i < no_of_bytes; i = i + mem_width) begin
|
||||||
|
case(data_type)
|
||||||
|
ALL_RANDOM : set_data(addr , $random);
|
||||||
|
ALL_ZEROS : set_data(addr , 32'h0000_0000);
|
||||||
|
ALL_ONES : set_data(addr , 32'hFFFF_FFFF);
|
||||||
|
default : set_data(addr , $random);
|
||||||
|
endcase
|
||||||
|
addr = addr+1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* wait for memory update at certain location */
|
||||||
|
task automatic wait_mem_update;
|
||||||
|
input[addr_width-1:0] address;
|
||||||
|
output[data_width-1:0] dataout;
|
||||||
|
begin
|
||||||
|
check_up_add = address >> shft_addr_bits;
|
||||||
|
check_we = 1;
|
||||||
|
@(mem_updated);
|
||||||
|
dataout = updated_data;
|
||||||
|
check_we = 0;
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* internal task to write data in memory */
|
||||||
|
task automatic set_data;
|
||||||
|
input [addr_width-1:0] addr;
|
||||||
|
input [data_width-1:0] data;
|
||||||
|
begin
|
||||||
|
if(check_we && (addr === check_up_add)) begin
|
||||||
|
updated_data = data;
|
||||||
|
-> mem_updated;
|
||||||
|
end
|
||||||
|
`ifdef XSIM_ISIM
|
||||||
|
case(addr[31:26])
|
||||||
|
6'd0 : ddr_mem0[addr[25:0]] = data;
|
||||||
|
6'd1 : ddr_mem1[addr[25:0]] = data;
|
||||||
|
6'd2 : ddr_mem2[addr[25:0]] = data;
|
||||||
|
6'd3 : ddr_mem3[addr[25:0]] = data;
|
||||||
|
endcase
|
||||||
|
`else
|
||||||
|
ddr_mem[addr] = data;
|
||||||
|
`endif
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* internal task to read data from memory */
|
||||||
|
task automatic get_data;
|
||||||
|
input [addr_width-1:0] addr;
|
||||||
|
output [data_width-1:0] data;
|
||||||
|
begin
|
||||||
|
`ifdef XSIM_ISIM
|
||||||
|
case(addr[31:26])
|
||||||
|
6'd0 : data = ddr_mem0[addr[25:0]];
|
||||||
|
6'd1 : data = ddr_mem1[addr[25:0]];
|
||||||
|
6'd2 : data = ddr_mem2[addr[25:0]];
|
||||||
|
6'd3 : data = ddr_mem3[addr[25:0]];
|
||||||
|
endcase
|
||||||
|
`else
|
||||||
|
data = ddr_mem[addr];
|
||||||
|
`endif
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* Write memory */
|
||||||
|
task write_mem;
|
||||||
|
input [max_burst_bits-1 :0] data;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [max_burst_bytes_width:0] no_of_bytes;
|
||||||
|
reg [addr_width-1:0] addr;
|
||||||
|
reg [max_burst_bits-1 :0] wr_temp_data;
|
||||||
|
reg [data_width-1:0] pre_pad_data,post_pad_data,temp_data;
|
||||||
|
integer bytes_left;
|
||||||
|
integer pre_pad_bytes;
|
||||||
|
integer post_pad_bytes;
|
||||||
|
begin
|
||||||
|
addr = start_addr >> shft_addr_bits;
|
||||||
|
wr_temp_data = data;
|
||||||
|
|
||||||
|
`ifdef XLNX_INT_DBG
|
||||||
|
$display("[%0d] : %0s : Writing DDR Memory starting address (0x%0h) with %0d bytes.\n Data (0x%0h)",$time, DISP_INT_INFO, start_addr, no_of_bytes, data);
|
||||||
|
`endif
|
||||||
|
|
||||||
|
temp_data = wr_temp_data[data_width-1:0];
|
||||||
|
bytes_left = no_of_bytes;
|
||||||
|
/* when the no. of bytes to be updated is less than mem_width */
|
||||||
|
if(bytes_left < mem_width) begin
|
||||||
|
/* first data word in the burst , if unaligned address, the adjust the wr_data accordingly for first write*/
|
||||||
|
if(start_addr[shft_addr_bits-1:0] > 0) begin
|
||||||
|
//temp_data = ddr_mem[addr];
|
||||||
|
get_data(addr,temp_data);
|
||||||
|
pre_pad_bytes = mem_width - start_addr[shft_addr_bits-1:0];
|
||||||
|
repeat(pre_pad_bytes) temp_data = temp_data << 8;
|
||||||
|
repeat(pre_pad_bytes) begin
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
temp_data[data_width-1:data_width-8] = wr_temp_data[7:0];
|
||||||
|
wr_temp_data = wr_temp_data >> 8;
|
||||||
|
end
|
||||||
|
bytes_left = bytes_left + pre_pad_bytes;
|
||||||
|
end
|
||||||
|
/* This is needed for post padding the data ...*/
|
||||||
|
post_pad_bytes = mem_width - bytes_left;
|
||||||
|
//post_pad_data = ddr_mem[addr];
|
||||||
|
get_data(addr,post_pad_data);
|
||||||
|
repeat(post_pad_bytes) temp_data = temp_data << 8;
|
||||||
|
repeat(bytes_left) post_pad_data = post_pad_data >> 8;
|
||||||
|
repeat(post_pad_bytes) begin
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
temp_data[data_width-1:data_width-8] = post_pad_data[7:0];
|
||||||
|
post_pad_data = post_pad_data >> 8;
|
||||||
|
end
|
||||||
|
//ddr_mem[addr] = temp_data;
|
||||||
|
set_data(addr,temp_data);
|
||||||
|
end else begin
|
||||||
|
/* first data word in the burst , if unaligned address, the adjust the wr_data accordingly for first write*/
|
||||||
|
if(start_addr[shft_addr_bits-1:0] > 0) begin
|
||||||
|
//temp_data = ddr_mem[addr];
|
||||||
|
get_data(addr,temp_data);
|
||||||
|
pre_pad_bytes = mem_width - start_addr[shft_addr_bits-1:0];
|
||||||
|
repeat(pre_pad_bytes) temp_data = temp_data << 8;
|
||||||
|
repeat(pre_pad_bytes) begin
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
temp_data[data_width-1:data_width-8] = wr_temp_data[7:0];
|
||||||
|
wr_temp_data = wr_temp_data >> 8;
|
||||||
|
bytes_left = bytes_left -1;
|
||||||
|
end
|
||||||
|
end else begin
|
||||||
|
wr_temp_data = wr_temp_data >> data_width;
|
||||||
|
bytes_left = bytes_left - mem_width;
|
||||||
|
end
|
||||||
|
/* first data word end */
|
||||||
|
//ddr_mem[addr] = temp_data;
|
||||||
|
set_data(addr,temp_data);
|
||||||
|
addr = addr + 1;
|
||||||
|
while(bytes_left > (mem_width-1) ) begin /// for unaliged address necessary to check for mem_wd-1 , accordingly we have to pad post bytes.
|
||||||
|
//ddr_mem[addr] = wr_temp_data[data_width-1:0];
|
||||||
|
set_data(addr,wr_temp_data[data_width-1:0]);
|
||||||
|
addr = addr+1;
|
||||||
|
wr_temp_data = wr_temp_data >> data_width;
|
||||||
|
bytes_left = bytes_left - mem_width;
|
||||||
|
end
|
||||||
|
|
||||||
|
//post_pad_data = ddr_mem[addr];
|
||||||
|
get_data(addr,post_pad_data);
|
||||||
|
post_pad_bytes = mem_width - bytes_left;
|
||||||
|
/* This is needed for last transfer in unaliged burst */
|
||||||
|
if(bytes_left > 0) begin
|
||||||
|
temp_data = wr_temp_data[data_width-1:0];
|
||||||
|
repeat(post_pad_bytes) temp_data = temp_data << 8;
|
||||||
|
repeat(bytes_left) post_pad_data = post_pad_data >> 8;
|
||||||
|
repeat(post_pad_bytes) begin
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
temp_data[data_width-1:data_width-8] = post_pad_data[7:0];
|
||||||
|
post_pad_data = post_pad_data >> 8;
|
||||||
|
end
|
||||||
|
//ddr_mem[addr] = temp_data;
|
||||||
|
set_data(addr,temp_data);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
`ifdef XLNX_INT_DBG $display("[%0d] : %0s : DONE -> Writing DDR Memory starting address (0x%0h)",$time, DISP_INT_INFO, start_addr );
|
||||||
|
`endif
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* read_memory */
|
||||||
|
task read_mem;
|
||||||
|
output[max_burst_bits-1 :0] data;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [max_burst_bytes_width :0] no_of_bytes;
|
||||||
|
integer i;
|
||||||
|
reg [addr_width-1:0] addr;
|
||||||
|
reg [data_width-1:0] temp_rd_data;
|
||||||
|
reg [max_burst_bits-1:0] temp_data;
|
||||||
|
integer pre_bytes;
|
||||||
|
integer bytes_left;
|
||||||
|
begin
|
||||||
|
addr = start_addr >> shft_addr_bits;
|
||||||
|
pre_bytes = start_addr[shft_addr_bits-1:0];
|
||||||
|
bytes_left = no_of_bytes;
|
||||||
|
|
||||||
|
`ifdef XLNX_INT_DBG
|
||||||
|
$display("[%0d] : %0s : Reading DDR Memory starting address (0x%0h) -> %0d bytes",$time, DISP_INT_INFO, start_addr,no_of_bytes );
|
||||||
|
`endif
|
||||||
|
|
||||||
|
/* Get first data ... if unaligned address */
|
||||||
|
//temp_data[(max_burst * max_data_burst)-1 : (max_burst * max_data_burst)- data_width] = ddr_mem[addr];
|
||||||
|
get_data(addr,temp_data[max_burst_bits-1 : max_burst_bits-data_width]);
|
||||||
|
|
||||||
|
if(no_of_bytes < mem_width ) begin
|
||||||
|
temp_data = temp_data >> (pre_bytes * 8);
|
||||||
|
repeat(max_burst_bytes - mem_width)
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
|
||||||
|
end else begin
|
||||||
|
bytes_left = bytes_left - (mem_width - pre_bytes);
|
||||||
|
addr = addr+1;
|
||||||
|
/* Got first data */
|
||||||
|
while (bytes_left > (mem_width-1) ) begin
|
||||||
|
temp_data = temp_data >> data_width;
|
||||||
|
//temp_data[(max_burst * max_data_burst)-1 : (max_burst * max_data_burst)- data_width] = ddr_mem[addr];
|
||||||
|
get_data(addr,temp_data[max_burst_bits-1 : max_burst_bits-data_width]);
|
||||||
|
addr = addr+1;
|
||||||
|
bytes_left = bytes_left - mem_width;
|
||||||
|
end
|
||||||
|
|
||||||
|
/* Get last valid data in the burst*/
|
||||||
|
//temp_rd_data = ddr_mem[addr];
|
||||||
|
get_data(addr,temp_rd_data);
|
||||||
|
while(bytes_left > 0) begin
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
temp_data[max_burst_bits-1 : max_burst_bits-8] = temp_rd_data[7:0];
|
||||||
|
temp_rd_data = temp_rd_data >> 8;
|
||||||
|
bytes_left = bytes_left - 1;
|
||||||
|
end
|
||||||
|
/* align to the brst_byte length */
|
||||||
|
repeat(max_burst_bytes - no_of_bytes)
|
||||||
|
temp_data = temp_data >> 8;
|
||||||
|
end
|
||||||
|
data = temp_data;
|
||||||
|
`ifdef XLNX_INT_DBG
|
||||||
|
$display("[%0d] : %0s : DONE -> Reading DDR Memory starting address (0x%0h), Data returned(0x%0h)",$time, DISP_INT_INFO, start_addr, data );
|
||||||
|
`endif
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
/* backdoor read to memory */
|
||||||
|
task peek_mem_to_file;
|
||||||
|
input [(max_chars*8)-1:0] file_name;
|
||||||
|
input [addr_width-1:0] start_addr;
|
||||||
|
input [int_width-1:0] no_of_bytes;
|
||||||
|
|
||||||
|
integer rd_fd;
|
||||||
|
integer bytes;
|
||||||
|
reg [addr_width-1:0] addr;
|
||||||
|
reg [data_width-1:0] rd_data;
|
||||||
|
begin
|
||||||
|
rd_fd = $fopen(file_name,"w");
|
||||||
|
bytes = no_of_bytes;
|
||||||
|
|
||||||
|
addr = start_addr >> shft_addr_bits;
|
||||||
|
while (bytes > 0) begin
|
||||||
|
get_data(addr,rd_data);
|
||||||
|
$fdisplayh(rd_fd,rd_data);
|
||||||
|
bytes = bytes - 4;
|
||||||
|
addr = addr + 1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
endtask
|
||||||
|
|
||||||
|
endmodule
|
@ -0,0 +1,443 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* File : processing_system7_bfm_v2_0_5_ssw_hp.v
|
||||||
|
*
|
||||||
|
* Date : 2012-11
|
||||||
|
*
|
||||||
|
* Description : SSW switch Model
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
`timescale 1ns/1ps
|
||||||
|
|
||||||
|
module processing_system7_bfm_v2_0_5_ssw_hp(
|
||||||
|
sw_clk,
|
||||||
|
rstn,
|
||||||
|
w_qos_hp0,
|
||||||
|
r_qos_hp0,
|
||||||
|
w_qos_hp1,
|
||||||
|
r_qos_hp1,
|
||||||
|
w_qos_hp2,
|
||||||
|
r_qos_hp2,
|
||||||
|
w_qos_hp3,
|
||||||
|
r_qos_hp3,
|
||||||
|
|
||||||
|
wr_ack_ddr_hp0,
|
||||||
|
wr_data_hp0,
|
||||||
|
wr_addr_hp0,
|
||||||
|
wr_bytes_hp0,
|
||||||
|
wr_dv_ddr_hp0,
|
||||||
|
rd_req_ddr_hp0,
|
||||||
|
rd_addr_hp0,
|
||||||
|
rd_bytes_hp0,
|
||||||
|
rd_data_ddr_hp0,
|
||||||
|
rd_dv_ddr_hp0,
|
||||||
|
|
||||||
|
rd_data_ocm_hp0,
|
||||||
|
wr_ack_ocm_hp0,
|
||||||
|
wr_dv_ocm_hp0,
|
||||||
|
rd_req_ocm_hp0,
|
||||||
|
rd_dv_ocm_hp0,
|
||||||
|
|
||||||
|
wr_ack_ddr_hp1,
|
||||||
|
wr_data_hp1,
|
||||||
|
wr_addr_hp1,
|
||||||
|
wr_bytes_hp1,
|
||||||
|
wr_dv_ddr_hp1,
|
||||||
|
rd_req_ddr_hp1,
|
||||||
|
rd_addr_hp1,
|
||||||
|
rd_bytes_hp1,
|
||||||
|
rd_data_ddr_hp1,
|
||||||
|
rd_data_ocm_hp1,
|
||||||
|
rd_dv_ddr_hp1,
|
||||||
|
|
||||||
|
wr_ack_ocm_hp1,
|
||||||
|
wr_dv_ocm_hp1,
|
||||||
|
rd_req_ocm_hp1,
|
||||||
|
rd_dv_ocm_hp1,
|
||||||
|
|
||||||
|
wr_ack_ddr_hp2,
|
||||||
|
wr_data_hp2,
|
||||||
|
wr_addr_hp2,
|
||||||
|
wr_bytes_hp2,
|
||||||
|
wr_dv_ddr_hp2,
|
||||||
|
rd_req_ddr_hp2,
|
||||||
|
rd_addr_hp2,
|
||||||
|
rd_bytes_hp2,
|
||||||
|
rd_data_ddr_hp2,
|
||||||
|
rd_data_ocm_hp2,
|
||||||
|
rd_dv_ddr_hp2,
|
||||||
|
|
||||||
|
wr_ack_ocm_hp2,
|
||||||
|
wr_dv_ocm_hp2,
|
||||||
|
rd_req_ocm_hp2,
|
||||||
|
rd_dv_ocm_hp2,
|
||||||
|
|
||||||
|
wr_ack_ddr_hp3,
|
||||||
|
wr_data_hp3,
|
||||||
|
wr_addr_hp3,
|
||||||
|
wr_bytes_hp3,
|
||||||
|
wr_dv_ddr_hp3,
|
||||||
|
rd_req_ddr_hp3,
|
||||||
|
rd_addr_hp3,
|
||||||
|
rd_bytes_hp3,
|
||||||
|
rd_data_ocm_hp3,
|
||||||
|
rd_data_ddr_hp3,
|
||||||
|
rd_dv_ddr_hp3,
|
||||||
|
|
||||||
|
wr_ack_ocm_hp3,
|
||||||
|
wr_dv_ocm_hp3,
|
||||||
|
rd_req_ocm_hp3,
|
||||||
|
rd_dv_ocm_hp3,
|
||||||
|
|
||||||
|
ddr_wr_ack0,
|
||||||
|
ddr_wr_dv0,
|
||||||
|
ddr_rd_req0,
|
||||||
|
ddr_rd_dv0,
|
||||||
|
ddr_rd_qos0,
|
||||||
|
ddr_wr_qos0,
|
||||||
|
|
||||||
|
ddr_wr_addr0,
|
||||||
|
ddr_wr_data0,
|
||||||
|
ddr_wr_bytes0,
|
||||||
|
ddr_rd_addr0,
|
||||||
|
ddr_rd_data0,
|
||||||
|
ddr_rd_bytes0,
|
||||||
|
|
||||||
|
ddr_wr_ack1,
|
||||||
|
ddr_wr_dv1,
|
||||||
|
ddr_rd_req1,
|
||||||
|
ddr_rd_dv1,
|
||||||
|
ddr_rd_qos1,
|
||||||
|
ddr_wr_qos1,
|
||||||
|
ddr_wr_addr1,
|
||||||
|
ddr_wr_data1,
|
||||||
|
ddr_wr_bytes1,
|
||||||
|
ddr_rd_addr1,
|
||||||
|
ddr_rd_data1,
|
||||||
|
ddr_rd_bytes1,
|
||||||
|
|
||||||
|
ocm_wr_ack,
|
||||||
|
ocm_wr_dv,
|
||||||
|
ocm_rd_req,
|
||||||
|
ocm_rd_dv,
|
||||||
|
|
||||||
|
ocm_wr_qos,
|
||||||
|
ocm_rd_qos,
|
||||||
|
ocm_wr_addr,
|
||||||
|
ocm_wr_data,
|
||||||
|
ocm_wr_bytes,
|
||||||
|
ocm_rd_addr,
|
||||||
|
ocm_rd_data,
|
||||||
|
ocm_rd_bytes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
input sw_clk;
|
||||||
|
input rstn;
|
||||||
|
input [3:0] w_qos_hp0;
|
||||||
|
input [3:0] r_qos_hp0;
|
||||||
|
input [3:0] w_qos_hp1;
|
||||||
|
input [3:0] r_qos_hp1;
|
||||||
|
input [3:0] w_qos_hp2;
|
||||||
|
input [3:0] r_qos_hp2;
|
||||||
|
input [3:0] w_qos_hp3;
|
||||||
|
input [3:0] r_qos_hp3;
|
||||||
|
|
||||||
|
output [3:0] ddr_rd_qos0;
|
||||||
|
output [3:0] ddr_wr_qos0;
|
||||||
|
output [3:0] ddr_rd_qos1;
|
||||||
|
output [3:0] ddr_wr_qos1;
|
||||||
|
output [3:0] ocm_wr_qos;
|
||||||
|
output [3:0] ocm_rd_qos;
|
||||||
|
|
||||||
|
output wr_ack_ddr_hp0;
|
||||||
|
input [1023:0] wr_data_hp0;
|
||||||
|
input [31:0] wr_addr_hp0;
|
||||||
|
input [7:0] wr_bytes_hp0;
|
||||||
|
output wr_dv_ddr_hp0;
|
||||||
|
|
||||||
|
input rd_req_ddr_hp0;
|
||||||
|
input [31:0] rd_addr_hp0;
|
||||||
|
input [7:0] rd_bytes_hp0;
|
||||||
|
output [1023:0] rd_data_ddr_hp0;
|
||||||
|
output rd_dv_ddr_hp0;
|
||||||
|
|
||||||
|
output wr_ack_ddr_hp1;
|
||||||
|
input [1023:0] wr_data_hp1;
|
||||||
|
input [31:0] wr_addr_hp1;
|
||||||
|
input [7:0] wr_bytes_hp1;
|
||||||
|
output wr_dv_ddr_hp1;
|
||||||
|
|
||||||
|
input rd_req_ddr_hp1;
|
||||||
|
input [31:0] rd_addr_hp1;
|
||||||
|
input [7:0] rd_bytes_hp1;
|
||||||
|
output [1023:0] rd_data_ddr_hp1;
|
||||||
|
output rd_dv_ddr_hp1;
|
||||||
|
|
||||||
|
output wr_ack_ddr_hp2;
|
||||||
|
input [1023:0] wr_data_hp2;
|
||||||
|
input [31:0] wr_addr_hp2;
|
||||||
|
input [7:0] wr_bytes_hp2;
|
||||||
|
output wr_dv_ddr_hp2;
|
||||||
|
|
||||||
|
input rd_req_ddr_hp2;
|
||||||
|
input [31:0] rd_addr_hp2;
|
||||||
|
input [7:0] rd_bytes_hp2;
|
||||||
|
output [1023:0] rd_data_ddr_hp2;
|
||||||
|
output rd_dv_ddr_hp2;
|
||||||
|
|
||||||
|
output wr_ack_ddr_hp3;
|
||||||
|
input [1023:0] wr_data_hp3;
|
||||||
|
input [31:0] wr_addr_hp3;
|
||||||
|
input [7:0] wr_bytes_hp3;
|
||||||
|
output wr_dv_ddr_hp3;
|
||||||
|
|
||||||
|
input rd_req_ddr_hp3;
|
||||||
|
input [31:0] rd_addr_hp3;
|
||||||
|
input [7:0] rd_bytes_hp3;
|
||||||
|
output [1023:0] rd_data_ddr_hp3;
|
||||||
|
output rd_dv_ddr_hp3;
|
||||||
|
|
||||||
|
input ddr_wr_ack0;
|
||||||
|
output ddr_wr_dv0;
|
||||||
|
output [31:0]ddr_wr_addr0;
|
||||||
|
output [1023:0]ddr_wr_data0;
|
||||||
|
output [7:0]ddr_wr_bytes0;
|
||||||
|
|
||||||
|
input ddr_rd_dv0;
|
||||||
|
input [1023:0] ddr_rd_data0;
|
||||||
|
output ddr_rd_req0;
|
||||||
|
output [31:0] ddr_rd_addr0;
|
||||||
|
output [7:0] ddr_rd_bytes0;
|
||||||
|
|
||||||
|
input ddr_wr_ack1;
|
||||||
|
output ddr_wr_dv1;
|
||||||
|
output [31:0]ddr_wr_addr1;
|
||||||
|
output [1023:0]ddr_wr_data1;
|
||||||
|
output [7:0]ddr_wr_bytes1;
|
||||||
|
|
||||||
|
input ddr_rd_dv1;
|
||||||
|
input [1023:0] ddr_rd_data1;
|
||||||
|
output ddr_rd_req1;
|
||||||
|
output [31:0] ddr_rd_addr1;
|
||||||
|
output [7:0] ddr_rd_bytes1;
|
||||||
|
|
||||||
|
output wr_ack_ocm_hp0;
|
||||||
|
input wr_dv_ocm_hp0;
|
||||||
|
input rd_req_ocm_hp0;
|
||||||
|
output rd_dv_ocm_hp0;
|
||||||
|
output [1023:0] rd_data_ocm_hp0;
|
||||||
|
|
||||||
|
output wr_ack_ocm_hp1;
|
||||||
|
input wr_dv_ocm_hp1;
|
||||||
|
input rd_req_ocm_hp1;
|
||||||
|
output rd_dv_ocm_hp1;
|
||||||
|
output [1023:0] rd_data_ocm_hp1;
|
||||||
|
|
||||||
|
output wr_ack_ocm_hp2;
|
||||||
|
input wr_dv_ocm_hp2;
|
||||||
|
input rd_req_ocm_hp2;
|
||||||
|
output rd_dv_ocm_hp2;
|
||||||
|
output [1023:0] rd_data_ocm_hp2;
|
||||||
|
|
||||||
|
output wr_ack_ocm_hp3;
|
||||||
|
input wr_dv_ocm_hp3;
|
||||||
|
input rd_req_ocm_hp3;
|
||||||
|
output rd_dv_ocm_hp3;
|
||||||
|
output [1023:0] rd_data_ocm_hp3;
|
||||||
|
|
||||||
|
input ocm_wr_ack;
|
||||||
|
output ocm_wr_dv;
|
||||||
|
output [31:0]ocm_wr_addr;
|
||||||
|
output [1023:0]ocm_wr_data;
|
||||||
|
output [7:0]ocm_wr_bytes;
|
||||||
|
|
||||||
|
input ocm_rd_dv;
|
||||||
|
input [1023:0] ocm_rd_data;
|
||||||
|
output ocm_rd_req;
|
||||||
|
output [31:0] ocm_rd_addr;
|
||||||
|
output [7:0] ocm_rd_bytes;
|
||||||
|
|
||||||
|
/* FOR DDR */
|
||||||
|
processing_system7_bfm_v2_0_5_arb_hp0_1 ddr_hp01 (
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
.rstn(rstn),
|
||||||
|
.w_qos_hp0(w_qos_hp0),
|
||||||
|
.r_qos_hp0(r_qos_hp0),
|
||||||
|
.w_qos_hp1(w_qos_hp1),
|
||||||
|
.r_qos_hp1(r_qos_hp1),
|
||||||
|
|
||||||
|
.wr_ack_ddr_hp0(wr_ack_ddr_hp0),
|
||||||
|
.wr_data_hp0(wr_data_hp0),
|
||||||
|
.wr_addr_hp0(wr_addr_hp0),
|
||||||
|
.wr_bytes_hp0(wr_bytes_hp0),
|
||||||
|
.wr_dv_ddr_hp0(wr_dv_ddr_hp0),
|
||||||
|
.rd_req_ddr_hp0(rd_req_ddr_hp0),
|
||||||
|
.rd_addr_hp0(rd_addr_hp0),
|
||||||
|
.rd_bytes_hp0(rd_bytes_hp0),
|
||||||
|
.rd_data_ddr_hp0(rd_data_ddr_hp0),
|
||||||
|
.rd_dv_ddr_hp0(rd_dv_ddr_hp0),
|
||||||
|
|
||||||
|
.wr_ack_ddr_hp1(wr_ack_ddr_hp1),
|
||||||
|
.wr_data_hp1(wr_data_hp1),
|
||||||
|
.wr_addr_hp1(wr_addr_hp1),
|
||||||
|
.wr_bytes_hp1(wr_bytes_hp1),
|
||||||
|
.wr_dv_ddr_hp1(wr_dv_ddr_hp1),
|
||||||
|
.rd_req_ddr_hp1(rd_req_ddr_hp1),
|
||||||
|
.rd_addr_hp1(rd_addr_hp1),
|
||||||
|
.rd_bytes_hp1(rd_bytes_hp1),
|
||||||
|
.rd_data_ddr_hp1(rd_data_ddr_hp1),
|
||||||
|
.rd_dv_ddr_hp1(rd_dv_ddr_hp1),
|
||||||
|
|
||||||
|
.ddr_wr_ack(ddr_wr_ack0),
|
||||||
|
.ddr_wr_dv(ddr_wr_dv0),
|
||||||
|
.ddr_rd_req(ddr_rd_req0),
|
||||||
|
.ddr_rd_dv(ddr_rd_dv0),
|
||||||
|
.ddr_rd_qos(ddr_rd_qos0),
|
||||||
|
.ddr_wr_qos(ddr_wr_qos0),
|
||||||
|
.ddr_wr_addr(ddr_wr_addr0),
|
||||||
|
.ddr_wr_data(ddr_wr_data0),
|
||||||
|
.ddr_wr_bytes(ddr_wr_bytes0),
|
||||||
|
.ddr_rd_addr(ddr_rd_addr0),
|
||||||
|
.ddr_rd_data(ddr_rd_data0),
|
||||||
|
.ddr_rd_bytes(ddr_rd_bytes0)
|
||||||
|
);
|
||||||
|
|
||||||
|
/* FOR DDR */
|
||||||
|
processing_system7_bfm_v2_0_5_arb_hp2_3 ddr_hp23 (
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
.rstn(rstn),
|
||||||
|
.w_qos_hp2(w_qos_hp2),
|
||||||
|
.r_qos_hp2(r_qos_hp2),
|
||||||
|
.w_qos_hp3(w_qos_hp3),
|
||||||
|
.r_qos_hp3(r_qos_hp3),
|
||||||
|
|
||||||
|
.wr_ack_ddr_hp2(wr_ack_ddr_hp2),
|
||||||
|
.wr_data_hp2(wr_data_hp2),
|
||||||
|
.wr_addr_hp2(wr_addr_hp2),
|
||||||
|
.wr_bytes_hp2(wr_bytes_hp2),
|
||||||
|
.wr_dv_ddr_hp2(wr_dv_ddr_hp2),
|
||||||
|
.rd_req_ddr_hp2(rd_req_ddr_hp2),
|
||||||
|
.rd_addr_hp2(rd_addr_hp2),
|
||||||
|
.rd_bytes_hp2(rd_bytes_hp2),
|
||||||
|
.rd_data_ddr_hp2(rd_data_ddr_hp2),
|
||||||
|
.rd_dv_ddr_hp2(rd_dv_ddr_hp2),
|
||||||
|
|
||||||
|
.wr_ack_ddr_hp3(wr_ack_ddr_hp3),
|
||||||
|
.wr_data_hp3(wr_data_hp3),
|
||||||
|
.wr_addr_hp3(wr_addr_hp3),
|
||||||
|
.wr_bytes_hp3(wr_bytes_hp3),
|
||||||
|
.wr_dv_ddr_hp3(wr_dv_ddr_hp3),
|
||||||
|
.rd_req_ddr_hp3(rd_req_ddr_hp3),
|
||||||
|
.rd_addr_hp3(rd_addr_hp3),
|
||||||
|
.rd_bytes_hp3(rd_bytes_hp3),
|
||||||
|
.rd_data_ddr_hp3(rd_data_ddr_hp3),
|
||||||
|
.rd_dv_ddr_hp3(rd_dv_ddr_hp3),
|
||||||
|
|
||||||
|
.ddr_wr_ack(ddr_wr_ack1),
|
||||||
|
.ddr_wr_dv(ddr_wr_dv1),
|
||||||
|
.ddr_rd_req(ddr_rd_req1),
|
||||||
|
.ddr_rd_dv(ddr_rd_dv1),
|
||||||
|
.ddr_rd_qos(ddr_rd_qos1),
|
||||||
|
.ddr_wr_qos(ddr_wr_qos1),
|
||||||
|
|
||||||
|
.ddr_wr_addr(ddr_wr_addr1),
|
||||||
|
.ddr_wr_data(ddr_wr_data1),
|
||||||
|
.ddr_wr_bytes(ddr_wr_bytes1),
|
||||||
|
.ddr_rd_addr(ddr_rd_addr1),
|
||||||
|
.ddr_rd_data(ddr_rd_data1),
|
||||||
|
.ddr_rd_bytes(ddr_rd_bytes1)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/* FOR OCM_WR */
|
||||||
|
processing_system7_bfm_v2_0_5_arb_wr_4 ocm_wr_hp(
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
|
||||||
|
.qos1(w_qos_hp0),
|
||||||
|
.qos2(w_qos_hp1),
|
||||||
|
.qos3(w_qos_hp2),
|
||||||
|
.qos4(w_qos_hp3),
|
||||||
|
|
||||||
|
.prt_dv1(wr_dv_ocm_hp0),
|
||||||
|
.prt_dv2(wr_dv_ocm_hp1),
|
||||||
|
.prt_dv3(wr_dv_ocm_hp2),
|
||||||
|
.prt_dv4(wr_dv_ocm_hp3),
|
||||||
|
|
||||||
|
.prt_data1(wr_data_hp0),
|
||||||
|
.prt_data2(wr_data_hp1),
|
||||||
|
.prt_data3(wr_data_hp2),
|
||||||
|
.prt_data4(wr_data_hp3),
|
||||||
|
|
||||||
|
.prt_addr1(wr_addr_hp0),
|
||||||
|
.prt_addr2(wr_addr_hp1),
|
||||||
|
.prt_addr3(wr_addr_hp2),
|
||||||
|
.prt_addr4(wr_addr_hp3),
|
||||||
|
|
||||||
|
.prt_bytes1(wr_bytes_hp0),
|
||||||
|
.prt_bytes2(wr_bytes_hp1),
|
||||||
|
.prt_bytes3(wr_bytes_hp2),
|
||||||
|
.prt_bytes4(wr_bytes_hp3),
|
||||||
|
|
||||||
|
.prt_ack1(wr_ack_ocm_hp0),
|
||||||
|
.prt_ack2(wr_ack_ocm_hp1),
|
||||||
|
.prt_ack3(wr_ack_ocm_hp2),
|
||||||
|
.prt_ack4(wr_ack_ocm_hp3),
|
||||||
|
|
||||||
|
.prt_qos(ocm_wr_qos),
|
||||||
|
.prt_req(ocm_wr_dv),
|
||||||
|
.prt_data(ocm_wr_data),
|
||||||
|
.prt_addr(ocm_wr_addr),
|
||||||
|
.prt_bytes(ocm_wr_bytes),
|
||||||
|
.prt_ack(ocm_wr_ack)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
/* FOR OCM_RD */
|
||||||
|
processing_system7_bfm_v2_0_5_arb_rd_4 ocm_rd_hp(
|
||||||
|
.rstn(rstn),
|
||||||
|
.sw_clk(sw_clk),
|
||||||
|
|
||||||
|
.qos1(r_qos_hp0),
|
||||||
|
.qos2(r_qos_hp1),
|
||||||
|
.qos3(r_qos_hp2),
|
||||||
|
.qos4(r_qos_hp3),
|
||||||
|
|
||||||
|
.prt_req1(rd_req_ocm_hp0),
|
||||||
|
.prt_req2(rd_req_ocm_hp1),
|
||||||
|
.prt_req3(rd_req_ocm_hp2),
|
||||||
|
.prt_req4(rd_req_ocm_hp3),
|
||||||
|
|
||||||
|
.prt_data1(rd_data_ocm_hp0),
|
||||||
|
.prt_data2(rd_data_ocm_hp1),
|
||||||
|
.prt_data3(rd_data_ocm_hp2),
|
||||||
|
.prt_data4(rd_data_ocm_hp3),
|
||||||
|
|
||||||
|
.prt_addr1(rd_addr_hp0),
|
||||||
|
.prt_addr2(rd_addr_hp1),
|
||||||
|
.prt_addr3(rd_addr_hp2),
|
||||||
|
.prt_addr4(rd_addr_hp3),
|
||||||
|
|
||||||
|
.prt_bytes1(rd_bytes_hp0),
|
||||||
|
.prt_bytes2(rd_bytes_hp1),
|
||||||
|
.prt_bytes3(rd_bytes_hp2),
|
||||||
|
.prt_bytes4(rd_bytes_hp3),
|
||||||
|
|
||||||
|
.prt_dv1(rd_dv_ocm_hp0),
|
||||||
|
.prt_dv2(rd_dv_ocm_hp1),
|
||||||
|
.prt_dv3(rd_dv_ocm_hp2),
|
||||||
|
.prt_dv4(rd_dv_ocm_hp3),
|
||||||
|
|
||||||
|
.prt_qos(ocm_rd_qos),
|
||||||
|
.prt_req(ocm_rd_req),
|
||||||
|
.prt_data(ocm_rd_data),
|
||||||
|
.prt_addr(ocm_rd_addr),
|
||||||
|
.prt_bytes(ocm_rd_bytes),
|
||||||
|
.prt_dv(ocm_rd_dv)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
endmodule
|
BIN
Miz_sys/Miz_sys.ip_user_files/mem_init_files/libps7.dll
Normal file
BIN
Miz_sys/Miz_sys.ip_user_files/mem_init_files/libps7.dll
Normal file
Binary file not shown.
BIN
Miz_sys/Miz_sys.ip_user_files/mem_init_files/libps7.so
Normal file
BIN
Miz_sys/Miz_sys.ip_user_files/mem_init_files/libps7.so
Normal file
Binary file not shown.
BIN
Miz_sys/Miz_sys.ip_user_files/mem_init_files/libremoteport.dll
Normal file
BIN
Miz_sys/Miz_sys.ip_user_files/mem_init_files/libremoteport.dll
Normal file
Binary file not shown.
BIN
Miz_sys/Miz_sys.ip_user_files/mem_init_files/libremoteport.so
Normal file
BIN
Miz_sys/Miz_sys.ip_user_files/mem_init_files/libremoteport.so
Normal file
Binary file not shown.
137
Miz_sys/Miz_sys.ip_user_files/mem_init_files/ps7_init.h
Normal file
137
Miz_sys/Miz_sys.ip_user_files/mem_init_files/ps7_init.h
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* (c) Copyright 2010-2014 Xilinx, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||||
|
* software and associated documentation files (the "Software"), to deal in the Software
|
||||||
|
* without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||||
|
* publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||||
|
* persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or
|
||||||
|
* substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* Use of the Software is limited solely to applications: (a) running on a Xilinx device, or
|
||||||
|
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||||
|
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* Except as contained in this notice, the name of the Xilinx shall not be used in advertising or
|
||||||
|
* otherwise to promote the sale, use or other dealings in this Software without prior written
|
||||||
|
* authorization from Xilinx.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
/****************************************************************************/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @file ps7_init.h
|
||||||
|
*
|
||||||
|
* This file can be included in FSBL code
|
||||||
|
* to get prototype of ps7_init() function
|
||||||
|
* and error codes
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//typedef unsigned int u32;
|
||||||
|
|
||||||
|
|
||||||
|
/** do we need to make this name more unique ? **/
|
||||||
|
//extern u32 ps7_init_data[];
|
||||||
|
extern unsigned long * ps7_ddr_init_data;
|
||||||
|
extern unsigned long * ps7_mio_init_data;
|
||||||
|
extern unsigned long * ps7_pll_init_data;
|
||||||
|
extern unsigned long * ps7_clock_init_data;
|
||||||
|
extern unsigned long * ps7_peripherals_init_data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define OPCODE_EXIT 0U
|
||||||
|
#define OPCODE_CLEAR 1U
|
||||||
|
#define OPCODE_WRITE 2U
|
||||||
|
#define OPCODE_MASKWRITE 3U
|
||||||
|
#define OPCODE_MASKPOLL 4U
|
||||||
|
#define OPCODE_MASKDELAY 5U
|
||||||
|
#define NEW_PS7_ERR_CODE 1
|
||||||
|
|
||||||
|
/* Encode number of arguments in last nibble */
|
||||||
|
#define EMIT_EXIT() ( (OPCODE_EXIT << 4 ) | 0 )
|
||||||
|
#define EMIT_CLEAR(addr) ( (OPCODE_CLEAR << 4 ) | 1 ) , addr
|
||||||
|
#define EMIT_WRITE(addr,val) ( (OPCODE_WRITE << 4 ) | 2 ) , addr, val
|
||||||
|
#define EMIT_MASKWRITE(addr,mask,val) ( (OPCODE_MASKWRITE << 4 ) | 3 ) , addr, mask, val
|
||||||
|
#define EMIT_MASKPOLL(addr,mask) ( (OPCODE_MASKPOLL << 4 ) | 2 ) , addr, mask
|
||||||
|
#define EMIT_MASKDELAY(addr,mask) ( (OPCODE_MASKDELAY << 4 ) | 2 ) , addr, mask
|
||||||
|
|
||||||
|
/* Returns codes of PS7_Init */
|
||||||
|
#define PS7_INIT_SUCCESS (0) // 0 is success in good old C
|
||||||
|
#define PS7_INIT_CORRUPT (1) // 1 the data is corrupted, and slcr reg are in corrupted state now
|
||||||
|
#define PS7_INIT_TIMEOUT (2) // 2 when a poll operation timed out
|
||||||
|
#define PS7_POLL_FAILED_DDR_INIT (3) // 3 when a poll operation timed out for ddr init
|
||||||
|
#define PS7_POLL_FAILED_DMA (4) // 4 when a poll operation timed out for dma done bit
|
||||||
|
#define PS7_POLL_FAILED_PLL (5) // 5 when a poll operation timed out for pll sequence init
|
||||||
|
|
||||||
|
|
||||||
|
/* Silicon Versions */
|
||||||
|
#define PCW_SILICON_VERSION_1 0
|
||||||
|
#define PCW_SILICON_VERSION_2 1
|
||||||
|
#define PCW_SILICON_VERSION_3 2
|
||||||
|
|
||||||
|
/* This flag to be used by FSBL to check whether ps7_post_config() proc exixts */
|
||||||
|
#define PS7_POST_CONFIG
|
||||||
|
|
||||||
|
/* Freq of all peripherals */
|
||||||
|
|
||||||
|
#define APU_FREQ 666666687
|
||||||
|
#define DDR_FREQ 533333374
|
||||||
|
#define DCI_FREQ 10158730
|
||||||
|
#define QSPI_FREQ 200000000
|
||||||
|
#define SMC_FREQ 10000000
|
||||||
|
#define ENET0_FREQ 125000000
|
||||||
|
#define ENET1_FREQ 10000000
|
||||||
|
#define USB0_FREQ 60000000
|
||||||
|
#define USB1_FREQ 60000000
|
||||||
|
#define SDIO_FREQ 100000000
|
||||||
|
#define UART_FREQ 100000000
|
||||||
|
#define SPI_FREQ 10000000
|
||||||
|
#define I2C_FREQ 111111115
|
||||||
|
#define WDT_FREQ 111111115
|
||||||
|
#define TTC_FREQ 50000000
|
||||||
|
#define CAN_FREQ 10000000
|
||||||
|
#define PCAP_FREQ 200000000
|
||||||
|
#define TPIU_FREQ 200000000
|
||||||
|
#define FPGA0_FREQ 50000000
|
||||||
|
#define FPGA1_FREQ 10000000
|
||||||
|
#define FPGA2_FREQ 10000000
|
||||||
|
#define FPGA3_FREQ 10000000
|
||||||
|
|
||||||
|
|
||||||
|
/* For delay calculation using global registers*/
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_L32 0xF8F00200
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_U32 0xF8F00204
|
||||||
|
#define SCU_GLOBAL_TIMER_CONTROL 0xF8F00208
|
||||||
|
#define SCU_GLOBAL_TIMER_AUTO_INC 0xF8F00218
|
||||||
|
|
||||||
|
int ps7_config( unsigned long*);
|
||||||
|
int ps7_init();
|
||||||
|
int ps7_post_config();
|
||||||
|
int ps7_debug();
|
||||||
|
char* getPS7MessageInfo(unsigned key);
|
||||||
|
|
||||||
|
void perf_start_clock(void);
|
||||||
|
void perf_disable_clock(void);
|
||||||
|
void perf_reset_clock(void);
|
||||||
|
void perf_reset_and_start_timer();
|
||||||
|
int get_number_of_cycles_for_delay(unsigned int delay);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
137694
Miz_sys/Miz_sys.ip_user_files/mem_init_files/ps7_init.html
Normal file
137694
Miz_sys/Miz_sys.ip_user_files/mem_init_files/ps7_init.html
Normal file
File diff suppressed because it is too large
Load Diff
832
Miz_sys/Miz_sys.ip_user_files/mem_init_files/ps7_init.tcl
Normal file
832
Miz_sys/Miz_sys.ip_user_files/mem_init_files/ps7_init.tcl
Normal file
@ -0,0 +1,832 @@
|
|||||||
|
proc ps7_pll_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000110 0x003FFFF0 0x000FA220
|
||||||
|
mask_write 0XF8000100 0x0007F000 0x00028000
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000120 0x1F003F30 0x1F000200
|
||||||
|
mask_write 0XF8000114 0x003FFFF0 0x0012C220
|
||||||
|
mask_write 0XF8000104 0x0007F000 0x00020000
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000002
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000124 0xFFF00003 0x0C200003
|
||||||
|
mask_write 0XF8000118 0x003FFFF0 0x001452C0
|
||||||
|
mask_write 0XF8000108 0x0007F000 0x0001E000
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000004
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_clock_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000128 0x03F03F01 0x00700F01
|
||||||
|
mask_write 0XF8000138 0x00000011 0x00000001
|
||||||
|
mask_write 0XF8000140 0x03F03F71 0x00100801
|
||||||
|
mask_write 0XF800014C 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000150 0x00003F33 0x00000A01
|
||||||
|
mask_write 0XF8000154 0x00003F33 0x00000A02
|
||||||
|
mask_write 0XF8000168 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000170 0x03F03F30 0x00400500
|
||||||
|
mask_write 0XF80001C4 0x00000001 0x00000001
|
||||||
|
mask_write 0XF800012C 0x01FFCCCD 0x01EC044D
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_ddr_init_data_3_0 {} {
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000080
|
||||||
|
mask_write 0XF8006004 0x0007FFFF 0x00001081
|
||||||
|
mask_write 0XF8006008 0x03FFFFFF 0x03C0780F
|
||||||
|
mask_write 0XF800600C 0x03FFFFFF 0x02001001
|
||||||
|
mask_write 0XF8006010 0x03FFFFFF 0x00014001
|
||||||
|
mask_write 0XF8006014 0x001FFFFF 0x0004281A
|
||||||
|
mask_write 0XF8006018 0xF7FFFFFF 0x44E458D2
|
||||||
|
mask_write 0XF800601C 0xFFFFFFFF 0x720238E5
|
||||||
|
mask_write 0XF8006020 0x7FDFFFFC 0x270872D0
|
||||||
|
mask_write 0XF8006024 0x0FFFFFC3 0x00000000
|
||||||
|
mask_write 0XF8006028 0x00003FFF 0x00002007
|
||||||
|
mask_write 0XF800602C 0xFFFFFFFF 0x00000008
|
||||||
|
mask_write 0XF8006030 0xFFFFFFFF 0x00040930
|
||||||
|
mask_write 0XF8006034 0x13FF3FFF 0x000116D4
|
||||||
|
mask_write 0XF8006038 0x00000003 0x00000000
|
||||||
|
mask_write 0XF800603C 0x000FFFFF 0x00000777
|
||||||
|
mask_write 0XF8006040 0xFFFFFFFF 0xFFF00000
|
||||||
|
mask_write 0XF8006044 0x0FFFFFFF 0x0F666666
|
||||||
|
mask_write 0XF8006048 0x0003F03F 0x0003C008
|
||||||
|
mask_write 0XF8006050 0xFF0F8FFF 0x77010800
|
||||||
|
mask_write 0XF8006058 0x00010000 0x00000000
|
||||||
|
mask_write 0XF800605C 0x0000FFFF 0x00005003
|
||||||
|
mask_write 0XF8006060 0x000017FF 0x0000003E
|
||||||
|
mask_write 0XF8006064 0x00021FE0 0x00020000
|
||||||
|
mask_write 0XF8006068 0x03FFFFFF 0x00284141
|
||||||
|
mask_write 0XF800606C 0x0000FFFF 0x00001610
|
||||||
|
mask_write 0XF8006078 0x03FFFFFF 0x00466111
|
||||||
|
mask_write 0XF800607C 0x000FFFFF 0x00032222
|
||||||
|
mask_write 0XF80060A4 0xFFFFFFFF 0x10200802
|
||||||
|
mask_write 0XF80060A8 0x0FFFFFFF 0x0690CB73
|
||||||
|
mask_write 0XF80060AC 0x000001FF 0x000001FE
|
||||||
|
mask_write 0XF80060B0 0x1FFFFFFF 0x1CFFFFFF
|
||||||
|
mask_write 0XF80060B4 0x00000200 0x00000200
|
||||||
|
mask_write 0XF80060B8 0x01FFFFFF 0x00200066
|
||||||
|
mask_write 0XF80060C4 0x00000003 0x00000000
|
||||||
|
mask_write 0XF80060C8 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF80060DC 0x00000001 0x00000000
|
||||||
|
mask_write 0XF80060F0 0x0000FFFF 0x00000000
|
||||||
|
mask_write 0XF80060F4 0x0000000F 0x00000008
|
||||||
|
mask_write 0XF8006114 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF8006118 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF800611C 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF8006120 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF8006124 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF800612C 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006130 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006134 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006138 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006140 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006144 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006148 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF800614C 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006154 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006158 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF800615C 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006160 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006168 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800616C 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006170 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006174 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800617C 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006180 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006184 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006188 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006190 0x6FFFFEFE 0x00040080
|
||||||
|
mask_write 0XF8006194 0x000FFFFF 0x0001FC82
|
||||||
|
mask_write 0XF8006204 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF8006208 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF800620C 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF8006210 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF8006214 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF8006218 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF800621C 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006220 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006224 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF80062A8 0x00000FF5 0x00000000
|
||||||
|
mask_write 0XF80062AC 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF80062B0 0x003FFFFF 0x00005125
|
||||||
|
mask_write 0XF80062B4 0x0003FFFF 0x000012A8
|
||||||
|
mask_poll 0XF8000B74 0x00002000
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000081
|
||||||
|
mask_poll 0XF8006054 0x00000007
|
||||||
|
}
|
||||||
|
proc ps7_mio_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B40 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B44 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B48 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B4C 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B50 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B54 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B58 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B5C 0xFFFFFFFF 0x0018C61C
|
||||||
|
mask_write 0XF8000B60 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B64 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B68 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B6C 0x00007FFF 0x00000260
|
||||||
|
mask_write 0XF8000B70 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000020
|
||||||
|
mask_write 0XF8000B70 0x07FEFFFF 0x00000823
|
||||||
|
mask_write 0XF8000700 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000704 0x00003FFF 0x00001602
|
||||||
|
mask_write 0XF8000708 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800070C 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000710 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000714 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000718 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800071C 0x00003FFF 0x00000600
|
||||||
|
mask_write 0XF8000720 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000724 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000728 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800072C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000730 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000734 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000738 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800073C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000740 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000744 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000748 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF800074C 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000750 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000754 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000758 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800075C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000760 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000764 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000768 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800076C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000770 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000774 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000778 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800077C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000780 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000784 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000788 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800078C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000790 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000794 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000798 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800079C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007A0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A8 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007AC 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007BC 0x00003F01 0x00001201
|
||||||
|
mask_write 0XF80007C0 0x00003FFF 0x000012E0
|
||||||
|
mask_write 0XF80007C4 0x00003FFF 0x000012E1
|
||||||
|
mask_write 0XF80007C8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007CC 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007D0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007D4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF8000830 0x003F003F 0x002F0037
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_peripherals_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B48 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B4C 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B50 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B54 0x00000180 0x00000180
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
mask_write 0XE0001034 0x000000FF 0x00000006
|
||||||
|
mask_write 0XE0001018 0x0000FFFF 0x0000007C
|
||||||
|
mask_write 0XE0001000 0x000001FF 0x00000017
|
||||||
|
mask_write 0XE0001004 0x000003FF 0x00000020
|
||||||
|
mask_write 0XE000D000 0x00080000 0x00080000
|
||||||
|
mask_write 0XF8007000 0x20000000 0x00000000
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
}
|
||||||
|
proc ps7_post_config_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000900 0x0000000F 0x0000000F
|
||||||
|
mask_write 0XF8000240 0xFFFFFFFF 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_debug_3_0 {} {
|
||||||
|
mwr -force 0XF8898FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8899FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8809FB0 0xC5ACCE55
|
||||||
|
}
|
||||||
|
proc ps7_pll_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000110 0x003FFFF0 0x000FA220
|
||||||
|
mask_write 0XF8000100 0x0007F000 0x00028000
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000120 0x1F003F30 0x1F000200
|
||||||
|
mask_write 0XF8000114 0x003FFFF0 0x0012C220
|
||||||
|
mask_write 0XF8000104 0x0007F000 0x00020000
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000002
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000124 0xFFF00003 0x0C200003
|
||||||
|
mask_write 0XF8000118 0x003FFFF0 0x001452C0
|
||||||
|
mask_write 0XF8000108 0x0007F000 0x0001E000
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000004
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_clock_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000128 0x03F03F01 0x00700F01
|
||||||
|
mask_write 0XF8000138 0x00000011 0x00000001
|
||||||
|
mask_write 0XF8000140 0x03F03F71 0x00100801
|
||||||
|
mask_write 0XF800014C 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000150 0x00003F33 0x00000A01
|
||||||
|
mask_write 0XF8000154 0x00003F33 0x00000A02
|
||||||
|
mask_write 0XF8000168 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000170 0x03F03F30 0x00400500
|
||||||
|
mask_write 0XF80001C4 0x00000001 0x00000001
|
||||||
|
mask_write 0XF800012C 0x01FFCCCD 0x01EC044D
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_ddr_init_data_2_0 {} {
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000080
|
||||||
|
mask_write 0XF8006004 0x1FFFFFFF 0x00081081
|
||||||
|
mask_write 0XF8006008 0x03FFFFFF 0x03C0780F
|
||||||
|
mask_write 0XF800600C 0x03FFFFFF 0x02001001
|
||||||
|
mask_write 0XF8006010 0x03FFFFFF 0x00014001
|
||||||
|
mask_write 0XF8006014 0x001FFFFF 0x0004281A
|
||||||
|
mask_write 0XF8006018 0xF7FFFFFF 0x44E458D2
|
||||||
|
mask_write 0XF800601C 0xFFFFFFFF 0x720238E5
|
||||||
|
mask_write 0XF8006020 0xFFFFFFFC 0x272872D0
|
||||||
|
mask_write 0XF8006024 0x0FFFFFFF 0x0000003C
|
||||||
|
mask_write 0XF8006028 0x00003FFF 0x00002007
|
||||||
|
mask_write 0XF800602C 0xFFFFFFFF 0x00000008
|
||||||
|
mask_write 0XF8006030 0xFFFFFFFF 0x00040930
|
||||||
|
mask_write 0XF8006034 0x13FF3FFF 0x000116D4
|
||||||
|
mask_write 0XF8006038 0x00001FC3 0x00000000
|
||||||
|
mask_write 0XF800603C 0x000FFFFF 0x00000777
|
||||||
|
mask_write 0XF8006040 0xFFFFFFFF 0xFFF00000
|
||||||
|
mask_write 0XF8006044 0x0FFFFFFF 0x0F666666
|
||||||
|
mask_write 0XF8006048 0x3FFFFFFF 0x0003C248
|
||||||
|
mask_write 0XF8006050 0xFF0F8FFF 0x77010800
|
||||||
|
mask_write 0XF8006058 0x0001FFFF 0x00000101
|
||||||
|
mask_write 0XF800605C 0x0000FFFF 0x00005003
|
||||||
|
mask_write 0XF8006060 0x000017FF 0x0000003E
|
||||||
|
mask_write 0XF8006064 0x00021FE0 0x00020000
|
||||||
|
mask_write 0XF8006068 0x03FFFFFF 0x00284141
|
||||||
|
mask_write 0XF800606C 0x0000FFFF 0x00001610
|
||||||
|
mask_write 0XF8006078 0x03FFFFFF 0x00466111
|
||||||
|
mask_write 0XF800607C 0x000FFFFF 0x00032222
|
||||||
|
mask_write 0XF80060A0 0x00FFFFFF 0x00008000
|
||||||
|
mask_write 0XF80060A4 0xFFFFFFFF 0x10200802
|
||||||
|
mask_write 0XF80060A8 0x0FFFFFFF 0x0690CB73
|
||||||
|
mask_write 0XF80060AC 0x000001FF 0x000001FE
|
||||||
|
mask_write 0XF80060B0 0x1FFFFFFF 0x1CFFFFFF
|
||||||
|
mask_write 0XF80060B4 0x000007FF 0x00000200
|
||||||
|
mask_write 0XF80060B8 0x01FFFFFF 0x00200066
|
||||||
|
mask_write 0XF80060C4 0x00000003 0x00000000
|
||||||
|
mask_write 0XF80060C8 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF80060DC 0x00000001 0x00000000
|
||||||
|
mask_write 0XF80060F0 0x0000FFFF 0x00000000
|
||||||
|
mask_write 0XF80060F4 0x0000000F 0x00000008
|
||||||
|
mask_write 0XF8006114 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF8006118 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800611C 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006120 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006124 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800612C 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006130 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006134 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006138 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006140 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006144 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006148 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF800614C 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006154 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006158 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF800615C 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006160 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006168 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800616C 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006170 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006174 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800617C 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006180 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006184 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006188 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006190 0xFFFFFFFF 0x10040080
|
||||||
|
mask_write 0XF8006194 0x000FFFFF 0x0001FC82
|
||||||
|
mask_write 0XF8006204 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF8006208 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF800620C 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006210 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006214 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006218 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF800621C 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006220 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006224 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF80062A8 0x00000FF7 0x00000000
|
||||||
|
mask_write 0XF80062AC 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF80062B0 0x003FFFFF 0x00005125
|
||||||
|
mask_write 0XF80062B4 0x0003FFFF 0x000012A8
|
||||||
|
mask_poll 0XF8000B74 0x00002000
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000081
|
||||||
|
mask_poll 0XF8006054 0x00000007
|
||||||
|
}
|
||||||
|
proc ps7_mio_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B40 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B44 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B48 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B4C 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B50 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B54 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B58 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B5C 0xFFFFFFFF 0x0018C61C
|
||||||
|
mask_write 0XF8000B60 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B64 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B68 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B6C 0x00007FFF 0x00000260
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000021
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000020
|
||||||
|
mask_write 0XF8000B70 0x07FFFFFF 0x00000823
|
||||||
|
mask_write 0XF8000700 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000704 0x00003FFF 0x00001602
|
||||||
|
mask_write 0XF8000708 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800070C 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000710 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000714 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000718 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800071C 0x00003FFF 0x00000600
|
||||||
|
mask_write 0XF8000720 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000724 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000728 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800072C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000730 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000734 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000738 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800073C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000740 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000744 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000748 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF800074C 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000750 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000754 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000758 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800075C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000760 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000764 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000768 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800076C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000770 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000774 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000778 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800077C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000780 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000784 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000788 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800078C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000790 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000794 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000798 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800079C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007A0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A8 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007AC 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007BC 0x00003F01 0x00001201
|
||||||
|
mask_write 0XF80007C0 0x00003FFF 0x000012E0
|
||||||
|
mask_write 0XF80007C4 0x00003FFF 0x000012E1
|
||||||
|
mask_write 0XF80007C8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007CC 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007D0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007D4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF8000830 0x003F003F 0x002F0037
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_peripherals_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B48 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B4C 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B50 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B54 0x00000180 0x00000180
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
mask_write 0XE0001034 0x000000FF 0x00000006
|
||||||
|
mask_write 0XE0001018 0x0000FFFF 0x0000007C
|
||||||
|
mask_write 0XE0001000 0x000001FF 0x00000017
|
||||||
|
mask_write 0XE0001004 0x00000FFF 0x00000020
|
||||||
|
mask_write 0XE000D000 0x00080000 0x00080000
|
||||||
|
mask_write 0XF8007000 0x20000000 0x00000000
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
}
|
||||||
|
proc ps7_post_config_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000900 0x0000000F 0x0000000F
|
||||||
|
mask_write 0XF8000240 0xFFFFFFFF 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_debug_2_0 {} {
|
||||||
|
mwr -force 0XF8898FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8899FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8809FB0 0xC5ACCE55
|
||||||
|
}
|
||||||
|
proc ps7_pll_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000110 0x003FFFF0 0x000FA220
|
||||||
|
mask_write 0XF8000100 0x0007F000 0x00028000
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000120 0x1F003F30 0x1F000200
|
||||||
|
mask_write 0XF8000114 0x003FFFF0 0x0012C220
|
||||||
|
mask_write 0XF8000104 0x0007F000 0x00020000
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000002
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000124 0xFFF00003 0x0C200003
|
||||||
|
mask_write 0XF8000118 0x003FFFF0 0x001452C0
|
||||||
|
mask_write 0XF8000108 0x0007F000 0x0001E000
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000004
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_clock_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000128 0x03F03F01 0x00700F01
|
||||||
|
mask_write 0XF8000138 0x00000011 0x00000001
|
||||||
|
mask_write 0XF8000140 0x03F03F71 0x00100801
|
||||||
|
mask_write 0XF800014C 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000150 0x00003F33 0x00000A01
|
||||||
|
mask_write 0XF8000154 0x00003F33 0x00000A02
|
||||||
|
mask_write 0XF8000168 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000170 0x03F03F30 0x00400500
|
||||||
|
mask_write 0XF80001C4 0x00000001 0x00000001
|
||||||
|
mask_write 0XF800012C 0x01FFCCCD 0x01EC044D
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_ddr_init_data_1_0 {} {
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000080
|
||||||
|
mask_write 0XF8006004 0x1FFFFFFF 0x00081081
|
||||||
|
mask_write 0XF8006008 0x03FFFFFF 0x03C0780F
|
||||||
|
mask_write 0XF800600C 0x03FFFFFF 0x02001001
|
||||||
|
mask_write 0XF8006010 0x03FFFFFF 0x00014001
|
||||||
|
mask_write 0XF8006014 0x001FFFFF 0x0004281A
|
||||||
|
mask_write 0XF8006018 0xF7FFFFFF 0x44E458D2
|
||||||
|
mask_write 0XF800601C 0xFFFFFFFF 0x720238E5
|
||||||
|
mask_write 0XF8006020 0xFFFFFFFC 0x272872D0
|
||||||
|
mask_write 0XF8006024 0x0FFFFFFF 0x0000003C
|
||||||
|
mask_write 0XF8006028 0x00003FFF 0x00002007
|
||||||
|
mask_write 0XF800602C 0xFFFFFFFF 0x00000008
|
||||||
|
mask_write 0XF8006030 0xFFFFFFFF 0x00040930
|
||||||
|
mask_write 0XF8006034 0x13FF3FFF 0x000116D4
|
||||||
|
mask_write 0XF8006038 0x00001FC3 0x00000000
|
||||||
|
mask_write 0XF800603C 0x000FFFFF 0x00000777
|
||||||
|
mask_write 0XF8006040 0xFFFFFFFF 0xFFF00000
|
||||||
|
mask_write 0XF8006044 0x0FFFFFFF 0x0F666666
|
||||||
|
mask_write 0XF8006048 0x3FFFFFFF 0x0003C248
|
||||||
|
mask_write 0XF8006050 0xFF0F8FFF 0x77010800
|
||||||
|
mask_write 0XF8006058 0x0001FFFF 0x00000101
|
||||||
|
mask_write 0XF800605C 0x0000FFFF 0x00005003
|
||||||
|
mask_write 0XF8006060 0x000017FF 0x0000003E
|
||||||
|
mask_write 0XF8006064 0x00021FE0 0x00020000
|
||||||
|
mask_write 0XF8006068 0x03FFFFFF 0x00284141
|
||||||
|
mask_write 0XF800606C 0x0000FFFF 0x00001610
|
||||||
|
mask_write 0XF80060A0 0x00FFFFFF 0x00008000
|
||||||
|
mask_write 0XF80060A4 0xFFFFFFFF 0x10200802
|
||||||
|
mask_write 0XF80060A8 0x0FFFFFFF 0x0690CB73
|
||||||
|
mask_write 0XF80060AC 0x000001FF 0x000001FE
|
||||||
|
mask_write 0XF80060B0 0x1FFFFFFF 0x1CFFFFFF
|
||||||
|
mask_write 0XF80060B4 0x000007FF 0x00000200
|
||||||
|
mask_write 0XF80060B8 0x01FFFFFF 0x00200066
|
||||||
|
mask_write 0XF80060C4 0x00000003 0x00000000
|
||||||
|
mask_write 0XF80060C8 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF80060DC 0x00000001 0x00000000
|
||||||
|
mask_write 0XF80060F0 0x0000FFFF 0x00000000
|
||||||
|
mask_write 0XF80060F4 0x0000000F 0x00000008
|
||||||
|
mask_write 0XF8006114 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF8006118 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800611C 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006120 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006124 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800612C 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006130 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006134 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006138 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006140 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006144 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006148 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF800614C 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006154 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006158 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF800615C 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006160 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006168 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800616C 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006170 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006174 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800617C 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006180 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006184 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006188 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006190 0xFFFFFFFF 0x10040080
|
||||||
|
mask_write 0XF8006194 0x000FFFFF 0x0001FC82
|
||||||
|
mask_write 0XF8006204 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF8006208 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF800620C 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006210 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006214 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006218 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF800621C 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006220 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006224 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF80062A8 0x00000FF7 0x00000000
|
||||||
|
mask_write 0XF80062AC 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF80062B0 0x003FFFFF 0x00005125
|
||||||
|
mask_write 0XF80062B4 0x0003FFFF 0x000012A8
|
||||||
|
mask_poll 0XF8000B74 0x00002000
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000081
|
||||||
|
mask_poll 0XF8006054 0x00000007
|
||||||
|
}
|
||||||
|
proc ps7_mio_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B40 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B44 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B48 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B4C 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B50 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B54 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B58 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B5C 0xFFFFFFFF 0x0018C61C
|
||||||
|
mask_write 0XF8000B60 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B64 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B68 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B6C 0x000073FF 0x00000260
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000021
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000020
|
||||||
|
mask_write 0XF8000B70 0x07FFFFFF 0x00000823
|
||||||
|
mask_write 0XF8000700 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000704 0x00003FFF 0x00001602
|
||||||
|
mask_write 0XF8000708 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800070C 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000710 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000714 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000718 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800071C 0x00003FFF 0x00000600
|
||||||
|
mask_write 0XF8000720 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000724 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000728 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800072C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000730 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000734 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000738 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800073C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000740 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000744 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000748 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF800074C 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000750 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000754 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000758 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800075C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000760 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000764 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000768 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800076C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000770 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000774 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000778 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800077C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000780 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000784 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000788 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800078C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000790 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000794 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000798 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800079C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007A0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A8 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007AC 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007BC 0x00003F01 0x00001201
|
||||||
|
mask_write 0XF80007C0 0x00003FFF 0x000012E0
|
||||||
|
mask_write 0XF80007C4 0x00003FFF 0x000012E1
|
||||||
|
mask_write 0XF80007C8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007CC 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007D0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007D4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF8000830 0x003F003F 0x002F0037
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_peripherals_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B48 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B4C 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B50 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B54 0x00000180 0x00000180
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
mask_write 0XE0001034 0x000000FF 0x00000006
|
||||||
|
mask_write 0XE0001018 0x0000FFFF 0x0000007C
|
||||||
|
mask_write 0XE0001000 0x000001FF 0x00000017
|
||||||
|
mask_write 0XE0001004 0x00000FFF 0x00000020
|
||||||
|
mask_write 0XE000D000 0x00080000 0x00080000
|
||||||
|
mask_write 0XF8007000 0x20000000 0x00000000
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
}
|
||||||
|
proc ps7_post_config_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000900 0x0000000F 0x0000000F
|
||||||
|
mask_write 0XF8000240 0xFFFFFFFF 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_debug_1_0 {} {
|
||||||
|
mwr -force 0XF8898FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8899FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8809FB0 0xC5ACCE55
|
||||||
|
}
|
||||||
|
set PCW_SILICON_VER_1_0 "0x0"
|
||||||
|
set PCW_SILICON_VER_2_0 "0x1"
|
||||||
|
set PCW_SILICON_VER_3_0 "0x2"
|
||||||
|
set APU_FREQ 666666666
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
proc mask_poll { addr mask } {
|
||||||
|
set count 1
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval & $mask}]
|
||||||
|
while { $maskedval == 0 } {
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval & $mask}]
|
||||||
|
set count [ expr { $count + 1 } ]
|
||||||
|
if { $count == 100000000 } {
|
||||||
|
puts "Timeout Reached. Mask poll failed at ADDRESS: $addr MASK: $mask"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
proc mask_delay { addr val } {
|
||||||
|
set delay [ get_number_of_cycles_for_delay $val ]
|
||||||
|
perf_reset_and_start_timer
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval < $delay}]
|
||||||
|
while { $maskedval == 1 } {
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval < $delay}]
|
||||||
|
}
|
||||||
|
perf_reset_clock
|
||||||
|
}
|
||||||
|
|
||||||
|
proc ps_version { } {
|
||||||
|
set si_ver "0x[string range [mrd 0xF8007080] end-8 end]"
|
||||||
|
set mask_sil_ver "0x[expr {$si_ver >> 28}]"
|
||||||
|
return $mask_sil_ver;
|
||||||
|
}
|
||||||
|
|
||||||
|
proc ps7_post_config {} {
|
||||||
|
set saved_mode [configparams force-mem-accesses]
|
||||||
|
configparams force-mem-accesses 1
|
||||||
|
|
||||||
|
variable PCW_SILICON_VER_1_0
|
||||||
|
variable PCW_SILICON_VER_2_0
|
||||||
|
variable PCW_SILICON_VER_3_0
|
||||||
|
set sil_ver [ps_version]
|
||||||
|
|
||||||
|
if { $sil_ver == $PCW_SILICON_VER_1_0} {
|
||||||
|
ps7_post_config_1_0
|
||||||
|
} elseif { $sil_ver == $PCW_SILICON_VER_2_0 } {
|
||||||
|
ps7_post_config_2_0
|
||||||
|
} else {
|
||||||
|
ps7_post_config_3_0
|
||||||
|
}
|
||||||
|
configparams force-mem-accesses $saved_mode
|
||||||
|
}
|
||||||
|
|
||||||
|
proc ps7_debug {} {
|
||||||
|
variable PCW_SILICON_VER_1_0
|
||||||
|
variable PCW_SILICON_VER_2_0
|
||||||
|
variable PCW_SILICON_VER_3_0
|
||||||
|
set sil_ver [ps_version]
|
||||||
|
|
||||||
|
if { $sil_ver == $PCW_SILICON_VER_1_0} {
|
||||||
|
ps7_debug_1_0
|
||||||
|
} elseif { $sil_ver == $PCW_SILICON_VER_2_0 } {
|
||||||
|
ps7_debug_2_0
|
||||||
|
} else {
|
||||||
|
ps7_debug_3_0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
proc ps7_init {} {
|
||||||
|
variable PCW_SILICON_VER_1_0
|
||||||
|
variable PCW_SILICON_VER_2_0
|
||||||
|
variable PCW_SILICON_VER_3_0
|
||||||
|
set sil_ver [ps_version]
|
||||||
|
if { $sil_ver == $PCW_SILICON_VER_1_0} {
|
||||||
|
ps7_mio_init_data_1_0
|
||||||
|
ps7_pll_init_data_1_0
|
||||||
|
ps7_clock_init_data_1_0
|
||||||
|
ps7_ddr_init_data_1_0
|
||||||
|
ps7_peripherals_init_data_1_0
|
||||||
|
#puts "PCW Silicon Version : 1.0"
|
||||||
|
} elseif { $sil_ver == $PCW_SILICON_VER_2_0 } {
|
||||||
|
ps7_mio_init_data_2_0
|
||||||
|
ps7_pll_init_data_2_0
|
||||||
|
ps7_clock_init_data_2_0
|
||||||
|
ps7_ddr_init_data_2_0
|
||||||
|
ps7_peripherals_init_data_2_0
|
||||||
|
#puts "PCW Silicon Version : 2.0"
|
||||||
|
} else {
|
||||||
|
ps7_mio_init_data_3_0
|
||||||
|
ps7_pll_init_data_3_0
|
||||||
|
ps7_clock_init_data_3_0
|
||||||
|
ps7_ddr_init_data_3_0
|
||||||
|
ps7_peripherals_init_data_3_0
|
||||||
|
#puts "PCW Silicon Version : 3.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# For delay calculation using global timer
|
||||||
|
|
||||||
|
# start timer
|
||||||
|
proc perf_start_clock { } {
|
||||||
|
|
||||||
|
#writing SCU_GLOBAL_TIMER_CONTROL register
|
||||||
|
|
||||||
|
mask_write 0xF8F00208 0x00000109 0x00000009
|
||||||
|
}
|
||||||
|
|
||||||
|
# stop timer and reset timer count regs
|
||||||
|
proc perf_reset_clock { } {
|
||||||
|
perf_disable_clock
|
||||||
|
mask_write 0xF8F00200 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0xF8F00204 0xFFFFFFFF 0x00000000
|
||||||
|
}
|
||||||
|
|
||||||
|
# Compute mask for given delay in miliseconds
|
||||||
|
proc get_number_of_cycles_for_delay { delay } {
|
||||||
|
|
||||||
|
# GTC is always clocked at 1/2 of the CPU frequency (CPU_3x2x)
|
||||||
|
variable APU_FREQ
|
||||||
|
return [ expr ($delay * $APU_FREQ /(2 * 1000))]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# stop timer
|
||||||
|
proc perf_disable_clock {} {
|
||||||
|
mask_write 0xF8F00208 0xFFFFFFFF 0x00000000
|
||||||
|
}
|
||||||
|
|
||||||
|
proc perf_reset_and_start_timer {} {
|
||||||
|
perf_reset_clock
|
||||||
|
perf_start_clock
|
||||||
|
}
|
||||||
|
|
||||||
|
|
137
Miz_sys/Miz_sys.ip_user_files/mem_init_files/ps7_init_gpl.h
Normal file
137
Miz_sys/Miz_sys.ip_user_files/mem_init_files/ps7_init_gpl.h
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* (c) Copyright 2010-2014 Xilinx, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||||
|
* software and associated documentation files (the "Software"), to deal in the Software
|
||||||
|
* without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||||
|
* publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||||
|
* persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or
|
||||||
|
* substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* Use of the Software is limited solely to applications: (a) running on a Xilinx device, or
|
||||||
|
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||||
|
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* Except as contained in this notice, the name of the Xilinx shall not be used in advertising or
|
||||||
|
* otherwise to promote the sale, use or other dealings in this Software without prior written
|
||||||
|
* authorization from Xilinx.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
/****************************************************************************/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @file ps7_init.h
|
||||||
|
*
|
||||||
|
* This file can be included in FSBL code
|
||||||
|
* to get prototype of ps7_init() function
|
||||||
|
* and error codes
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//typedef unsigned int u32;
|
||||||
|
|
||||||
|
|
||||||
|
/** do we need to make this name more unique ? **/
|
||||||
|
//extern u32 ps7_init_data[];
|
||||||
|
extern unsigned long * ps7_ddr_init_data;
|
||||||
|
extern unsigned long * ps7_mio_init_data;
|
||||||
|
extern unsigned long * ps7_pll_init_data;
|
||||||
|
extern unsigned long * ps7_clock_init_data;
|
||||||
|
extern unsigned long * ps7_peripherals_init_data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define OPCODE_EXIT 0U
|
||||||
|
#define OPCODE_CLEAR 1U
|
||||||
|
#define OPCODE_WRITE 2U
|
||||||
|
#define OPCODE_MASKWRITE 3U
|
||||||
|
#define OPCODE_MASKPOLL 4U
|
||||||
|
#define OPCODE_MASKDELAY 5U
|
||||||
|
#define NEW_PS7_ERR_CODE 1
|
||||||
|
|
||||||
|
/* Encode number of arguments in last nibble */
|
||||||
|
#define EMIT_EXIT() ( (OPCODE_EXIT << 4 ) | 0 )
|
||||||
|
#define EMIT_CLEAR(addr) ( (OPCODE_CLEAR << 4 ) | 1 ) , addr
|
||||||
|
#define EMIT_WRITE(addr,val) ( (OPCODE_WRITE << 4 ) | 2 ) , addr, val
|
||||||
|
#define EMIT_MASKWRITE(addr,mask,val) ( (OPCODE_MASKWRITE << 4 ) | 3 ) , addr, mask, val
|
||||||
|
#define EMIT_MASKPOLL(addr,mask) ( (OPCODE_MASKPOLL << 4 ) | 2 ) , addr, mask
|
||||||
|
#define EMIT_MASKDELAY(addr,mask) ( (OPCODE_MASKDELAY << 4 ) | 2 ) , addr, mask
|
||||||
|
|
||||||
|
/* Returns codes of PS7_Init */
|
||||||
|
#define PS7_INIT_SUCCESS (0) // 0 is success in good old C
|
||||||
|
#define PS7_INIT_CORRUPT (1) // 1 the data is corrupted, and slcr reg are in corrupted state now
|
||||||
|
#define PS7_INIT_TIMEOUT (2) // 2 when a poll operation timed out
|
||||||
|
#define PS7_POLL_FAILED_DDR_INIT (3) // 3 when a poll operation timed out for ddr init
|
||||||
|
#define PS7_POLL_FAILED_DMA (4) // 4 when a poll operation timed out for dma done bit
|
||||||
|
#define PS7_POLL_FAILED_PLL (5) // 5 when a poll operation timed out for pll sequence init
|
||||||
|
|
||||||
|
|
||||||
|
/* Silicon Versions */
|
||||||
|
#define PCW_SILICON_VERSION_1 0
|
||||||
|
#define PCW_SILICON_VERSION_2 1
|
||||||
|
#define PCW_SILICON_VERSION_3 2
|
||||||
|
|
||||||
|
/* This flag to be used by FSBL to check whether ps7_post_config() proc exixts */
|
||||||
|
#define PS7_POST_CONFIG
|
||||||
|
|
||||||
|
/* Freq of all peripherals */
|
||||||
|
|
||||||
|
#define APU_FREQ 666666687
|
||||||
|
#define DDR_FREQ 533333374
|
||||||
|
#define DCI_FREQ 10158730
|
||||||
|
#define QSPI_FREQ 200000000
|
||||||
|
#define SMC_FREQ 10000000
|
||||||
|
#define ENET0_FREQ 125000000
|
||||||
|
#define ENET1_FREQ 10000000
|
||||||
|
#define USB0_FREQ 60000000
|
||||||
|
#define USB1_FREQ 60000000
|
||||||
|
#define SDIO_FREQ 100000000
|
||||||
|
#define UART_FREQ 100000000
|
||||||
|
#define SPI_FREQ 10000000
|
||||||
|
#define I2C_FREQ 111111115
|
||||||
|
#define WDT_FREQ 111111115
|
||||||
|
#define TTC_FREQ 50000000
|
||||||
|
#define CAN_FREQ 10000000
|
||||||
|
#define PCAP_FREQ 200000000
|
||||||
|
#define TPIU_FREQ 200000000
|
||||||
|
#define FPGA0_FREQ 50000000
|
||||||
|
#define FPGA1_FREQ 10000000
|
||||||
|
#define FPGA2_FREQ 10000000
|
||||||
|
#define FPGA3_FREQ 10000000
|
||||||
|
|
||||||
|
|
||||||
|
/* For delay calculation using global registers*/
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_L32 0xF8F00200
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_U32 0xF8F00204
|
||||||
|
#define SCU_GLOBAL_TIMER_CONTROL 0xF8F00208
|
||||||
|
#define SCU_GLOBAL_TIMER_AUTO_INC 0xF8F00218
|
||||||
|
|
||||||
|
int ps7_config( unsigned long*);
|
||||||
|
int ps7_init();
|
||||||
|
int ps7_post_config();
|
||||||
|
int ps7_debug();
|
||||||
|
char* getPS7MessageInfo(unsigned key);
|
||||||
|
|
||||||
|
void perf_start_clock(void);
|
||||||
|
void perf_disable_clock(void);
|
||||||
|
void perf_reset_clock(void);
|
||||||
|
void perf_reset_and_start_timer();
|
||||||
|
int get_number_of_cycles_for_delay(unsigned int delay);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
83
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/README.txt
Normal file
83
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/README.txt
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
################################################################################
|
||||||
|
# Vivado (TM) v2017.4 (64-bit)
|
||||||
|
#
|
||||||
|
# README.txt: Please read the sections below to understand the steps required
|
||||||
|
# to simulate the design for a simulator, the directory structure
|
||||||
|
# and the generated exported files.
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
1. Simulate Design
|
||||||
|
|
||||||
|
To simulate design, cd to the simulator directory and execute the script.
|
||||||
|
|
||||||
|
For example:-
|
||||||
|
|
||||||
|
% cd questa
|
||||||
|
% ./top.sh
|
||||||
|
|
||||||
|
The export simulation flow requires the Xilinx pre-compiled simulation library
|
||||||
|
components for the target simulator. These components are referred using the
|
||||||
|
'-lib_map_path' switch. If this switch is specified, then the export simulation
|
||||||
|
will automatically set this library path in the generated script and update,
|
||||||
|
copy the simulator setup file(s) in the exported directory.
|
||||||
|
|
||||||
|
If '-lib_map_path' is not specified, then the pre-compiled simulation library
|
||||||
|
information will not be included in the exported scripts and that may cause
|
||||||
|
simulation errors when running this script. Alternatively, you can provide the
|
||||||
|
library information using this switch while executing the generated script.
|
||||||
|
|
||||||
|
For example:-
|
||||||
|
|
||||||
|
% ./top.sh -lib_map_path /design/questa/clibs
|
||||||
|
|
||||||
|
Please refer to the generated script header 'Prerequisite' section for more details.
|
||||||
|
|
||||||
|
2. Directory Structure
|
||||||
|
|
||||||
|
By default, if the -directory switch is not specified, export_simulation will
|
||||||
|
create the following directory structure:-
|
||||||
|
|
||||||
|
<current_working_directory>/export_sim/<simulator>
|
||||||
|
|
||||||
|
For example, if the current working directory is /tmp/test, export_simulation
|
||||||
|
will create the following directory path:-
|
||||||
|
|
||||||
|
/tmp/test/export_sim/questa
|
||||||
|
|
||||||
|
If -directory switch is specified, export_simulation will create a simulator
|
||||||
|
sub-directory under the specified directory path.
|
||||||
|
|
||||||
|
For example, 'export_simulation -directory /tmp/test/my_test_area/func_sim'
|
||||||
|
command will create the following directory:-
|
||||||
|
|
||||||
|
/tmp/test/my_test_area/func_sim/questa
|
||||||
|
|
||||||
|
By default, if -simulator is not specified, export_simulation will create a
|
||||||
|
simulator sub-directory for each simulator and export the files for each simulator
|
||||||
|
in this sub-directory respectively.
|
||||||
|
|
||||||
|
IMPORTANT: Please note that the simulation library path must be specified manually
|
||||||
|
in the generated script for the respective simulator. Please refer to the generated
|
||||||
|
script header 'Prerequisite' section for more details.
|
||||||
|
|
||||||
|
3. Exported script and files
|
||||||
|
|
||||||
|
Export simulation will create the driver shell script, setup files and copy the
|
||||||
|
design sources in the output directory path.
|
||||||
|
|
||||||
|
By default, when the -script_name switch is not specified, export_simulation will
|
||||||
|
create the following script name:-
|
||||||
|
|
||||||
|
<simulation_top>.sh (Unix)
|
||||||
|
When exporting the files for an IP using the -of_objects switch, export_simulation
|
||||||
|
will create the following script name:-
|
||||||
|
|
||||||
|
<ip-name>.sh (Unix)
|
||||||
|
Export simulation will create the setup files for the target simulator specified
|
||||||
|
with the -simulator switch.
|
||||||
|
|
||||||
|
For example, if the target simulator is "ies", export_simulation will create the
|
||||||
|
'cds.lib', 'hdl.var' and design library diectories and mappings in the 'cds.lib'
|
||||||
|
file.
|
||||||
|
|
@ -0,0 +1,49 @@
|
|||||||
|
################################################################################
|
||||||
|
# Vivado (TM) v2017.4 (64-bit)
|
||||||
|
#
|
||||||
|
# README.txt: Please read the sections below to understand the steps required to
|
||||||
|
# run the exported script and information about the source files.
|
||||||
|
#
|
||||||
|
# Generated by export_simulation on Sat May 25 13:08:26 +0800 2019
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
1. How to run the generated simulation script:-
|
||||||
|
|
||||||
|
From the shell prompt in the current directory, issue the following command:-
|
||||||
|
|
||||||
|
./system.sh
|
||||||
|
|
||||||
|
This command will launch the 'compile', 'elaborate' and 'simulate' functions
|
||||||
|
implemented in the script file for the 3-step flow. These functions are called
|
||||||
|
from the main 'run' function in the script file.
|
||||||
|
|
||||||
|
The 'run' function first executes the 'setup' function, the purpose of which is to
|
||||||
|
create simulator specific setup files, create design library mappings and library
|
||||||
|
directories and copy 'glbl.v' from the Vivado software install location into the
|
||||||
|
current directory.
|
||||||
|
|
||||||
|
The 'setup' function is also used for removing the simulator generated data in
|
||||||
|
order to reset the current directory to the original state when export_simulation
|
||||||
|
was launched from Vivado. This generated data can be removed by specifying the
|
||||||
|
'-reset_run' switch to the './system.sh' script.
|
||||||
|
|
||||||
|
./system.sh -reset_run
|
||||||
|
|
||||||
|
To keep the generated data from the previous run but regenerate the setup files and
|
||||||
|
library directories, use the '-noclean_files' switch.
|
||||||
|
|
||||||
|
./system.sh -noclean_files
|
||||||
|
|
||||||
|
For more information on the script, please type './system.sh -help'.
|
||||||
|
|
||||||
|
2. Additional design information files:-
|
||||||
|
|
||||||
|
export_simulation generates following additional file that can be used for fetching
|
||||||
|
the design files information or for integrating with external custom scripts.
|
||||||
|
|
||||||
|
Name : file_info.txt
|
||||||
|
Purpose: This file contains detail design file information based on the compile order
|
||||||
|
when export_simulation was executed from Vivado. The file contains information
|
||||||
|
about the file type, name, whether it is part of the IP, associated library
|
||||||
|
and the file path information.
|
@ -0,0 +1,49 @@
|
|||||||
|
vlib work
|
||||||
|
vlib activehdl
|
||||||
|
|
||||||
|
vlib activehdl/xil_defaultlib
|
||||||
|
vlib activehdl/xpm
|
||||||
|
vlib activehdl/axi_infrastructure_v1_1_0
|
||||||
|
vlib activehdl/smartconnect_v1_0
|
||||||
|
vlib activehdl/axi_protocol_checker_v2_0_1
|
||||||
|
vlib activehdl/axi_vip_v1_1_1
|
||||||
|
vlib activehdl/processing_system7_vip_v1_0_3
|
||||||
|
|
||||||
|
vmap xil_defaultlib activehdl/xil_defaultlib
|
||||||
|
vmap xpm activehdl/xpm
|
||||||
|
vmap axi_infrastructure_v1_1_0 activehdl/axi_infrastructure_v1_1_0
|
||||||
|
vmap smartconnect_v1_0 activehdl/smartconnect_v1_0
|
||||||
|
vmap axi_protocol_checker_v2_0_1 activehdl/axi_protocol_checker_v2_0_1
|
||||||
|
vmap axi_vip_v1_1_1 activehdl/axi_vip_v1_1_1
|
||||||
|
vmap processing_system7_vip_v1_0_3 activehdl/processing_system7_vip_v1_0_3
|
||||||
|
|
||||||
|
vlog -work xil_defaultlib -sv2k12 "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_fifo/hdl/xpm_fifo.sv" \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_memory/hdl/xpm_memory.sv" \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_cdc/hdl/xpm_cdc.sv" \
|
||||||
|
|
||||||
|
vcom -work xpm -93 \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_VCOMP.vhd" \
|
||||||
|
|
||||||
|
vlog -work axi_infrastructure_v1_1_0 -v2k5 "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl/axi_infrastructure_v1_1_vl_rfs.v" \
|
||||||
|
|
||||||
|
vlog -work smartconnect_v1_0 -sv2k12 "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/sc_util_v1_0_vl_rfs.sv" \
|
||||||
|
|
||||||
|
vlog -work axi_protocol_checker_v2_0_1 -sv2k12 "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/3b24/hdl/axi_protocol_checker_v2_0_vl_rfs.sv" \
|
||||||
|
|
||||||
|
vlog -work axi_vip_v1_1_1 -sv2k12 "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/a16a/hdl/axi_vip_v1_1_vl_rfs.sv" \
|
||||||
|
|
||||||
|
vlog -work processing_system7_vip_v1_0_3 -sv2k12 "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl/processing_system7_vip_v1_0_vl_rfs.sv" \
|
||||||
|
|
||||||
|
vlog -work xil_defaultlib -v2k5 "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../bd/system/ip/system_processing_system7_0_0/sim/system_processing_system7_0_0.v" \
|
||||||
|
"../../../bd/system/sim/system.v" \
|
||||||
|
|
||||||
|
vlog -work xil_defaultlib \
|
||||||
|
"glbl.v"
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
xpm_fifo.sv,systemverilog,xil_defaultlib,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_fifo/hdl/xpm_fifo.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
xpm_memory.sv,systemverilog,xil_defaultlib,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_memory/hdl/xpm_memory.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
xpm_cdc.sv,systemverilog,xil_defaultlib,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_cdc/hdl/xpm_cdc.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
xpm_VCOMP.vhd,vhdl,xpm,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_VCOMP.vhd,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
axi_infrastructure_v1_1_vl_rfs.v,verilog,axi_infrastructure_v1_1_0,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl/axi_infrastructure_v1_1_vl_rfs.v,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
sc_util_v1_0_vl_rfs.sv,systemverilog,smartconnect_v1_0,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/sc_util_v1_0_vl_rfs.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
axi_protocol_checker_v2_0_vl_rfs.sv,systemverilog,axi_protocol_checker_v2_0_1,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/3b24/hdl/axi_protocol_checker_v2_0_vl_rfs.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
axi_vip_v1_1_vl_rfs.sv,systemverilog,axi_vip_v1_1_1,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/a16a/hdl/axi_vip_v1_1_vl_rfs.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
processing_system7_vip_v1_0_vl_rfs.sv,systemverilog,processing_system7_vip_v1_0_3,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl/processing_system7_vip_v1_0_vl_rfs.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
system_processing_system7_0_0.v,verilog,xil_defaultlib,../../../bd/system/ip/system_processing_system7_0_0/sim/system_processing_system7_0_0.v,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
system.v,verilog,xil_defaultlib,../../../bd/system/sim/system.v,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
glbl.v,Verilog,xil_defaultlib,glbl.v
|
@ -0,0 +1,71 @@
|
|||||||
|
// $Header: /devl/xcs/repo/env/Databases/CAEInterfaces/verunilibs/data/glbl.v,v 1.14 2010/10/28 20:44:00 fphillip Exp $
|
||||||
|
`ifndef GLBL
|
||||||
|
`define GLBL
|
||||||
|
`timescale 1 ps / 1 ps
|
||||||
|
|
||||||
|
module glbl ();
|
||||||
|
|
||||||
|
parameter ROC_WIDTH = 100000;
|
||||||
|
parameter TOC_WIDTH = 0;
|
||||||
|
|
||||||
|
//-------- STARTUP Globals --------------
|
||||||
|
wire GSR;
|
||||||
|
wire GTS;
|
||||||
|
wire GWE;
|
||||||
|
wire PRLD;
|
||||||
|
tri1 p_up_tmp;
|
||||||
|
tri (weak1, strong0) PLL_LOCKG = p_up_tmp;
|
||||||
|
|
||||||
|
wire PROGB_GLBL;
|
||||||
|
wire CCLKO_GLBL;
|
||||||
|
wire FCSBO_GLBL;
|
||||||
|
wire [3:0] DO_GLBL;
|
||||||
|
wire [3:0] DI_GLBL;
|
||||||
|
|
||||||
|
reg GSR_int;
|
||||||
|
reg GTS_int;
|
||||||
|
reg PRLD_int;
|
||||||
|
|
||||||
|
//-------- JTAG Globals --------------
|
||||||
|
wire JTAG_TDO_GLBL;
|
||||||
|
wire JTAG_TCK_GLBL;
|
||||||
|
wire JTAG_TDI_GLBL;
|
||||||
|
wire JTAG_TMS_GLBL;
|
||||||
|
wire JTAG_TRST_GLBL;
|
||||||
|
|
||||||
|
reg JTAG_CAPTURE_GLBL;
|
||||||
|
reg JTAG_RESET_GLBL;
|
||||||
|
reg JTAG_SHIFT_GLBL;
|
||||||
|
reg JTAG_UPDATE_GLBL;
|
||||||
|
reg JTAG_RUNTEST_GLBL;
|
||||||
|
|
||||||
|
reg JTAG_SEL1_GLBL = 0;
|
||||||
|
reg JTAG_SEL2_GLBL = 0 ;
|
||||||
|
reg JTAG_SEL3_GLBL = 0;
|
||||||
|
reg JTAG_SEL4_GLBL = 0;
|
||||||
|
|
||||||
|
reg JTAG_USER_TDO1_GLBL = 1'bz;
|
||||||
|
reg JTAG_USER_TDO2_GLBL = 1'bz;
|
||||||
|
reg JTAG_USER_TDO3_GLBL = 1'bz;
|
||||||
|
reg JTAG_USER_TDO4_GLBL = 1'bz;
|
||||||
|
|
||||||
|
assign (strong1, weak0) GSR = GSR_int;
|
||||||
|
assign (strong1, weak0) GTS = GTS_int;
|
||||||
|
assign (weak1, weak0) PRLD = PRLD_int;
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
GSR_int = 1'b1;
|
||||||
|
PRLD_int = 1'b1;
|
||||||
|
#(ROC_WIDTH)
|
||||||
|
GSR_int = 1'b0;
|
||||||
|
PRLD_int = 1'b0;
|
||||||
|
end
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
GTS_int = 1'b1;
|
||||||
|
#(TOC_WIDTH)
|
||||||
|
GTS_int = 1'b0;
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
||||||
|
`endif
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,137 @@
|
|||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* (c) Copyright 2010-2014 Xilinx, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||||
|
* software and associated documentation files (the "Software"), to deal in the Software
|
||||||
|
* without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||||
|
* publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||||
|
* persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or
|
||||||
|
* substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* Use of the Software is limited solely to applications: (a) running on a Xilinx device, or
|
||||||
|
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||||
|
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* Except as contained in this notice, the name of the Xilinx shall not be used in advertising or
|
||||||
|
* otherwise to promote the sale, use or other dealings in this Software without prior written
|
||||||
|
* authorization from Xilinx.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
/****************************************************************************/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @file ps7_init.h
|
||||||
|
*
|
||||||
|
* This file can be included in FSBL code
|
||||||
|
* to get prototype of ps7_init() function
|
||||||
|
* and error codes
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//typedef unsigned int u32;
|
||||||
|
|
||||||
|
|
||||||
|
/** do we need to make this name more unique ? **/
|
||||||
|
//extern u32 ps7_init_data[];
|
||||||
|
extern unsigned long * ps7_ddr_init_data;
|
||||||
|
extern unsigned long * ps7_mio_init_data;
|
||||||
|
extern unsigned long * ps7_pll_init_data;
|
||||||
|
extern unsigned long * ps7_clock_init_data;
|
||||||
|
extern unsigned long * ps7_peripherals_init_data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define OPCODE_EXIT 0U
|
||||||
|
#define OPCODE_CLEAR 1U
|
||||||
|
#define OPCODE_WRITE 2U
|
||||||
|
#define OPCODE_MASKWRITE 3U
|
||||||
|
#define OPCODE_MASKPOLL 4U
|
||||||
|
#define OPCODE_MASKDELAY 5U
|
||||||
|
#define NEW_PS7_ERR_CODE 1
|
||||||
|
|
||||||
|
/* Encode number of arguments in last nibble */
|
||||||
|
#define EMIT_EXIT() ( (OPCODE_EXIT << 4 ) | 0 )
|
||||||
|
#define EMIT_CLEAR(addr) ( (OPCODE_CLEAR << 4 ) | 1 ) , addr
|
||||||
|
#define EMIT_WRITE(addr,val) ( (OPCODE_WRITE << 4 ) | 2 ) , addr, val
|
||||||
|
#define EMIT_MASKWRITE(addr,mask,val) ( (OPCODE_MASKWRITE << 4 ) | 3 ) , addr, mask, val
|
||||||
|
#define EMIT_MASKPOLL(addr,mask) ( (OPCODE_MASKPOLL << 4 ) | 2 ) , addr, mask
|
||||||
|
#define EMIT_MASKDELAY(addr,mask) ( (OPCODE_MASKDELAY << 4 ) | 2 ) , addr, mask
|
||||||
|
|
||||||
|
/* Returns codes of PS7_Init */
|
||||||
|
#define PS7_INIT_SUCCESS (0) // 0 is success in good old C
|
||||||
|
#define PS7_INIT_CORRUPT (1) // 1 the data is corrupted, and slcr reg are in corrupted state now
|
||||||
|
#define PS7_INIT_TIMEOUT (2) // 2 when a poll operation timed out
|
||||||
|
#define PS7_POLL_FAILED_DDR_INIT (3) // 3 when a poll operation timed out for ddr init
|
||||||
|
#define PS7_POLL_FAILED_DMA (4) // 4 when a poll operation timed out for dma done bit
|
||||||
|
#define PS7_POLL_FAILED_PLL (5) // 5 when a poll operation timed out for pll sequence init
|
||||||
|
|
||||||
|
|
||||||
|
/* Silicon Versions */
|
||||||
|
#define PCW_SILICON_VERSION_1 0
|
||||||
|
#define PCW_SILICON_VERSION_2 1
|
||||||
|
#define PCW_SILICON_VERSION_3 2
|
||||||
|
|
||||||
|
/* This flag to be used by FSBL to check whether ps7_post_config() proc exixts */
|
||||||
|
#define PS7_POST_CONFIG
|
||||||
|
|
||||||
|
/* Freq of all peripherals */
|
||||||
|
|
||||||
|
#define APU_FREQ 666666687
|
||||||
|
#define DDR_FREQ 533333374
|
||||||
|
#define DCI_FREQ 10158730
|
||||||
|
#define QSPI_FREQ 200000000
|
||||||
|
#define SMC_FREQ 10000000
|
||||||
|
#define ENET0_FREQ 125000000
|
||||||
|
#define ENET1_FREQ 10000000
|
||||||
|
#define USB0_FREQ 60000000
|
||||||
|
#define USB1_FREQ 60000000
|
||||||
|
#define SDIO_FREQ 100000000
|
||||||
|
#define UART_FREQ 100000000
|
||||||
|
#define SPI_FREQ 10000000
|
||||||
|
#define I2C_FREQ 111111115
|
||||||
|
#define WDT_FREQ 111111115
|
||||||
|
#define TTC_FREQ 50000000
|
||||||
|
#define CAN_FREQ 10000000
|
||||||
|
#define PCAP_FREQ 200000000
|
||||||
|
#define TPIU_FREQ 200000000
|
||||||
|
#define FPGA0_FREQ 50000000
|
||||||
|
#define FPGA1_FREQ 10000000
|
||||||
|
#define FPGA2_FREQ 10000000
|
||||||
|
#define FPGA3_FREQ 10000000
|
||||||
|
|
||||||
|
|
||||||
|
/* For delay calculation using global registers*/
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_L32 0xF8F00200
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_U32 0xF8F00204
|
||||||
|
#define SCU_GLOBAL_TIMER_CONTROL 0xF8F00208
|
||||||
|
#define SCU_GLOBAL_TIMER_AUTO_INC 0xF8F00218
|
||||||
|
|
||||||
|
int ps7_config( unsigned long*);
|
||||||
|
int ps7_init();
|
||||||
|
int ps7_post_config();
|
||||||
|
int ps7_debug();
|
||||||
|
char* getPS7MessageInfo(unsigned key);
|
||||||
|
|
||||||
|
void perf_start_clock(void);
|
||||||
|
void perf_disable_clock(void);
|
||||||
|
void perf_reset_clock(void);
|
||||||
|
void perf_reset_and_start_timer();
|
||||||
|
int get_number_of_cycles_for_delay(unsigned int delay);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
137694
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/activehdl/ps7_init.html
Normal file
137694
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/activehdl/ps7_init.html
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,832 @@
|
|||||||
|
proc ps7_pll_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000110 0x003FFFF0 0x000FA220
|
||||||
|
mask_write 0XF8000100 0x0007F000 0x00028000
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000120 0x1F003F30 0x1F000200
|
||||||
|
mask_write 0XF8000114 0x003FFFF0 0x0012C220
|
||||||
|
mask_write 0XF8000104 0x0007F000 0x00020000
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000002
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000124 0xFFF00003 0x0C200003
|
||||||
|
mask_write 0XF8000118 0x003FFFF0 0x001452C0
|
||||||
|
mask_write 0XF8000108 0x0007F000 0x0001E000
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000004
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_clock_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000128 0x03F03F01 0x00700F01
|
||||||
|
mask_write 0XF8000138 0x00000011 0x00000001
|
||||||
|
mask_write 0XF8000140 0x03F03F71 0x00100801
|
||||||
|
mask_write 0XF800014C 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000150 0x00003F33 0x00000A01
|
||||||
|
mask_write 0XF8000154 0x00003F33 0x00000A02
|
||||||
|
mask_write 0XF8000168 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000170 0x03F03F30 0x00400500
|
||||||
|
mask_write 0XF80001C4 0x00000001 0x00000001
|
||||||
|
mask_write 0XF800012C 0x01FFCCCD 0x01EC044D
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_ddr_init_data_3_0 {} {
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000080
|
||||||
|
mask_write 0XF8006004 0x0007FFFF 0x00001081
|
||||||
|
mask_write 0XF8006008 0x03FFFFFF 0x03C0780F
|
||||||
|
mask_write 0XF800600C 0x03FFFFFF 0x02001001
|
||||||
|
mask_write 0XF8006010 0x03FFFFFF 0x00014001
|
||||||
|
mask_write 0XF8006014 0x001FFFFF 0x0004281A
|
||||||
|
mask_write 0XF8006018 0xF7FFFFFF 0x44E458D2
|
||||||
|
mask_write 0XF800601C 0xFFFFFFFF 0x720238E5
|
||||||
|
mask_write 0XF8006020 0x7FDFFFFC 0x270872D0
|
||||||
|
mask_write 0XF8006024 0x0FFFFFC3 0x00000000
|
||||||
|
mask_write 0XF8006028 0x00003FFF 0x00002007
|
||||||
|
mask_write 0XF800602C 0xFFFFFFFF 0x00000008
|
||||||
|
mask_write 0XF8006030 0xFFFFFFFF 0x00040930
|
||||||
|
mask_write 0XF8006034 0x13FF3FFF 0x000116D4
|
||||||
|
mask_write 0XF8006038 0x00000003 0x00000000
|
||||||
|
mask_write 0XF800603C 0x000FFFFF 0x00000777
|
||||||
|
mask_write 0XF8006040 0xFFFFFFFF 0xFFF00000
|
||||||
|
mask_write 0XF8006044 0x0FFFFFFF 0x0F666666
|
||||||
|
mask_write 0XF8006048 0x0003F03F 0x0003C008
|
||||||
|
mask_write 0XF8006050 0xFF0F8FFF 0x77010800
|
||||||
|
mask_write 0XF8006058 0x00010000 0x00000000
|
||||||
|
mask_write 0XF800605C 0x0000FFFF 0x00005003
|
||||||
|
mask_write 0XF8006060 0x000017FF 0x0000003E
|
||||||
|
mask_write 0XF8006064 0x00021FE0 0x00020000
|
||||||
|
mask_write 0XF8006068 0x03FFFFFF 0x00284141
|
||||||
|
mask_write 0XF800606C 0x0000FFFF 0x00001610
|
||||||
|
mask_write 0XF8006078 0x03FFFFFF 0x00466111
|
||||||
|
mask_write 0XF800607C 0x000FFFFF 0x00032222
|
||||||
|
mask_write 0XF80060A4 0xFFFFFFFF 0x10200802
|
||||||
|
mask_write 0XF80060A8 0x0FFFFFFF 0x0690CB73
|
||||||
|
mask_write 0XF80060AC 0x000001FF 0x000001FE
|
||||||
|
mask_write 0XF80060B0 0x1FFFFFFF 0x1CFFFFFF
|
||||||
|
mask_write 0XF80060B4 0x00000200 0x00000200
|
||||||
|
mask_write 0XF80060B8 0x01FFFFFF 0x00200066
|
||||||
|
mask_write 0XF80060C4 0x00000003 0x00000000
|
||||||
|
mask_write 0XF80060C8 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF80060DC 0x00000001 0x00000000
|
||||||
|
mask_write 0XF80060F0 0x0000FFFF 0x00000000
|
||||||
|
mask_write 0XF80060F4 0x0000000F 0x00000008
|
||||||
|
mask_write 0XF8006114 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF8006118 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF800611C 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF8006120 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF8006124 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF800612C 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006130 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006134 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006138 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006140 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006144 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006148 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF800614C 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006154 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006158 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF800615C 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006160 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006168 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800616C 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006170 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006174 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800617C 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006180 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006184 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006188 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006190 0x6FFFFEFE 0x00040080
|
||||||
|
mask_write 0XF8006194 0x000FFFFF 0x0001FC82
|
||||||
|
mask_write 0XF8006204 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF8006208 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF800620C 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF8006210 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF8006214 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF8006218 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF800621C 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006220 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006224 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF80062A8 0x00000FF5 0x00000000
|
||||||
|
mask_write 0XF80062AC 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF80062B0 0x003FFFFF 0x00005125
|
||||||
|
mask_write 0XF80062B4 0x0003FFFF 0x000012A8
|
||||||
|
mask_poll 0XF8000B74 0x00002000
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000081
|
||||||
|
mask_poll 0XF8006054 0x00000007
|
||||||
|
}
|
||||||
|
proc ps7_mio_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B40 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B44 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B48 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B4C 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B50 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B54 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B58 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B5C 0xFFFFFFFF 0x0018C61C
|
||||||
|
mask_write 0XF8000B60 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B64 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B68 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B6C 0x00007FFF 0x00000260
|
||||||
|
mask_write 0XF8000B70 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000020
|
||||||
|
mask_write 0XF8000B70 0x07FEFFFF 0x00000823
|
||||||
|
mask_write 0XF8000700 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000704 0x00003FFF 0x00001602
|
||||||
|
mask_write 0XF8000708 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800070C 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000710 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000714 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000718 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800071C 0x00003FFF 0x00000600
|
||||||
|
mask_write 0XF8000720 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000724 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000728 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800072C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000730 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000734 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000738 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800073C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000740 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000744 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000748 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF800074C 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000750 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000754 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000758 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800075C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000760 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000764 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000768 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800076C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000770 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000774 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000778 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800077C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000780 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000784 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000788 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800078C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000790 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000794 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000798 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800079C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007A0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A8 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007AC 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007BC 0x00003F01 0x00001201
|
||||||
|
mask_write 0XF80007C0 0x00003FFF 0x000012E0
|
||||||
|
mask_write 0XF80007C4 0x00003FFF 0x000012E1
|
||||||
|
mask_write 0XF80007C8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007CC 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007D0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007D4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF8000830 0x003F003F 0x002F0037
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_peripherals_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B48 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B4C 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B50 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B54 0x00000180 0x00000180
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
mask_write 0XE0001034 0x000000FF 0x00000006
|
||||||
|
mask_write 0XE0001018 0x0000FFFF 0x0000007C
|
||||||
|
mask_write 0XE0001000 0x000001FF 0x00000017
|
||||||
|
mask_write 0XE0001004 0x000003FF 0x00000020
|
||||||
|
mask_write 0XE000D000 0x00080000 0x00080000
|
||||||
|
mask_write 0XF8007000 0x20000000 0x00000000
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
}
|
||||||
|
proc ps7_post_config_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000900 0x0000000F 0x0000000F
|
||||||
|
mask_write 0XF8000240 0xFFFFFFFF 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_debug_3_0 {} {
|
||||||
|
mwr -force 0XF8898FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8899FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8809FB0 0xC5ACCE55
|
||||||
|
}
|
||||||
|
proc ps7_pll_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000110 0x003FFFF0 0x000FA220
|
||||||
|
mask_write 0XF8000100 0x0007F000 0x00028000
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000120 0x1F003F30 0x1F000200
|
||||||
|
mask_write 0XF8000114 0x003FFFF0 0x0012C220
|
||||||
|
mask_write 0XF8000104 0x0007F000 0x00020000
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000002
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000124 0xFFF00003 0x0C200003
|
||||||
|
mask_write 0XF8000118 0x003FFFF0 0x001452C0
|
||||||
|
mask_write 0XF8000108 0x0007F000 0x0001E000
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000004
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_clock_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000128 0x03F03F01 0x00700F01
|
||||||
|
mask_write 0XF8000138 0x00000011 0x00000001
|
||||||
|
mask_write 0XF8000140 0x03F03F71 0x00100801
|
||||||
|
mask_write 0XF800014C 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000150 0x00003F33 0x00000A01
|
||||||
|
mask_write 0XF8000154 0x00003F33 0x00000A02
|
||||||
|
mask_write 0XF8000168 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000170 0x03F03F30 0x00400500
|
||||||
|
mask_write 0XF80001C4 0x00000001 0x00000001
|
||||||
|
mask_write 0XF800012C 0x01FFCCCD 0x01EC044D
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_ddr_init_data_2_0 {} {
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000080
|
||||||
|
mask_write 0XF8006004 0x1FFFFFFF 0x00081081
|
||||||
|
mask_write 0XF8006008 0x03FFFFFF 0x03C0780F
|
||||||
|
mask_write 0XF800600C 0x03FFFFFF 0x02001001
|
||||||
|
mask_write 0XF8006010 0x03FFFFFF 0x00014001
|
||||||
|
mask_write 0XF8006014 0x001FFFFF 0x0004281A
|
||||||
|
mask_write 0XF8006018 0xF7FFFFFF 0x44E458D2
|
||||||
|
mask_write 0XF800601C 0xFFFFFFFF 0x720238E5
|
||||||
|
mask_write 0XF8006020 0xFFFFFFFC 0x272872D0
|
||||||
|
mask_write 0XF8006024 0x0FFFFFFF 0x0000003C
|
||||||
|
mask_write 0XF8006028 0x00003FFF 0x00002007
|
||||||
|
mask_write 0XF800602C 0xFFFFFFFF 0x00000008
|
||||||
|
mask_write 0XF8006030 0xFFFFFFFF 0x00040930
|
||||||
|
mask_write 0XF8006034 0x13FF3FFF 0x000116D4
|
||||||
|
mask_write 0XF8006038 0x00001FC3 0x00000000
|
||||||
|
mask_write 0XF800603C 0x000FFFFF 0x00000777
|
||||||
|
mask_write 0XF8006040 0xFFFFFFFF 0xFFF00000
|
||||||
|
mask_write 0XF8006044 0x0FFFFFFF 0x0F666666
|
||||||
|
mask_write 0XF8006048 0x3FFFFFFF 0x0003C248
|
||||||
|
mask_write 0XF8006050 0xFF0F8FFF 0x77010800
|
||||||
|
mask_write 0XF8006058 0x0001FFFF 0x00000101
|
||||||
|
mask_write 0XF800605C 0x0000FFFF 0x00005003
|
||||||
|
mask_write 0XF8006060 0x000017FF 0x0000003E
|
||||||
|
mask_write 0XF8006064 0x00021FE0 0x00020000
|
||||||
|
mask_write 0XF8006068 0x03FFFFFF 0x00284141
|
||||||
|
mask_write 0XF800606C 0x0000FFFF 0x00001610
|
||||||
|
mask_write 0XF8006078 0x03FFFFFF 0x00466111
|
||||||
|
mask_write 0XF800607C 0x000FFFFF 0x00032222
|
||||||
|
mask_write 0XF80060A0 0x00FFFFFF 0x00008000
|
||||||
|
mask_write 0XF80060A4 0xFFFFFFFF 0x10200802
|
||||||
|
mask_write 0XF80060A8 0x0FFFFFFF 0x0690CB73
|
||||||
|
mask_write 0XF80060AC 0x000001FF 0x000001FE
|
||||||
|
mask_write 0XF80060B0 0x1FFFFFFF 0x1CFFFFFF
|
||||||
|
mask_write 0XF80060B4 0x000007FF 0x00000200
|
||||||
|
mask_write 0XF80060B8 0x01FFFFFF 0x00200066
|
||||||
|
mask_write 0XF80060C4 0x00000003 0x00000000
|
||||||
|
mask_write 0XF80060C8 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF80060DC 0x00000001 0x00000000
|
||||||
|
mask_write 0XF80060F0 0x0000FFFF 0x00000000
|
||||||
|
mask_write 0XF80060F4 0x0000000F 0x00000008
|
||||||
|
mask_write 0XF8006114 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF8006118 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800611C 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006120 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006124 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800612C 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006130 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006134 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006138 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006140 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006144 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006148 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF800614C 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006154 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006158 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF800615C 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006160 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006168 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800616C 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006170 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006174 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800617C 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006180 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006184 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006188 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006190 0xFFFFFFFF 0x10040080
|
||||||
|
mask_write 0XF8006194 0x000FFFFF 0x0001FC82
|
||||||
|
mask_write 0XF8006204 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF8006208 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF800620C 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006210 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006214 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006218 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF800621C 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006220 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006224 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF80062A8 0x00000FF7 0x00000000
|
||||||
|
mask_write 0XF80062AC 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF80062B0 0x003FFFFF 0x00005125
|
||||||
|
mask_write 0XF80062B4 0x0003FFFF 0x000012A8
|
||||||
|
mask_poll 0XF8000B74 0x00002000
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000081
|
||||||
|
mask_poll 0XF8006054 0x00000007
|
||||||
|
}
|
||||||
|
proc ps7_mio_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B40 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B44 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B48 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B4C 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B50 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B54 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B58 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B5C 0xFFFFFFFF 0x0018C61C
|
||||||
|
mask_write 0XF8000B60 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B64 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B68 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B6C 0x00007FFF 0x00000260
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000021
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000020
|
||||||
|
mask_write 0XF8000B70 0x07FFFFFF 0x00000823
|
||||||
|
mask_write 0XF8000700 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000704 0x00003FFF 0x00001602
|
||||||
|
mask_write 0XF8000708 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800070C 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000710 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000714 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000718 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800071C 0x00003FFF 0x00000600
|
||||||
|
mask_write 0XF8000720 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000724 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000728 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800072C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000730 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000734 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000738 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800073C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000740 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000744 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000748 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF800074C 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000750 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000754 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000758 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800075C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000760 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000764 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000768 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800076C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000770 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000774 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000778 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800077C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000780 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000784 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000788 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800078C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000790 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000794 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000798 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800079C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007A0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A8 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007AC 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007BC 0x00003F01 0x00001201
|
||||||
|
mask_write 0XF80007C0 0x00003FFF 0x000012E0
|
||||||
|
mask_write 0XF80007C4 0x00003FFF 0x000012E1
|
||||||
|
mask_write 0XF80007C8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007CC 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007D0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007D4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF8000830 0x003F003F 0x002F0037
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_peripherals_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B48 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B4C 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B50 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B54 0x00000180 0x00000180
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
mask_write 0XE0001034 0x000000FF 0x00000006
|
||||||
|
mask_write 0XE0001018 0x0000FFFF 0x0000007C
|
||||||
|
mask_write 0XE0001000 0x000001FF 0x00000017
|
||||||
|
mask_write 0XE0001004 0x00000FFF 0x00000020
|
||||||
|
mask_write 0XE000D000 0x00080000 0x00080000
|
||||||
|
mask_write 0XF8007000 0x20000000 0x00000000
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
}
|
||||||
|
proc ps7_post_config_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000900 0x0000000F 0x0000000F
|
||||||
|
mask_write 0XF8000240 0xFFFFFFFF 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_debug_2_0 {} {
|
||||||
|
mwr -force 0XF8898FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8899FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8809FB0 0xC5ACCE55
|
||||||
|
}
|
||||||
|
proc ps7_pll_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000110 0x003FFFF0 0x000FA220
|
||||||
|
mask_write 0XF8000100 0x0007F000 0x00028000
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000120 0x1F003F30 0x1F000200
|
||||||
|
mask_write 0XF8000114 0x003FFFF0 0x0012C220
|
||||||
|
mask_write 0XF8000104 0x0007F000 0x00020000
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000002
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000124 0xFFF00003 0x0C200003
|
||||||
|
mask_write 0XF8000118 0x003FFFF0 0x001452C0
|
||||||
|
mask_write 0XF8000108 0x0007F000 0x0001E000
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000004
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_clock_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000128 0x03F03F01 0x00700F01
|
||||||
|
mask_write 0XF8000138 0x00000011 0x00000001
|
||||||
|
mask_write 0XF8000140 0x03F03F71 0x00100801
|
||||||
|
mask_write 0XF800014C 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000150 0x00003F33 0x00000A01
|
||||||
|
mask_write 0XF8000154 0x00003F33 0x00000A02
|
||||||
|
mask_write 0XF8000168 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000170 0x03F03F30 0x00400500
|
||||||
|
mask_write 0XF80001C4 0x00000001 0x00000001
|
||||||
|
mask_write 0XF800012C 0x01FFCCCD 0x01EC044D
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_ddr_init_data_1_0 {} {
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000080
|
||||||
|
mask_write 0XF8006004 0x1FFFFFFF 0x00081081
|
||||||
|
mask_write 0XF8006008 0x03FFFFFF 0x03C0780F
|
||||||
|
mask_write 0XF800600C 0x03FFFFFF 0x02001001
|
||||||
|
mask_write 0XF8006010 0x03FFFFFF 0x00014001
|
||||||
|
mask_write 0XF8006014 0x001FFFFF 0x0004281A
|
||||||
|
mask_write 0XF8006018 0xF7FFFFFF 0x44E458D2
|
||||||
|
mask_write 0XF800601C 0xFFFFFFFF 0x720238E5
|
||||||
|
mask_write 0XF8006020 0xFFFFFFFC 0x272872D0
|
||||||
|
mask_write 0XF8006024 0x0FFFFFFF 0x0000003C
|
||||||
|
mask_write 0XF8006028 0x00003FFF 0x00002007
|
||||||
|
mask_write 0XF800602C 0xFFFFFFFF 0x00000008
|
||||||
|
mask_write 0XF8006030 0xFFFFFFFF 0x00040930
|
||||||
|
mask_write 0XF8006034 0x13FF3FFF 0x000116D4
|
||||||
|
mask_write 0XF8006038 0x00001FC3 0x00000000
|
||||||
|
mask_write 0XF800603C 0x000FFFFF 0x00000777
|
||||||
|
mask_write 0XF8006040 0xFFFFFFFF 0xFFF00000
|
||||||
|
mask_write 0XF8006044 0x0FFFFFFF 0x0F666666
|
||||||
|
mask_write 0XF8006048 0x3FFFFFFF 0x0003C248
|
||||||
|
mask_write 0XF8006050 0xFF0F8FFF 0x77010800
|
||||||
|
mask_write 0XF8006058 0x0001FFFF 0x00000101
|
||||||
|
mask_write 0XF800605C 0x0000FFFF 0x00005003
|
||||||
|
mask_write 0XF8006060 0x000017FF 0x0000003E
|
||||||
|
mask_write 0XF8006064 0x00021FE0 0x00020000
|
||||||
|
mask_write 0XF8006068 0x03FFFFFF 0x00284141
|
||||||
|
mask_write 0XF800606C 0x0000FFFF 0x00001610
|
||||||
|
mask_write 0XF80060A0 0x00FFFFFF 0x00008000
|
||||||
|
mask_write 0XF80060A4 0xFFFFFFFF 0x10200802
|
||||||
|
mask_write 0XF80060A8 0x0FFFFFFF 0x0690CB73
|
||||||
|
mask_write 0XF80060AC 0x000001FF 0x000001FE
|
||||||
|
mask_write 0XF80060B0 0x1FFFFFFF 0x1CFFFFFF
|
||||||
|
mask_write 0XF80060B4 0x000007FF 0x00000200
|
||||||
|
mask_write 0XF80060B8 0x01FFFFFF 0x00200066
|
||||||
|
mask_write 0XF80060C4 0x00000003 0x00000000
|
||||||
|
mask_write 0XF80060C8 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF80060DC 0x00000001 0x00000000
|
||||||
|
mask_write 0XF80060F0 0x0000FFFF 0x00000000
|
||||||
|
mask_write 0XF80060F4 0x0000000F 0x00000008
|
||||||
|
mask_write 0XF8006114 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF8006118 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800611C 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006120 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006124 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800612C 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006130 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006134 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006138 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006140 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006144 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006148 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF800614C 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006154 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006158 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF800615C 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006160 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006168 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800616C 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006170 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006174 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800617C 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006180 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006184 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006188 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006190 0xFFFFFFFF 0x10040080
|
||||||
|
mask_write 0XF8006194 0x000FFFFF 0x0001FC82
|
||||||
|
mask_write 0XF8006204 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF8006208 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF800620C 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006210 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006214 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006218 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF800621C 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006220 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006224 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF80062A8 0x00000FF7 0x00000000
|
||||||
|
mask_write 0XF80062AC 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF80062B0 0x003FFFFF 0x00005125
|
||||||
|
mask_write 0XF80062B4 0x0003FFFF 0x000012A8
|
||||||
|
mask_poll 0XF8000B74 0x00002000
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000081
|
||||||
|
mask_poll 0XF8006054 0x00000007
|
||||||
|
}
|
||||||
|
proc ps7_mio_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B40 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B44 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B48 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B4C 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B50 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B54 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B58 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B5C 0xFFFFFFFF 0x0018C61C
|
||||||
|
mask_write 0XF8000B60 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B64 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B68 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B6C 0x000073FF 0x00000260
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000021
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000020
|
||||||
|
mask_write 0XF8000B70 0x07FFFFFF 0x00000823
|
||||||
|
mask_write 0XF8000700 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000704 0x00003FFF 0x00001602
|
||||||
|
mask_write 0XF8000708 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800070C 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000710 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000714 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000718 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800071C 0x00003FFF 0x00000600
|
||||||
|
mask_write 0XF8000720 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000724 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000728 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800072C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000730 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000734 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000738 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800073C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000740 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000744 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000748 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF800074C 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000750 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000754 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000758 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800075C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000760 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000764 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000768 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800076C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000770 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000774 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000778 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800077C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000780 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000784 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000788 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800078C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000790 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000794 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000798 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800079C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007A0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A8 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007AC 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007BC 0x00003F01 0x00001201
|
||||||
|
mask_write 0XF80007C0 0x00003FFF 0x000012E0
|
||||||
|
mask_write 0XF80007C4 0x00003FFF 0x000012E1
|
||||||
|
mask_write 0XF80007C8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007CC 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007D0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007D4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF8000830 0x003F003F 0x002F0037
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_peripherals_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B48 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B4C 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B50 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B54 0x00000180 0x00000180
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
mask_write 0XE0001034 0x000000FF 0x00000006
|
||||||
|
mask_write 0XE0001018 0x0000FFFF 0x0000007C
|
||||||
|
mask_write 0XE0001000 0x000001FF 0x00000017
|
||||||
|
mask_write 0XE0001004 0x00000FFF 0x00000020
|
||||||
|
mask_write 0XE000D000 0x00080000 0x00080000
|
||||||
|
mask_write 0XF8007000 0x20000000 0x00000000
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
}
|
||||||
|
proc ps7_post_config_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000900 0x0000000F 0x0000000F
|
||||||
|
mask_write 0XF8000240 0xFFFFFFFF 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_debug_1_0 {} {
|
||||||
|
mwr -force 0XF8898FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8899FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8809FB0 0xC5ACCE55
|
||||||
|
}
|
||||||
|
set PCW_SILICON_VER_1_0 "0x0"
|
||||||
|
set PCW_SILICON_VER_2_0 "0x1"
|
||||||
|
set PCW_SILICON_VER_3_0 "0x2"
|
||||||
|
set APU_FREQ 666666666
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
proc mask_poll { addr mask } {
|
||||||
|
set count 1
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval & $mask}]
|
||||||
|
while { $maskedval == 0 } {
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval & $mask}]
|
||||||
|
set count [ expr { $count + 1 } ]
|
||||||
|
if { $count == 100000000 } {
|
||||||
|
puts "Timeout Reached. Mask poll failed at ADDRESS: $addr MASK: $mask"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
proc mask_delay { addr val } {
|
||||||
|
set delay [ get_number_of_cycles_for_delay $val ]
|
||||||
|
perf_reset_and_start_timer
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval < $delay}]
|
||||||
|
while { $maskedval == 1 } {
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval < $delay}]
|
||||||
|
}
|
||||||
|
perf_reset_clock
|
||||||
|
}
|
||||||
|
|
||||||
|
proc ps_version { } {
|
||||||
|
set si_ver "0x[string range [mrd 0xF8007080] end-8 end]"
|
||||||
|
set mask_sil_ver "0x[expr {$si_ver >> 28}]"
|
||||||
|
return $mask_sil_ver;
|
||||||
|
}
|
||||||
|
|
||||||
|
proc ps7_post_config {} {
|
||||||
|
set saved_mode [configparams force-mem-accesses]
|
||||||
|
configparams force-mem-accesses 1
|
||||||
|
|
||||||
|
variable PCW_SILICON_VER_1_0
|
||||||
|
variable PCW_SILICON_VER_2_0
|
||||||
|
variable PCW_SILICON_VER_3_0
|
||||||
|
set sil_ver [ps_version]
|
||||||
|
|
||||||
|
if { $sil_ver == $PCW_SILICON_VER_1_0} {
|
||||||
|
ps7_post_config_1_0
|
||||||
|
} elseif { $sil_ver == $PCW_SILICON_VER_2_0 } {
|
||||||
|
ps7_post_config_2_0
|
||||||
|
} else {
|
||||||
|
ps7_post_config_3_0
|
||||||
|
}
|
||||||
|
configparams force-mem-accesses $saved_mode
|
||||||
|
}
|
||||||
|
|
||||||
|
proc ps7_debug {} {
|
||||||
|
variable PCW_SILICON_VER_1_0
|
||||||
|
variable PCW_SILICON_VER_2_0
|
||||||
|
variable PCW_SILICON_VER_3_0
|
||||||
|
set sil_ver [ps_version]
|
||||||
|
|
||||||
|
if { $sil_ver == $PCW_SILICON_VER_1_0} {
|
||||||
|
ps7_debug_1_0
|
||||||
|
} elseif { $sil_ver == $PCW_SILICON_VER_2_0 } {
|
||||||
|
ps7_debug_2_0
|
||||||
|
} else {
|
||||||
|
ps7_debug_3_0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
proc ps7_init {} {
|
||||||
|
variable PCW_SILICON_VER_1_0
|
||||||
|
variable PCW_SILICON_VER_2_0
|
||||||
|
variable PCW_SILICON_VER_3_0
|
||||||
|
set sil_ver [ps_version]
|
||||||
|
if { $sil_ver == $PCW_SILICON_VER_1_0} {
|
||||||
|
ps7_mio_init_data_1_0
|
||||||
|
ps7_pll_init_data_1_0
|
||||||
|
ps7_clock_init_data_1_0
|
||||||
|
ps7_ddr_init_data_1_0
|
||||||
|
ps7_peripherals_init_data_1_0
|
||||||
|
#puts "PCW Silicon Version : 1.0"
|
||||||
|
} elseif { $sil_ver == $PCW_SILICON_VER_2_0 } {
|
||||||
|
ps7_mio_init_data_2_0
|
||||||
|
ps7_pll_init_data_2_0
|
||||||
|
ps7_clock_init_data_2_0
|
||||||
|
ps7_ddr_init_data_2_0
|
||||||
|
ps7_peripherals_init_data_2_0
|
||||||
|
#puts "PCW Silicon Version : 2.0"
|
||||||
|
} else {
|
||||||
|
ps7_mio_init_data_3_0
|
||||||
|
ps7_pll_init_data_3_0
|
||||||
|
ps7_clock_init_data_3_0
|
||||||
|
ps7_ddr_init_data_3_0
|
||||||
|
ps7_peripherals_init_data_3_0
|
||||||
|
#puts "PCW Silicon Version : 3.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# For delay calculation using global timer
|
||||||
|
|
||||||
|
# start timer
|
||||||
|
proc perf_start_clock { } {
|
||||||
|
|
||||||
|
#writing SCU_GLOBAL_TIMER_CONTROL register
|
||||||
|
|
||||||
|
mask_write 0xF8F00208 0x00000109 0x00000009
|
||||||
|
}
|
||||||
|
|
||||||
|
# stop timer and reset timer count regs
|
||||||
|
proc perf_reset_clock { } {
|
||||||
|
perf_disable_clock
|
||||||
|
mask_write 0xF8F00200 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0xF8F00204 0xFFFFFFFF 0x00000000
|
||||||
|
}
|
||||||
|
|
||||||
|
# Compute mask for given delay in miliseconds
|
||||||
|
proc get_number_of_cycles_for_delay { delay } {
|
||||||
|
|
||||||
|
# GTC is always clocked at 1/2 of the CPU frequency (CPU_3x2x)
|
||||||
|
variable APU_FREQ
|
||||||
|
return [ expr ($delay * $APU_FREQ /(2 * 1000))]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# stop timer
|
||||||
|
proc perf_disable_clock {} {
|
||||||
|
mask_write 0xF8F00208 0xFFFFFFFF 0x00000000
|
||||||
|
}
|
||||||
|
|
||||||
|
proc perf_reset_and_start_timer {} {
|
||||||
|
perf_reset_clock
|
||||||
|
perf_start_clock
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,137 @@
|
|||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* (c) Copyright 2010-2014 Xilinx, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||||
|
* software and associated documentation files (the "Software"), to deal in the Software
|
||||||
|
* without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||||
|
* publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||||
|
* persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or
|
||||||
|
* substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* Use of the Software is limited solely to applications: (a) running on a Xilinx device, or
|
||||||
|
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||||
|
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* Except as contained in this notice, the name of the Xilinx shall not be used in advertising or
|
||||||
|
* otherwise to promote the sale, use or other dealings in this Software without prior written
|
||||||
|
* authorization from Xilinx.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
/****************************************************************************/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @file ps7_init.h
|
||||||
|
*
|
||||||
|
* This file can be included in FSBL code
|
||||||
|
* to get prototype of ps7_init() function
|
||||||
|
* and error codes
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//typedef unsigned int u32;
|
||||||
|
|
||||||
|
|
||||||
|
/** do we need to make this name more unique ? **/
|
||||||
|
//extern u32 ps7_init_data[];
|
||||||
|
extern unsigned long * ps7_ddr_init_data;
|
||||||
|
extern unsigned long * ps7_mio_init_data;
|
||||||
|
extern unsigned long * ps7_pll_init_data;
|
||||||
|
extern unsigned long * ps7_clock_init_data;
|
||||||
|
extern unsigned long * ps7_peripherals_init_data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define OPCODE_EXIT 0U
|
||||||
|
#define OPCODE_CLEAR 1U
|
||||||
|
#define OPCODE_WRITE 2U
|
||||||
|
#define OPCODE_MASKWRITE 3U
|
||||||
|
#define OPCODE_MASKPOLL 4U
|
||||||
|
#define OPCODE_MASKDELAY 5U
|
||||||
|
#define NEW_PS7_ERR_CODE 1
|
||||||
|
|
||||||
|
/* Encode number of arguments in last nibble */
|
||||||
|
#define EMIT_EXIT() ( (OPCODE_EXIT << 4 ) | 0 )
|
||||||
|
#define EMIT_CLEAR(addr) ( (OPCODE_CLEAR << 4 ) | 1 ) , addr
|
||||||
|
#define EMIT_WRITE(addr,val) ( (OPCODE_WRITE << 4 ) | 2 ) , addr, val
|
||||||
|
#define EMIT_MASKWRITE(addr,mask,val) ( (OPCODE_MASKWRITE << 4 ) | 3 ) , addr, mask, val
|
||||||
|
#define EMIT_MASKPOLL(addr,mask) ( (OPCODE_MASKPOLL << 4 ) | 2 ) , addr, mask
|
||||||
|
#define EMIT_MASKDELAY(addr,mask) ( (OPCODE_MASKDELAY << 4 ) | 2 ) , addr, mask
|
||||||
|
|
||||||
|
/* Returns codes of PS7_Init */
|
||||||
|
#define PS7_INIT_SUCCESS (0) // 0 is success in good old C
|
||||||
|
#define PS7_INIT_CORRUPT (1) // 1 the data is corrupted, and slcr reg are in corrupted state now
|
||||||
|
#define PS7_INIT_TIMEOUT (2) // 2 when a poll operation timed out
|
||||||
|
#define PS7_POLL_FAILED_DDR_INIT (3) // 3 when a poll operation timed out for ddr init
|
||||||
|
#define PS7_POLL_FAILED_DMA (4) // 4 when a poll operation timed out for dma done bit
|
||||||
|
#define PS7_POLL_FAILED_PLL (5) // 5 when a poll operation timed out for pll sequence init
|
||||||
|
|
||||||
|
|
||||||
|
/* Silicon Versions */
|
||||||
|
#define PCW_SILICON_VERSION_1 0
|
||||||
|
#define PCW_SILICON_VERSION_2 1
|
||||||
|
#define PCW_SILICON_VERSION_3 2
|
||||||
|
|
||||||
|
/* This flag to be used by FSBL to check whether ps7_post_config() proc exixts */
|
||||||
|
#define PS7_POST_CONFIG
|
||||||
|
|
||||||
|
/* Freq of all peripherals */
|
||||||
|
|
||||||
|
#define APU_FREQ 666666687
|
||||||
|
#define DDR_FREQ 533333374
|
||||||
|
#define DCI_FREQ 10158730
|
||||||
|
#define QSPI_FREQ 200000000
|
||||||
|
#define SMC_FREQ 10000000
|
||||||
|
#define ENET0_FREQ 125000000
|
||||||
|
#define ENET1_FREQ 10000000
|
||||||
|
#define USB0_FREQ 60000000
|
||||||
|
#define USB1_FREQ 60000000
|
||||||
|
#define SDIO_FREQ 100000000
|
||||||
|
#define UART_FREQ 100000000
|
||||||
|
#define SPI_FREQ 10000000
|
||||||
|
#define I2C_FREQ 111111115
|
||||||
|
#define WDT_FREQ 111111115
|
||||||
|
#define TTC_FREQ 50000000
|
||||||
|
#define CAN_FREQ 10000000
|
||||||
|
#define PCAP_FREQ 200000000
|
||||||
|
#define TPIU_FREQ 200000000
|
||||||
|
#define FPGA0_FREQ 50000000
|
||||||
|
#define FPGA1_FREQ 10000000
|
||||||
|
#define FPGA2_FREQ 10000000
|
||||||
|
#define FPGA3_FREQ 10000000
|
||||||
|
|
||||||
|
|
||||||
|
/* For delay calculation using global registers*/
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_L32 0xF8F00200
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_U32 0xF8F00204
|
||||||
|
#define SCU_GLOBAL_TIMER_CONTROL 0xF8F00208
|
||||||
|
#define SCU_GLOBAL_TIMER_AUTO_INC 0xF8F00218
|
||||||
|
|
||||||
|
int ps7_config( unsigned long*);
|
||||||
|
int ps7_init();
|
||||||
|
int ps7_post_config();
|
||||||
|
int ps7_debug();
|
||||||
|
char* getPS7MessageInfo(unsigned key);
|
||||||
|
|
||||||
|
void perf_start_clock(void);
|
||||||
|
void perf_disable_clock(void);
|
||||||
|
void perf_reset_clock(void);
|
||||||
|
void perf_reset_and_start_timer();
|
||||||
|
int get_number_of_cycles_for_delay(unsigned int delay);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
onbreak {quit -force}
|
||||||
|
onerror {quit -force}
|
||||||
|
|
||||||
|
asim -t 1ps +access +r +m+system -L xil_defaultlib -L xpm -L axi_infrastructure_v1_1_0 -L smartconnect_v1_0 -L axi_protocol_checker_v2_0_1 -L axi_vip_v1_1_1 -L processing_system7_vip_v1_0_3 -L xilinx_vip -L unisims_ver -L unimacro_ver -L secureip -O5 xil_defaultlib.system xil_defaultlib.glbl
|
||||||
|
|
||||||
|
do {wave.do}
|
||||||
|
|
||||||
|
view wave
|
||||||
|
view structure
|
||||||
|
|
||||||
|
do {system.udo}
|
||||||
|
|
||||||
|
run -all
|
||||||
|
|
||||||
|
endsim
|
||||||
|
|
||||||
|
quit -force
|
@ -0,0 +1,151 @@
|
|||||||
|
#!/bin/bash -f
|
||||||
|
#*********************************************************************************************************
|
||||||
|
# Vivado (TM) v2017.4 (64-bit)
|
||||||
|
#
|
||||||
|
# Filename : system.sh
|
||||||
|
# Simulator : Aldec Active-HDL Simulator
|
||||||
|
# Description : Simulation script for compiling, elaborating and verifying the project source files.
|
||||||
|
# The script will automatically create the design libraries sub-directories in the run
|
||||||
|
# directory, add the library logical mappings in the simulator setup file, create default
|
||||||
|
# 'do/prj' file, execute compilation, elaboration and simulation steps.
|
||||||
|
#
|
||||||
|
# Generated by Vivado on Sat May 25 13:08:26 +0800 2019
|
||||||
|
# SW Build 2086221 on Fri Dec 15 20:55:39 MST 2017
|
||||||
|
#
|
||||||
|
# Copyright 1986-2017 Xilinx, Inc. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# usage: system.sh [-help]
|
||||||
|
# usage: system.sh [-lib_map_path]
|
||||||
|
# usage: system.sh [-noclean_files]
|
||||||
|
# usage: system.sh [-reset_run]
|
||||||
|
#
|
||||||
|
# Prerequisite:- To compile and run simulation, you must compile the Xilinx simulation libraries using the
|
||||||
|
# 'compile_simlib' TCL command. For more information about this command, run 'compile_simlib -help' in the
|
||||||
|
# Vivado Tcl Shell. Once the libraries have been compiled successfully, specify the -lib_map_path switch
|
||||||
|
# that points to these libraries and rerun export_simulation. For more information about this switch please
|
||||||
|
# type 'export_simulation -help' in the Tcl shell.
|
||||||
|
#
|
||||||
|
# You can also point to the simulation libraries by either replacing the <SPECIFY_COMPILED_LIB_PATH> in this
|
||||||
|
# script with the compiled library directory path or specify this path with the '-lib_map_path' switch when
|
||||||
|
# executing this script. Please type 'system.sh -help' for more information.
|
||||||
|
#
|
||||||
|
# Additional references - 'Xilinx Vivado Design Suite User Guide:Logic simulation (UG900)'
|
||||||
|
#
|
||||||
|
#*********************************************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
# Script info
|
||||||
|
echo -e "system.sh - Script generated by export_simulation (Vivado v2017.4 (64-bit)-id)\n"
|
||||||
|
|
||||||
|
# Main steps
|
||||||
|
run()
|
||||||
|
{
|
||||||
|
check_args $# $1
|
||||||
|
setup $1 $2
|
||||||
|
compile
|
||||||
|
simulate
|
||||||
|
}
|
||||||
|
|
||||||
|
# RUN_STEP: <compile>
|
||||||
|
compile()
|
||||||
|
{
|
||||||
|
# Compile design files
|
||||||
|
source compile.do 2>&1 | tee -a compile.log
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# RUN_STEP: <simulate>
|
||||||
|
simulate()
|
||||||
|
{
|
||||||
|
runvsimsa -l simulate.log -do "do {simulate.do}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# STEP: setup
|
||||||
|
setup()
|
||||||
|
{
|
||||||
|
case $1 in
|
||||||
|
"-lib_map_path" )
|
||||||
|
if [[ ($2 == "") ]]; then
|
||||||
|
echo -e "ERROR: Simulation library directory path not specified (type \"./system.sh -help\" for more information)\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
copy_setup_file $2
|
||||||
|
;;
|
||||||
|
"-reset_run" )
|
||||||
|
reset_run
|
||||||
|
echo -e "INFO: Simulation run files deleted.\n"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
"-noclean_files" )
|
||||||
|
# do not remove previous data
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
copy_setup_file $2
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Add any setup/initialization commands here:-
|
||||||
|
|
||||||
|
# <user specific commands>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# Copy library.cfg file
|
||||||
|
copy_setup_file()
|
||||||
|
{
|
||||||
|
file="library.cfg"
|
||||||
|
if [[ ($1 != "") ]]; then
|
||||||
|
lib_map_path="$1"
|
||||||
|
else
|
||||||
|
lib_map_path="L:/REV2019/MZ7XAB/MZ7XA_7010/02_example_SOC/CH08_Intr_timer/Miz_sys/Miz_sys.cache/compile_simlib/activehdl"
|
||||||
|
fi
|
||||||
|
if [[ ($lib_map_path != "") ]]; then
|
||||||
|
src_file="$lib_map_path/$file"
|
||||||
|
cp $src_file .
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Delete generated data from the previous run
|
||||||
|
reset_run()
|
||||||
|
{
|
||||||
|
files_to_remove=(compile.log elaboration.log simulate.log dataset.asdb work activehdl)
|
||||||
|
for (( i=0; i<${#files_to_remove[*]}; i++ )); do
|
||||||
|
file="${files_to_remove[i]}"
|
||||||
|
if [[ -e $file ]]; then
|
||||||
|
rm -rf $file
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check command line arguments
|
||||||
|
check_args()
|
||||||
|
{
|
||||||
|
if [[ ($1 == 1 ) && ($2 != "-lib_map_path" && $2 != "-noclean_files" && $2 != "-reset_run" && $2 != "-help" && $2 != "-h") ]]; then
|
||||||
|
echo -e "ERROR: Unknown option specified '$2' (type \"./system.sh -help\" for more information)\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ($2 == "-help" || $2 == "-h") ]]; then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Script usage
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
msg="Usage: system.sh [-help]\n\
|
||||||
|
Usage: system.sh [-lib_map_path]\n\
|
||||||
|
Usage: system.sh [-reset_run]\n\
|
||||||
|
Usage: system.sh [-noclean_files]\n\n\
|
||||||
|
[-help] -- Print help information for this script\n\n\
|
||||||
|
[-lib_map_path <path>] -- Compiled simulation library directory path. The simulation library is compiled\n\
|
||||||
|
using the compile_simlib tcl command. Please see 'compile_simlib -help' for more information.\n\n\
|
||||||
|
[-reset_run] -- Recreate simulator setup files and library mappings for a clean run. The generated files\n\
|
||||||
|
from the previous run will be removed. If you don't want to remove the simulator generated files, use the\n\
|
||||||
|
-noclean_files switch.\n\n\
|
||||||
|
[-noclean_files] -- Reset previous run, but do not remove simulator generated files from the previous run.\n\n"
|
||||||
|
echo -e $msg
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Launch script
|
||||||
|
run $1 $2
|
@ -0,0 +1,2 @@
|
|||||||
|
add wave *
|
||||||
|
add wave /glbl/GSR
|
@ -0,0 +1,48 @@
|
|||||||
|
################################################################################
|
||||||
|
# Vivado (TM) v2017.4 (64-bit)
|
||||||
|
#
|
||||||
|
# README.txt: Please read the sections below to understand the steps required to
|
||||||
|
# run the exported script and information about the source files.
|
||||||
|
#
|
||||||
|
# Generated by export_simulation on Sat May 25 13:08:26 +0800 2019
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
1. How to run the generated simulation script:-
|
||||||
|
|
||||||
|
From the shell prompt in the current directory, issue the following command:-
|
||||||
|
|
||||||
|
./system.sh
|
||||||
|
|
||||||
|
This command will launch the 'execute' function for the single-step flow. This
|
||||||
|
function is called from the main 'run' function in the script file.
|
||||||
|
|
||||||
|
The 'run' function first executes the 'setup' function, the purpose of which is to
|
||||||
|
create simulator specific setup files, create design library mappings and library
|
||||||
|
directories and copy 'glbl.v' from the Vivado software install location into the
|
||||||
|
current directory.
|
||||||
|
|
||||||
|
The 'setup' function is also used for removing the simulator generated data in
|
||||||
|
order to reset the current directory to the original state when export_simulation
|
||||||
|
was launched from Vivado. This generated data can be removed by specifying the
|
||||||
|
'-reset_run' switch to the './system.sh' script.
|
||||||
|
|
||||||
|
./system.sh -reset_run
|
||||||
|
|
||||||
|
To keep the generated data from the previous run but regenerate the setup files and
|
||||||
|
library directories, use the '-noclean_files' switch.
|
||||||
|
|
||||||
|
./system.sh -noclean_files
|
||||||
|
|
||||||
|
For more information on the script, please type './system.sh -help'.
|
||||||
|
|
||||||
|
2. Additional design information files:-
|
||||||
|
|
||||||
|
export_simulation generates following additional file that can be used for fetching
|
||||||
|
the design files information or for integrating with external custom scripts.
|
||||||
|
|
||||||
|
Name : file_info.txt
|
||||||
|
Purpose: This file contains detail design file information based on the compile order
|
||||||
|
when export_simulation was executed from Vivado. The file contains information
|
||||||
|
about the file type, name, whether it is part of the IP, associated library
|
||||||
|
and the file path information.
|
@ -0,0 +1,12 @@
|
|||||||
|
xpm_fifo.sv,systemverilog,xil_defaultlib,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_fifo/hdl/xpm_fifo.sv,incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
xpm_memory.sv,systemverilog,xil_defaultlib,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_memory/hdl/xpm_memory.sv,incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
xpm_cdc.sv,systemverilog,xil_defaultlib,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_cdc/hdl/xpm_cdc.sv,incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
xpm_VCOMP.vhd,vhdl,xpm,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_VCOMP.vhd,incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
axi_infrastructure_v1_1_vl_rfs.v,verilog,axi_infrastructure_v1_1_0,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl/axi_infrastructure_v1_1_vl_rfs.v,incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
sc_util_v1_0_vl_rfs.sv,systemverilog,smartconnect_v1_0,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/sc_util_v1_0_vl_rfs.sv,incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
axi_protocol_checker_v2_0_vl_rfs.sv,systemverilog,axi_protocol_checker_v2_0_1,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/3b24/hdl/axi_protocol_checker_v2_0_vl_rfs.sv,incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
axi_vip_v1_1_vl_rfs.sv,systemverilog,axi_vip_v1_1_1,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/a16a/hdl/axi_vip_v1_1_vl_rfs.sv,incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
processing_system7_vip_v1_0_vl_rfs.sv,systemverilog,processing_system7_vip_v1_0_3,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl/processing_system7_vip_v1_0_vl_rfs.sv,incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
system_processing_system7_0_0.v,verilog,xil_defaultlib,../../../bd/system/ip/system_processing_system7_0_0/sim/system_processing_system7_0_0.v,incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
system.v,verilog,xil_defaultlib,../../../bd/system/sim/system.v,incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
glbl.v,Verilog,xil_defaultlib,glbl.v
|
71
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/ies/glbl.v
Normal file
71
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/ies/glbl.v
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
// $Header: /devl/xcs/repo/env/Databases/CAEInterfaces/verunilibs/data/glbl.v,v 1.14 2010/10/28 20:44:00 fphillip Exp $
|
||||||
|
`ifndef GLBL
|
||||||
|
`define GLBL
|
||||||
|
`timescale 1 ps / 1 ps
|
||||||
|
|
||||||
|
module glbl ();
|
||||||
|
|
||||||
|
parameter ROC_WIDTH = 100000;
|
||||||
|
parameter TOC_WIDTH = 0;
|
||||||
|
|
||||||
|
//-------- STARTUP Globals --------------
|
||||||
|
wire GSR;
|
||||||
|
wire GTS;
|
||||||
|
wire GWE;
|
||||||
|
wire PRLD;
|
||||||
|
tri1 p_up_tmp;
|
||||||
|
tri (weak1, strong0) PLL_LOCKG = p_up_tmp;
|
||||||
|
|
||||||
|
wire PROGB_GLBL;
|
||||||
|
wire CCLKO_GLBL;
|
||||||
|
wire FCSBO_GLBL;
|
||||||
|
wire [3:0] DO_GLBL;
|
||||||
|
wire [3:0] DI_GLBL;
|
||||||
|
|
||||||
|
reg GSR_int;
|
||||||
|
reg GTS_int;
|
||||||
|
reg PRLD_int;
|
||||||
|
|
||||||
|
//-------- JTAG Globals --------------
|
||||||
|
wire JTAG_TDO_GLBL;
|
||||||
|
wire JTAG_TCK_GLBL;
|
||||||
|
wire JTAG_TDI_GLBL;
|
||||||
|
wire JTAG_TMS_GLBL;
|
||||||
|
wire JTAG_TRST_GLBL;
|
||||||
|
|
||||||
|
reg JTAG_CAPTURE_GLBL;
|
||||||
|
reg JTAG_RESET_GLBL;
|
||||||
|
reg JTAG_SHIFT_GLBL;
|
||||||
|
reg JTAG_UPDATE_GLBL;
|
||||||
|
reg JTAG_RUNTEST_GLBL;
|
||||||
|
|
||||||
|
reg JTAG_SEL1_GLBL = 0;
|
||||||
|
reg JTAG_SEL2_GLBL = 0 ;
|
||||||
|
reg JTAG_SEL3_GLBL = 0;
|
||||||
|
reg JTAG_SEL4_GLBL = 0;
|
||||||
|
|
||||||
|
reg JTAG_USER_TDO1_GLBL = 1'bz;
|
||||||
|
reg JTAG_USER_TDO2_GLBL = 1'bz;
|
||||||
|
reg JTAG_USER_TDO3_GLBL = 1'bz;
|
||||||
|
reg JTAG_USER_TDO4_GLBL = 1'bz;
|
||||||
|
|
||||||
|
assign (strong1, weak0) GSR = GSR_int;
|
||||||
|
assign (strong1, weak0) GTS = GTS_int;
|
||||||
|
assign (weak1, weak0) PRLD = PRLD_int;
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
GSR_int = 1'b1;
|
||||||
|
PRLD_int = 1'b1;
|
||||||
|
#(ROC_WIDTH)
|
||||||
|
GSR_int = 1'b0;
|
||||||
|
PRLD_int = 1'b0;
|
||||||
|
end
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
GTS_int = 1'b1;
|
||||||
|
#(TOC_WIDTH)
|
||||||
|
GTS_int = 1'b0;
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
||||||
|
`endif
|
BIN
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/ies/libps7.dll
Normal file
BIN
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/ies/libps7.dll
Normal file
Binary file not shown.
BIN
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/ies/libps7.so
Normal file
BIN
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/ies/libps7.so
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
137
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/ies/ps7_init.h
Normal file
137
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/ies/ps7_init.h
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* (c) Copyright 2010-2014 Xilinx, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||||
|
* software and associated documentation files (the "Software"), to deal in the Software
|
||||||
|
* without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||||
|
* publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||||
|
* persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or
|
||||||
|
* substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* Use of the Software is limited solely to applications: (a) running on a Xilinx device, or
|
||||||
|
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||||
|
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* Except as contained in this notice, the name of the Xilinx shall not be used in advertising or
|
||||||
|
* otherwise to promote the sale, use or other dealings in this Software without prior written
|
||||||
|
* authorization from Xilinx.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
/****************************************************************************/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @file ps7_init.h
|
||||||
|
*
|
||||||
|
* This file can be included in FSBL code
|
||||||
|
* to get prototype of ps7_init() function
|
||||||
|
* and error codes
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//typedef unsigned int u32;
|
||||||
|
|
||||||
|
|
||||||
|
/** do we need to make this name more unique ? **/
|
||||||
|
//extern u32 ps7_init_data[];
|
||||||
|
extern unsigned long * ps7_ddr_init_data;
|
||||||
|
extern unsigned long * ps7_mio_init_data;
|
||||||
|
extern unsigned long * ps7_pll_init_data;
|
||||||
|
extern unsigned long * ps7_clock_init_data;
|
||||||
|
extern unsigned long * ps7_peripherals_init_data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define OPCODE_EXIT 0U
|
||||||
|
#define OPCODE_CLEAR 1U
|
||||||
|
#define OPCODE_WRITE 2U
|
||||||
|
#define OPCODE_MASKWRITE 3U
|
||||||
|
#define OPCODE_MASKPOLL 4U
|
||||||
|
#define OPCODE_MASKDELAY 5U
|
||||||
|
#define NEW_PS7_ERR_CODE 1
|
||||||
|
|
||||||
|
/* Encode number of arguments in last nibble */
|
||||||
|
#define EMIT_EXIT() ( (OPCODE_EXIT << 4 ) | 0 )
|
||||||
|
#define EMIT_CLEAR(addr) ( (OPCODE_CLEAR << 4 ) | 1 ) , addr
|
||||||
|
#define EMIT_WRITE(addr,val) ( (OPCODE_WRITE << 4 ) | 2 ) , addr, val
|
||||||
|
#define EMIT_MASKWRITE(addr,mask,val) ( (OPCODE_MASKWRITE << 4 ) | 3 ) , addr, mask, val
|
||||||
|
#define EMIT_MASKPOLL(addr,mask) ( (OPCODE_MASKPOLL << 4 ) | 2 ) , addr, mask
|
||||||
|
#define EMIT_MASKDELAY(addr,mask) ( (OPCODE_MASKDELAY << 4 ) | 2 ) , addr, mask
|
||||||
|
|
||||||
|
/* Returns codes of PS7_Init */
|
||||||
|
#define PS7_INIT_SUCCESS (0) // 0 is success in good old C
|
||||||
|
#define PS7_INIT_CORRUPT (1) // 1 the data is corrupted, and slcr reg are in corrupted state now
|
||||||
|
#define PS7_INIT_TIMEOUT (2) // 2 when a poll operation timed out
|
||||||
|
#define PS7_POLL_FAILED_DDR_INIT (3) // 3 when a poll operation timed out for ddr init
|
||||||
|
#define PS7_POLL_FAILED_DMA (4) // 4 when a poll operation timed out for dma done bit
|
||||||
|
#define PS7_POLL_FAILED_PLL (5) // 5 when a poll operation timed out for pll sequence init
|
||||||
|
|
||||||
|
|
||||||
|
/* Silicon Versions */
|
||||||
|
#define PCW_SILICON_VERSION_1 0
|
||||||
|
#define PCW_SILICON_VERSION_2 1
|
||||||
|
#define PCW_SILICON_VERSION_3 2
|
||||||
|
|
||||||
|
/* This flag to be used by FSBL to check whether ps7_post_config() proc exixts */
|
||||||
|
#define PS7_POST_CONFIG
|
||||||
|
|
||||||
|
/* Freq of all peripherals */
|
||||||
|
|
||||||
|
#define APU_FREQ 666666687
|
||||||
|
#define DDR_FREQ 533333374
|
||||||
|
#define DCI_FREQ 10158730
|
||||||
|
#define QSPI_FREQ 200000000
|
||||||
|
#define SMC_FREQ 10000000
|
||||||
|
#define ENET0_FREQ 125000000
|
||||||
|
#define ENET1_FREQ 10000000
|
||||||
|
#define USB0_FREQ 60000000
|
||||||
|
#define USB1_FREQ 60000000
|
||||||
|
#define SDIO_FREQ 100000000
|
||||||
|
#define UART_FREQ 100000000
|
||||||
|
#define SPI_FREQ 10000000
|
||||||
|
#define I2C_FREQ 111111115
|
||||||
|
#define WDT_FREQ 111111115
|
||||||
|
#define TTC_FREQ 50000000
|
||||||
|
#define CAN_FREQ 10000000
|
||||||
|
#define PCAP_FREQ 200000000
|
||||||
|
#define TPIU_FREQ 200000000
|
||||||
|
#define FPGA0_FREQ 50000000
|
||||||
|
#define FPGA1_FREQ 10000000
|
||||||
|
#define FPGA2_FREQ 10000000
|
||||||
|
#define FPGA3_FREQ 10000000
|
||||||
|
|
||||||
|
|
||||||
|
/* For delay calculation using global registers*/
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_L32 0xF8F00200
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_U32 0xF8F00204
|
||||||
|
#define SCU_GLOBAL_TIMER_CONTROL 0xF8F00208
|
||||||
|
#define SCU_GLOBAL_TIMER_AUTO_INC 0xF8F00218
|
||||||
|
|
||||||
|
int ps7_config( unsigned long*);
|
||||||
|
int ps7_init();
|
||||||
|
int ps7_post_config();
|
||||||
|
int ps7_debug();
|
||||||
|
char* getPS7MessageInfo(unsigned key);
|
||||||
|
|
||||||
|
void perf_start_clock(void);
|
||||||
|
void perf_disable_clock(void);
|
||||||
|
void perf_reset_clock(void);
|
||||||
|
void perf_reset_and_start_timer();
|
||||||
|
int get_number_of_cycles_for_delay(unsigned int delay);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
137694
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/ies/ps7_init.html
Normal file
137694
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/ies/ps7_init.html
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,832 @@
|
|||||||
|
proc ps7_pll_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000110 0x003FFFF0 0x000FA220
|
||||||
|
mask_write 0XF8000100 0x0007F000 0x00028000
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000120 0x1F003F30 0x1F000200
|
||||||
|
mask_write 0XF8000114 0x003FFFF0 0x0012C220
|
||||||
|
mask_write 0XF8000104 0x0007F000 0x00020000
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000002
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000124 0xFFF00003 0x0C200003
|
||||||
|
mask_write 0XF8000118 0x003FFFF0 0x001452C0
|
||||||
|
mask_write 0XF8000108 0x0007F000 0x0001E000
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000004
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_clock_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000128 0x03F03F01 0x00700F01
|
||||||
|
mask_write 0XF8000138 0x00000011 0x00000001
|
||||||
|
mask_write 0XF8000140 0x03F03F71 0x00100801
|
||||||
|
mask_write 0XF800014C 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000150 0x00003F33 0x00000A01
|
||||||
|
mask_write 0XF8000154 0x00003F33 0x00000A02
|
||||||
|
mask_write 0XF8000168 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000170 0x03F03F30 0x00400500
|
||||||
|
mask_write 0XF80001C4 0x00000001 0x00000001
|
||||||
|
mask_write 0XF800012C 0x01FFCCCD 0x01EC044D
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_ddr_init_data_3_0 {} {
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000080
|
||||||
|
mask_write 0XF8006004 0x0007FFFF 0x00001081
|
||||||
|
mask_write 0XF8006008 0x03FFFFFF 0x03C0780F
|
||||||
|
mask_write 0XF800600C 0x03FFFFFF 0x02001001
|
||||||
|
mask_write 0XF8006010 0x03FFFFFF 0x00014001
|
||||||
|
mask_write 0XF8006014 0x001FFFFF 0x0004281A
|
||||||
|
mask_write 0XF8006018 0xF7FFFFFF 0x44E458D2
|
||||||
|
mask_write 0XF800601C 0xFFFFFFFF 0x720238E5
|
||||||
|
mask_write 0XF8006020 0x7FDFFFFC 0x270872D0
|
||||||
|
mask_write 0XF8006024 0x0FFFFFC3 0x00000000
|
||||||
|
mask_write 0XF8006028 0x00003FFF 0x00002007
|
||||||
|
mask_write 0XF800602C 0xFFFFFFFF 0x00000008
|
||||||
|
mask_write 0XF8006030 0xFFFFFFFF 0x00040930
|
||||||
|
mask_write 0XF8006034 0x13FF3FFF 0x000116D4
|
||||||
|
mask_write 0XF8006038 0x00000003 0x00000000
|
||||||
|
mask_write 0XF800603C 0x000FFFFF 0x00000777
|
||||||
|
mask_write 0XF8006040 0xFFFFFFFF 0xFFF00000
|
||||||
|
mask_write 0XF8006044 0x0FFFFFFF 0x0F666666
|
||||||
|
mask_write 0XF8006048 0x0003F03F 0x0003C008
|
||||||
|
mask_write 0XF8006050 0xFF0F8FFF 0x77010800
|
||||||
|
mask_write 0XF8006058 0x00010000 0x00000000
|
||||||
|
mask_write 0XF800605C 0x0000FFFF 0x00005003
|
||||||
|
mask_write 0XF8006060 0x000017FF 0x0000003E
|
||||||
|
mask_write 0XF8006064 0x00021FE0 0x00020000
|
||||||
|
mask_write 0XF8006068 0x03FFFFFF 0x00284141
|
||||||
|
mask_write 0XF800606C 0x0000FFFF 0x00001610
|
||||||
|
mask_write 0XF8006078 0x03FFFFFF 0x00466111
|
||||||
|
mask_write 0XF800607C 0x000FFFFF 0x00032222
|
||||||
|
mask_write 0XF80060A4 0xFFFFFFFF 0x10200802
|
||||||
|
mask_write 0XF80060A8 0x0FFFFFFF 0x0690CB73
|
||||||
|
mask_write 0XF80060AC 0x000001FF 0x000001FE
|
||||||
|
mask_write 0XF80060B0 0x1FFFFFFF 0x1CFFFFFF
|
||||||
|
mask_write 0XF80060B4 0x00000200 0x00000200
|
||||||
|
mask_write 0XF80060B8 0x01FFFFFF 0x00200066
|
||||||
|
mask_write 0XF80060C4 0x00000003 0x00000000
|
||||||
|
mask_write 0XF80060C8 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF80060DC 0x00000001 0x00000000
|
||||||
|
mask_write 0XF80060F0 0x0000FFFF 0x00000000
|
||||||
|
mask_write 0XF80060F4 0x0000000F 0x00000008
|
||||||
|
mask_write 0XF8006114 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF8006118 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF800611C 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF8006120 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF8006124 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF800612C 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006130 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006134 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006138 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006140 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006144 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006148 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF800614C 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006154 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006158 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF800615C 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006160 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006168 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800616C 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006170 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006174 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800617C 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006180 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006184 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006188 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006190 0x6FFFFEFE 0x00040080
|
||||||
|
mask_write 0XF8006194 0x000FFFFF 0x0001FC82
|
||||||
|
mask_write 0XF8006204 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF8006208 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF800620C 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF8006210 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF8006214 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF8006218 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF800621C 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006220 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006224 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF80062A8 0x00000FF5 0x00000000
|
||||||
|
mask_write 0XF80062AC 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF80062B0 0x003FFFFF 0x00005125
|
||||||
|
mask_write 0XF80062B4 0x0003FFFF 0x000012A8
|
||||||
|
mask_poll 0XF8000B74 0x00002000
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000081
|
||||||
|
mask_poll 0XF8006054 0x00000007
|
||||||
|
}
|
||||||
|
proc ps7_mio_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B40 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B44 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B48 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B4C 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B50 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B54 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B58 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B5C 0xFFFFFFFF 0x0018C61C
|
||||||
|
mask_write 0XF8000B60 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B64 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B68 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B6C 0x00007FFF 0x00000260
|
||||||
|
mask_write 0XF8000B70 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000020
|
||||||
|
mask_write 0XF8000B70 0x07FEFFFF 0x00000823
|
||||||
|
mask_write 0XF8000700 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000704 0x00003FFF 0x00001602
|
||||||
|
mask_write 0XF8000708 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800070C 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000710 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000714 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000718 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800071C 0x00003FFF 0x00000600
|
||||||
|
mask_write 0XF8000720 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000724 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000728 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800072C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000730 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000734 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000738 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800073C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000740 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000744 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000748 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF800074C 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000750 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000754 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000758 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800075C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000760 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000764 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000768 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800076C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000770 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000774 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000778 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800077C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000780 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000784 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000788 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800078C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000790 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000794 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000798 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800079C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007A0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A8 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007AC 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007BC 0x00003F01 0x00001201
|
||||||
|
mask_write 0XF80007C0 0x00003FFF 0x000012E0
|
||||||
|
mask_write 0XF80007C4 0x00003FFF 0x000012E1
|
||||||
|
mask_write 0XF80007C8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007CC 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007D0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007D4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF8000830 0x003F003F 0x002F0037
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_peripherals_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B48 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B4C 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B50 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B54 0x00000180 0x00000180
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
mask_write 0XE0001034 0x000000FF 0x00000006
|
||||||
|
mask_write 0XE0001018 0x0000FFFF 0x0000007C
|
||||||
|
mask_write 0XE0001000 0x000001FF 0x00000017
|
||||||
|
mask_write 0XE0001004 0x000003FF 0x00000020
|
||||||
|
mask_write 0XE000D000 0x00080000 0x00080000
|
||||||
|
mask_write 0XF8007000 0x20000000 0x00000000
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
}
|
||||||
|
proc ps7_post_config_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000900 0x0000000F 0x0000000F
|
||||||
|
mask_write 0XF8000240 0xFFFFFFFF 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_debug_3_0 {} {
|
||||||
|
mwr -force 0XF8898FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8899FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8809FB0 0xC5ACCE55
|
||||||
|
}
|
||||||
|
proc ps7_pll_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000110 0x003FFFF0 0x000FA220
|
||||||
|
mask_write 0XF8000100 0x0007F000 0x00028000
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000120 0x1F003F30 0x1F000200
|
||||||
|
mask_write 0XF8000114 0x003FFFF0 0x0012C220
|
||||||
|
mask_write 0XF8000104 0x0007F000 0x00020000
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000002
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000124 0xFFF00003 0x0C200003
|
||||||
|
mask_write 0XF8000118 0x003FFFF0 0x001452C0
|
||||||
|
mask_write 0XF8000108 0x0007F000 0x0001E000
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000004
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_clock_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000128 0x03F03F01 0x00700F01
|
||||||
|
mask_write 0XF8000138 0x00000011 0x00000001
|
||||||
|
mask_write 0XF8000140 0x03F03F71 0x00100801
|
||||||
|
mask_write 0XF800014C 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000150 0x00003F33 0x00000A01
|
||||||
|
mask_write 0XF8000154 0x00003F33 0x00000A02
|
||||||
|
mask_write 0XF8000168 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000170 0x03F03F30 0x00400500
|
||||||
|
mask_write 0XF80001C4 0x00000001 0x00000001
|
||||||
|
mask_write 0XF800012C 0x01FFCCCD 0x01EC044D
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_ddr_init_data_2_0 {} {
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000080
|
||||||
|
mask_write 0XF8006004 0x1FFFFFFF 0x00081081
|
||||||
|
mask_write 0XF8006008 0x03FFFFFF 0x03C0780F
|
||||||
|
mask_write 0XF800600C 0x03FFFFFF 0x02001001
|
||||||
|
mask_write 0XF8006010 0x03FFFFFF 0x00014001
|
||||||
|
mask_write 0XF8006014 0x001FFFFF 0x0004281A
|
||||||
|
mask_write 0XF8006018 0xF7FFFFFF 0x44E458D2
|
||||||
|
mask_write 0XF800601C 0xFFFFFFFF 0x720238E5
|
||||||
|
mask_write 0XF8006020 0xFFFFFFFC 0x272872D0
|
||||||
|
mask_write 0XF8006024 0x0FFFFFFF 0x0000003C
|
||||||
|
mask_write 0XF8006028 0x00003FFF 0x00002007
|
||||||
|
mask_write 0XF800602C 0xFFFFFFFF 0x00000008
|
||||||
|
mask_write 0XF8006030 0xFFFFFFFF 0x00040930
|
||||||
|
mask_write 0XF8006034 0x13FF3FFF 0x000116D4
|
||||||
|
mask_write 0XF8006038 0x00001FC3 0x00000000
|
||||||
|
mask_write 0XF800603C 0x000FFFFF 0x00000777
|
||||||
|
mask_write 0XF8006040 0xFFFFFFFF 0xFFF00000
|
||||||
|
mask_write 0XF8006044 0x0FFFFFFF 0x0F666666
|
||||||
|
mask_write 0XF8006048 0x3FFFFFFF 0x0003C248
|
||||||
|
mask_write 0XF8006050 0xFF0F8FFF 0x77010800
|
||||||
|
mask_write 0XF8006058 0x0001FFFF 0x00000101
|
||||||
|
mask_write 0XF800605C 0x0000FFFF 0x00005003
|
||||||
|
mask_write 0XF8006060 0x000017FF 0x0000003E
|
||||||
|
mask_write 0XF8006064 0x00021FE0 0x00020000
|
||||||
|
mask_write 0XF8006068 0x03FFFFFF 0x00284141
|
||||||
|
mask_write 0XF800606C 0x0000FFFF 0x00001610
|
||||||
|
mask_write 0XF8006078 0x03FFFFFF 0x00466111
|
||||||
|
mask_write 0XF800607C 0x000FFFFF 0x00032222
|
||||||
|
mask_write 0XF80060A0 0x00FFFFFF 0x00008000
|
||||||
|
mask_write 0XF80060A4 0xFFFFFFFF 0x10200802
|
||||||
|
mask_write 0XF80060A8 0x0FFFFFFF 0x0690CB73
|
||||||
|
mask_write 0XF80060AC 0x000001FF 0x000001FE
|
||||||
|
mask_write 0XF80060B0 0x1FFFFFFF 0x1CFFFFFF
|
||||||
|
mask_write 0XF80060B4 0x000007FF 0x00000200
|
||||||
|
mask_write 0XF80060B8 0x01FFFFFF 0x00200066
|
||||||
|
mask_write 0XF80060C4 0x00000003 0x00000000
|
||||||
|
mask_write 0XF80060C8 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF80060DC 0x00000001 0x00000000
|
||||||
|
mask_write 0XF80060F0 0x0000FFFF 0x00000000
|
||||||
|
mask_write 0XF80060F4 0x0000000F 0x00000008
|
||||||
|
mask_write 0XF8006114 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF8006118 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800611C 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006120 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006124 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800612C 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006130 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006134 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006138 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006140 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006144 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006148 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF800614C 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006154 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006158 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF800615C 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006160 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006168 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800616C 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006170 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006174 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800617C 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006180 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006184 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006188 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006190 0xFFFFFFFF 0x10040080
|
||||||
|
mask_write 0XF8006194 0x000FFFFF 0x0001FC82
|
||||||
|
mask_write 0XF8006204 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF8006208 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF800620C 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006210 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006214 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006218 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF800621C 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006220 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006224 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF80062A8 0x00000FF7 0x00000000
|
||||||
|
mask_write 0XF80062AC 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF80062B0 0x003FFFFF 0x00005125
|
||||||
|
mask_write 0XF80062B4 0x0003FFFF 0x000012A8
|
||||||
|
mask_poll 0XF8000B74 0x00002000
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000081
|
||||||
|
mask_poll 0XF8006054 0x00000007
|
||||||
|
}
|
||||||
|
proc ps7_mio_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B40 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B44 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B48 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B4C 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B50 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B54 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B58 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B5C 0xFFFFFFFF 0x0018C61C
|
||||||
|
mask_write 0XF8000B60 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B64 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B68 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B6C 0x00007FFF 0x00000260
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000021
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000020
|
||||||
|
mask_write 0XF8000B70 0x07FFFFFF 0x00000823
|
||||||
|
mask_write 0XF8000700 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000704 0x00003FFF 0x00001602
|
||||||
|
mask_write 0XF8000708 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800070C 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000710 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000714 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000718 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800071C 0x00003FFF 0x00000600
|
||||||
|
mask_write 0XF8000720 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000724 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000728 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800072C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000730 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000734 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000738 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800073C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000740 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000744 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000748 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF800074C 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000750 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000754 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000758 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800075C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000760 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000764 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000768 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800076C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000770 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000774 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000778 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800077C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000780 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000784 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000788 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800078C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000790 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000794 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000798 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800079C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007A0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A8 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007AC 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007BC 0x00003F01 0x00001201
|
||||||
|
mask_write 0XF80007C0 0x00003FFF 0x000012E0
|
||||||
|
mask_write 0XF80007C4 0x00003FFF 0x000012E1
|
||||||
|
mask_write 0XF80007C8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007CC 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007D0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007D4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF8000830 0x003F003F 0x002F0037
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_peripherals_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B48 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B4C 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B50 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B54 0x00000180 0x00000180
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
mask_write 0XE0001034 0x000000FF 0x00000006
|
||||||
|
mask_write 0XE0001018 0x0000FFFF 0x0000007C
|
||||||
|
mask_write 0XE0001000 0x000001FF 0x00000017
|
||||||
|
mask_write 0XE0001004 0x00000FFF 0x00000020
|
||||||
|
mask_write 0XE000D000 0x00080000 0x00080000
|
||||||
|
mask_write 0XF8007000 0x20000000 0x00000000
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
}
|
||||||
|
proc ps7_post_config_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000900 0x0000000F 0x0000000F
|
||||||
|
mask_write 0XF8000240 0xFFFFFFFF 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_debug_2_0 {} {
|
||||||
|
mwr -force 0XF8898FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8899FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8809FB0 0xC5ACCE55
|
||||||
|
}
|
||||||
|
proc ps7_pll_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000110 0x003FFFF0 0x000FA220
|
||||||
|
mask_write 0XF8000100 0x0007F000 0x00028000
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000120 0x1F003F30 0x1F000200
|
||||||
|
mask_write 0XF8000114 0x003FFFF0 0x0012C220
|
||||||
|
mask_write 0XF8000104 0x0007F000 0x00020000
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000002
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000124 0xFFF00003 0x0C200003
|
||||||
|
mask_write 0XF8000118 0x003FFFF0 0x001452C0
|
||||||
|
mask_write 0XF8000108 0x0007F000 0x0001E000
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000004
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_clock_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000128 0x03F03F01 0x00700F01
|
||||||
|
mask_write 0XF8000138 0x00000011 0x00000001
|
||||||
|
mask_write 0XF8000140 0x03F03F71 0x00100801
|
||||||
|
mask_write 0XF800014C 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000150 0x00003F33 0x00000A01
|
||||||
|
mask_write 0XF8000154 0x00003F33 0x00000A02
|
||||||
|
mask_write 0XF8000168 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000170 0x03F03F30 0x00400500
|
||||||
|
mask_write 0XF80001C4 0x00000001 0x00000001
|
||||||
|
mask_write 0XF800012C 0x01FFCCCD 0x01EC044D
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_ddr_init_data_1_0 {} {
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000080
|
||||||
|
mask_write 0XF8006004 0x1FFFFFFF 0x00081081
|
||||||
|
mask_write 0XF8006008 0x03FFFFFF 0x03C0780F
|
||||||
|
mask_write 0XF800600C 0x03FFFFFF 0x02001001
|
||||||
|
mask_write 0XF8006010 0x03FFFFFF 0x00014001
|
||||||
|
mask_write 0XF8006014 0x001FFFFF 0x0004281A
|
||||||
|
mask_write 0XF8006018 0xF7FFFFFF 0x44E458D2
|
||||||
|
mask_write 0XF800601C 0xFFFFFFFF 0x720238E5
|
||||||
|
mask_write 0XF8006020 0xFFFFFFFC 0x272872D0
|
||||||
|
mask_write 0XF8006024 0x0FFFFFFF 0x0000003C
|
||||||
|
mask_write 0XF8006028 0x00003FFF 0x00002007
|
||||||
|
mask_write 0XF800602C 0xFFFFFFFF 0x00000008
|
||||||
|
mask_write 0XF8006030 0xFFFFFFFF 0x00040930
|
||||||
|
mask_write 0XF8006034 0x13FF3FFF 0x000116D4
|
||||||
|
mask_write 0XF8006038 0x00001FC3 0x00000000
|
||||||
|
mask_write 0XF800603C 0x000FFFFF 0x00000777
|
||||||
|
mask_write 0XF8006040 0xFFFFFFFF 0xFFF00000
|
||||||
|
mask_write 0XF8006044 0x0FFFFFFF 0x0F666666
|
||||||
|
mask_write 0XF8006048 0x3FFFFFFF 0x0003C248
|
||||||
|
mask_write 0XF8006050 0xFF0F8FFF 0x77010800
|
||||||
|
mask_write 0XF8006058 0x0001FFFF 0x00000101
|
||||||
|
mask_write 0XF800605C 0x0000FFFF 0x00005003
|
||||||
|
mask_write 0XF8006060 0x000017FF 0x0000003E
|
||||||
|
mask_write 0XF8006064 0x00021FE0 0x00020000
|
||||||
|
mask_write 0XF8006068 0x03FFFFFF 0x00284141
|
||||||
|
mask_write 0XF800606C 0x0000FFFF 0x00001610
|
||||||
|
mask_write 0XF80060A0 0x00FFFFFF 0x00008000
|
||||||
|
mask_write 0XF80060A4 0xFFFFFFFF 0x10200802
|
||||||
|
mask_write 0XF80060A8 0x0FFFFFFF 0x0690CB73
|
||||||
|
mask_write 0XF80060AC 0x000001FF 0x000001FE
|
||||||
|
mask_write 0XF80060B0 0x1FFFFFFF 0x1CFFFFFF
|
||||||
|
mask_write 0XF80060B4 0x000007FF 0x00000200
|
||||||
|
mask_write 0XF80060B8 0x01FFFFFF 0x00200066
|
||||||
|
mask_write 0XF80060C4 0x00000003 0x00000000
|
||||||
|
mask_write 0XF80060C8 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF80060DC 0x00000001 0x00000000
|
||||||
|
mask_write 0XF80060F0 0x0000FFFF 0x00000000
|
||||||
|
mask_write 0XF80060F4 0x0000000F 0x00000008
|
||||||
|
mask_write 0XF8006114 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF8006118 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800611C 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006120 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006124 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800612C 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006130 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006134 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006138 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006140 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006144 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006148 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF800614C 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006154 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006158 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF800615C 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006160 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006168 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800616C 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006170 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006174 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800617C 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006180 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006184 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006188 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006190 0xFFFFFFFF 0x10040080
|
||||||
|
mask_write 0XF8006194 0x000FFFFF 0x0001FC82
|
||||||
|
mask_write 0XF8006204 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF8006208 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF800620C 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006210 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006214 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006218 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF800621C 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006220 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006224 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF80062A8 0x00000FF7 0x00000000
|
||||||
|
mask_write 0XF80062AC 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF80062B0 0x003FFFFF 0x00005125
|
||||||
|
mask_write 0XF80062B4 0x0003FFFF 0x000012A8
|
||||||
|
mask_poll 0XF8000B74 0x00002000
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000081
|
||||||
|
mask_poll 0XF8006054 0x00000007
|
||||||
|
}
|
||||||
|
proc ps7_mio_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B40 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B44 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B48 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B4C 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B50 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B54 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B58 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B5C 0xFFFFFFFF 0x0018C61C
|
||||||
|
mask_write 0XF8000B60 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B64 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B68 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B6C 0x000073FF 0x00000260
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000021
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000020
|
||||||
|
mask_write 0XF8000B70 0x07FFFFFF 0x00000823
|
||||||
|
mask_write 0XF8000700 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000704 0x00003FFF 0x00001602
|
||||||
|
mask_write 0XF8000708 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800070C 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000710 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000714 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000718 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800071C 0x00003FFF 0x00000600
|
||||||
|
mask_write 0XF8000720 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000724 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000728 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800072C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000730 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000734 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000738 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800073C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000740 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000744 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000748 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF800074C 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000750 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000754 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000758 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800075C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000760 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000764 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000768 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800076C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000770 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000774 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000778 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800077C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000780 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000784 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000788 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800078C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000790 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000794 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000798 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800079C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007A0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A8 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007AC 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007BC 0x00003F01 0x00001201
|
||||||
|
mask_write 0XF80007C0 0x00003FFF 0x000012E0
|
||||||
|
mask_write 0XF80007C4 0x00003FFF 0x000012E1
|
||||||
|
mask_write 0XF80007C8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007CC 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007D0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007D4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF8000830 0x003F003F 0x002F0037
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_peripherals_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B48 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B4C 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B50 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B54 0x00000180 0x00000180
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
mask_write 0XE0001034 0x000000FF 0x00000006
|
||||||
|
mask_write 0XE0001018 0x0000FFFF 0x0000007C
|
||||||
|
mask_write 0XE0001000 0x000001FF 0x00000017
|
||||||
|
mask_write 0XE0001004 0x00000FFF 0x00000020
|
||||||
|
mask_write 0XE000D000 0x00080000 0x00080000
|
||||||
|
mask_write 0XF8007000 0x20000000 0x00000000
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
}
|
||||||
|
proc ps7_post_config_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000900 0x0000000F 0x0000000F
|
||||||
|
mask_write 0XF8000240 0xFFFFFFFF 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_debug_1_0 {} {
|
||||||
|
mwr -force 0XF8898FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8899FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8809FB0 0xC5ACCE55
|
||||||
|
}
|
||||||
|
set PCW_SILICON_VER_1_0 "0x0"
|
||||||
|
set PCW_SILICON_VER_2_0 "0x1"
|
||||||
|
set PCW_SILICON_VER_3_0 "0x2"
|
||||||
|
set APU_FREQ 666666666
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
proc mask_poll { addr mask } {
|
||||||
|
set count 1
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval & $mask}]
|
||||||
|
while { $maskedval == 0 } {
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval & $mask}]
|
||||||
|
set count [ expr { $count + 1 } ]
|
||||||
|
if { $count == 100000000 } {
|
||||||
|
puts "Timeout Reached. Mask poll failed at ADDRESS: $addr MASK: $mask"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
proc mask_delay { addr val } {
|
||||||
|
set delay [ get_number_of_cycles_for_delay $val ]
|
||||||
|
perf_reset_and_start_timer
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval < $delay}]
|
||||||
|
while { $maskedval == 1 } {
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval < $delay}]
|
||||||
|
}
|
||||||
|
perf_reset_clock
|
||||||
|
}
|
||||||
|
|
||||||
|
proc ps_version { } {
|
||||||
|
set si_ver "0x[string range [mrd 0xF8007080] end-8 end]"
|
||||||
|
set mask_sil_ver "0x[expr {$si_ver >> 28}]"
|
||||||
|
return $mask_sil_ver;
|
||||||
|
}
|
||||||
|
|
||||||
|
proc ps7_post_config {} {
|
||||||
|
set saved_mode [configparams force-mem-accesses]
|
||||||
|
configparams force-mem-accesses 1
|
||||||
|
|
||||||
|
variable PCW_SILICON_VER_1_0
|
||||||
|
variable PCW_SILICON_VER_2_0
|
||||||
|
variable PCW_SILICON_VER_3_0
|
||||||
|
set sil_ver [ps_version]
|
||||||
|
|
||||||
|
if { $sil_ver == $PCW_SILICON_VER_1_0} {
|
||||||
|
ps7_post_config_1_0
|
||||||
|
} elseif { $sil_ver == $PCW_SILICON_VER_2_0 } {
|
||||||
|
ps7_post_config_2_0
|
||||||
|
} else {
|
||||||
|
ps7_post_config_3_0
|
||||||
|
}
|
||||||
|
configparams force-mem-accesses $saved_mode
|
||||||
|
}
|
||||||
|
|
||||||
|
proc ps7_debug {} {
|
||||||
|
variable PCW_SILICON_VER_1_0
|
||||||
|
variable PCW_SILICON_VER_2_0
|
||||||
|
variable PCW_SILICON_VER_3_0
|
||||||
|
set sil_ver [ps_version]
|
||||||
|
|
||||||
|
if { $sil_ver == $PCW_SILICON_VER_1_0} {
|
||||||
|
ps7_debug_1_0
|
||||||
|
} elseif { $sil_ver == $PCW_SILICON_VER_2_0 } {
|
||||||
|
ps7_debug_2_0
|
||||||
|
} else {
|
||||||
|
ps7_debug_3_0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
proc ps7_init {} {
|
||||||
|
variable PCW_SILICON_VER_1_0
|
||||||
|
variable PCW_SILICON_VER_2_0
|
||||||
|
variable PCW_SILICON_VER_3_0
|
||||||
|
set sil_ver [ps_version]
|
||||||
|
if { $sil_ver == $PCW_SILICON_VER_1_0} {
|
||||||
|
ps7_mio_init_data_1_0
|
||||||
|
ps7_pll_init_data_1_0
|
||||||
|
ps7_clock_init_data_1_0
|
||||||
|
ps7_ddr_init_data_1_0
|
||||||
|
ps7_peripherals_init_data_1_0
|
||||||
|
#puts "PCW Silicon Version : 1.0"
|
||||||
|
} elseif { $sil_ver == $PCW_SILICON_VER_2_0 } {
|
||||||
|
ps7_mio_init_data_2_0
|
||||||
|
ps7_pll_init_data_2_0
|
||||||
|
ps7_clock_init_data_2_0
|
||||||
|
ps7_ddr_init_data_2_0
|
||||||
|
ps7_peripherals_init_data_2_0
|
||||||
|
#puts "PCW Silicon Version : 2.0"
|
||||||
|
} else {
|
||||||
|
ps7_mio_init_data_3_0
|
||||||
|
ps7_pll_init_data_3_0
|
||||||
|
ps7_clock_init_data_3_0
|
||||||
|
ps7_ddr_init_data_3_0
|
||||||
|
ps7_peripherals_init_data_3_0
|
||||||
|
#puts "PCW Silicon Version : 3.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# For delay calculation using global timer
|
||||||
|
|
||||||
|
# start timer
|
||||||
|
proc perf_start_clock { } {
|
||||||
|
|
||||||
|
#writing SCU_GLOBAL_TIMER_CONTROL register
|
||||||
|
|
||||||
|
mask_write 0xF8F00208 0x00000109 0x00000009
|
||||||
|
}
|
||||||
|
|
||||||
|
# stop timer and reset timer count regs
|
||||||
|
proc perf_reset_clock { } {
|
||||||
|
perf_disable_clock
|
||||||
|
mask_write 0xF8F00200 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0xF8F00204 0xFFFFFFFF 0x00000000
|
||||||
|
}
|
||||||
|
|
||||||
|
# Compute mask for given delay in miliseconds
|
||||||
|
proc get_number_of_cycles_for_delay { delay } {
|
||||||
|
|
||||||
|
# GTC is always clocked at 1/2 of the CPU frequency (CPU_3x2x)
|
||||||
|
variable APU_FREQ
|
||||||
|
return [ expr ($delay * $APU_FREQ /(2 * 1000))]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# stop timer
|
||||||
|
proc perf_disable_clock {} {
|
||||||
|
mask_write 0xF8F00208 0xFFFFFFFF 0x00000000
|
||||||
|
}
|
||||||
|
|
||||||
|
proc perf_reset_and_start_timer {} {
|
||||||
|
perf_reset_clock
|
||||||
|
perf_start_clock
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,137 @@
|
|||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* (c) Copyright 2010-2014 Xilinx, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||||
|
* software and associated documentation files (the "Software"), to deal in the Software
|
||||||
|
* without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||||
|
* publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||||
|
* persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or
|
||||||
|
* substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* Use of the Software is limited solely to applications: (a) running on a Xilinx device, or
|
||||||
|
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||||
|
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* Except as contained in this notice, the name of the Xilinx shall not be used in advertising or
|
||||||
|
* otherwise to promote the sale, use or other dealings in this Software without prior written
|
||||||
|
* authorization from Xilinx.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
/****************************************************************************/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @file ps7_init.h
|
||||||
|
*
|
||||||
|
* This file can be included in FSBL code
|
||||||
|
* to get prototype of ps7_init() function
|
||||||
|
* and error codes
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//typedef unsigned int u32;
|
||||||
|
|
||||||
|
|
||||||
|
/** do we need to make this name more unique ? **/
|
||||||
|
//extern u32 ps7_init_data[];
|
||||||
|
extern unsigned long * ps7_ddr_init_data;
|
||||||
|
extern unsigned long * ps7_mio_init_data;
|
||||||
|
extern unsigned long * ps7_pll_init_data;
|
||||||
|
extern unsigned long * ps7_clock_init_data;
|
||||||
|
extern unsigned long * ps7_peripherals_init_data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define OPCODE_EXIT 0U
|
||||||
|
#define OPCODE_CLEAR 1U
|
||||||
|
#define OPCODE_WRITE 2U
|
||||||
|
#define OPCODE_MASKWRITE 3U
|
||||||
|
#define OPCODE_MASKPOLL 4U
|
||||||
|
#define OPCODE_MASKDELAY 5U
|
||||||
|
#define NEW_PS7_ERR_CODE 1
|
||||||
|
|
||||||
|
/* Encode number of arguments in last nibble */
|
||||||
|
#define EMIT_EXIT() ( (OPCODE_EXIT << 4 ) | 0 )
|
||||||
|
#define EMIT_CLEAR(addr) ( (OPCODE_CLEAR << 4 ) | 1 ) , addr
|
||||||
|
#define EMIT_WRITE(addr,val) ( (OPCODE_WRITE << 4 ) | 2 ) , addr, val
|
||||||
|
#define EMIT_MASKWRITE(addr,mask,val) ( (OPCODE_MASKWRITE << 4 ) | 3 ) , addr, mask, val
|
||||||
|
#define EMIT_MASKPOLL(addr,mask) ( (OPCODE_MASKPOLL << 4 ) | 2 ) , addr, mask
|
||||||
|
#define EMIT_MASKDELAY(addr,mask) ( (OPCODE_MASKDELAY << 4 ) | 2 ) , addr, mask
|
||||||
|
|
||||||
|
/* Returns codes of PS7_Init */
|
||||||
|
#define PS7_INIT_SUCCESS (0) // 0 is success in good old C
|
||||||
|
#define PS7_INIT_CORRUPT (1) // 1 the data is corrupted, and slcr reg are in corrupted state now
|
||||||
|
#define PS7_INIT_TIMEOUT (2) // 2 when a poll operation timed out
|
||||||
|
#define PS7_POLL_FAILED_DDR_INIT (3) // 3 when a poll operation timed out for ddr init
|
||||||
|
#define PS7_POLL_FAILED_DMA (4) // 4 when a poll operation timed out for dma done bit
|
||||||
|
#define PS7_POLL_FAILED_PLL (5) // 5 when a poll operation timed out for pll sequence init
|
||||||
|
|
||||||
|
|
||||||
|
/* Silicon Versions */
|
||||||
|
#define PCW_SILICON_VERSION_1 0
|
||||||
|
#define PCW_SILICON_VERSION_2 1
|
||||||
|
#define PCW_SILICON_VERSION_3 2
|
||||||
|
|
||||||
|
/* This flag to be used by FSBL to check whether ps7_post_config() proc exixts */
|
||||||
|
#define PS7_POST_CONFIG
|
||||||
|
|
||||||
|
/* Freq of all peripherals */
|
||||||
|
|
||||||
|
#define APU_FREQ 666666687
|
||||||
|
#define DDR_FREQ 533333374
|
||||||
|
#define DCI_FREQ 10158730
|
||||||
|
#define QSPI_FREQ 200000000
|
||||||
|
#define SMC_FREQ 10000000
|
||||||
|
#define ENET0_FREQ 125000000
|
||||||
|
#define ENET1_FREQ 10000000
|
||||||
|
#define USB0_FREQ 60000000
|
||||||
|
#define USB1_FREQ 60000000
|
||||||
|
#define SDIO_FREQ 100000000
|
||||||
|
#define UART_FREQ 100000000
|
||||||
|
#define SPI_FREQ 10000000
|
||||||
|
#define I2C_FREQ 111111115
|
||||||
|
#define WDT_FREQ 111111115
|
||||||
|
#define TTC_FREQ 50000000
|
||||||
|
#define CAN_FREQ 10000000
|
||||||
|
#define PCAP_FREQ 200000000
|
||||||
|
#define TPIU_FREQ 200000000
|
||||||
|
#define FPGA0_FREQ 50000000
|
||||||
|
#define FPGA1_FREQ 10000000
|
||||||
|
#define FPGA2_FREQ 10000000
|
||||||
|
#define FPGA3_FREQ 10000000
|
||||||
|
|
||||||
|
|
||||||
|
/* For delay calculation using global registers*/
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_L32 0xF8F00200
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_U32 0xF8F00204
|
||||||
|
#define SCU_GLOBAL_TIMER_CONTROL 0xF8F00208
|
||||||
|
#define SCU_GLOBAL_TIMER_AUTO_INC 0xF8F00218
|
||||||
|
|
||||||
|
int ps7_config( unsigned long*);
|
||||||
|
int ps7_init();
|
||||||
|
int ps7_post_config();
|
||||||
|
int ps7_debug();
|
||||||
|
char* getPS7MessageInfo(unsigned key);
|
||||||
|
|
||||||
|
void perf_start_clock(void);
|
||||||
|
void perf_disable_clock(void);
|
||||||
|
void perf_reset_clock(void);
|
||||||
|
void perf_reset_and_start_timer();
|
||||||
|
int get_number_of_cycles_for_delay(unsigned int delay);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
31
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/ies/run.f
Normal file
31
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/ies/run.f
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
-makelib ies_lib/xil_defaultlib -sv \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_fifo/hdl/xpm_fifo.sv" \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_memory/hdl/xpm_memory.sv" \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_cdc/hdl/xpm_cdc.sv" \
|
||||||
|
-endlib
|
||||||
|
-makelib ies_lib/xpm \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_VCOMP.vhd" \
|
||||||
|
-endlib
|
||||||
|
-makelib ies_lib/axi_infrastructure_v1_1_0 \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl/axi_infrastructure_v1_1_vl_rfs.v" \
|
||||||
|
-endlib
|
||||||
|
-makelib ies_lib/smartconnect_v1_0 -sv \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/sc_util_v1_0_vl_rfs.sv" \
|
||||||
|
-endlib
|
||||||
|
-makelib ies_lib/axi_protocol_checker_v2_0_1 -sv \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/3b24/hdl/axi_protocol_checker_v2_0_vl_rfs.sv" \
|
||||||
|
-endlib
|
||||||
|
-makelib ies_lib/axi_vip_v1_1_1 -sv \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/a16a/hdl/axi_vip_v1_1_vl_rfs.sv" \
|
||||||
|
-endlib
|
||||||
|
-makelib ies_lib/processing_system7_vip_v1_0_3 -sv \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl/processing_system7_vip_v1_0_vl_rfs.sv" \
|
||||||
|
-endlib
|
||||||
|
-makelib ies_lib/xil_defaultlib \
|
||||||
|
"../../../bd/system/ip/system_processing_system7_0_0/sim/system_processing_system7_0_0.v" \
|
||||||
|
"../../../bd/system/sim/system.v" \
|
||||||
|
-endlib
|
||||||
|
-makelib ies_lib/xil_defaultlib \
|
||||||
|
glbl.v
|
||||||
|
-endlib
|
||||||
|
|
183
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/ies/system.sh
Normal file
183
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/ies/system.sh
Normal file
@ -0,0 +1,183 @@
|
|||||||
|
#!/bin/bash -f
|
||||||
|
#*********************************************************************************************************
|
||||||
|
# Vivado (TM) v2017.4 (64-bit)
|
||||||
|
#
|
||||||
|
# Filename : system.sh
|
||||||
|
# Simulator : Cadence Incisive Enterprise Simulator
|
||||||
|
# Description : Simulation script for compiling, elaborating and verifying the project source files.
|
||||||
|
# The script will automatically create the design libraries sub-directories in the run
|
||||||
|
# directory, add the library logical mappings in the simulator setup file, create default
|
||||||
|
# 'do/prj' file, execute compilation, elaboration and simulation steps.
|
||||||
|
#
|
||||||
|
# Generated by Vivado on Sat May 25 13:08:26 +0800 2019
|
||||||
|
# SW Build 2086221 on Fri Dec 15 20:55:39 MST 2017
|
||||||
|
#
|
||||||
|
# Copyright 1986-2017 Xilinx, Inc. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# usage: system.sh [-help]
|
||||||
|
# usage: system.sh [-lib_map_path]
|
||||||
|
# usage: system.sh [-noclean_files]
|
||||||
|
# usage: system.sh [-reset_run]
|
||||||
|
#
|
||||||
|
# Prerequisite:- To compile and run simulation, you must compile the Xilinx simulation libraries using the
|
||||||
|
# 'compile_simlib' TCL command. For more information about this command, run 'compile_simlib -help' in the
|
||||||
|
# Vivado Tcl Shell. Once the libraries have been compiled successfully, specify the -lib_map_path switch
|
||||||
|
# that points to these libraries and rerun export_simulation. For more information about this switch please
|
||||||
|
# type 'export_simulation -help' in the Tcl shell.
|
||||||
|
#
|
||||||
|
# You can also point to the simulation libraries by either replacing the <SPECIFY_COMPILED_LIB_PATH> in this
|
||||||
|
# script with the compiled library directory path or specify this path with the '-lib_map_path' switch when
|
||||||
|
# executing this script. Please type 'system.sh -help' for more information.
|
||||||
|
#
|
||||||
|
# Additional references - 'Xilinx Vivado Design Suite User Guide:Logic simulation (UG900)'
|
||||||
|
#
|
||||||
|
#*********************************************************************************************************
|
||||||
|
|
||||||
|
# Directory path for design sources and include directories (if any) wrt this path
|
||||||
|
ref_dir="."
|
||||||
|
|
||||||
|
# Override directory with 'export_sim_ref_dir' env path value if set in the shell
|
||||||
|
if [[ (! -z "$export_sim_ref_dir") && ($export_sim_ref_dir != "") ]]; then
|
||||||
|
ref_dir="$export_sim_ref_dir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set the compiled library directory
|
||||||
|
ref_lib_dir="."
|
||||||
|
|
||||||
|
# Command line options
|
||||||
|
irun_opts="-64bit -v93 -relax -access +rwc -namemap_mixgen"
|
||||||
|
|
||||||
|
# Design libraries
|
||||||
|
design_libs=(xil_defaultlib xpm axi_infrastructure_v1_1_0 smartconnect_v1_0 axi_protocol_checker_v2_0_1 axi_vip_v1_1_1 processing_system7_vip_v1_0_3)
|
||||||
|
|
||||||
|
# Simulation root library directory
|
||||||
|
sim_lib_dir="ies_lib"
|
||||||
|
|
||||||
|
# Script info
|
||||||
|
echo -e "system.sh - Script generated by export_simulation (Vivado v2017.4 (64-bit)-id)\n"
|
||||||
|
|
||||||
|
# Main steps
|
||||||
|
run()
|
||||||
|
{
|
||||||
|
check_args $# $1
|
||||||
|
setup $1 $2
|
||||||
|
execute
|
||||||
|
}
|
||||||
|
|
||||||
|
# RUN_STEP: <execute>
|
||||||
|
execute()
|
||||||
|
{
|
||||||
|
irun $irun_opts \
|
||||||
|
-reflib "$ref_lib_dir/unisim:unisim" \
|
||||||
|
-reflib "$ref_lib_dir/unisims_ver:unisims_ver" \
|
||||||
|
-reflib "$ref_lib_dir/secureip:secureip" \
|
||||||
|
-reflib "$ref_lib_dir/unimacro:unimacro" \
|
||||||
|
-reflib "$ref_lib_dir/unimacro_ver:unimacro_ver" \
|
||||||
|
-reflib "$ref_lib_dir/xilinx_vip:xilinx_vip" \
|
||||||
|
-top xil_defaultlib.system \
|
||||||
|
-f run.f \
|
||||||
|
-top glbl \
|
||||||
|
glbl.v \
|
||||||
|
+incdir+"$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" \
|
||||||
|
+incdir+"$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" \
|
||||||
|
+incdir+"$ref_dir/../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" \
|
||||||
|
+incdir+"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" \
|
||||||
|
+incdir+"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" \
|
||||||
|
+incdir+"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" \
|
||||||
|
+incdir+"E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include"
|
||||||
|
}
|
||||||
|
|
||||||
|
# STEP: setup
|
||||||
|
setup()
|
||||||
|
{
|
||||||
|
case $1 in
|
||||||
|
"-lib_map_path" )
|
||||||
|
if [[ ($2 == "") ]]; then
|
||||||
|
echo -e "ERROR: Simulation library directory path not specified (type \"./system.sh -help\" for more information)\n"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
ref_lib_dir=$2
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"-reset_run" )
|
||||||
|
reset_run
|
||||||
|
echo -e "INFO: Simulation run files deleted.\n"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
"-noclean_files" )
|
||||||
|
# do not remove previous data
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
esac
|
||||||
|
|
||||||
|
create_lib_dir
|
||||||
|
|
||||||
|
# Add any setup/initialization commands here:-
|
||||||
|
|
||||||
|
# <user specific commands>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create design library directory paths
|
||||||
|
create_lib_dir()
|
||||||
|
{
|
||||||
|
if [[ -e $sim_lib_dir ]]; then
|
||||||
|
rm -rf $sim_lib_dir
|
||||||
|
fi
|
||||||
|
|
||||||
|
for (( i=0; i<${#design_libs[*]}; i++ )); do
|
||||||
|
lib="${design_libs[i]}"
|
||||||
|
lib_dir="$sim_lib_dir/$lib"
|
||||||
|
if [[ ! -e $lib_dir ]]; then
|
||||||
|
mkdir -p $lib_dir
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Delete generated data from the previous run
|
||||||
|
reset_run()
|
||||||
|
{
|
||||||
|
files_to_remove=(ncsim.key irun.key irun.log waves.shm irun.history .simvision INCA_libs)
|
||||||
|
for (( i=0; i<${#files_to_remove[*]}; i++ )); do
|
||||||
|
file="${files_to_remove[i]}"
|
||||||
|
if [[ -e $file ]]; then
|
||||||
|
rm -rf $file
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
create_lib_dir
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check command line arguments
|
||||||
|
check_args()
|
||||||
|
{
|
||||||
|
if [[ ($1 == 1 ) && ($2 != "-lib_map_path" && $2 != "-noclean_files" && $2 != "-reset_run" && $2 != "-help" && $2 != "-h") ]]; then
|
||||||
|
echo -e "ERROR: Unknown option specified '$2' (type \"./system.sh -help\" for more information)\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ($2 == "-help" || $2 == "-h") ]]; then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Script usage
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
msg="Usage: system.sh [-help]\n\
|
||||||
|
Usage: system.sh [-lib_map_path]\n\
|
||||||
|
Usage: system.sh [-reset_run]\n\
|
||||||
|
Usage: system.sh [-noclean_files]\n\n\
|
||||||
|
[-help] -- Print help information for this script\n\n\
|
||||||
|
[-lib_map_path <path>] -- Compiled simulation library directory path. The simulation library is compiled\n\
|
||||||
|
using the compile_simlib tcl command. Please see 'compile_simlib -help' for more information.\n\n\
|
||||||
|
[-reset_run] -- Recreate simulator setup files and library mappings for a clean run. The generated files\n\
|
||||||
|
from the previous run will be removed. If you don't want to remove the simulator generated files, use the\n\
|
||||||
|
-noclean_files switch.\n\n\
|
||||||
|
[-noclean_files] -- Reset previous run, but do not remove simulator generated files from the previous run.\n\n"
|
||||||
|
echo -e $msg
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Launch script
|
||||||
|
run $1 $2
|
@ -0,0 +1,49 @@
|
|||||||
|
################################################################################
|
||||||
|
# Vivado (TM) v2017.4 (64-bit)
|
||||||
|
#
|
||||||
|
# README.txt: Please read the sections below to understand the steps required to
|
||||||
|
# run the exported script and information about the source files.
|
||||||
|
#
|
||||||
|
# Generated by export_simulation on Sat May 25 13:08:26 +0800 2019
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
1. How to run the generated simulation script:-
|
||||||
|
|
||||||
|
From the shell prompt in the current directory, issue the following command:-
|
||||||
|
|
||||||
|
./system.sh
|
||||||
|
|
||||||
|
This command will launch the 'compile', 'elaborate' and 'simulate' functions
|
||||||
|
implemented in the script file for the 3-step flow. These functions are called
|
||||||
|
from the main 'run' function in the script file.
|
||||||
|
|
||||||
|
The 'run' function first executes the 'setup' function, the purpose of which is to
|
||||||
|
create simulator specific setup files, create design library mappings and library
|
||||||
|
directories and copy 'glbl.v' from the Vivado software install location into the
|
||||||
|
current directory.
|
||||||
|
|
||||||
|
The 'setup' function is also used for removing the simulator generated data in
|
||||||
|
order to reset the current directory to the original state when export_simulation
|
||||||
|
was launched from Vivado. This generated data can be removed by specifying the
|
||||||
|
'-reset_run' switch to the './system.sh' script.
|
||||||
|
|
||||||
|
./system.sh -reset_run
|
||||||
|
|
||||||
|
To keep the generated data from the previous run but regenerate the setup files and
|
||||||
|
library directories, use the '-noclean_files' switch.
|
||||||
|
|
||||||
|
./system.sh -noclean_files
|
||||||
|
|
||||||
|
For more information on the script, please type './system.sh -help'.
|
||||||
|
|
||||||
|
2. Additional design information files:-
|
||||||
|
|
||||||
|
export_simulation generates following additional file that can be used for fetching
|
||||||
|
the design files information or for integrating with external custom scripts.
|
||||||
|
|
||||||
|
Name : file_info.txt
|
||||||
|
Purpose: This file contains detail design file information based on the compile order
|
||||||
|
when export_simulation was executed from Vivado. The file contains information
|
||||||
|
about the file type, name, whether it is part of the IP, associated library
|
||||||
|
and the file path information.
|
@ -0,0 +1,49 @@
|
|||||||
|
vlib modelsim_lib/work
|
||||||
|
vlib modelsim_lib/msim
|
||||||
|
|
||||||
|
vlib modelsim_lib/msim/xil_defaultlib
|
||||||
|
vlib modelsim_lib/msim/xpm
|
||||||
|
vlib modelsim_lib/msim/axi_infrastructure_v1_1_0
|
||||||
|
vlib modelsim_lib/msim/smartconnect_v1_0
|
||||||
|
vlib modelsim_lib/msim/axi_protocol_checker_v2_0_1
|
||||||
|
vlib modelsim_lib/msim/axi_vip_v1_1_1
|
||||||
|
vlib modelsim_lib/msim/processing_system7_vip_v1_0_3
|
||||||
|
|
||||||
|
vmap xil_defaultlib modelsim_lib/msim/xil_defaultlib
|
||||||
|
vmap xpm modelsim_lib/msim/xpm
|
||||||
|
vmap axi_infrastructure_v1_1_0 modelsim_lib/msim/axi_infrastructure_v1_1_0
|
||||||
|
vmap smartconnect_v1_0 modelsim_lib/msim/smartconnect_v1_0
|
||||||
|
vmap axi_protocol_checker_v2_0_1 modelsim_lib/msim/axi_protocol_checker_v2_0_1
|
||||||
|
vmap axi_vip_v1_1_1 modelsim_lib/msim/axi_vip_v1_1_1
|
||||||
|
vmap processing_system7_vip_v1_0_3 modelsim_lib/msim/processing_system7_vip_v1_0_3
|
||||||
|
|
||||||
|
vlog -work xil_defaultlib -64 -incr -sv -L smartconnect_v1_0 -L axi_protocol_checker_v2_0_1 -L axi_vip_v1_1_1 -L processing_system7_vip_v1_0_3 -L xilinx_vip "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_fifo/hdl/xpm_fifo.sv" \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_memory/hdl/xpm_memory.sv" \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_cdc/hdl/xpm_cdc.sv" \
|
||||||
|
|
||||||
|
vcom -work xpm -64 -93 \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_VCOMP.vhd" \
|
||||||
|
|
||||||
|
vlog -work axi_infrastructure_v1_1_0 -64 -incr "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl/axi_infrastructure_v1_1_vl_rfs.v" \
|
||||||
|
|
||||||
|
vlog -work smartconnect_v1_0 -64 -incr -sv -L smartconnect_v1_0 -L axi_protocol_checker_v2_0_1 -L axi_vip_v1_1_1 -L processing_system7_vip_v1_0_3 -L xilinx_vip "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/sc_util_v1_0_vl_rfs.sv" \
|
||||||
|
|
||||||
|
vlog -work axi_protocol_checker_v2_0_1 -64 -incr -sv -L smartconnect_v1_0 -L axi_protocol_checker_v2_0_1 -L axi_vip_v1_1_1 -L processing_system7_vip_v1_0_3 -L xilinx_vip "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/3b24/hdl/axi_protocol_checker_v2_0_vl_rfs.sv" \
|
||||||
|
|
||||||
|
vlog -work axi_vip_v1_1_1 -64 -incr -sv -L smartconnect_v1_0 -L axi_protocol_checker_v2_0_1 -L axi_vip_v1_1_1 -L processing_system7_vip_v1_0_3 -L xilinx_vip "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/a16a/hdl/axi_vip_v1_1_vl_rfs.sv" \
|
||||||
|
|
||||||
|
vlog -work processing_system7_vip_v1_0_3 -64 -incr -sv -L smartconnect_v1_0 -L axi_protocol_checker_v2_0_1 -L axi_vip_v1_1_1 -L processing_system7_vip_v1_0_3 -L xilinx_vip "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl/processing_system7_vip_v1_0_vl_rfs.sv" \
|
||||||
|
|
||||||
|
vlog -work xil_defaultlib -64 -incr "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../bd/system/ip/system_processing_system7_0_0/sim/system_processing_system7_0_0.v" \
|
||||||
|
"../../../bd/system/sim/system.v" \
|
||||||
|
|
||||||
|
vlog -work xil_defaultlib \
|
||||||
|
"glbl.v"
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
xpm_fifo.sv,systemverilog,xil_defaultlib,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_fifo/hdl/xpm_fifo.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
xpm_memory.sv,systemverilog,xil_defaultlib,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_memory/hdl/xpm_memory.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
xpm_cdc.sv,systemverilog,xil_defaultlib,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_cdc/hdl/xpm_cdc.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
xpm_VCOMP.vhd,vhdl,xpm,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_VCOMP.vhd,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
axi_infrastructure_v1_1_vl_rfs.v,verilog,axi_infrastructure_v1_1_0,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl/axi_infrastructure_v1_1_vl_rfs.v,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
sc_util_v1_0_vl_rfs.sv,systemverilog,smartconnect_v1_0,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/sc_util_v1_0_vl_rfs.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
axi_protocol_checker_v2_0_vl_rfs.sv,systemverilog,axi_protocol_checker_v2_0_1,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/3b24/hdl/axi_protocol_checker_v2_0_vl_rfs.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
axi_vip_v1_1_vl_rfs.sv,systemverilog,axi_vip_v1_1_1,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/a16a/hdl/axi_vip_v1_1_vl_rfs.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
processing_system7_vip_v1_0_vl_rfs.sv,systemverilog,processing_system7_vip_v1_0_3,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl/processing_system7_vip_v1_0_vl_rfs.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
system_processing_system7_0_0.v,verilog,xil_defaultlib,../../../bd/system/ip/system_processing_system7_0_0/sim/system_processing_system7_0_0.v,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
system.v,verilog,xil_defaultlib,../../../bd/system/sim/system.v,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
glbl.v,Verilog,xil_defaultlib,glbl.v
|
@ -0,0 +1,71 @@
|
|||||||
|
// $Header: /devl/xcs/repo/env/Databases/CAEInterfaces/verunilibs/data/glbl.v,v 1.14 2010/10/28 20:44:00 fphillip Exp $
|
||||||
|
`ifndef GLBL
|
||||||
|
`define GLBL
|
||||||
|
`timescale 1 ps / 1 ps
|
||||||
|
|
||||||
|
module glbl ();
|
||||||
|
|
||||||
|
parameter ROC_WIDTH = 100000;
|
||||||
|
parameter TOC_WIDTH = 0;
|
||||||
|
|
||||||
|
//-------- STARTUP Globals --------------
|
||||||
|
wire GSR;
|
||||||
|
wire GTS;
|
||||||
|
wire GWE;
|
||||||
|
wire PRLD;
|
||||||
|
tri1 p_up_tmp;
|
||||||
|
tri (weak1, strong0) PLL_LOCKG = p_up_tmp;
|
||||||
|
|
||||||
|
wire PROGB_GLBL;
|
||||||
|
wire CCLKO_GLBL;
|
||||||
|
wire FCSBO_GLBL;
|
||||||
|
wire [3:0] DO_GLBL;
|
||||||
|
wire [3:0] DI_GLBL;
|
||||||
|
|
||||||
|
reg GSR_int;
|
||||||
|
reg GTS_int;
|
||||||
|
reg PRLD_int;
|
||||||
|
|
||||||
|
//-------- JTAG Globals --------------
|
||||||
|
wire JTAG_TDO_GLBL;
|
||||||
|
wire JTAG_TCK_GLBL;
|
||||||
|
wire JTAG_TDI_GLBL;
|
||||||
|
wire JTAG_TMS_GLBL;
|
||||||
|
wire JTAG_TRST_GLBL;
|
||||||
|
|
||||||
|
reg JTAG_CAPTURE_GLBL;
|
||||||
|
reg JTAG_RESET_GLBL;
|
||||||
|
reg JTAG_SHIFT_GLBL;
|
||||||
|
reg JTAG_UPDATE_GLBL;
|
||||||
|
reg JTAG_RUNTEST_GLBL;
|
||||||
|
|
||||||
|
reg JTAG_SEL1_GLBL = 0;
|
||||||
|
reg JTAG_SEL2_GLBL = 0 ;
|
||||||
|
reg JTAG_SEL3_GLBL = 0;
|
||||||
|
reg JTAG_SEL4_GLBL = 0;
|
||||||
|
|
||||||
|
reg JTAG_USER_TDO1_GLBL = 1'bz;
|
||||||
|
reg JTAG_USER_TDO2_GLBL = 1'bz;
|
||||||
|
reg JTAG_USER_TDO3_GLBL = 1'bz;
|
||||||
|
reg JTAG_USER_TDO4_GLBL = 1'bz;
|
||||||
|
|
||||||
|
assign (strong1, weak0) GSR = GSR_int;
|
||||||
|
assign (strong1, weak0) GTS = GTS_int;
|
||||||
|
assign (weak1, weak0) PRLD = PRLD_int;
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
GSR_int = 1'b1;
|
||||||
|
PRLD_int = 1'b1;
|
||||||
|
#(ROC_WIDTH)
|
||||||
|
GSR_int = 1'b0;
|
||||||
|
PRLD_int = 1'b0;
|
||||||
|
end
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
GTS_int = 1'b1;
|
||||||
|
#(TOC_WIDTH)
|
||||||
|
GTS_int = 1'b0;
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
||||||
|
`endif
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,137 @@
|
|||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* (c) Copyright 2010-2014 Xilinx, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||||
|
* software and associated documentation files (the "Software"), to deal in the Software
|
||||||
|
* without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||||
|
* publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||||
|
* persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or
|
||||||
|
* substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* Use of the Software is limited solely to applications: (a) running on a Xilinx device, or
|
||||||
|
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||||
|
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* Except as contained in this notice, the name of the Xilinx shall not be used in advertising or
|
||||||
|
* otherwise to promote the sale, use or other dealings in this Software without prior written
|
||||||
|
* authorization from Xilinx.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
/****************************************************************************/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @file ps7_init.h
|
||||||
|
*
|
||||||
|
* This file can be included in FSBL code
|
||||||
|
* to get prototype of ps7_init() function
|
||||||
|
* and error codes
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//typedef unsigned int u32;
|
||||||
|
|
||||||
|
|
||||||
|
/** do we need to make this name more unique ? **/
|
||||||
|
//extern u32 ps7_init_data[];
|
||||||
|
extern unsigned long * ps7_ddr_init_data;
|
||||||
|
extern unsigned long * ps7_mio_init_data;
|
||||||
|
extern unsigned long * ps7_pll_init_data;
|
||||||
|
extern unsigned long * ps7_clock_init_data;
|
||||||
|
extern unsigned long * ps7_peripherals_init_data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define OPCODE_EXIT 0U
|
||||||
|
#define OPCODE_CLEAR 1U
|
||||||
|
#define OPCODE_WRITE 2U
|
||||||
|
#define OPCODE_MASKWRITE 3U
|
||||||
|
#define OPCODE_MASKPOLL 4U
|
||||||
|
#define OPCODE_MASKDELAY 5U
|
||||||
|
#define NEW_PS7_ERR_CODE 1
|
||||||
|
|
||||||
|
/* Encode number of arguments in last nibble */
|
||||||
|
#define EMIT_EXIT() ( (OPCODE_EXIT << 4 ) | 0 )
|
||||||
|
#define EMIT_CLEAR(addr) ( (OPCODE_CLEAR << 4 ) | 1 ) , addr
|
||||||
|
#define EMIT_WRITE(addr,val) ( (OPCODE_WRITE << 4 ) | 2 ) , addr, val
|
||||||
|
#define EMIT_MASKWRITE(addr,mask,val) ( (OPCODE_MASKWRITE << 4 ) | 3 ) , addr, mask, val
|
||||||
|
#define EMIT_MASKPOLL(addr,mask) ( (OPCODE_MASKPOLL << 4 ) | 2 ) , addr, mask
|
||||||
|
#define EMIT_MASKDELAY(addr,mask) ( (OPCODE_MASKDELAY << 4 ) | 2 ) , addr, mask
|
||||||
|
|
||||||
|
/* Returns codes of PS7_Init */
|
||||||
|
#define PS7_INIT_SUCCESS (0) // 0 is success in good old C
|
||||||
|
#define PS7_INIT_CORRUPT (1) // 1 the data is corrupted, and slcr reg are in corrupted state now
|
||||||
|
#define PS7_INIT_TIMEOUT (2) // 2 when a poll operation timed out
|
||||||
|
#define PS7_POLL_FAILED_DDR_INIT (3) // 3 when a poll operation timed out for ddr init
|
||||||
|
#define PS7_POLL_FAILED_DMA (4) // 4 when a poll operation timed out for dma done bit
|
||||||
|
#define PS7_POLL_FAILED_PLL (5) // 5 when a poll operation timed out for pll sequence init
|
||||||
|
|
||||||
|
|
||||||
|
/* Silicon Versions */
|
||||||
|
#define PCW_SILICON_VERSION_1 0
|
||||||
|
#define PCW_SILICON_VERSION_2 1
|
||||||
|
#define PCW_SILICON_VERSION_3 2
|
||||||
|
|
||||||
|
/* This flag to be used by FSBL to check whether ps7_post_config() proc exixts */
|
||||||
|
#define PS7_POST_CONFIG
|
||||||
|
|
||||||
|
/* Freq of all peripherals */
|
||||||
|
|
||||||
|
#define APU_FREQ 666666687
|
||||||
|
#define DDR_FREQ 533333374
|
||||||
|
#define DCI_FREQ 10158730
|
||||||
|
#define QSPI_FREQ 200000000
|
||||||
|
#define SMC_FREQ 10000000
|
||||||
|
#define ENET0_FREQ 125000000
|
||||||
|
#define ENET1_FREQ 10000000
|
||||||
|
#define USB0_FREQ 60000000
|
||||||
|
#define USB1_FREQ 60000000
|
||||||
|
#define SDIO_FREQ 100000000
|
||||||
|
#define UART_FREQ 100000000
|
||||||
|
#define SPI_FREQ 10000000
|
||||||
|
#define I2C_FREQ 111111115
|
||||||
|
#define WDT_FREQ 111111115
|
||||||
|
#define TTC_FREQ 50000000
|
||||||
|
#define CAN_FREQ 10000000
|
||||||
|
#define PCAP_FREQ 200000000
|
||||||
|
#define TPIU_FREQ 200000000
|
||||||
|
#define FPGA0_FREQ 50000000
|
||||||
|
#define FPGA1_FREQ 10000000
|
||||||
|
#define FPGA2_FREQ 10000000
|
||||||
|
#define FPGA3_FREQ 10000000
|
||||||
|
|
||||||
|
|
||||||
|
/* For delay calculation using global registers*/
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_L32 0xF8F00200
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_U32 0xF8F00204
|
||||||
|
#define SCU_GLOBAL_TIMER_CONTROL 0xF8F00208
|
||||||
|
#define SCU_GLOBAL_TIMER_AUTO_INC 0xF8F00218
|
||||||
|
|
||||||
|
int ps7_config( unsigned long*);
|
||||||
|
int ps7_init();
|
||||||
|
int ps7_post_config();
|
||||||
|
int ps7_debug();
|
||||||
|
char* getPS7MessageInfo(unsigned key);
|
||||||
|
|
||||||
|
void perf_start_clock(void);
|
||||||
|
void perf_disable_clock(void);
|
||||||
|
void perf_reset_clock(void);
|
||||||
|
void perf_reset_and_start_timer();
|
||||||
|
int get_number_of_cycles_for_delay(unsigned int delay);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
137694
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/modelsim/ps7_init.html
Normal file
137694
Miz_sys/Miz_sys.ip_user_files/sim_scripts/system/modelsim/ps7_init.html
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,832 @@
|
|||||||
|
proc ps7_pll_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000110 0x003FFFF0 0x000FA220
|
||||||
|
mask_write 0XF8000100 0x0007F000 0x00028000
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000120 0x1F003F30 0x1F000200
|
||||||
|
mask_write 0XF8000114 0x003FFFF0 0x0012C220
|
||||||
|
mask_write 0XF8000104 0x0007F000 0x00020000
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000002
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000124 0xFFF00003 0x0C200003
|
||||||
|
mask_write 0XF8000118 0x003FFFF0 0x001452C0
|
||||||
|
mask_write 0XF8000108 0x0007F000 0x0001E000
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000004
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_clock_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000128 0x03F03F01 0x00700F01
|
||||||
|
mask_write 0XF8000138 0x00000011 0x00000001
|
||||||
|
mask_write 0XF8000140 0x03F03F71 0x00100801
|
||||||
|
mask_write 0XF800014C 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000150 0x00003F33 0x00000A01
|
||||||
|
mask_write 0XF8000154 0x00003F33 0x00000A02
|
||||||
|
mask_write 0XF8000168 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000170 0x03F03F30 0x00400500
|
||||||
|
mask_write 0XF80001C4 0x00000001 0x00000001
|
||||||
|
mask_write 0XF800012C 0x01FFCCCD 0x01EC044D
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_ddr_init_data_3_0 {} {
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000080
|
||||||
|
mask_write 0XF8006004 0x0007FFFF 0x00001081
|
||||||
|
mask_write 0XF8006008 0x03FFFFFF 0x03C0780F
|
||||||
|
mask_write 0XF800600C 0x03FFFFFF 0x02001001
|
||||||
|
mask_write 0XF8006010 0x03FFFFFF 0x00014001
|
||||||
|
mask_write 0XF8006014 0x001FFFFF 0x0004281A
|
||||||
|
mask_write 0XF8006018 0xF7FFFFFF 0x44E458D2
|
||||||
|
mask_write 0XF800601C 0xFFFFFFFF 0x720238E5
|
||||||
|
mask_write 0XF8006020 0x7FDFFFFC 0x270872D0
|
||||||
|
mask_write 0XF8006024 0x0FFFFFC3 0x00000000
|
||||||
|
mask_write 0XF8006028 0x00003FFF 0x00002007
|
||||||
|
mask_write 0XF800602C 0xFFFFFFFF 0x00000008
|
||||||
|
mask_write 0XF8006030 0xFFFFFFFF 0x00040930
|
||||||
|
mask_write 0XF8006034 0x13FF3FFF 0x000116D4
|
||||||
|
mask_write 0XF8006038 0x00000003 0x00000000
|
||||||
|
mask_write 0XF800603C 0x000FFFFF 0x00000777
|
||||||
|
mask_write 0XF8006040 0xFFFFFFFF 0xFFF00000
|
||||||
|
mask_write 0XF8006044 0x0FFFFFFF 0x0F666666
|
||||||
|
mask_write 0XF8006048 0x0003F03F 0x0003C008
|
||||||
|
mask_write 0XF8006050 0xFF0F8FFF 0x77010800
|
||||||
|
mask_write 0XF8006058 0x00010000 0x00000000
|
||||||
|
mask_write 0XF800605C 0x0000FFFF 0x00005003
|
||||||
|
mask_write 0XF8006060 0x000017FF 0x0000003E
|
||||||
|
mask_write 0XF8006064 0x00021FE0 0x00020000
|
||||||
|
mask_write 0XF8006068 0x03FFFFFF 0x00284141
|
||||||
|
mask_write 0XF800606C 0x0000FFFF 0x00001610
|
||||||
|
mask_write 0XF8006078 0x03FFFFFF 0x00466111
|
||||||
|
mask_write 0XF800607C 0x000FFFFF 0x00032222
|
||||||
|
mask_write 0XF80060A4 0xFFFFFFFF 0x10200802
|
||||||
|
mask_write 0XF80060A8 0x0FFFFFFF 0x0690CB73
|
||||||
|
mask_write 0XF80060AC 0x000001FF 0x000001FE
|
||||||
|
mask_write 0XF80060B0 0x1FFFFFFF 0x1CFFFFFF
|
||||||
|
mask_write 0XF80060B4 0x00000200 0x00000200
|
||||||
|
mask_write 0XF80060B8 0x01FFFFFF 0x00200066
|
||||||
|
mask_write 0XF80060C4 0x00000003 0x00000000
|
||||||
|
mask_write 0XF80060C8 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF80060DC 0x00000001 0x00000000
|
||||||
|
mask_write 0XF80060F0 0x0000FFFF 0x00000000
|
||||||
|
mask_write 0XF80060F4 0x0000000F 0x00000008
|
||||||
|
mask_write 0XF8006114 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF8006118 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF800611C 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF8006120 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF8006124 0x7FFFFFCF 0x40000001
|
||||||
|
mask_write 0XF800612C 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006130 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006134 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006138 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006140 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006144 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006148 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF800614C 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006154 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006158 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF800615C 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006160 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006168 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800616C 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006170 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006174 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800617C 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006180 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006184 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006188 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006190 0x6FFFFEFE 0x00040080
|
||||||
|
mask_write 0XF8006194 0x000FFFFF 0x0001FC82
|
||||||
|
mask_write 0XF8006204 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF8006208 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF800620C 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF8006210 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF8006214 0x000703FF 0x000003FF
|
||||||
|
mask_write 0XF8006218 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF800621C 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006220 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006224 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF80062A8 0x00000FF5 0x00000000
|
||||||
|
mask_write 0XF80062AC 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF80062B0 0x003FFFFF 0x00005125
|
||||||
|
mask_write 0XF80062B4 0x0003FFFF 0x000012A8
|
||||||
|
mask_poll 0XF8000B74 0x00002000
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000081
|
||||||
|
mask_poll 0XF8006054 0x00000007
|
||||||
|
}
|
||||||
|
proc ps7_mio_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B40 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B44 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B48 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B4C 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B50 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B54 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B58 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B5C 0xFFFFFFFF 0x0018C61C
|
||||||
|
mask_write 0XF8000B60 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B64 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B68 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B6C 0x00007FFF 0x00000260
|
||||||
|
mask_write 0XF8000B70 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000020
|
||||||
|
mask_write 0XF8000B70 0x07FEFFFF 0x00000823
|
||||||
|
mask_write 0XF8000700 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000704 0x00003FFF 0x00001602
|
||||||
|
mask_write 0XF8000708 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800070C 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000710 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000714 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000718 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800071C 0x00003FFF 0x00000600
|
||||||
|
mask_write 0XF8000720 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000724 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000728 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800072C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000730 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000734 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000738 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800073C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000740 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000744 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000748 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF800074C 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000750 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000754 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000758 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800075C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000760 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000764 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000768 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800076C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000770 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000774 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000778 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800077C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000780 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000784 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000788 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800078C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000790 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000794 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000798 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800079C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007A0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A8 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007AC 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007BC 0x00003F01 0x00001201
|
||||||
|
mask_write 0XF80007C0 0x00003FFF 0x000012E0
|
||||||
|
mask_write 0XF80007C4 0x00003FFF 0x000012E1
|
||||||
|
mask_write 0XF80007C8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007CC 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007D0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007D4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF8000830 0x003F003F 0x002F0037
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_peripherals_init_data_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B48 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B4C 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B50 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B54 0x00000180 0x00000180
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
mask_write 0XE0001034 0x000000FF 0x00000006
|
||||||
|
mask_write 0XE0001018 0x0000FFFF 0x0000007C
|
||||||
|
mask_write 0XE0001000 0x000001FF 0x00000017
|
||||||
|
mask_write 0XE0001004 0x000003FF 0x00000020
|
||||||
|
mask_write 0XE000D000 0x00080000 0x00080000
|
||||||
|
mask_write 0XF8007000 0x20000000 0x00000000
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
}
|
||||||
|
proc ps7_post_config_3_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000900 0x0000000F 0x0000000F
|
||||||
|
mask_write 0XF8000240 0xFFFFFFFF 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_debug_3_0 {} {
|
||||||
|
mwr -force 0XF8898FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8899FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8809FB0 0xC5ACCE55
|
||||||
|
}
|
||||||
|
proc ps7_pll_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000110 0x003FFFF0 0x000FA220
|
||||||
|
mask_write 0XF8000100 0x0007F000 0x00028000
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000120 0x1F003F30 0x1F000200
|
||||||
|
mask_write 0XF8000114 0x003FFFF0 0x0012C220
|
||||||
|
mask_write 0XF8000104 0x0007F000 0x00020000
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000002
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000124 0xFFF00003 0x0C200003
|
||||||
|
mask_write 0XF8000118 0x003FFFF0 0x001452C0
|
||||||
|
mask_write 0XF8000108 0x0007F000 0x0001E000
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000004
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_clock_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000128 0x03F03F01 0x00700F01
|
||||||
|
mask_write 0XF8000138 0x00000011 0x00000001
|
||||||
|
mask_write 0XF8000140 0x03F03F71 0x00100801
|
||||||
|
mask_write 0XF800014C 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000150 0x00003F33 0x00000A01
|
||||||
|
mask_write 0XF8000154 0x00003F33 0x00000A02
|
||||||
|
mask_write 0XF8000168 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000170 0x03F03F30 0x00400500
|
||||||
|
mask_write 0XF80001C4 0x00000001 0x00000001
|
||||||
|
mask_write 0XF800012C 0x01FFCCCD 0x01EC044D
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_ddr_init_data_2_0 {} {
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000080
|
||||||
|
mask_write 0XF8006004 0x1FFFFFFF 0x00081081
|
||||||
|
mask_write 0XF8006008 0x03FFFFFF 0x03C0780F
|
||||||
|
mask_write 0XF800600C 0x03FFFFFF 0x02001001
|
||||||
|
mask_write 0XF8006010 0x03FFFFFF 0x00014001
|
||||||
|
mask_write 0XF8006014 0x001FFFFF 0x0004281A
|
||||||
|
mask_write 0XF8006018 0xF7FFFFFF 0x44E458D2
|
||||||
|
mask_write 0XF800601C 0xFFFFFFFF 0x720238E5
|
||||||
|
mask_write 0XF8006020 0xFFFFFFFC 0x272872D0
|
||||||
|
mask_write 0XF8006024 0x0FFFFFFF 0x0000003C
|
||||||
|
mask_write 0XF8006028 0x00003FFF 0x00002007
|
||||||
|
mask_write 0XF800602C 0xFFFFFFFF 0x00000008
|
||||||
|
mask_write 0XF8006030 0xFFFFFFFF 0x00040930
|
||||||
|
mask_write 0XF8006034 0x13FF3FFF 0x000116D4
|
||||||
|
mask_write 0XF8006038 0x00001FC3 0x00000000
|
||||||
|
mask_write 0XF800603C 0x000FFFFF 0x00000777
|
||||||
|
mask_write 0XF8006040 0xFFFFFFFF 0xFFF00000
|
||||||
|
mask_write 0XF8006044 0x0FFFFFFF 0x0F666666
|
||||||
|
mask_write 0XF8006048 0x3FFFFFFF 0x0003C248
|
||||||
|
mask_write 0XF8006050 0xFF0F8FFF 0x77010800
|
||||||
|
mask_write 0XF8006058 0x0001FFFF 0x00000101
|
||||||
|
mask_write 0XF800605C 0x0000FFFF 0x00005003
|
||||||
|
mask_write 0XF8006060 0x000017FF 0x0000003E
|
||||||
|
mask_write 0XF8006064 0x00021FE0 0x00020000
|
||||||
|
mask_write 0XF8006068 0x03FFFFFF 0x00284141
|
||||||
|
mask_write 0XF800606C 0x0000FFFF 0x00001610
|
||||||
|
mask_write 0XF8006078 0x03FFFFFF 0x00466111
|
||||||
|
mask_write 0XF800607C 0x000FFFFF 0x00032222
|
||||||
|
mask_write 0XF80060A0 0x00FFFFFF 0x00008000
|
||||||
|
mask_write 0XF80060A4 0xFFFFFFFF 0x10200802
|
||||||
|
mask_write 0XF80060A8 0x0FFFFFFF 0x0690CB73
|
||||||
|
mask_write 0XF80060AC 0x000001FF 0x000001FE
|
||||||
|
mask_write 0XF80060B0 0x1FFFFFFF 0x1CFFFFFF
|
||||||
|
mask_write 0XF80060B4 0x000007FF 0x00000200
|
||||||
|
mask_write 0XF80060B8 0x01FFFFFF 0x00200066
|
||||||
|
mask_write 0XF80060C4 0x00000003 0x00000000
|
||||||
|
mask_write 0XF80060C8 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF80060DC 0x00000001 0x00000000
|
||||||
|
mask_write 0XF80060F0 0x0000FFFF 0x00000000
|
||||||
|
mask_write 0XF80060F4 0x0000000F 0x00000008
|
||||||
|
mask_write 0XF8006114 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF8006118 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800611C 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006120 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006124 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800612C 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006130 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006134 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006138 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006140 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006144 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006148 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF800614C 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006154 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006158 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF800615C 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006160 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006168 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800616C 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006170 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006174 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800617C 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006180 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006184 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006188 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006190 0xFFFFFFFF 0x10040080
|
||||||
|
mask_write 0XF8006194 0x000FFFFF 0x0001FC82
|
||||||
|
mask_write 0XF8006204 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF8006208 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF800620C 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006210 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006214 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006218 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF800621C 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006220 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006224 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF80062A8 0x00000FF7 0x00000000
|
||||||
|
mask_write 0XF80062AC 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF80062B0 0x003FFFFF 0x00005125
|
||||||
|
mask_write 0XF80062B4 0x0003FFFF 0x000012A8
|
||||||
|
mask_poll 0XF8000B74 0x00002000
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000081
|
||||||
|
mask_poll 0XF8006054 0x00000007
|
||||||
|
}
|
||||||
|
proc ps7_mio_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B40 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B44 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B48 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B4C 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B50 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B54 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B58 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B5C 0xFFFFFFFF 0x0018C61C
|
||||||
|
mask_write 0XF8000B60 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B64 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B68 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B6C 0x00007FFF 0x00000260
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000021
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000020
|
||||||
|
mask_write 0XF8000B70 0x07FFFFFF 0x00000823
|
||||||
|
mask_write 0XF8000700 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000704 0x00003FFF 0x00001602
|
||||||
|
mask_write 0XF8000708 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800070C 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000710 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000714 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000718 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800071C 0x00003FFF 0x00000600
|
||||||
|
mask_write 0XF8000720 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000724 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000728 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800072C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000730 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000734 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000738 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800073C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000740 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000744 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000748 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF800074C 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000750 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000754 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000758 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800075C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000760 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000764 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000768 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800076C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000770 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000774 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000778 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800077C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000780 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000784 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000788 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800078C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000790 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000794 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000798 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800079C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007A0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A8 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007AC 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007BC 0x00003F01 0x00001201
|
||||||
|
mask_write 0XF80007C0 0x00003FFF 0x000012E0
|
||||||
|
mask_write 0XF80007C4 0x00003FFF 0x000012E1
|
||||||
|
mask_write 0XF80007C8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007CC 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007D0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007D4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF8000830 0x003F003F 0x002F0037
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_peripherals_init_data_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B48 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B4C 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B50 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B54 0x00000180 0x00000180
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
mask_write 0XE0001034 0x000000FF 0x00000006
|
||||||
|
mask_write 0XE0001018 0x0000FFFF 0x0000007C
|
||||||
|
mask_write 0XE0001000 0x000001FF 0x00000017
|
||||||
|
mask_write 0XE0001004 0x00000FFF 0x00000020
|
||||||
|
mask_write 0XE000D000 0x00080000 0x00080000
|
||||||
|
mask_write 0XF8007000 0x20000000 0x00000000
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
}
|
||||||
|
proc ps7_post_config_2_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000900 0x0000000F 0x0000000F
|
||||||
|
mask_write 0XF8000240 0xFFFFFFFF 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_debug_2_0 {} {
|
||||||
|
mwr -force 0XF8898FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8899FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8809FB0 0xC5ACCE55
|
||||||
|
}
|
||||||
|
proc ps7_pll_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000110 0x003FFFF0 0x000FA220
|
||||||
|
mask_write 0XF8000100 0x0007F000 0x00028000
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000001
|
||||||
|
mask_write 0XF8000100 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000120 0x1F003F30 0x1F000200
|
||||||
|
mask_write 0XF8000114 0x003FFFF0 0x0012C220
|
||||||
|
mask_write 0XF8000104 0x0007F000 0x00020000
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000104 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000002
|
||||||
|
mask_write 0XF8000104 0x00000010 0x00000000
|
||||||
|
mask_write 0XF8000124 0xFFF00003 0x0C200003
|
||||||
|
mask_write 0XF8000118 0x003FFFF0 0x001452C0
|
||||||
|
mask_write 0XF8000108 0x0007F000 0x0001E000
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000010
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000001
|
||||||
|
mask_write 0XF8000108 0x00000001 0x00000000
|
||||||
|
mask_poll 0XF800010C 0x00000004
|
||||||
|
mask_write 0XF8000108 0x00000010 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_clock_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000128 0x03F03F01 0x00700F01
|
||||||
|
mask_write 0XF8000138 0x00000011 0x00000001
|
||||||
|
mask_write 0XF8000140 0x03F03F71 0x00100801
|
||||||
|
mask_write 0XF800014C 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000150 0x00003F33 0x00000A01
|
||||||
|
mask_write 0XF8000154 0x00003F33 0x00000A02
|
||||||
|
mask_write 0XF8000168 0x00003F31 0x00000501
|
||||||
|
mask_write 0XF8000170 0x03F03F30 0x00400500
|
||||||
|
mask_write 0XF80001C4 0x00000001 0x00000001
|
||||||
|
mask_write 0XF800012C 0x01FFCCCD 0x01EC044D
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_ddr_init_data_1_0 {} {
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000080
|
||||||
|
mask_write 0XF8006004 0x1FFFFFFF 0x00081081
|
||||||
|
mask_write 0XF8006008 0x03FFFFFF 0x03C0780F
|
||||||
|
mask_write 0XF800600C 0x03FFFFFF 0x02001001
|
||||||
|
mask_write 0XF8006010 0x03FFFFFF 0x00014001
|
||||||
|
mask_write 0XF8006014 0x001FFFFF 0x0004281A
|
||||||
|
mask_write 0XF8006018 0xF7FFFFFF 0x44E458D2
|
||||||
|
mask_write 0XF800601C 0xFFFFFFFF 0x720238E5
|
||||||
|
mask_write 0XF8006020 0xFFFFFFFC 0x272872D0
|
||||||
|
mask_write 0XF8006024 0x0FFFFFFF 0x0000003C
|
||||||
|
mask_write 0XF8006028 0x00003FFF 0x00002007
|
||||||
|
mask_write 0XF800602C 0xFFFFFFFF 0x00000008
|
||||||
|
mask_write 0XF8006030 0xFFFFFFFF 0x00040930
|
||||||
|
mask_write 0XF8006034 0x13FF3FFF 0x000116D4
|
||||||
|
mask_write 0XF8006038 0x00001FC3 0x00000000
|
||||||
|
mask_write 0XF800603C 0x000FFFFF 0x00000777
|
||||||
|
mask_write 0XF8006040 0xFFFFFFFF 0xFFF00000
|
||||||
|
mask_write 0XF8006044 0x0FFFFFFF 0x0F666666
|
||||||
|
mask_write 0XF8006048 0x3FFFFFFF 0x0003C248
|
||||||
|
mask_write 0XF8006050 0xFF0F8FFF 0x77010800
|
||||||
|
mask_write 0XF8006058 0x0001FFFF 0x00000101
|
||||||
|
mask_write 0XF800605C 0x0000FFFF 0x00005003
|
||||||
|
mask_write 0XF8006060 0x000017FF 0x0000003E
|
||||||
|
mask_write 0XF8006064 0x00021FE0 0x00020000
|
||||||
|
mask_write 0XF8006068 0x03FFFFFF 0x00284141
|
||||||
|
mask_write 0XF800606C 0x0000FFFF 0x00001610
|
||||||
|
mask_write 0XF80060A0 0x00FFFFFF 0x00008000
|
||||||
|
mask_write 0XF80060A4 0xFFFFFFFF 0x10200802
|
||||||
|
mask_write 0XF80060A8 0x0FFFFFFF 0x0690CB73
|
||||||
|
mask_write 0XF80060AC 0x000001FF 0x000001FE
|
||||||
|
mask_write 0XF80060B0 0x1FFFFFFF 0x1CFFFFFF
|
||||||
|
mask_write 0XF80060B4 0x000007FF 0x00000200
|
||||||
|
mask_write 0XF80060B8 0x01FFFFFF 0x00200066
|
||||||
|
mask_write 0XF80060C4 0x00000003 0x00000000
|
||||||
|
mask_write 0XF80060C8 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF80060DC 0x00000001 0x00000000
|
||||||
|
mask_write 0XF80060F0 0x0000FFFF 0x00000000
|
||||||
|
mask_write 0XF80060F4 0x0000000F 0x00000008
|
||||||
|
mask_write 0XF8006114 0x000000FF 0x00000000
|
||||||
|
mask_write 0XF8006118 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800611C 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006120 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF8006124 0x7FFFFFFF 0x40000001
|
||||||
|
mask_write 0XF800612C 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006130 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006134 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006138 0x000FFFFF 0x00029000
|
||||||
|
mask_write 0XF8006140 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006144 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006148 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF800614C 0x000FFFFF 0x00000035
|
||||||
|
mask_write 0XF8006154 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006158 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF800615C 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006160 0x000FFFFF 0x00000080
|
||||||
|
mask_write 0XF8006168 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800616C 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006170 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF8006174 0x001FFFFF 0x000000F9
|
||||||
|
mask_write 0XF800617C 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006180 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006184 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006188 0x000FFFFF 0x000000C0
|
||||||
|
mask_write 0XF8006190 0xFFFFFFFF 0x10040080
|
||||||
|
mask_write 0XF8006194 0x000FFFFF 0x0001FC82
|
||||||
|
mask_write 0XF8006204 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF8006208 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF800620C 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006210 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006214 0x000F03FF 0x000803FF
|
||||||
|
mask_write 0XF8006218 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF800621C 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006220 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF8006224 0x000F03FF 0x000003FF
|
||||||
|
mask_write 0XF80062A8 0x00000FF7 0x00000000
|
||||||
|
mask_write 0XF80062AC 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0XF80062B0 0x003FFFFF 0x00005125
|
||||||
|
mask_write 0XF80062B4 0x0003FFFF 0x000012A8
|
||||||
|
mask_poll 0XF8000B74 0x00002000
|
||||||
|
mask_write 0XF8006000 0x0001FFFF 0x00000081
|
||||||
|
mask_poll 0XF8006054 0x00000007
|
||||||
|
}
|
||||||
|
proc ps7_mio_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B40 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B44 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B48 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B4C 0x00000FFF 0x00000672
|
||||||
|
mask_write 0XF8000B50 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B54 0x00000FFF 0x00000674
|
||||||
|
mask_write 0XF8000B58 0x00000FFF 0x00000600
|
||||||
|
mask_write 0XF8000B5C 0xFFFFFFFF 0x0018C61C
|
||||||
|
mask_write 0XF8000B60 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B64 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B68 0xFFFFFFFF 0x00F9861C
|
||||||
|
mask_write 0XF8000B6C 0x000073FF 0x00000260
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000021
|
||||||
|
mask_write 0XF8000B70 0x00000021 0x00000020
|
||||||
|
mask_write 0XF8000B70 0x07FFFFFF 0x00000823
|
||||||
|
mask_write 0XF8000700 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000704 0x00003FFF 0x00001602
|
||||||
|
mask_write 0XF8000708 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800070C 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000710 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000714 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000718 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF800071C 0x00003FFF 0x00000600
|
||||||
|
mask_write 0XF8000720 0x00003FFF 0x00000602
|
||||||
|
mask_write 0XF8000724 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000728 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800072C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000730 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000734 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000738 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF800073C 0x00003FFF 0x00001600
|
||||||
|
mask_write 0XF8000740 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000744 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000748 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF800074C 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000750 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000754 0x00003FFF 0x00001202
|
||||||
|
mask_write 0XF8000758 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800075C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000760 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000764 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000768 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF800076C 0x00003FFF 0x00001203
|
||||||
|
mask_write 0XF8000770 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000774 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000778 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800077C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000780 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000784 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000788 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800078C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000790 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000794 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF8000798 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF800079C 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007A0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007A8 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007AC 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007B8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007BC 0x00003F01 0x00001201
|
||||||
|
mask_write 0XF80007C0 0x00003FFF 0x000012E0
|
||||||
|
mask_write 0XF80007C4 0x00003FFF 0x000012E1
|
||||||
|
mask_write 0XF80007C8 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007CC 0x00003FFF 0x00001200
|
||||||
|
mask_write 0XF80007D0 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF80007D4 0x00003FFF 0x00001280
|
||||||
|
mask_write 0XF8000830 0x003F003F 0x002F0037
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_peripherals_init_data_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000B48 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B4C 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B50 0x00000180 0x00000180
|
||||||
|
mask_write 0XF8000B54 0x00000180 0x00000180
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
mask_write 0XE0001034 0x000000FF 0x00000006
|
||||||
|
mask_write 0XE0001018 0x0000FFFF 0x0000007C
|
||||||
|
mask_write 0XE0001000 0x000001FF 0x00000017
|
||||||
|
mask_write 0XE0001004 0x00000FFF 0x00000020
|
||||||
|
mask_write 0XE000D000 0x00080000 0x00080000
|
||||||
|
mask_write 0XF8007000 0x20000000 0x00000000
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
mask_delay 0XF8F00200 1
|
||||||
|
}
|
||||||
|
proc ps7_post_config_1_0 {} {
|
||||||
|
mwr -force 0XF8000008 0x0000DF0D
|
||||||
|
mask_write 0XF8000900 0x0000000F 0x0000000F
|
||||||
|
mask_write 0XF8000240 0xFFFFFFFF 0x00000000
|
||||||
|
mwr -force 0XF8000004 0x0000767B
|
||||||
|
}
|
||||||
|
proc ps7_debug_1_0 {} {
|
||||||
|
mwr -force 0XF8898FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8899FB0 0xC5ACCE55
|
||||||
|
mwr -force 0XF8809FB0 0xC5ACCE55
|
||||||
|
}
|
||||||
|
set PCW_SILICON_VER_1_0 "0x0"
|
||||||
|
set PCW_SILICON_VER_2_0 "0x1"
|
||||||
|
set PCW_SILICON_VER_3_0 "0x2"
|
||||||
|
set APU_FREQ 666666666
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
proc mask_poll { addr mask } {
|
||||||
|
set count 1
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval & $mask}]
|
||||||
|
while { $maskedval == 0 } {
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval & $mask}]
|
||||||
|
set count [ expr { $count + 1 } ]
|
||||||
|
if { $count == 100000000 } {
|
||||||
|
puts "Timeout Reached. Mask poll failed at ADDRESS: $addr MASK: $mask"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
proc mask_delay { addr val } {
|
||||||
|
set delay [ get_number_of_cycles_for_delay $val ]
|
||||||
|
perf_reset_and_start_timer
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval < $delay}]
|
||||||
|
while { $maskedval == 1 } {
|
||||||
|
set curval "0x[string range [mrd $addr] end-8 end]"
|
||||||
|
set maskedval [expr {$curval < $delay}]
|
||||||
|
}
|
||||||
|
perf_reset_clock
|
||||||
|
}
|
||||||
|
|
||||||
|
proc ps_version { } {
|
||||||
|
set si_ver "0x[string range [mrd 0xF8007080] end-8 end]"
|
||||||
|
set mask_sil_ver "0x[expr {$si_ver >> 28}]"
|
||||||
|
return $mask_sil_ver;
|
||||||
|
}
|
||||||
|
|
||||||
|
proc ps7_post_config {} {
|
||||||
|
set saved_mode [configparams force-mem-accesses]
|
||||||
|
configparams force-mem-accesses 1
|
||||||
|
|
||||||
|
variable PCW_SILICON_VER_1_0
|
||||||
|
variable PCW_SILICON_VER_2_0
|
||||||
|
variable PCW_SILICON_VER_3_0
|
||||||
|
set sil_ver [ps_version]
|
||||||
|
|
||||||
|
if { $sil_ver == $PCW_SILICON_VER_1_0} {
|
||||||
|
ps7_post_config_1_0
|
||||||
|
} elseif { $sil_ver == $PCW_SILICON_VER_2_0 } {
|
||||||
|
ps7_post_config_2_0
|
||||||
|
} else {
|
||||||
|
ps7_post_config_3_0
|
||||||
|
}
|
||||||
|
configparams force-mem-accesses $saved_mode
|
||||||
|
}
|
||||||
|
|
||||||
|
proc ps7_debug {} {
|
||||||
|
variable PCW_SILICON_VER_1_0
|
||||||
|
variable PCW_SILICON_VER_2_0
|
||||||
|
variable PCW_SILICON_VER_3_0
|
||||||
|
set sil_ver [ps_version]
|
||||||
|
|
||||||
|
if { $sil_ver == $PCW_SILICON_VER_1_0} {
|
||||||
|
ps7_debug_1_0
|
||||||
|
} elseif { $sil_ver == $PCW_SILICON_VER_2_0 } {
|
||||||
|
ps7_debug_2_0
|
||||||
|
} else {
|
||||||
|
ps7_debug_3_0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
proc ps7_init {} {
|
||||||
|
variable PCW_SILICON_VER_1_0
|
||||||
|
variable PCW_SILICON_VER_2_0
|
||||||
|
variable PCW_SILICON_VER_3_0
|
||||||
|
set sil_ver [ps_version]
|
||||||
|
if { $sil_ver == $PCW_SILICON_VER_1_0} {
|
||||||
|
ps7_mio_init_data_1_0
|
||||||
|
ps7_pll_init_data_1_0
|
||||||
|
ps7_clock_init_data_1_0
|
||||||
|
ps7_ddr_init_data_1_0
|
||||||
|
ps7_peripherals_init_data_1_0
|
||||||
|
#puts "PCW Silicon Version : 1.0"
|
||||||
|
} elseif { $sil_ver == $PCW_SILICON_VER_2_0 } {
|
||||||
|
ps7_mio_init_data_2_0
|
||||||
|
ps7_pll_init_data_2_0
|
||||||
|
ps7_clock_init_data_2_0
|
||||||
|
ps7_ddr_init_data_2_0
|
||||||
|
ps7_peripherals_init_data_2_0
|
||||||
|
#puts "PCW Silicon Version : 2.0"
|
||||||
|
} else {
|
||||||
|
ps7_mio_init_data_3_0
|
||||||
|
ps7_pll_init_data_3_0
|
||||||
|
ps7_clock_init_data_3_0
|
||||||
|
ps7_ddr_init_data_3_0
|
||||||
|
ps7_peripherals_init_data_3_0
|
||||||
|
#puts "PCW Silicon Version : 3.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# For delay calculation using global timer
|
||||||
|
|
||||||
|
# start timer
|
||||||
|
proc perf_start_clock { } {
|
||||||
|
|
||||||
|
#writing SCU_GLOBAL_TIMER_CONTROL register
|
||||||
|
|
||||||
|
mask_write 0xF8F00208 0x00000109 0x00000009
|
||||||
|
}
|
||||||
|
|
||||||
|
# stop timer and reset timer count regs
|
||||||
|
proc perf_reset_clock { } {
|
||||||
|
perf_disable_clock
|
||||||
|
mask_write 0xF8F00200 0xFFFFFFFF 0x00000000
|
||||||
|
mask_write 0xF8F00204 0xFFFFFFFF 0x00000000
|
||||||
|
}
|
||||||
|
|
||||||
|
# Compute mask for given delay in miliseconds
|
||||||
|
proc get_number_of_cycles_for_delay { delay } {
|
||||||
|
|
||||||
|
# GTC is always clocked at 1/2 of the CPU frequency (CPU_3x2x)
|
||||||
|
variable APU_FREQ
|
||||||
|
return [ expr ($delay * $APU_FREQ /(2 * 1000))]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# stop timer
|
||||||
|
proc perf_disable_clock {} {
|
||||||
|
mask_write 0xF8F00208 0xFFFFFFFF 0x00000000
|
||||||
|
}
|
||||||
|
|
||||||
|
proc perf_reset_and_start_timer {} {
|
||||||
|
perf_reset_clock
|
||||||
|
perf_start_clock
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,137 @@
|
|||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* (c) Copyright 2010-2014 Xilinx, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||||
|
* software and associated documentation files (the "Software"), to deal in the Software
|
||||||
|
* without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||||
|
* publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||||
|
* persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or
|
||||||
|
* substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* Use of the Software is limited solely to applications: (a) running on a Xilinx device, or
|
||||||
|
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||||
|
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* Except as contained in this notice, the name of the Xilinx shall not be used in advertising or
|
||||||
|
* otherwise to promote the sale, use or other dealings in this Software without prior written
|
||||||
|
* authorization from Xilinx.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
/****************************************************************************/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @file ps7_init.h
|
||||||
|
*
|
||||||
|
* This file can be included in FSBL code
|
||||||
|
* to get prototype of ps7_init() function
|
||||||
|
* and error codes
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//typedef unsigned int u32;
|
||||||
|
|
||||||
|
|
||||||
|
/** do we need to make this name more unique ? **/
|
||||||
|
//extern u32 ps7_init_data[];
|
||||||
|
extern unsigned long * ps7_ddr_init_data;
|
||||||
|
extern unsigned long * ps7_mio_init_data;
|
||||||
|
extern unsigned long * ps7_pll_init_data;
|
||||||
|
extern unsigned long * ps7_clock_init_data;
|
||||||
|
extern unsigned long * ps7_peripherals_init_data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define OPCODE_EXIT 0U
|
||||||
|
#define OPCODE_CLEAR 1U
|
||||||
|
#define OPCODE_WRITE 2U
|
||||||
|
#define OPCODE_MASKWRITE 3U
|
||||||
|
#define OPCODE_MASKPOLL 4U
|
||||||
|
#define OPCODE_MASKDELAY 5U
|
||||||
|
#define NEW_PS7_ERR_CODE 1
|
||||||
|
|
||||||
|
/* Encode number of arguments in last nibble */
|
||||||
|
#define EMIT_EXIT() ( (OPCODE_EXIT << 4 ) | 0 )
|
||||||
|
#define EMIT_CLEAR(addr) ( (OPCODE_CLEAR << 4 ) | 1 ) , addr
|
||||||
|
#define EMIT_WRITE(addr,val) ( (OPCODE_WRITE << 4 ) | 2 ) , addr, val
|
||||||
|
#define EMIT_MASKWRITE(addr,mask,val) ( (OPCODE_MASKWRITE << 4 ) | 3 ) , addr, mask, val
|
||||||
|
#define EMIT_MASKPOLL(addr,mask) ( (OPCODE_MASKPOLL << 4 ) | 2 ) , addr, mask
|
||||||
|
#define EMIT_MASKDELAY(addr,mask) ( (OPCODE_MASKDELAY << 4 ) | 2 ) , addr, mask
|
||||||
|
|
||||||
|
/* Returns codes of PS7_Init */
|
||||||
|
#define PS7_INIT_SUCCESS (0) // 0 is success in good old C
|
||||||
|
#define PS7_INIT_CORRUPT (1) // 1 the data is corrupted, and slcr reg are in corrupted state now
|
||||||
|
#define PS7_INIT_TIMEOUT (2) // 2 when a poll operation timed out
|
||||||
|
#define PS7_POLL_FAILED_DDR_INIT (3) // 3 when a poll operation timed out for ddr init
|
||||||
|
#define PS7_POLL_FAILED_DMA (4) // 4 when a poll operation timed out for dma done bit
|
||||||
|
#define PS7_POLL_FAILED_PLL (5) // 5 when a poll operation timed out for pll sequence init
|
||||||
|
|
||||||
|
|
||||||
|
/* Silicon Versions */
|
||||||
|
#define PCW_SILICON_VERSION_1 0
|
||||||
|
#define PCW_SILICON_VERSION_2 1
|
||||||
|
#define PCW_SILICON_VERSION_3 2
|
||||||
|
|
||||||
|
/* This flag to be used by FSBL to check whether ps7_post_config() proc exixts */
|
||||||
|
#define PS7_POST_CONFIG
|
||||||
|
|
||||||
|
/* Freq of all peripherals */
|
||||||
|
|
||||||
|
#define APU_FREQ 666666687
|
||||||
|
#define DDR_FREQ 533333374
|
||||||
|
#define DCI_FREQ 10158730
|
||||||
|
#define QSPI_FREQ 200000000
|
||||||
|
#define SMC_FREQ 10000000
|
||||||
|
#define ENET0_FREQ 125000000
|
||||||
|
#define ENET1_FREQ 10000000
|
||||||
|
#define USB0_FREQ 60000000
|
||||||
|
#define USB1_FREQ 60000000
|
||||||
|
#define SDIO_FREQ 100000000
|
||||||
|
#define UART_FREQ 100000000
|
||||||
|
#define SPI_FREQ 10000000
|
||||||
|
#define I2C_FREQ 111111115
|
||||||
|
#define WDT_FREQ 111111115
|
||||||
|
#define TTC_FREQ 50000000
|
||||||
|
#define CAN_FREQ 10000000
|
||||||
|
#define PCAP_FREQ 200000000
|
||||||
|
#define TPIU_FREQ 200000000
|
||||||
|
#define FPGA0_FREQ 50000000
|
||||||
|
#define FPGA1_FREQ 10000000
|
||||||
|
#define FPGA2_FREQ 10000000
|
||||||
|
#define FPGA3_FREQ 10000000
|
||||||
|
|
||||||
|
|
||||||
|
/* For delay calculation using global registers*/
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_L32 0xF8F00200
|
||||||
|
#define SCU_GLOBAL_TIMER_COUNT_U32 0xF8F00204
|
||||||
|
#define SCU_GLOBAL_TIMER_CONTROL 0xF8F00208
|
||||||
|
#define SCU_GLOBAL_TIMER_AUTO_INC 0xF8F00218
|
||||||
|
|
||||||
|
int ps7_config( unsigned long*);
|
||||||
|
int ps7_init();
|
||||||
|
int ps7_post_config();
|
||||||
|
int ps7_debug();
|
||||||
|
char* getPS7MessageInfo(unsigned key);
|
||||||
|
|
||||||
|
void perf_start_clock(void);
|
||||||
|
void perf_disable_clock(void);
|
||||||
|
void perf_reset_clock(void);
|
||||||
|
void perf_reset_and_start_timer();
|
||||||
|
int get_number_of_cycles_for_delay(unsigned int delay);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,16 @@
|
|||||||
|
onbreak {quit -f}
|
||||||
|
onerror {quit -f}
|
||||||
|
|
||||||
|
vsim -voptargs="+acc" -t 1ps -L xil_defaultlib -L xpm -L axi_infrastructure_v1_1_0 -L smartconnect_v1_0 -L axi_protocol_checker_v2_0_1 -L axi_vip_v1_1_1 -L processing_system7_vip_v1_0_3 -L xilinx_vip -L unisims_ver -L unimacro_ver -L secureip -lib xil_defaultlib xil_defaultlib.system xil_defaultlib.glbl
|
||||||
|
|
||||||
|
do {wave.do}
|
||||||
|
|
||||||
|
view wave
|
||||||
|
view structure
|
||||||
|
view signals
|
||||||
|
|
||||||
|
do {system.udo}
|
||||||
|
|
||||||
|
run -all
|
||||||
|
|
||||||
|
quit -force
|
@ -0,0 +1,167 @@
|
|||||||
|
#!/bin/bash -f
|
||||||
|
#*********************************************************************************************************
|
||||||
|
# Vivado (TM) v2017.4 (64-bit)
|
||||||
|
#
|
||||||
|
# Filename : system.sh
|
||||||
|
# Simulator : Mentor Graphics ModelSim Simulator
|
||||||
|
# Description : Simulation script for compiling, elaborating and verifying the project source files.
|
||||||
|
# The script will automatically create the design libraries sub-directories in the run
|
||||||
|
# directory, add the library logical mappings in the simulator setup file, create default
|
||||||
|
# 'do/prj' file, execute compilation, elaboration and simulation steps.
|
||||||
|
#
|
||||||
|
# Generated by Vivado on Sat May 25 13:08:26 +0800 2019
|
||||||
|
# SW Build 2086221 on Fri Dec 15 20:55:39 MST 2017
|
||||||
|
#
|
||||||
|
# Copyright 1986-2017 Xilinx, Inc. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# usage: system.sh [-help]
|
||||||
|
# usage: system.sh [-lib_map_path]
|
||||||
|
# usage: system.sh [-noclean_files]
|
||||||
|
# usage: system.sh [-reset_run]
|
||||||
|
#
|
||||||
|
# Prerequisite:- To compile and run simulation, you must compile the Xilinx simulation libraries using the
|
||||||
|
# 'compile_simlib' TCL command. For more information about this command, run 'compile_simlib -help' in the
|
||||||
|
# Vivado Tcl Shell. Once the libraries have been compiled successfully, specify the -lib_map_path switch
|
||||||
|
# that points to these libraries and rerun export_simulation. For more information about this switch please
|
||||||
|
# type 'export_simulation -help' in the Tcl shell.
|
||||||
|
#
|
||||||
|
# You can also point to the simulation libraries by either replacing the <SPECIFY_COMPILED_LIB_PATH> in this
|
||||||
|
# script with the compiled library directory path or specify this path with the '-lib_map_path' switch when
|
||||||
|
# executing this script. Please type 'system.sh -help' for more information.
|
||||||
|
#
|
||||||
|
# Additional references - 'Xilinx Vivado Design Suite User Guide:Logic simulation (UG900)'
|
||||||
|
#
|
||||||
|
#*********************************************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
# Script info
|
||||||
|
echo -e "system.sh - Script generated by export_simulation (Vivado v2017.4 (64-bit)-id)\n"
|
||||||
|
|
||||||
|
# Main steps
|
||||||
|
run()
|
||||||
|
{
|
||||||
|
check_args $# $1
|
||||||
|
setup $1 $2
|
||||||
|
compile
|
||||||
|
simulate
|
||||||
|
}
|
||||||
|
|
||||||
|
# RUN_STEP: <compile>
|
||||||
|
compile()
|
||||||
|
{
|
||||||
|
# Compile design files
|
||||||
|
source compile.do 2>&1 | tee -a compile.log
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# RUN_STEP: <simulate>
|
||||||
|
simulate()
|
||||||
|
{
|
||||||
|
vsim -64 -c -do "do {simulate.do}" -l simulate.log
|
||||||
|
}
|
||||||
|
|
||||||
|
# STEP: setup
|
||||||
|
setup()
|
||||||
|
{
|
||||||
|
case $1 in
|
||||||
|
"-lib_map_path" )
|
||||||
|
if [[ ($2 == "") ]]; then
|
||||||
|
echo -e "ERROR: Simulation library directory path not specified (type \"./system.sh -help\" for more information)\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
copy_setup_file $2
|
||||||
|
;;
|
||||||
|
"-reset_run" )
|
||||||
|
reset_run
|
||||||
|
echo -e "INFO: Simulation run files deleted.\n"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
"-noclean_files" )
|
||||||
|
# do not remove previous data
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
copy_setup_file $2
|
||||||
|
esac
|
||||||
|
|
||||||
|
create_lib_dir
|
||||||
|
|
||||||
|
# Add any setup/initialization commands here:-
|
||||||
|
|
||||||
|
# <user specific commands>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# Copy modelsim.ini file
|
||||||
|
copy_setup_file()
|
||||||
|
{
|
||||||
|
file="modelsim.ini"
|
||||||
|
if [[ ($1 != "") ]]; then
|
||||||
|
lib_map_path="$1"
|
||||||
|
else
|
||||||
|
lib_map_path="L:/REV2019/MZ7XAB/MZ7XA_7010/02_example_SOC/CH08_Intr_timer/Miz_sys/Miz_sys.cache/compile_simlib/modelsim"
|
||||||
|
fi
|
||||||
|
if [[ ($lib_map_path != "") ]]; then
|
||||||
|
src_file="$lib_map_path/$file"
|
||||||
|
cp $src_file .
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create design library directory
|
||||||
|
create_lib_dir()
|
||||||
|
{
|
||||||
|
lib_dir="modelsim_lib"
|
||||||
|
if [[ -e $lib_dir ]]; then
|
||||||
|
rm -rf $sim_lib_dir
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir $lib_dir
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# Delete generated data from the previous run
|
||||||
|
reset_run()
|
||||||
|
{
|
||||||
|
files_to_remove=(compile.log elaborate.log simulate.log vsim.wlf modelsim_lib)
|
||||||
|
for (( i=0; i<${#files_to_remove[*]}; i++ )); do
|
||||||
|
file="${files_to_remove[i]}"
|
||||||
|
if [[ -e $file ]]; then
|
||||||
|
rm -rf $file
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
create_lib_dir
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check command line arguments
|
||||||
|
check_args()
|
||||||
|
{
|
||||||
|
if [[ ($1 == 1 ) && ($2 != "-lib_map_path" && $2 != "-noclean_files" && $2 != "-reset_run" && $2 != "-help" && $2 != "-h") ]]; then
|
||||||
|
echo -e "ERROR: Unknown option specified '$2' (type \"./system.sh -help\" for more information)\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ($2 == "-help" || $2 == "-h") ]]; then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Script usage
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
msg="Usage: system.sh [-help]\n\
|
||||||
|
Usage: system.sh [-lib_map_path]\n\
|
||||||
|
Usage: system.sh [-reset_run]\n\
|
||||||
|
Usage: system.sh [-noclean_files]\n\n\
|
||||||
|
[-help] -- Print help information for this script\n\n\
|
||||||
|
[-lib_map_path <path>] -- Compiled simulation library directory path. The simulation library is compiled\n\
|
||||||
|
using the compile_simlib tcl command. Please see 'compile_simlib -help' for more information.\n\n\
|
||||||
|
[-reset_run] -- Recreate simulator setup files and library mappings for a clean run. The generated files\n\
|
||||||
|
from the previous run will be removed. If you don't want to remove the simulator generated files, use the\n\
|
||||||
|
-noclean_files switch.\n\n\
|
||||||
|
[-noclean_files] -- Reset previous run, but do not remove simulator generated files from the previous run.\n\n"
|
||||||
|
echo -e $msg
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Launch script
|
||||||
|
run $1 $2
|
@ -0,0 +1,2 @@
|
|||||||
|
add wave *
|
||||||
|
add wave /glbl/GSR
|
@ -0,0 +1,49 @@
|
|||||||
|
################################################################################
|
||||||
|
# Vivado (TM) v2017.4 (64-bit)
|
||||||
|
#
|
||||||
|
# README.txt: Please read the sections below to understand the steps required to
|
||||||
|
# run the exported script and information about the source files.
|
||||||
|
#
|
||||||
|
# Generated by export_simulation on Sat May 25 13:08:26 +0800 2019
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
1. How to run the generated simulation script:-
|
||||||
|
|
||||||
|
From the shell prompt in the current directory, issue the following command:-
|
||||||
|
|
||||||
|
./system.sh
|
||||||
|
|
||||||
|
This command will launch the 'compile', 'elaborate' and 'simulate' functions
|
||||||
|
implemented in the script file for the 3-step flow. These functions are called
|
||||||
|
from the main 'run' function in the script file.
|
||||||
|
|
||||||
|
The 'run' function first executes the 'setup' function, the purpose of which is to
|
||||||
|
create simulator specific setup files, create design library mappings and library
|
||||||
|
directories and copy 'glbl.v' from the Vivado software install location into the
|
||||||
|
current directory.
|
||||||
|
|
||||||
|
The 'setup' function is also used for removing the simulator generated data in
|
||||||
|
order to reset the current directory to the original state when export_simulation
|
||||||
|
was launched from Vivado. This generated data can be removed by specifying the
|
||||||
|
'-reset_run' switch to the './system.sh' script.
|
||||||
|
|
||||||
|
./system.sh -reset_run
|
||||||
|
|
||||||
|
To keep the generated data from the previous run but regenerate the setup files and
|
||||||
|
library directories, use the '-noclean_files' switch.
|
||||||
|
|
||||||
|
./system.sh -noclean_files
|
||||||
|
|
||||||
|
For more information on the script, please type './system.sh -help'.
|
||||||
|
|
||||||
|
2. Additional design information files:-
|
||||||
|
|
||||||
|
export_simulation generates following additional file that can be used for fetching
|
||||||
|
the design files information or for integrating with external custom scripts.
|
||||||
|
|
||||||
|
Name : file_info.txt
|
||||||
|
Purpose: This file contains detail design file information based on the compile order
|
||||||
|
when export_simulation was executed from Vivado. The file contains information
|
||||||
|
about the file type, name, whether it is part of the IP, associated library
|
||||||
|
and the file path information.
|
@ -0,0 +1,49 @@
|
|||||||
|
vlib questa_lib/work
|
||||||
|
vlib questa_lib/msim
|
||||||
|
|
||||||
|
vlib questa_lib/msim/xil_defaultlib
|
||||||
|
vlib questa_lib/msim/xpm
|
||||||
|
vlib questa_lib/msim/axi_infrastructure_v1_1_0
|
||||||
|
vlib questa_lib/msim/smartconnect_v1_0
|
||||||
|
vlib questa_lib/msim/axi_protocol_checker_v2_0_1
|
||||||
|
vlib questa_lib/msim/axi_vip_v1_1_1
|
||||||
|
vlib questa_lib/msim/processing_system7_vip_v1_0_3
|
||||||
|
|
||||||
|
vmap xil_defaultlib questa_lib/msim/xil_defaultlib
|
||||||
|
vmap xpm questa_lib/msim/xpm
|
||||||
|
vmap axi_infrastructure_v1_1_0 questa_lib/msim/axi_infrastructure_v1_1_0
|
||||||
|
vmap smartconnect_v1_0 questa_lib/msim/smartconnect_v1_0
|
||||||
|
vmap axi_protocol_checker_v2_0_1 questa_lib/msim/axi_protocol_checker_v2_0_1
|
||||||
|
vmap axi_vip_v1_1_1 questa_lib/msim/axi_vip_v1_1_1
|
||||||
|
vmap processing_system7_vip_v1_0_3 questa_lib/msim/processing_system7_vip_v1_0_3
|
||||||
|
|
||||||
|
vlog -work xil_defaultlib -64 -sv -L smartconnect_v1_0 -L axi_protocol_checker_v2_0_1 -L axi_vip_v1_1_1 -L processing_system7_vip_v1_0_3 -L xilinx_vip "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_fifo/hdl/xpm_fifo.sv" \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_memory/hdl/xpm_memory.sv" \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_cdc/hdl/xpm_cdc.sv" \
|
||||||
|
|
||||||
|
vcom -work xpm -64 -93 \
|
||||||
|
"E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_VCOMP.vhd" \
|
||||||
|
|
||||||
|
vlog -work axi_infrastructure_v1_1_0 -64 "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl/axi_infrastructure_v1_1_vl_rfs.v" \
|
||||||
|
|
||||||
|
vlog -work smartconnect_v1_0 -64 -sv -L smartconnect_v1_0 -L axi_protocol_checker_v2_0_1 -L axi_vip_v1_1_1 -L processing_system7_vip_v1_0_3 -L xilinx_vip "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/sc_util_v1_0_vl_rfs.sv" \
|
||||||
|
|
||||||
|
vlog -work axi_protocol_checker_v2_0_1 -64 -sv -L smartconnect_v1_0 -L axi_protocol_checker_v2_0_1 -L axi_vip_v1_1_1 -L processing_system7_vip_v1_0_3 -L xilinx_vip "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/3b24/hdl/axi_protocol_checker_v2_0_vl_rfs.sv" \
|
||||||
|
|
||||||
|
vlog -work axi_vip_v1_1_1 -64 -sv -L smartconnect_v1_0 -L axi_protocol_checker_v2_0_1 -L axi_vip_v1_1_1 -L processing_system7_vip_v1_0_3 -L xilinx_vip "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/a16a/hdl/axi_vip_v1_1_vl_rfs.sv" \
|
||||||
|
|
||||||
|
vlog -work processing_system7_vip_v1_0_3 -64 -sv -L smartconnect_v1_0 -L axi_protocol_checker_v2_0_1 -L axi_vip_v1_1_1 -L processing_system7_vip_v1_0_3 -L xilinx_vip "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl/processing_system7_vip_v1_0_vl_rfs.sv" \
|
||||||
|
|
||||||
|
vlog -work xil_defaultlib -64 "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog" "+incdir+../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl" "+incdir+E:/Xilinx2017/Vivado/2017.4/data/xilinx_vip/include" \
|
||||||
|
"../../../bd/system/ip/system_processing_system7_0_0/sim/system_processing_system7_0_0.v" \
|
||||||
|
"../../../bd/system/sim/system.v" \
|
||||||
|
|
||||||
|
vlog -work xil_defaultlib \
|
||||||
|
"glbl.v"
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
vopt -64 +acc -l elaborate.log -L xil_defaultlib -L xpm -L axi_infrastructure_v1_1_0 -L smartconnect_v1_0 -L axi_protocol_checker_v2_0_1 -L axi_vip_v1_1_1 -L processing_system7_vip_v1_0_3 -L smartconnect_v1_0 -L axi_protocol_checker_v2_0_1 -L axi_vip_v1_1_1 -L processing_system7_vip_v1_0_3 -L xilinx_vip -L unisims_ver -L unimacro_ver -L secureip -work xil_defaultlib xil_defaultlib.system xil_defaultlib.glbl -o system_opt
|
@ -0,0 +1,12 @@
|
|||||||
|
xpm_fifo.sv,systemverilog,xil_defaultlib,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_fifo/hdl/xpm_fifo.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
xpm_memory.sv,systemverilog,xil_defaultlib,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_memory/hdl/xpm_memory.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
xpm_cdc.sv,systemverilog,xil_defaultlib,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_cdc/hdl/xpm_cdc.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
xpm_VCOMP.vhd,vhdl,xpm,E:/Xilinx2017/Vivado/2017.4/data/ip/xpm/xpm_VCOMP.vhd,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
axi_infrastructure_v1_1_vl_rfs.v,verilog,axi_infrastructure_v1_1_0,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl/axi_infrastructure_v1_1_vl_rfs.v,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
sc_util_v1_0_vl_rfs.sv,systemverilog,smartconnect_v1_0,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/sc_util_v1_0_vl_rfs.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
axi_protocol_checker_v2_0_vl_rfs.sv,systemverilog,axi_protocol_checker_v2_0_1,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/3b24/hdl/axi_protocol_checker_v2_0_vl_rfs.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
axi_vip_v1_1_vl_rfs.sv,systemverilog,axi_vip_v1_1_1,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/a16a/hdl/axi_vip_v1_1_vl_rfs.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
processing_system7_vip_v1_0_vl_rfs.sv,systemverilog,processing_system7_vip_v1_0_3,../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl/processing_system7_vip_v1_0_vl_rfs.sv,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
system_processing_system7_0_0.v,verilog,xil_defaultlib,../../../bd/system/ip/system_processing_system7_0_0/sim/system_processing_system7_0_0.v,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
system.v,verilog,xil_defaultlib,../../../bd/system/sim/system.v,incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/ec67/hdl"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/02c8/hdl/verilog"incdir="../../../../Miz_sys.srcs/sources_1/bd/system/ipshared/1313/hdl"
|
||||||
|
glbl.v,Verilog,xil_defaultlib,glbl.v
|
@ -0,0 +1,71 @@
|
|||||||
|
// $Header: /devl/xcs/repo/env/Databases/CAEInterfaces/verunilibs/data/glbl.v,v 1.14 2010/10/28 20:44:00 fphillip Exp $
|
||||||
|
`ifndef GLBL
|
||||||
|
`define GLBL
|
||||||
|
`timescale 1 ps / 1 ps
|
||||||
|
|
||||||
|
module glbl ();
|
||||||
|
|
||||||
|
parameter ROC_WIDTH = 100000;
|
||||||
|
parameter TOC_WIDTH = 0;
|
||||||
|
|
||||||
|
//-------- STARTUP Globals --------------
|
||||||
|
wire GSR;
|
||||||
|
wire GTS;
|
||||||
|
wire GWE;
|
||||||
|
wire PRLD;
|
||||||
|
tri1 p_up_tmp;
|
||||||
|
tri (weak1, strong0) PLL_LOCKG = p_up_tmp;
|
||||||
|
|
||||||
|
wire PROGB_GLBL;
|
||||||
|
wire CCLKO_GLBL;
|
||||||
|
wire FCSBO_GLBL;
|
||||||
|
wire [3:0] DO_GLBL;
|
||||||
|
wire [3:0] DI_GLBL;
|
||||||
|
|
||||||
|
reg GSR_int;
|
||||||
|
reg GTS_int;
|
||||||
|
reg PRLD_int;
|
||||||
|
|
||||||
|
//-------- JTAG Globals --------------
|
||||||
|
wire JTAG_TDO_GLBL;
|
||||||
|
wire JTAG_TCK_GLBL;
|
||||||
|
wire JTAG_TDI_GLBL;
|
||||||
|
wire JTAG_TMS_GLBL;
|
||||||
|
wire JTAG_TRST_GLBL;
|
||||||
|
|
||||||
|
reg JTAG_CAPTURE_GLBL;
|
||||||
|
reg JTAG_RESET_GLBL;
|
||||||
|
reg JTAG_SHIFT_GLBL;
|
||||||
|
reg JTAG_UPDATE_GLBL;
|
||||||
|
reg JTAG_RUNTEST_GLBL;
|
||||||
|
|
||||||
|
reg JTAG_SEL1_GLBL = 0;
|
||||||
|
reg JTAG_SEL2_GLBL = 0 ;
|
||||||
|
reg JTAG_SEL3_GLBL = 0;
|
||||||
|
reg JTAG_SEL4_GLBL = 0;
|
||||||
|
|
||||||
|
reg JTAG_USER_TDO1_GLBL = 1'bz;
|
||||||
|
reg JTAG_USER_TDO2_GLBL = 1'bz;
|
||||||
|
reg JTAG_USER_TDO3_GLBL = 1'bz;
|
||||||
|
reg JTAG_USER_TDO4_GLBL = 1'bz;
|
||||||
|
|
||||||
|
assign (strong1, weak0) GSR = GSR_int;
|
||||||
|
assign (strong1, weak0) GTS = GTS_int;
|
||||||
|
assign (weak1, weak0) PRLD = PRLD_int;
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
GSR_int = 1'b1;
|
||||||
|
PRLD_int = 1'b1;
|
||||||
|
#(ROC_WIDTH)
|
||||||
|
GSR_int = 1'b0;
|
||||||
|
PRLD_int = 1'b0;
|
||||||
|
end
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
GTS_int = 1'b1;
|
||||||
|
#(TOC_WIDTH)
|
||||||
|
GTS_int = 1'b0;
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
||||||
|
`endif
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user