balavinayagam
Member level 3
- Joined
- Feb 24, 2010
- Messages
- 59
- Helped
- 9
- Reputation
- 18
- Reaction score
- 8
- Trophy points
- 1,288
- Location
- banglore
- Activity points
- 1,630
Hi ,
I am trying to trace the signals from input to output through VPI. Below is the sample code from source ( which I cannot edit)
"
...
input l ;
wire m ;
output s
not sh1 (d,l);
nand sh2 (s,d,m)
...
"
Here is the code that i wrote which is not working
if(vpi_get(vpiType, dr_h) == vpiPrimTerm) { // dr_h is the input 'l'
vpiHandle prim_h = vpi_handle(vpiPrimitive,dr_h); // Prim Term --> Primitive --> Udp Defn -->> I/O Decl
vpiHandle udp_d = vpi_handle(vpiUdpDefn,prim_h);
vpiHandle arg_itor3 = vpi_iterate(vpiIODecl,udp_d);
vpiHandle netv1 = vpi_scan(arg_itor3);
vpiHandle ht_net = vpi_handle(vpiExpr,netv1);
}
The above method does not give the I/O. But I did follow the object diagrams
It would be great if anyone could point out the error or the method for accessing the Output
I am trying to trace the signals from input to output through VPI. Below is the sample code from source ( which I cannot edit)
"
...
input l ;
wire m ;
output s
not sh1 (d,l);
nand sh2 (s,d,m)
...
"
Here is the code that i wrote which is not working
if(vpi_get(vpiType, dr_h) == vpiPrimTerm) { // dr_h is the input 'l'
vpiHandle prim_h = vpi_handle(vpiPrimitive,dr_h); // Prim Term --> Primitive --> Udp Defn -->> I/O Decl
vpiHandle udp_d = vpi_handle(vpiUdpDefn,prim_h);
vpiHandle arg_itor3 = vpi_iterate(vpiIODecl,udp_d);
vpiHandle netv1 = vpi_scan(arg_itor3);
vpiHandle ht_net = vpi_handle(vpiExpr,netv1);
}
The above method does not give the I/O. But I did follow the object diagrams
It would be great if anyone could point out the error or the method for accessing the Output