|
| 1 | +// *************************************************************************** |
| 2 | +// *************************************************************************** |
| 3 | +// Copyright (C) 2025 Analog Devices, Inc. All rights reserved. |
| 4 | +// |
| 5 | +// In this HDL repository, there are many different and unique modules, consisting |
| 6 | +// of various HDL (Verilog or VHDL) components. The individual modules are |
| 7 | +// developed independently, and may be accompanied by separate and unique license |
| 8 | +// terms. |
| 9 | +// |
| 10 | +// The user should read each of these license terms, and understand the |
| 11 | +// freedoms and responsibilities that he or she has by using this source/core. |
| 12 | +// |
| 13 | +// This core is distributed in the hope that it will be useful, but WITHOUT ANY |
| 14 | +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
| 15 | +// A PARTICULAR PURPOSE. |
| 16 | +// |
| 17 | +// Redistribution and use of source or resulting binaries, with or without modification |
| 18 | +// of this file, are permitted under one of the following two license terms: |
| 19 | +// |
| 20 | +// 1. The GNU General Public License version 2 as published by the |
| 21 | +// Free Software Foundation, which can be found in the top level directory |
| 22 | +// of this repository (LICENSE_GPL2), and also online at: |
| 23 | +// <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html> |
| 24 | +// |
| 25 | +// OR |
| 26 | +// |
| 27 | +// 2. An ADI specific BSD license, which can be found in the top level directory |
| 28 | +// of this repository (LICENSE_ADIBSD), and also on-line at: |
| 29 | +// https://github.com/analogdevicesinc/hdl/blob/main/LICENSE_ADIBSD |
| 30 | +// This will allow to generate bit files and not release the source code, |
| 31 | +// as long as it attaches to an ADI device. |
| 32 | +// |
| 33 | +// *************************************************************************** |
| 34 | +// *************************************************************************** |
| 35 | + |
| 36 | +`timescale 1ps/1ps |
| 37 | +import hsci_master_regs_pkg::*; |
| 38 | + |
| 39 | +module axi_hsci #( |
| 40 | + parameter AXI_ADDR_WIDTH = 15, |
| 41 | + parameter AXI_DATA_WIDTH = 32, |
| 42 | + parameter REGMAP_ADDR_WIDTH = 16, |
| 43 | + parameter S_AXI_ADDR_WIDTH = 18 |
| 44 | +) ( |
| 45 | + input wire s_axi_aclk, |
| 46 | + input wire s_axi_aresetn, |
| 47 | + |
| 48 | + input wire [S_AXI_ADDR_WIDTH-1:0] s_axi_awaddr, |
| 49 | + input wire [2:0] s_axi_awprot, |
| 50 | + input wire s_axi_awvalid, |
| 51 | + input wire s_axi_bready, |
| 52 | + input wire [AXI_DATA_WIDTH-1:0] s_axi_wdata, |
| 53 | + input wire s_axi_wvalid, |
| 54 | + input wire s_axi_rready, |
| 55 | + input wire [(AXI_DATA_WIDTH/8)-1 : 0] s_axi_wstrb, |
| 56 | + input wire [S_AXI_ADDR_WIDTH-1:0] s_axi_araddr, |
| 57 | + input wire [2:0] s_axi_arprot, |
| 58 | + input wire s_axi_arvalid, |
| 59 | + |
| 60 | + output wire s_axi_wready, |
| 61 | + output wire s_axi_arready, |
| 62 | + output wire [1:0] s_axi_rresp, |
| 63 | + output wire [AXI_DATA_WIDTH-1:0] s_axi_rdata, |
| 64 | + output wire s_axi_rvalid, |
| 65 | + output wire s_axi_awready, |
| 66 | + output wire [1:0] s_axi_bresp, |
| 67 | + output wire s_axi_bvalid, |
| 68 | + |
| 69 | + input wire hsci_pclk, |
| 70 | + output [7:0] hsci_menc_clk, |
| 71 | + output [7:0] hsci_mosi_data, |
| 72 | + input wire [7:0] hsci_miso_data, |
| 73 | + |
| 74 | + output wire hsci_pll_reset, |
| 75 | + input wire hsci_rst_seq_done, |
| 76 | + input wire hsci_pll_locked, |
| 77 | + input wire hsci_vtc_rdy_bsc_tx, |
| 78 | + input wire hsci_dly_rdy_bsc_tx, |
| 79 | + input wire hsci_vtc_rdy_bsc_rx, |
| 80 | + input wire hsci_dly_rdy_bsc_rx |
| 81 | + |
| 82 | +); |
| 83 | + |
| 84 | + axi4_lite #(32,18) axi(); |
| 85 | + |
| 86 | + assign axi.awaddr = s_axi_awaddr; |
| 87 | + assign axi.awprot = s_axi_awprot; |
| 88 | + assign axi.awvalid = s_axi_awvalid; |
| 89 | + assign axi.bready = s_axi_bready; |
| 90 | + assign axi.wdata = s_axi_wdata; |
| 91 | + assign axi.wvalid = s_axi_wvalid; |
| 92 | + assign axi.rready = s_axi_rready; |
| 93 | + assign axi.wstrb = s_axi_wstrb; |
| 94 | + assign axi.araddr = s_axi_araddr; |
| 95 | + assign axi.arprot = s_axi_arprot; |
| 96 | + assign axi.arvalid = s_axi_arvalid; |
| 97 | + |
| 98 | + assign s_axi_wready = axi.wready; |
| 99 | + assign s_axi_arready = axi.arready; |
| 100 | + assign s_axi_rresp = axi.rresp; |
| 101 | + assign s_axi_rdata = axi.rdata; |
| 102 | + assign s_axi_rvalid = axi.rvalid ; |
| 103 | + assign s_axi_awready = axi.awready; |
| 104 | + assign s_axi_bresp = axi.bresp; |
| 105 | + assign s_axi_bvalid = axi.bvalid; |
| 106 | + |
| 107 | + hsci_master_top #( |
| 108 | + .AXI_ADDR_WIDTH (AXI_ADDR_WIDTH), |
| 109 | + .AXI_DATA_WIDTH (AXI_DATA_WIDTH), |
| 110 | + .REGMAP_ADDR_WIDTH (REGMAP_ADDR_WIDTH), |
| 111 | + .S_AXI_ADDR_WIDTH (S_AXI_ADDR_WIDTH) |
| 112 | + ) hsci_master_top ( |
| 113 | + .axi_clk (s_axi_aclk), |
| 114 | + .axi_resetn (s_axi_aresetn), |
| 115 | + .axi (axi), |
| 116 | + .hsci_pclk (hsci_pclk), |
| 117 | + .hsci_menc_clk (hsci_menc_clk), |
| 118 | + .hsci_mosi_data (hsci_mosi_data), |
| 119 | + .hsci_miso_data (hsci_miso_data), |
| 120 | + .hsci_pll_reset (hsci_pll_reset), |
| 121 | + .hsci_rst_seq_done (hsci_rst_seq_done), |
| 122 | + .hsci_pll_locked (hsci_pll_locked), |
| 123 | + .hsci_vtc_rdy_bsc_tx (hsci_vtc_rdy_bsc_tx), |
| 124 | + .hsci_dly_rdy_bsc_tx (hsci_dly_rdy_bsc_tx), |
| 125 | + .hsci_vtc_rdy_bsc_rx (hsci_vtc_rdy_bsc_rx), |
| 126 | + .hsci_dly_rdy_bsc_rx (hsci_dly_rdy_bsc_rx)); |
| 127 | + |
| 128 | +endmodule |
0 commit comments