From 98609527e30c403c58413e872d97df2e69e3911c Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Wed, 1 Apr 2015 17:26:01 +0200 Subject: [PATCH] axi_i2s: Add I2S interface definition Using interface definitions makes it possible to group pins of a peripheral into a interface pins. This allows us to use connect_bd_intf_net to connect all pins of the interface instead of having to manually call connect_bd_net for each for the pins. Using interface pins also unclutters the connections in the Vivado block design view a bit. Signed-off-by: Lars-Peter Clausen --- library/axi_i2s_adi/axi_i2s_adi_ip.tcl | 11 +++++ library/axi_i2s_adi/i2s.xml | 13 ++++++ library/axi_i2s_adi/i2s_rtl.xml | 61 ++++++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 library/axi_i2s_adi/i2s.xml create mode 100644 library/axi_i2s_adi/i2s_rtl.xml diff --git a/library/axi_i2s_adi/axi_i2s_adi_ip.tcl b/library/axi_i2s_adi/axi_i2s_adi_ip.tcl index bfb1c44ee..bcbc3fb3d 100644 --- a/library/axi_i2s_adi/axi_i2s_adi_ip.tcl +++ b/library/axi_i2s_adi/axi_i2s_adi_ip.tcl @@ -59,6 +59,17 @@ adi_add_bus "DMA_REQ_TX" "master" \ # Clock and reset are for both DMA_REQ and DMA_ACK adi_add_bus_clock "DMA_REQ_TX_ACLK" "DMA_REQ_TX:DMA_ACK_TX" "DMA_REQ_TX_RSTN" +adi_add_bus "I2S" "master" \ + "analog.com:interface:i2s_rtl:1.0" \ + "analog.com:interface:i2s:1.0" \ + { \ + {"BCLK_O" "BCLK"} \ + {"LRCLK_O" "LRCLK"} \ + {"SDATA_O" "SDATA_OUT"} \ + {"SDATA_I" "SDATA_IN"} \ + } +adi_add_bus_clock "DATA_CLK_I" "i2s" + adi_set_bus_dependency "S_AXIS" "S_AXIS" \ "(spirit:decode(id('MODELPARAM_VALUE.C_DMA_TYPE')) = 0)" adi_set_bus_dependency "M_AXIS" "M_AXIS" \ diff --git a/library/axi_i2s_adi/i2s.xml b/library/axi_i2s_adi/i2s.xml new file mode 100644 index 000000000..feb8ac55d --- /dev/null +++ b/library/axi_i2s_adi/i2s.xml @@ -0,0 +1,13 @@ + + + analog.com + interface + i2s + 1.0 + false + false + 1 + 1 + diff --git a/library/axi_i2s_adi/i2s_rtl.xml b/library/axi_i2s_adi/i2s_rtl.xml new file mode 100644 index 000000000..5a77e9b9c --- /dev/null +++ b/library/axi_i2s_adi/i2s_rtl.xml @@ -0,0 +1,61 @@ + + + analog.com + interface + i2s_rtl + 1.0 + + + + BCLK + + + required + 1 + + + required + 1 + in + + + + + LRCLK + + + required + 1 + + + required + 1 + in + + + + + SDATA_OUT + + + + in + + + + + SDATA_IN + + + in + + + + + +