The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 28th, 2024, 2:30pm
Pages: 1
Send Topic Print
Connecting Registers to Analog Ports (Read 99 times)
aznaragorn
Junior Member
**
Offline



Posts: 16

Connecting Registers to Analog Ports
Jul 22nd, 2004, 12:14pm
 
I always get the error: "analog ports can't be driven by registers directly" from ncelab when I connect registers to ports of electrical discipline ( I have connectmodules to deal with this). If I have wires connect these registers to the ports I don't get these warning messages. Is there anything fundamentally wrong  with connecting registers to analog ports?
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: Connecting Registers to Analog Ports
Reply #1 - Jul 27th, 2004, 3:02pm
 
Have you moved to a more recent version of the tools (LDV51
or IUS53) as I suggested before in a previous similar posting? If not, does this still happen with the newer versions?

Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
aznaragorn
Junior Member
**
Offline



Posts: 16

Re: Connecting Registers to Analog Ports
Reply #2 - Jul 27th, 2004, 4:33pm
 
Yes I have moved to the new LDV and the errors still persist.
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: Connecting Registers to Analog Ports
Reply #3 - Jul 27th, 2004, 9:51pm
 
In that case, can you post a small example which illustrates this? Also, can you post what "ncsim -version" returns?

Thanks,

Andrew.


Back to top
 
 
View Profile WWW   IP Logged
aznaragorn
Junior Member
**
Offline



Posts: 16

Re: Connecting Registers to Analog Ports
Reply #4 - Jul 28th, 2004, 5:58pm
 
ncsim -version returns:
TOOL:    ncsim 05.10-s011

Code to generate error:

module test();

reg a;
logic b;

initial a=0;
initial forever a = #100 ~a;

analog_inv a1(a,b);
endmodule

module analog_inv(a,b);
input a;output b;
electrical a,b;
real outval;

analog begin
   @(above(V(a) - 1.65)) outval = 0.0;
   @(above(1.65 - V(a)) outval = 3.3;
   V(b) <+ transition(outval,0,1n);
end
endmodule

I am using the sample connect module library cadence provides in the install directory.
I get an error something like :
Registers can not drive analog ports directly.


Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: Connecting Registers to Analog Ports
Reply #5 - Jul 30th, 2004, 12:38am
 
There is an outstanding PCR for this problem - PCR 694264.

The problem is that a register cannot connect to an analog port if the register is at the top-level (driving analog), since this is not supported by ncelab.

Supporting this case from the digital elaborator involves non-trivial
amount of work, which is why it hasn't been implemented yet.

There's a simple workaround - use an assign statement, and then connect the assigned net to the analog block:

Code:
`include "disciplines.vams"

module test();

reg a;
logic b,c;

initial a=0;
initial forever a = #100 ~a;

assign c=a;

analog_inv a1(c,b);
endmodule

module analog_inv(a,b);
input a;output b;
electrical a,b;
real outval;

analog begin
    @(above(V(a) - 1.65)) outval = 0.0;
    @(above(1.65 - V(a))) outval = 3.3;
    V(b) <+ transition(outval,0,1n);
end
endmodule
 



(note, I corrected the missing parenthesis in your code too).

Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
aznaragorn
Junior Member
**
Offline



Posts: 16

Re: Connecting Registers to Analog Ports
Reply #6 - Jul 30th, 2004, 11:03am
 
Thanks, I figured out the temporary solution using nets, I was just wondering if there was something i was doing wrong. I have another question on this LDV update to 5.1. Some of our code no longer works in the new LDV, we get an error like this at the elaboration stage :
    ncelab: *internal*  (cu_propagate_expand -width conflict)

The problem occurs when we try to connect the output of a module to the top level through a vector net that is bit selected instead of using a scalar net.

For example:

module inside_module( insideout)
output insideout;
reg insideoout;
endmodule

module top()
output  [1:0] topout;
wire [1:0] topout;

inside_module( .insideout(topout[1]))
endmodule

A funny thing about the error is that it only occurs when we have wreals. The engineer who has written the modules contacted Cadence but all they have told him so far is that it is a bug. Anyone experienced something similiar (cu_propagate_width errors) or have a suggestion?
Back to top
 
« Last Edit: Aug 2nd, 2004, 8:20am by aznaragorn »  
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: Connecting Registers to Analog Ports
Reply #7 - Aug 2nd, 2004, 1:25am
 
I did some searching. This seems to have been the only reported instance of this problem, and so I suspect it is a bug in the specific situation you have, as you have been told.

Note, your example below is full of syntax errors (missing semicolons, missing instance name), and does not show the problem (it doesn't have any wreals in it, which you mention as being related).

Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
jbdavid
Community Fellow
*****
Offline



Posts: 378
Silicon Valley
Re: Connecting Registers to Analog Ports
Reply #8 - Nov 1st, 2004, 7:38pm
 
wreals are not currently supported in a bus in the cadence implementation.  This is a known issue, and is documented in the kp&s.

the register issue is the same one that prevents you from declaring a register as an output at the top level
( remember having to add a whole bunch of assign statements to a verilog-XL model for the same reason. )
If you do it at a lower level of the design, a net is added when you connect the module into the testbench.. and this "hides" that requirement..
basically you need a net there that you can insert the connect module on.. a register isn't quite the same kind of thing in verilog.. so there is a fundamental issue here..
I think there is also a problem (at least in ncelab) if you have an assign statement that contains some logic..
between two electrical nets..
wire a, b;
assign b = !a;

(where a is an electrical output of a lower module and b is an electrical input of a lower module.. )



jbd


Back to top
 
 

jbdavid
Mixed Signal Design Verification
View Profile WWW   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.