• Content count

  • Joined

  • Last visited

  1. Hello, As Roman Popov rightly pointed out the processes can run in parallel and this is crucial to model the hardware behavior as well. Spec states that at time 0 all processes (SC_METHOD and SC_THREAD) will run in an undefined order until they suspend. The ordering of the processes may not be of much importance here as it has no impact on the overall behavior of the system. However, the ordering may be based on the order in which you define these processes in the constructor. May be experts can throw some lights on this. If you look at the following code and the simulation result, class ThreadOrdering : public sc_module { public: SC_CTOR(ThreadOrdering) { SC_METHOD(methodOne) ; sensitive << terminateMethod_ev ; SC_THREAD(threadOne) ; SC_THREAD(threadTwo) ; } void threadOne() { cout << "Thread One is Running...! @ " << sc_time_stamp() << endl; wait(1.0, SC_NS); cout << " Thread One Processing Done @ " << sc_time_stamp() << endl; } void threadTwo() { cout << "Thread Two is Running...! @ " << sc_time_stamp() << endl; wait(1.0, SC_NS); terminateMethod_ev.notify(); cout << " Thread Two Processing Done @ " << sc_time_stamp() << endl; } void methodOne() { cout << "Method One Processing...!" <<" @ " << sc_time_stamp() << endl ; next_trigger(terminateMethod_ev); } private: sc_event terminateMethod_ev; }; Simulation Result Compile done. Starting run... SystemC 2.3.1-Accellera --- Jun 1 2014 14:49:19 Copyright (c) 1996-2014 by all Contributors, ALL RIGHTS RESERVED Method One Processing...! @ 0 s Thread One is Running...! @ 0 s Thread Two is Running...! @ 0 s Thread One Processing Done @ 1 ns Thread Two Processing Done @ 1 ns Method One Processing...! @ 1 ns Thanks, R.Adiga
  2. Hello, I'm just starting off with TLM-2.0 and would like to explore more about the use cases for byte_enable_ptr. In TLM manual, I see that " A value of 0 shall indicate that that corresponding byte is disabled, and a value of 0xff shall indicate that the corresponding byte is enabled"; Does this mean that we can switch between 0xff and 0x0 if required for every transaction? TLM manual also states that Byte Enable can be used to create burst transfers, can anyone please explain this? Thanks, R.Adiga