Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: test.o #30

Open
geeta-yadav opened this issue Jan 11, 2016 · 0 comments
Open

Error: test.o #30

geeta-yadav opened this issue Jan 11, 2016 · 0 comments

Comments

@geeta-yadav
Copy link

Compilation of the below code test.o error:

import esdl;
import uvm;
import std.stdio;

class test_root: uvm_root
{
mixin uvm_component_utils;
}

class TestBench: RootEntity
{
uvm_root_entity!(test_root) tb;
}

class cfg: uvm_object
{
uint z;
string covert2string()
{
string s;
writeln(s, "{ z = %0d }", z);
return s;
}
}

class env: uvm_component
{
uvm_bitstream_t A;
uint B;
uvm_object dummy;
cfg C,D;

mixin uvm_component_utils;

this(string name, uvm_component parent)
{
super(name, parent);
}

override void build()
{
if(!uvm_resource_db!(uvm_bitstream_t).read_by_name(get_full_name(), "A", A, this))
{
uvm_error("NOCONFIG", "A not located in resource pool");
}
writeln("A = %0d", A);

if(!get_config_int("B", B))
  {
uvm_error("NOCONFIG", "B not located in resource pool");
  }
writeln("B = %0d", B);

if(!uvm_resource_db!(uvm_object).read_by_name(get_full_name(), "C", dummy, this))
  {
uvm_error("NOCONFIG", "C not located in resource pool");
  }
else
  {
if(C!=cast(cfg) dummy)
  {
    uvm_error("NOCONFIG", "C has incorrect type");
  }
else
  {
    writeln("C = %s", C.convert2string());
  }
  }

if(!get_config_object("D", dummy, 0))
  {
uvm_error("NOCONFIG", "D not located in resource pool");
  }
else
  {
if(D!=cast(cfg) dummy)
  {
    uvm_error("NOCONFIG", "D has incorrect type");
  }
else
  {
    writeln("D = %s", D.convert2string());
  }
  }

if(A == 14 && B == 98 && C.z == -122 && D.z == 88)
  {
writeln("** UVM TEST PASSED **");
  }
else
  {
writeln("** UVM TEST FAIL **");
  }

}
}

class test: uvm_component
{
mixin uvm_component_utils;

env e;

this(string name, uvm_component parent)
{
super(name, parent);
}

override void build()
{
cfg c, d;

e = new env ("env", this);
set_config_int("*", "A", 14);
uvm_resource_db!(int).set("*", "B", 98, this);

c = new cfg;
c.z = -122;
set_config_object("*", "C", c, 0);

d = new cfg;
d.z = 88;
uvm_resource_db!(uvm_object).set("*", "D", d, this);

}

override void report()
{
uvm_resource_pool rp = uvm_resource_pool.get();
rp.dump();
}
}

void main(string[] argv) {
TestBench tb = new TestBench;
tb.multiCore(0, 0);
tb.elaborate("tb", argv);
tb.simulate();
}

Here is the error:

test.o: In function _D3uvm4base15uvm_resource_db23__T15uvm_resource_dbTiZ15uvm_resource_db10m_show_msgFAyaAyaAyaAyaAyaC3uvm4base10uvm_object10uvm_objectC3uvm4base12uvm_resource20__T12uvm_resourceTiZ12uvm_resourceZv': /home/vlang/local/vlang-1.0.0-alpha1/dmd2/linux/bin64/../../../vlang-uvm/src/uvm/base/uvm_resource_db.d:125: undefined reference to_D3uvm4base11uvm_globals9__mixin34234__T8uvm_infoVAyaa103_2f686f6d652f766c616e672f6c6f63616c2f766c616e672d312e302e302d616c706861312f646d64322f6c696e75782f62696e36342f2e2e2f2e2e2f2e2e2f766c616e672d75766d2f7372632f75766d2f626173652f75766d5f7265736f757263655f64622e64Vmi125Z8uvm_infoFAyaAyaiZv'
collect2: error: ld returned 1 exit status
--- errorlevel 1

Regards
Geeta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant