sc_module.cc (13284:db01c2acd23f) | sc_module.cc (13285:86dc66ffac35) |
---|---|
1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 785 unchanged lines hidden (view full) --- 794 while (s.read() == sc_dt::Log_1) 795 wait(); 796} 797 798const char * 799sc_gen_unique_name(const char *seed) 800{ 801 auto mod = sc_gem5::pickParentModule(); | 1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 785 unchanged lines hidden (view full) --- 794 while (s.read() == sc_dt::Log_1) 795 wait(); 796} 797 798const char * 799sc_gen_unique_name(const char *seed) 800{ 801 auto mod = sc_gem5::pickParentModule(); |
802 return mod ? mod->uniqueName(seed) : 803 ::sc_gem5::nameGen.gen(seed); | 802 if (mod) 803 return mod->uniqueName(seed); 804 sc_gem5::Process *p = sc_gem5::scheduler.current(); 805 if (p) 806 return p->uniqueName(seed); 807 return ::sc_gem5::nameGen.gen(seed); |
804} 805 806bool 807sc_hierarchical_name_exists(const char *name) 808{ 809 return sc_gem5::findEvent(name) != sc_gem5::allEvents.end() || 810 ::sc_gem5::findObject(name, sc_gem5::allObjects); 811} --- 22 unchanged lines hidden --- | 808} 809 810bool 811sc_hierarchical_name_exists(const char *name) 812{ 813 return sc_gem5::findEvent(name) != sc_gem5::allEvents.end() || 814 ::sc_gem5::findObject(name, sc_gem5::allObjects); 815} --- 22 unchanged lines hidden --- |