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 <lars@metafoo.de>
main
Lars-Peter Clausen 2015-04-01 17:26:01 +02:00
parent 06e37b0082
commit 98609527e3
3 changed files with 85 additions and 0 deletions

View File

@ -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" \

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<spirit:busDefinition xmlns:xilinx="http://www.xilinx.com"
xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<spirit:vendor>analog.com</spirit:vendor>
<spirit:library>interface</spirit:library>
<spirit:name>i2s</spirit:name>
<spirit:version>1.0</spirit:version>
<spirit:directConnection>false</spirit:directConnection>
<spirit:isAddressable>false</spirit:isAddressable>
<spirit:maxMasters>1</spirit:maxMasters>
<spirit:maxSlaves>1</spirit:maxSlaves>
</spirit:busDefinition>

View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<spirit:abstractionDefinition xmlns:xilinx="http://www.xilinx.com"
xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<spirit:vendor>analog.com</spirit:vendor>
<spirit:library>interface</spirit:library>
<spirit:name>i2s_rtl</spirit:name>
<spirit:version>1.0</spirit:version>
<spirit:busType spirit:vendor="analog.com"
spirit:library="interface"
spirit:name="i2s"
spirit:version="1.0"/>
<spirit:ports>
<spirit:port>
<spirit:logicalName>BCLK</spirit:logicalName>
<spirit:wire>
<spirit:onMaster>
<spirit:presence>required</spirit:presence>
<spirit:width>1</spirit:width>
</spirit:onMaster>
<spirit:onSlave>
<spirit:presence>required</spirit:presence>
<spirit:width>1</spirit:width>
<spirit:direction>in</spirit:direction>
</spirit:onSlave>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:logicalName>LRCLK</spirit:logicalName>
<spirit:wire>
<spirit:onMaster>
<spirit:presence>required</spirit:presence>
<spirit:width>1</spirit:width>
</spirit:onMaster>
<spirit:onSlave>
<spirit:presence>required</spirit:presence>
<spirit:width>1</spirit:width>
<spirit:direction>in</spirit:direction>
</spirit:onSlave>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:logicalName>SDATA_OUT</spirit:logicalName>
<spirit:wire>
<spirit:onMaster/>
<spirit:onSlave>
<spirit:direction>in</spirit:direction>
</spirit:onSlave>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:logicalName>SDATA_IN</spirit:logicalName>
<spirit:wire>
<spirit:onMaster>
<spirit:direction>in</spirit:direction>
</spirit:onMaster>
<spirit:onSlave/>
</spirit:wire>
</spirit:port>
</spirit:ports>
</spirit:abstractionDefinition>