Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Clematrics

  1. Hi David and Eyck, thank you very much for your answers ! Indeed, it works very well this way.
  2. I am trying to make a circuit which computes the carries for an addition. In this piece of code, I would like to connect the output port rOut of the submodule pg to two output ports (rOut and carries[0]) of the parent module, so both get the same value. template<> struct Carries<1> : ::sc_core::sc_module { sc_vector<sc_in<bool>> a, b; sc_in<bool> rIn; sc_out<bool> p, g, rOut; sc_vector<sc_out<bool>> carries; CarryPropGen pg {"PG"}; SC_CTOR(Carries) : a {"vectA", 1}, b {"vectB", 1}, rIn {"rIn"}, p {"p"}, g {"g"}, rOut {"rOut"}, carries {"vectCarries", 1} { pg.a(a[0]); pg.b(b[0]); pg.r(rIn); pg.p(p); pg.g(g); pg.rOut(rOut); // What I would like to do. pg.rOut(carries[0]); // } }; However, I get the error (E109) complete binding failed: 2 binds exceeds maximum of 1 allowed: port 'Carries.PG.port_5' (sc_out). I also tried with a signal, with and without the writer policy SC_MANY_WRITER, as it was suggested by someone on a forum, but it didn't work either. I am new to SystemC and while I understand the error, I don't really understand why this can't work and how to do it differently. So, is there a way to bind one sub-module output to multiple sc_out of the parent module, and how?
  • Create New...