Hello,
I'm trying to run a very trivial example to see how the automatic insertion of E2R and R2E connect modules works. Please find the code below. Unfortunately, I get the following elaboration error:
Elaborating the design hierarchy: Top level design units: top Discipline resolution Pass...ncelab: *E,CUVDRF: Could not determine discipline for top.xr.
Would I be missing some elaboration option?
thanks!
`include "constants.vams"
`include "disciplines.vams"
module top;
wreal r, xr, wr;
assign xr = 3.14;
ams_electrical_src e_s1(r);
// causes insertion of Electrical2Real
// connection module
ams_electrical_dst e_d1(xr);
// causes insertion of
// Real2Electrical connection module
ams_wreal_src w_s1(wr);
// Coercion of SystemVerilog real variable
// to wreal
endmodule
module ams_electrical_dst(e);
input e;
electrical e;
initial #10 $display("%M: %f", V(e));
endmodule
module ams_electrical_src(e);
output e; electrical e;
analog V(e) <+ 5.0;
endmodule
module ams_wreal_src(w);
output w; wreal w;
assign w = 2.5;
endmodule