def recv_export(self): ret_type, params = self.send_command('EXPORT') for intf, p in zip(sorted(self.outputs.items()), params): intf[1].write('0x' + p.replace('x', 'u').replace('z', 'u')) sydsys().sim._update()
def __init__(self, out_path='.', **kwargs): if (not os.path.isdir(self.out_path)): os.makedirs(self.out_path, exist_ok=True) sydsys().sim.events['run_end'].append(self.coverage_done) GreenletProfiler.set_clock_type('cpu') GreenletProfiler.start()
def __del__(self): try: sydsys().server.send('$CLOSE') # self.xsim_proc.terminate() except: pass
def __init__(self, out_path = '.', **kwargs): if (not os.path.isdir(self.out_path)): os.makedirs(self.out_path, exist_ok=True) sydsys().sim.events['run_end'].append(self.coverage_done) GreenletProfiler.set_clock_type('cpu') GreenletProfiler.start()
def send_command(self, type, params = []): msg = "$" + type if params: msg += ',' + ','.join(params) sydsys().server.send(msg) print(msg) ret = sydsys().server.recv().split(',') print(ret) if len(ret) > 1: params = ret[1:] else: params = [] return ret[0][1:], params
def send_command(self, type, params=[]): msg = "$" + type if params: msg += ',' + ','.join(params) sydsys().server.send(msg) print(msg) ret = sydsys().server.recv().split(',') print(ret) if len(ret) > 1: params = ret[1:] else: params = [] return ret[0][1:], params
def __init__(self, cosim_intf, fileset=[], module_name=None, **kwargs): Component.__init__(self, **kwargs) self.cosim_intf = sydsys()[cosim_intf] self.module_name = module_name self.fileset = fileset if self.module_name is None: self.module_name = self.name.rsplit('.', 1)[-1] self.cosim_intf.register(self)
def __lshift__(self, other): if sydsys().sim.running: try: other = other.read() except AttributeError: pass return self.read() << other else: self._connect(other) return self
def __init__(self, builddir='.', **kwargs): self.cosim_pool = [] sydsys().sim.events['run_start'].append(sydsys().sim_run_start) sydsys().sim.events['run_end'].append(sydsys().sim_run_end) sydsys().sim.events['delta_settled'].append(sydsys().sim_delta_settled) sydsys().sim.events['timestep_start'].append(sydsys().sim_timestep_start)
def gen_drivers(self): for _, comp in sydsys().findall(self.name + '.top*').items(): if hasattr(comp, '_gen_drivers'): comp._gen_drivers()
def bpop(self): if not self._sourced: sydsys()['sim'].wait(self.e.enqueued) return self._sig.bpop()
def __init__(self, builddir='.', **kwargs): self.cosim_pool = [] sydsys().sim.events['run_start'].append(sydsys().sim_run_start) sydsys().sim.events['run_end'].append(sydsys().sim_run_end) sydsys().sim.events['delta_settled'].append(sydsys().sim_delta_settled) sydsys().sim.events['timestep_start'].append( sydsys().sim_timestep_start)
def _fifo_proc(self): while (1): self.data.bpop() self.last <<= (self.data.get_queue() == False) self.valid <<= True sydsys().sim.wait(self._dout.e.updated)
def _fifo_proc(self): while(1): self.data.bpop() self.last <<= (self.data.get_queue() == False) self.valid <<= True sydsys().sim.wait(self._dout.e.updated)