hhq Posted March 18, 2022 Report Posted March 18, 2022 sc_signal<sc_int<17>> signal_a; sc_signal<sc_int<15>> signal_b; I want to create a port which can handle both of these signals, for example sc_inout<uint32_t> port Write to this port is equivalent to write both of these signals. Read from this port is equivalent to read from both of these signals Wait value_changed_event() is equivalent to wait any of their value_changed_event(); Anyway to do it? Thanks Quote
David Black Posted March 18, 2022 Report Posted March 18, 2022 SystemC ports are designed to bind to a very specific signature. The idea that a 15-bit port could bind to a 17-bit port is considered dangerous. That was an intentional design decision of the design committee. The goal was to avoid mismatched signals in hardware that would be synthesized from SystemC. In a similar vein, some folks want to split out bits and write to single bits, but cannot that directly. It is possible to write channels that make the conversion. Quote
hhq Posted March 19, 2022 Author Report Posted March 19, 2022 I do not intend to bind 15-bit port to 17-bit port I would like to create a 32-bit (uint32_t) port which contains two fields, one is 15-bit, and the other is 32-bit, anyway to do that? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.