Mar 27, 2015 #1 R ruwan2 Member level 5 Joined Nov 29, 2011 Messages 90 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,286 Activity points 2,141 Hi, I see the below code from verilog-AMS reference book. `include "disciplines.vams" module a2d(dnet1a, anet); input dnet1a; output anet; wire dnet1a; ddiscrete dnet1a; electrical anet; real avar; analog begin if (dnet1a === 1'b1) avar = 5; else if (dnet1a === 1'bx) avar = avar; // hold value else if (dnet1a === 1'b0) avar = 0; else if (dnet1a === 1'bz) avar = 2.5; // high impedance - float value V(anet) <+ avar; end endmodule Click to expand... When I run simulation of it in SMASH 6.3.0, it has error message: ERROR: syntax error near discrete C:\Users\rj\Documents\SMASH_Verilog_AMS_prj\one_bit_dac.vams(27): discrete dnet1a; Click to expand... I have included `include "disciplines.vams". And that file has ddiscrete definition: discipline logic domain discrete; enddiscipline discipline ddiscrete domain discrete; enddiscipline Click to expand... What is a solution for this? The AMS standard, or the EDA software? Thanks, Last edited: Mar 27, 2015
Hi, I see the below code from verilog-AMS reference book. `include "disciplines.vams" module a2d(dnet1a, anet); input dnet1a; output anet; wire dnet1a; ddiscrete dnet1a; electrical anet; real avar; analog begin if (dnet1a === 1'b1) avar = 5; else if (dnet1a === 1'bx) avar = avar; // hold value else if (dnet1a === 1'b0) avar = 0; else if (dnet1a === 1'bz) avar = 2.5; // high impedance - float value V(anet) <+ avar; end endmodule Click to expand... When I run simulation of it in SMASH 6.3.0, it has error message: ERROR: syntax error near discrete C:\Users\rj\Documents\SMASH_Verilog_AMS_prj\one_bit_dac.vams(27): discrete dnet1a; Click to expand... I have included `include "disciplines.vams". And that file has ddiscrete definition: discipline logic domain discrete; enddiscipline discipline ddiscrete domain discrete; enddiscipline Click to expand... What is a solution for this? The AMS standard, or the EDA software? Thanks,