The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 10:25am
Pages: 1
Send Topic Print
`wrealStateZ and wreal ports in verilog ams (Read 3737 times)
E van der Heijden
New Member
*
Offline



Posts: 1

`wrealStateZ and wreal ports in verilog ams
Jun 17th, 2010, 3:09am
 
Hi,

I am trying to get to grips with wreal modelling in verilog ams, so please forgive any 'stupid' questions.

I am trying to substitute verilog ams blocks into a top level schematic, using Cadence's Hierarchy Editor and ADE simulation environment. I have a very simple model of a transmission gate, which I've coded as follows:

---------------------------------------
//Verilog-AMS HDL for "adcLib", "tx_gate" "verilogams"

`include "constants.vams"
`include "disciplines.vams"

module tx_gate ( out, enable, in, not_enable );

 input wreal in;
 input enable;
 input not_enable;
 output wreal out;
 real out_wire ;
 
 always@(enable or not_enable)
   begin
     if (enable)
           out_wire = in;
     else
           out_wire = `wrealZState;
   end
 
 assign out = out_wire;
 
endmodule
-------------------------

but it doesn't work, there is no output in either state.

What have I done wrong?
Are the port declarations and useage correct?
can I use `wrealstateZ like this?

Any enlightment would be appreciated!

Thank you,

E
Back to top
 
 
View Profile   IP Logged
Marq Kole
Senior Member
****
Offline

Hmmm. That's
weird...

Posts: 122
Eindhoven, The Netherlands
Re: `wrealStateZ and wreal ports in verilog ams
Reply #1 - Jun 25th, 2010, 8:10am
 
Hi E,

If you try to print the values using $display you will see what happens: the `wrealZState value is translated to nan if nothing else is attached to the out terminal.

Cheers,
Marq
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.