• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. Problem in creating logic to electrical connect module in...

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 125
  • Views 14363
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem in creating logic to electrical connect module in verilogams

indra0804
indra0804 over 12 years ago

Hi,

 

I am trying to make a logic to electrical connect module that can convert logic ( '1' or '0') at the input side to electrical pulses at the output side, implementing in verilog-ams, its required for one of the project that I am doing. But, the problem that I am having is that, its running and simulation is taking place, but irrespective of whether I give '1 or a logic '0'', the output is staying at 818.18mV. My Vhigh= 1.8 V and Vlow= 0v.

I am attaching the code that I am trying to implement....

 

`include "disciplines.vams"

`timescale 1ns / 10ps

 

connectmodule d2a (out, in);

    parameter real v0 = 0.0; // output voltage for a logic 0 (V)

    parameter real v1 = 5.0; // output voltage for a logic 1 (V)

    parameter real vx = 2.5; // output voltage for a logic x (V)

    parameter real vz = 5.0; // output voltage for a logic z (V)

    parameter real r0 = 1k from (0:inf); // output resistance for a logic 0 (Ohms)

    parameter real r1 = 1k from (0:inf); // output resistance for a logic 1 (Ohms)

    parameter real rx = 100 from (0:inf); // output resistance for a logic x (Ohms)

    parameter real rz = 1M from (0:inf); // output resistance for a logic z (Ohms)

    parameter real tr=1n from [0:inf); // rise time (s)

    parameter real tf=1n from [0:inf); // fall time (s)

    input in;

    output out;

    logic in;

    electrical out;

    real v, r;

 

    assign in = in;

 

    initial begin

case(in)

   1'b0: begin v = v0; r = r0; end

   1'b1: begin v = v1; r = r1; end

   1'bx: begin v = vx; r = rx; end

   1'bz: begin v = vz; r = rz; end

endcase

    end

 

    always @in begin

case(in)

   1'b0: begin v = v0; r = r0; end

   1'b1: begin v = v1; r = r1; end

   1'bx: begin v = vx; r = rx; end

   1'bz: begin v = vz; r = rz; end

endcase

    end

 

    analog 

V(out) <+ transition(v, 0, tr, tf) + transition(r, 0, tr, tf)*I(out);

endmodule 

 

Regards,

 

Indrajit 

  • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information