axi_ad9144- qsys updates
parent
01b7662e05
commit
bced17a16f
|
@ -34,8 +34,6 @@
|
|||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// ***************************************************************************
|
||||
// ***************************************************************************
|
||||
// ***************************************************************************
|
||||
// ***************************************************************************
|
||||
|
||||
`timescale 1ns/100ps
|
||||
|
||||
|
@ -45,7 +43,9 @@ module axi_ad9144 (
|
|||
// tx_clk is (line-rate/40)
|
||||
|
||||
tx_clk,
|
||||
tx_valid,
|
||||
tx_data,
|
||||
tx_ready,
|
||||
|
||||
// dma interface
|
||||
|
||||
|
@ -92,90 +92,93 @@ module axi_ad9144 (
|
|||
// parameters
|
||||
|
||||
parameter ID = 0;
|
||||
parameter DEVICE_TYPE = 0;
|
||||
parameter QUAD_OR_DUAL_N = 1;
|
||||
parameter DAC_DATAPATH_DISABLE = 0;
|
||||
|
||||
// jesd interface
|
||||
// tx_clk is (line-rate/40)
|
||||
|
||||
input tx_clk;
|
||||
output [(128*QUAD_OR_DUAL_N)+127:0] tx_data;
|
||||
input tx_clk;
|
||||
output tx_valid;
|
||||
output [(128*QUAD_OR_DUAL_N)+127:0] tx_data;
|
||||
input tx_ready;
|
||||
|
||||
// dma interface
|
||||
|
||||
output dac_clk;
|
||||
output dac_valid_0;
|
||||
output dac_enable_0;
|
||||
input [63:0] dac_ddata_0;
|
||||
output dac_valid_1;
|
||||
output dac_enable_1;
|
||||
input [63:0] dac_ddata_1;
|
||||
output dac_valid_2;
|
||||
output dac_enable_2;
|
||||
input [63:0] dac_ddata_2;
|
||||
output dac_valid_3;
|
||||
output dac_enable_3;
|
||||
input [63:0] dac_ddata_3;
|
||||
input dac_dovf;
|
||||
input dac_dunf;
|
||||
output dac_clk;
|
||||
output dac_valid_0;
|
||||
output dac_enable_0;
|
||||
input [63:0] dac_ddata_0;
|
||||
output dac_valid_1;
|
||||
output dac_enable_1;
|
||||
input [63:0] dac_ddata_1;
|
||||
output dac_valid_2;
|
||||
output dac_enable_2;
|
||||
input [63:0] dac_ddata_2;
|
||||
output dac_valid_3;
|
||||
output dac_enable_3;
|
||||
input [63:0] dac_ddata_3;
|
||||
input dac_dovf;
|
||||
input dac_dunf;
|
||||
|
||||
// axi interface
|
||||
|
||||
input s_axi_aclk;
|
||||
input s_axi_aresetn;
|
||||
input s_axi_awvalid;
|
||||
input [ 31:0] s_axi_awaddr;
|
||||
input [ 2:0] s_axi_awprot;
|
||||
output s_axi_awready;
|
||||
input s_axi_wvalid;
|
||||
input [ 31:0] s_axi_wdata;
|
||||
input [ 3:0] s_axi_wstrb;
|
||||
output s_axi_wready;
|
||||
output s_axi_bvalid;
|
||||
output [ 1:0] s_axi_bresp;
|
||||
input s_axi_bready;
|
||||
input s_axi_arvalid;
|
||||
input [ 31:0] s_axi_araddr;
|
||||
input [ 2:0] s_axi_arprot;
|
||||
output s_axi_arready;
|
||||
output s_axi_rvalid;
|
||||
output [ 31:0] s_axi_rdata;
|
||||
output [ 1:0] s_axi_rresp;
|
||||
input s_axi_rready;
|
||||
input s_axi_aclk;
|
||||
input s_axi_aresetn;
|
||||
input s_axi_awvalid;
|
||||
input [ 31:0] s_axi_awaddr;
|
||||
input [ 2:0] s_axi_awprot;
|
||||
output s_axi_awready;
|
||||
input s_axi_wvalid;
|
||||
input [ 31:0] s_axi_wdata;
|
||||
input [ 3:0] s_axi_wstrb;
|
||||
output s_axi_wready;
|
||||
output s_axi_bvalid;
|
||||
output [ 1:0] s_axi_bresp;
|
||||
input s_axi_bready;
|
||||
input s_axi_arvalid;
|
||||
input [ 31:0] s_axi_araddr;
|
||||
input [ 2:0] s_axi_arprot;
|
||||
output s_axi_arready;
|
||||
output s_axi_rvalid;
|
||||
output [ 31:0] s_axi_rdata;
|
||||
output [ 1:0] s_axi_rresp;
|
||||
input s_axi_rready;
|
||||
|
||||
// internal clocks and resets
|
||||
|
||||
wire dac_rst;
|
||||
wire up_clk;
|
||||
wire up_rstn;
|
||||
wire dac_rst;
|
||||
wire up_clk;
|
||||
wire up_rstn;
|
||||
|
||||
// internal signals
|
||||
|
||||
wire [255:0] tx_data_s;
|
||||
wire [ 15:0] dac_data_0_0_s;
|
||||
wire [ 15:0] dac_data_0_1_s;
|
||||
wire [ 15:0] dac_data_0_2_s;
|
||||
wire [ 15:0] dac_data_0_3_s;
|
||||
wire [ 15:0] dac_data_1_0_s;
|
||||
wire [ 15:0] dac_data_1_1_s;
|
||||
wire [ 15:0] dac_data_1_2_s;
|
||||
wire [ 15:0] dac_data_1_3_s;
|
||||
wire [ 15:0] dac_data_2_0_s;
|
||||
wire [ 15:0] dac_data_2_1_s;
|
||||
wire [ 15:0] dac_data_2_2_s;
|
||||
wire [ 15:0] dac_data_2_3_s;
|
||||
wire [ 15:0] dac_data_3_0_s;
|
||||
wire [ 15:0] dac_data_3_1_s;
|
||||
wire [ 15:0] dac_data_3_2_s;
|
||||
wire [ 15:0] dac_data_3_3_s;
|
||||
wire up_wreq_s;
|
||||
wire [ 13:0] up_waddr_s;
|
||||
wire [ 31:0] up_wdata_s;
|
||||
wire up_wack_s;
|
||||
wire up_rreq_s;
|
||||
wire [ 13:0] up_raddr_s;
|
||||
wire [ 31:0] up_rdata_s;
|
||||
wire up_rack_s;
|
||||
wire [255:0] tx_data_s;
|
||||
wire [ 15:0] dac_data_0_0_s;
|
||||
wire [ 15:0] dac_data_0_1_s;
|
||||
wire [ 15:0] dac_data_0_2_s;
|
||||
wire [ 15:0] dac_data_0_3_s;
|
||||
wire [ 15:0] dac_data_1_0_s;
|
||||
wire [ 15:0] dac_data_1_1_s;
|
||||
wire [ 15:0] dac_data_1_2_s;
|
||||
wire [ 15:0] dac_data_1_3_s;
|
||||
wire [ 15:0] dac_data_2_0_s;
|
||||
wire [ 15:0] dac_data_2_1_s;
|
||||
wire [ 15:0] dac_data_2_2_s;
|
||||
wire [ 15:0] dac_data_2_3_s;
|
||||
wire [ 15:0] dac_data_3_0_s;
|
||||
wire [ 15:0] dac_data_3_1_s;
|
||||
wire [ 15:0] dac_data_3_2_s;
|
||||
wire [ 15:0] dac_data_3_3_s;
|
||||
wire up_wreq_s;
|
||||
wire [ 13:0] up_waddr_s;
|
||||
wire [ 31:0] up_wdata_s;
|
||||
wire up_wack_s;
|
||||
wire up_rreq_s;
|
||||
wire [ 13:0] up_raddr_s;
|
||||
wire [ 31:0] up_rdata_s;
|
||||
wire up_rack_s;
|
||||
|
||||
// signal name changes
|
||||
|
||||
|
@ -184,11 +187,12 @@ module axi_ad9144 (
|
|||
|
||||
// dual/quad cores
|
||||
|
||||
assign tx_valid = 1'b1;
|
||||
assign tx_data = (QUAD_OR_DUAL_N == 1) ? tx_data_s : tx_data_s[127:0];
|
||||
|
||||
// device interface
|
||||
|
||||
axi_ad9144_if i_if (
|
||||
axi_ad9144_if #(.DEVICE_TYPE (DEVICE_TYPE)) i_if (
|
||||
.tx_clk (tx_clk),
|
||||
.tx_data (tx_data_s),
|
||||
.dac_clk (dac_clk),
|
||||
|
|
|
@ -48,6 +48,13 @@ set_parameter_property QUAD_OR_DUAL_N TYPE INTEGER
|
|||
set_parameter_property QUAD_OR_DUAL_N UNITS None
|
||||
set_parameter_property QUAD_OR_DUAL_N HDL_PARAMETER true
|
||||
|
||||
add_parameter DEVICE_TYPE INTEGER 0
|
||||
set_parameter_property DEVICE_TYPE DEFAULT_VALUE 1
|
||||
set_parameter_property DEVICE_TYPE DISPLAY_NAME DEVICE_TYPE
|
||||
set_parameter_property DEVICE_TYPE TYPE INTEGER
|
||||
set_parameter_property DEVICE_TYPE UNITS None
|
||||
set_parameter_property DEVICE_TYPE HDL_PARAMETER true
|
||||
|
||||
# axi4 slave
|
||||
|
||||
add_interface s_axi_clock clock end
|
||||
|
@ -83,7 +90,13 @@ add_interface_port s_axi s_axi_rready rready Input 1
|
|||
# transceiver interface
|
||||
|
||||
ad_alt_intf clock tx_clk input 1
|
||||
ad_alt_intf signal tx_data output 128*(QUAD_OR_DUAL_N+1) data
|
||||
|
||||
add_interface if_tx_data avalon_streaming source
|
||||
add_interface_port if_tx_data tx_data data output 128*(QUAD_OR_DUAL_N+1)
|
||||
add_interface_port if_tx_data tx_valid valid output 1
|
||||
add_interface_port if_tx_data tx_ready ready input 1
|
||||
set_interface_property if_tx_data associatedClock if_tx_clk
|
||||
set_interface_property if_tx_data dataBitsPerSymbol 128
|
||||
|
||||
# dma interface
|
||||
|
||||
|
|
|
@ -34,10 +34,6 @@
|
|||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// ***************************************************************************
|
||||
// ***************************************************************************
|
||||
// ***************************************************************************
|
||||
// ***************************************************************************
|
||||
// This is the dac physical interface (drives samples from the low speed clock to the
|
||||
// dac clock domain.
|
||||
|
||||
`timescale 1ns/100ps
|
||||
|
||||
|
@ -70,6 +66,10 @@ module axi_ad9144_if (
|
|||
dac_data_3_2,
|
||||
dac_data_3_3);
|
||||
|
||||
// altera (0x1) or xilinx (0x0)
|
||||
|
||||
parameter DEVICE_TYPE = 0;
|
||||
|
||||
// jesd interface
|
||||
// tx_clk is (line-rate/40)
|
||||
|
||||
|
@ -109,38 +109,38 @@ module axi_ad9144_if (
|
|||
if (dac_rst == 1'b1) begin
|
||||
tx_data <= 256'd0;
|
||||
end else begin
|
||||
tx_data[255:248] <= dac_data_3_3[ 7: 0];
|
||||
tx_data[247:240] <= dac_data_3_2[ 7: 0];
|
||||
tx_data[239:232] <= dac_data_3_1[ 7: 0];
|
||||
tx_data[231:224] <= dac_data_3_0[ 7: 0];
|
||||
tx_data[223:216] <= dac_data_3_3[15: 8];
|
||||
tx_data[215:208] <= dac_data_3_2[15: 8];
|
||||
tx_data[207:200] <= dac_data_3_1[15: 8];
|
||||
tx_data[199:192] <= dac_data_3_0[15: 8];
|
||||
tx_data[191:184] <= dac_data_2_3[ 7: 0];
|
||||
tx_data[183:176] <= dac_data_2_2[ 7: 0];
|
||||
tx_data[175:168] <= dac_data_2_1[ 7: 0];
|
||||
tx_data[167:160] <= dac_data_2_0[ 7: 0];
|
||||
tx_data[159:152] <= dac_data_2_3[15: 8];
|
||||
tx_data[151:144] <= dac_data_2_2[15: 8];
|
||||
tx_data[143:136] <= dac_data_2_1[15: 8];
|
||||
tx_data[135:128] <= dac_data_2_0[15: 8];
|
||||
tx_data[127:120] <= dac_data_1_3[ 7: 0];
|
||||
tx_data[119:112] <= dac_data_1_2[ 7: 0];
|
||||
tx_data[111:104] <= dac_data_1_1[ 7: 0];
|
||||
tx_data[103: 96] <= dac_data_1_0[ 7: 0];
|
||||
tx_data[ 95: 88] <= dac_data_1_3[15: 8];
|
||||
tx_data[ 87: 80] <= dac_data_1_2[15: 8];
|
||||
tx_data[ 79: 72] <= dac_data_1_1[15: 8];
|
||||
tx_data[ 71: 64] <= dac_data_1_0[15: 8];
|
||||
tx_data[ 63: 56] <= dac_data_0_3[ 7: 0];
|
||||
tx_data[ 55: 48] <= dac_data_0_2[ 7: 0];
|
||||
tx_data[ 47: 40] <= dac_data_0_1[ 7: 0];
|
||||
tx_data[ 39: 32] <= dac_data_0_0[ 7: 0];
|
||||
tx_data[ 31: 24] <= dac_data_0_3[15: 8];
|
||||
tx_data[ 23: 16] <= dac_data_0_2[15: 8];
|
||||
tx_data[ 15: 8] <= dac_data_0_1[15: 8];
|
||||
tx_data[ 7: 0] <= dac_data_0_0[15: 8];
|
||||
tx_data[255:248] <= (DEVICE_TYPE == 1) ? dac_data_3_0[ 7: 0] : dac_data_3_3[ 7: 0];
|
||||
tx_data[247:240] <= (DEVICE_TYPE == 1) ? dac_data_3_1[ 7: 0] : dac_data_3_2[ 7: 0];
|
||||
tx_data[239:232] <= (DEVICE_TYPE == 1) ? dac_data_3_2[ 7: 0] : dac_data_3_1[ 7: 0];
|
||||
tx_data[231:224] <= (DEVICE_TYPE == 1) ? dac_data_3_3[ 7: 0] : dac_data_3_0[ 7: 0];
|
||||
tx_data[223:216] <= (DEVICE_TYPE == 1) ? dac_data_3_0[15: 8] : dac_data_3_3[15: 8];
|
||||
tx_data[215:208] <= (DEVICE_TYPE == 1) ? dac_data_3_1[15: 8] : dac_data_3_2[15: 8];
|
||||
tx_data[207:200] <= (DEVICE_TYPE == 1) ? dac_data_3_2[15: 8] : dac_data_3_1[15: 8];
|
||||
tx_data[199:192] <= (DEVICE_TYPE == 1) ? dac_data_3_3[15: 8] : dac_data_3_0[15: 8];
|
||||
tx_data[191:184] <= (DEVICE_TYPE == 1) ? dac_data_2_0[ 7: 0] : dac_data_2_3[ 7: 0];
|
||||
tx_data[183:176] <= (DEVICE_TYPE == 1) ? dac_data_2_1[ 7: 0] : dac_data_2_2[ 7: 0];
|
||||
tx_data[175:168] <= (DEVICE_TYPE == 1) ? dac_data_2_2[ 7: 0] : dac_data_2_1[ 7: 0];
|
||||
tx_data[167:160] <= (DEVICE_TYPE == 1) ? dac_data_2_3[ 7: 0] : dac_data_2_0[ 7: 0];
|
||||
tx_data[159:152] <= (DEVICE_TYPE == 1) ? dac_data_2_0[15: 8] : dac_data_2_3[15: 8];
|
||||
tx_data[151:144] <= (DEVICE_TYPE == 1) ? dac_data_2_1[15: 8] : dac_data_2_2[15: 8];
|
||||
tx_data[143:136] <= (DEVICE_TYPE == 1) ? dac_data_2_2[15: 8] : dac_data_2_1[15: 8];
|
||||
tx_data[135:128] <= (DEVICE_TYPE == 1) ? dac_data_2_3[15: 8] : dac_data_2_0[15: 8];
|
||||
tx_data[127:120] <= (DEVICE_TYPE == 1) ? dac_data_1_0[ 7: 0] : dac_data_1_3[ 7: 0];
|
||||
tx_data[119:112] <= (DEVICE_TYPE == 1) ? dac_data_1_1[ 7: 0] : dac_data_1_2[ 7: 0];
|
||||
tx_data[111:104] <= (DEVICE_TYPE == 1) ? dac_data_1_2[ 7: 0] : dac_data_1_1[ 7: 0];
|
||||
tx_data[103: 96] <= (DEVICE_TYPE == 1) ? dac_data_1_3[ 7: 0] : dac_data_1_0[ 7: 0];
|
||||
tx_data[ 95: 88] <= (DEVICE_TYPE == 1) ? dac_data_1_0[15: 8] : dac_data_1_3[15: 8];
|
||||
tx_data[ 87: 80] <= (DEVICE_TYPE == 1) ? dac_data_1_1[15: 8] : dac_data_1_2[15: 8];
|
||||
tx_data[ 79: 72] <= (DEVICE_TYPE == 1) ? dac_data_1_2[15: 8] : dac_data_1_1[15: 8];
|
||||
tx_data[ 71: 64] <= (DEVICE_TYPE == 1) ? dac_data_1_3[15: 8] : dac_data_1_0[15: 8];
|
||||
tx_data[ 63: 56] <= (DEVICE_TYPE == 1) ? dac_data_0_0[ 7: 0] : dac_data_0_3[ 7: 0];
|
||||
tx_data[ 55: 48] <= (DEVICE_TYPE == 1) ? dac_data_0_1[ 7: 0] : dac_data_0_2[ 7: 0];
|
||||
tx_data[ 47: 40] <= (DEVICE_TYPE == 1) ? dac_data_0_2[ 7: 0] : dac_data_0_1[ 7: 0];
|
||||
tx_data[ 39: 32] <= (DEVICE_TYPE == 1) ? dac_data_0_3[ 7: 0] : dac_data_0_0[ 7: 0];
|
||||
tx_data[ 31: 24] <= (DEVICE_TYPE == 1) ? dac_data_0_0[15: 8] : dac_data_0_3[15: 8];
|
||||
tx_data[ 23: 16] <= (DEVICE_TYPE == 1) ? dac_data_0_1[15: 8] : dac_data_0_2[15: 8];
|
||||
tx_data[ 15: 8] <= (DEVICE_TYPE == 1) ? dac_data_0_2[15: 8] : dac_data_0_1[15: 8];
|
||||
tx_data[ 7: 0] <= (DEVICE_TYPE == 1) ? dac_data_0_3[15: 8] : dac_data_0_0[15: 8];
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ adi_ip_constraints axi_ad9144 [list \
|
|||
|
||||
set_property driver_value 0 [ipx::get_ports *dovf* -of_objects [ipx::current_core]]
|
||||
set_property driver_value 0 [ipx::get_ports *dunf* -of_objects [ipx::current_core]]
|
||||
set_property driver_value 0 [ipx::get_ports *tx_ready* -of_objects [ipx::current_core]]
|
||||
|
||||
ipx::save_core [ipx::current_core]
|
||||
|
||||
|
|
Loading…
Reference in New Issue