...
 
Commits (1)
......@@ -79,7 +79,12 @@ int System::attach(Entity* e, const char* n, unsigned short k, char c)
{
oo = -1;
std::string name(n);
if(k>1) name += std::to_string(i);
if(k>1)
{
name += "[";
name += std::to_string(i);
name += "]";
}
std::cout << name << std::endl;
auto a = m.find(name);
if(a==m.end())
......
......@@ -37,9 +37,9 @@ namespace TRC
const char MAYBE = 'O';
const char FALSE = 'N';
const char NC = 'Z';
const char PULLUP = '1'; // ???
const char PULLDOWN = '0'; // ???
const char INVALID = 'X';
const char PULLUP = '1';
const char PULLDOWN = '0';
const char INVALID = '?';
const int UNSPECIFIED = 0x00000000;
const int UINT = 0x00010000;
......@@ -449,7 +449,7 @@ namespace TRC
return io(i).transition(MAYBE,FALSE);
}
virtual void run() = 0;
virtual void step() = 0;
};
......
......@@ -24,7 +24,7 @@ class Unit1 : public Entity
i2 = at("single");
}
void run()
void step()
{
for(int i=0;i<8;i++)
net[i] = io(i1+i).read();
......@@ -68,5 +68,5 @@ int main()
System *sys = System::getInstance();
Unit1 u1;
sys->clean();
u1.run();
u1.step();
}