Re: [Discuss OpenCPI] Fwd: Fwd: Fwd: Multiple AD9361 Devices Cause Multiple Connections Error
Brian/Davis,
I am assuming that both ad9361s share the same SPI bus?
If you have two ad9361s sharing a single SPI, then you need a different
SPI subdevice worker that supports both ad9361s. The existing one only
works when the SPI is not shared.
Thus having two ad9361_spi devices would be wrong. Normally a SPI
subdevice worker is specific to a platform and supports all the devices
that share the same SPI bus (or other signals).
The purpose of the ocpigen code as it is, is when one subdevice is
supporting multiple devices of the same type, where there are multiple
"supports" relationships between that one SPI subdevice and the devices
that share it.
So the solution here depends on the actual SPI-sharing in your hardware
platform.
Unfortunately, the current system does not support "scalable
subdevices", where we can parameterize it to have a type of "supports"
that is an "array" of supported devices of the same type.
Jim
On 1/17/20 4:57 PM, Davis Hoover wrote:
> Some debugging help: I often use make -n in these scenarios, which will
> print to the screen the ocpigen commands being run - except in this case
> where -n doesn't work, so I mod'd ocpigen to print out its arguments - then
> stepped through the ocpigen command with gdb. The ocpigen command can also
> be called w/ OCPI_LOG_LEVEL set to 8 or 10, which gives useful logging info.
>
> There are lots of ordinals being handled here, in part to facilitate the
> multi device<->subdevice worker scenario. One problem I have identified is
> an incorrect ordinal inspection - I *think* this is the fix:
>
> diff --git a/tools/ocpigen/src/hdl-config.cxx
> b/tools/ocpigen/src/hdl-config.cxx
> index bc0cfa5..d3412ff 100644
> --- a/tools/ocpigen/src/hdl-config.cxx
> +++ b/tools/ocpigen/src/hdl-config.cxx
> _at_@ -327,7 +327,8 @@ emitSubdeviceConnections(std::string &assy,
> DevInstances *baseInstances) {
> // If there are no mapping entries, then we use the implicit
> ordinal of the
> // supports element among supports elements for that device type
> if (s.m_supportsMap.empty()) {
> - if (si->m_ordinal != d.m_ordinal)
> + //if (si->m_ordinal != d.m_ordinal)
> + if (s.m_ordinal != d.m_ordinal)
> continue;
> } else {
> auto it =
>
> This suspected fix causes other problems that I'm still looking into.
>
> ---------- Forwarded message ---------
> From: Brian Padalino <bpadalino_at_gmail.com>
> Date: Thu, Jan 16, 2020 at 5:24 PM
> Subject: Re: [Discuss OpenCPI] Fwd: Fwd: Multiple AD9361 Devices Cause
> Multiple Connections Error
> To: Davis Hoover <dhoover_at_geontech.com>
> Cc: <discuss_at_lists.opencpi.org>
>
>
> On Thu, Jan 16, 2020 at 4:54 PM Davis Hoover <dhoover_at_geontech.com> wrote:
>
>> I think I have recreated this issue locally. Let me do some poking around
>> in tools/ocpigen/* and get back to you.
>>
> Thank you. I appreciate the help.
>
> Let me know if you want me to try anything or give you any other
> information regarding my setup.
>
> Thanks,
> Brian
>
Received on Sun Jan 19 2020 - 22:55:39 CST
This archive was generated by hypermail 2.3.0
: Fri Jun 05 2026 - 08:45:25 CDT