Hello,
I have issues understanding sc_simcontext::next_time. The easiest way to describe what does not make sense for me is to give an example:
#include <systemc>
using namespace sc_core;
SC_MODULE(A)
{
sc_out<bool> out;
SC_CTOR(A)
{
SC_THREAD(t);
}
void t()
{
bool c = false;
while (1) {
wait(sc_time(1, SC_NS));
c = !c;
out.write(c);
}
}
};
SC_MODULE(B)
{
sc_in<bool> in;
SC_CTOR(B)
{
SC_THREAD(t)
}
void t()
{
while (1) {
wait(in.value_changed_event());
std::cout << "got: " << in.read() << std::endl;
}