Re: [Discuss OpenCPI] Multiple AD9361 Devices Cause Multiple Connections Error
On Wed, Jan 15, 2020 at 9:26 PM Brian Padalino <bpadalino_at_gmail.com> wrote:
> I am trying to instantiate 2 AD9361 devices on a single platform, always
> connected (no slots), with platform pin renaming.
>
> I defined two different AFE's for the AD9361 devices as such:
>
> <device name="afe0_adc" worker="ad9361_adc"/>
> <device name="afe0_adc_sub" worker="ad9361_adc_sub"/>
> <device name="afe0_dac" worker="ad9361_dac"/>
> <device name="afe0_dac_sub" worker="ad9361_dac_sub"/>
> <device name="afe0_spi" worker="ad9361_spi">
> ...
> <device name="afe1_adc" worker="ad9361_adc"/>
> <device name="afe1_adc_sub" worker="ad9361_adc_sub"/>
> <device name="afe1_dac" worker="ad9361_dac"/>
> <device name="afe1_dac_sub" worker="ad9361_dac_sub"/>
> <device name="afe1_spi" worker="ad9361_spi">
>
> I then created single0 and single1 configurations like this:
>
> <HdlConfig Constraints="newplatform" Language="vhdl">
> <!-- AD9361 AFE #0 -->
> <device name="afe0_spi">
> <property name="CP_CLK_FREQ_HZ_p" value="100e6"/>
> </device>
> <device name="afe0_data_sub">
> <property name="LVDS_p" value="true"/>
> <property name="DATA_CLK_DELAY" value="2"/>
> <property name="TX_DATA_DELAY" value="0"/>
> <property name="FB_CLK_DELAY" value="7"/>
> <property name="TX_DATA_DELAY" value="0"/>
> </device>
> <device name="afe0_adc_sub">
> <property name="LVDS_p" value="true"/>
> </device>
> <device name="afe0_adc"/>
> <device name="afe0_dac_sub">
> <property name="LVDS_p" value="true"/>
> </device>
> <device name="afe0_dac"/>
> </HdlConfig>
>
> When I try to instantiate both, I get this error:
>
> dual.xml: in HdlPlatformAssembly for dual: Multiple connections not
> allowed for port 'dev_adc' on instance 'afe0_adc' of worker 'ad9361_adc'
>
> I see a devsignal defined as dev_adc in the ad9361_adc.xml file, but I
> have no idea why it's trying to get multiple connections.
>
Working through this more, it seems like I need to add a <supports> tag
with the worker, device, and connections. This would associated the
devices in very specific ways instead of generically or in an overloaded
way.
This would also seem to be the case for also enabling dual channel modes
for each of the AD9361 devices by connecting the other channel output to a
second ADC or DAC.
After adding all the <supports> tags, I am still getting a problem with the
ad9361_data_sub worker:
<supports> element for device "afe0_data_sub" on board "newplatform" does
not match any <supports> element on the "ad9361_data_sub" worker
I've determined it's the ad9361_adc_sub and ad9361_dac_sub tags which are
problematic. Here is the beginning of the definition:
<device name="afe0_data_sub" worker="ad9361_data_sub">
<supports worker="ad9361_config" device="afe0_config">
<connect port="dev_cfg_data_port" to="dev_cfg_data_port"/>
<connect port="dev_rxen_data_sub" to="dev_rxen_config"/>
<connect port="dev_txen_data_sub" to="dev_txen_config"/>
<connect port="dev_data_clk" to="dev_data_clk" index="2"/>
</supports>
<supports worker="ad9361_adc_sub" device="afe0_adc_sub">
<connect port="dev_data_clk" to="dev_data_clk" index="0"/>
<connect port="dev_data_from_pins" to="dev_data_adc"/>
</supports>
<supports worker="ad9361_dac_sub" device="afe0_dac_sub">
<connect port="dev_data_clk" to="dev_data_dac" index="1"/>
<connect port="dev_data_to_pins" to="dev_data_dac"/>
<connect port="dev_txen" to="dev_txen_dac"/>
</supports>
And the <supports> tags from the ad9361_data_sub.xml in OpenCPI looks like
this:
<!-- Sub-Device Port Connections (Supports) -->
<supports worker='ad9361_config'>
<connect port="dev_cfg_data_port" to="dev_cfg_data_port"/>
<connect port="dev_rxen_data_sub" to="dev_rxen_config"/>
<connect port="dev_txen_data_sub" to="dev_txen_config"/>
<connect port="dev_data_clk" to="dev_data_clk" index='2'/>
</supports>
<supports worker='ad9361_adc_sub'>
<connect port="dev_data_clk" to="dev_data_clk" index='0'/>
<connect port="dev_data_from_pins" to="dev_data_adc"/>
<!--connect port="dev_rxen" to="dev_rxen_adc"/--> <!-- TODO / FIXME -
support this -->
</supports>
<supports worker='ad9361_dac_sub'>
<connect port="dev_data_clk" to="dev_data_clk" index='1'/>
<connect port="dev_data_to_pins" to="dev_data_dac"/>
<connect port="dev_txen" to="dev_txen_dac"/>
</supports>
I can't find much information about this stuff, so I'll keep trying, but
someone who might know either how to get more debug out of why the tag
isn't matched would be great.
Again, any insight or help is appreciated.
Thanks,
Brian
>
Received on Thu Jan 16 2020 - 15:09:44 CST
This archive was generated by hypermail 2.3.0
: Fri Jun 05 2026 - 08:45:25 CDT