Re: [myhdl-list] Global state and multiple instances
Brought to you by:
jandecaluwe
From: Henry G. <he...@ca...> - 2015-05-06 17:13:29
|
On 06/05/15 18:06, Juan Pablo Caram wrote: > Attempting to make the global calls in user code local to the > Simulation instance. The example in StackOverflow shows how the calls > to, say, a global now(), can be replaced by a local instance, > self.now(). This avoids any complicated lookups that would degrade > performance, and maintains the syntax used by the user. Is the only issue the now() call? I think it makes much more sense to make now() a method on the simulation instance and changing the API. If there is no global notion of now(), I don't see why it makes sense to even offer that as part of the API... Cheers, Henry |