systemc: fix hierarchical binding

Fix hierarchical bindings for multi_passthrough_target_socket. This bug
also was also present in the Accellera implementation in version 2.3.2
but was fixed in 2.3.3. This fix is analogous to the patch applied to
the Accellera implementation.

It allows to complete the binding also for hierarchical bindings.

Jira Issue: https://gem5.atlassian.net/browse/GEM5-1255

Change-Id: I95497ad4b432b23412f2c0c8a3ef216af3372338
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62031
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
2022-08-03 09:42:59 +02:00
committed by Derek C.
parent d49c8f78fe
commit 32a206a2d0

View File

@@ -240,9 +240,10 @@ class multi_passthrough_target_socket :
multi_binds = get_hierarch_bind()->get_multi_binds();
// Complete binding only if there has been a real bind.
bool unbound = (binders.size() == 1 && m_export_callback_created);
bool locally_unbound =
(binders.size() == 1 && m_export_callback_created);
// No call to get_base_interface has consumed the export - ignore.
if (unbound)
if (locally_unbound && !m_hierarch_bind)
return;
// Iterate over all binders.