The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> TB ground issue? https://designers-guide.org/forum/YaBB.pl?num=1354918901 Message started by RolfK on Dec 7th, 2012, 2:21pm |
Title: TB ground issue? Post by RolfK on Dec 7th, 2012, 2:21pm Dear All, below my first TB. Simulation with spectre is OK. But the result is very questionalble. I have likely a ref gnd issue. I tried to define the gnd (ref node 0) like shon in Ken Kunderts book. But this leads to error messages at compile time. Also I would appriciate if someone coild comment on this first trial. I just wnt to emulate a power up sequence. Thanks a lot ########### code ######################### `include "constants.vams" `include "disciplines.vams" module tb_digital_core ; // tb vars electrical vdd_io ; electrical vdd_core ; electrical common_gnd ; // "ground common_gnd" or also "ground gnd" lead to erro message analog begin @(initial_step) begin V(vdd_io) <+ 0 ; V(vdd_core) <+ 0 ; V(common_gnd) <+ 0 ; end V(vdd_io) <+ transition(3.3,5n,10m) ; V(vdd_core) <+ transition(1.25,10n,20m) ; end // DUT Instanciation digital_core dut ( .vdd_reg_in (vdd_io) , .vdd_core (vdd_core) , .common_gnd (common_gnd) ) ; endmodule ################# end ###################### |
Title: Re: TB ground issue? Post by Ken Kundert on Dec 7th, 2012, 10:25pm Verilog-A does not support node numbers, so you cannot use 0 to represent ground (I try to make that clear in my book). You can declare a node to be ground using: Code:
If you do that, you cannot also add the following: Code:
Now, lets think about a simplified version of what you proposed. Code:
The initial_step triggers on the first timepoint, meaning that on the first time point, this code simplifies to: Code:
The contribution operators sum all contributions made at the same time point, so this is equivalent to: Code:
Thus, the initial_step block does not do any thing. Finally, the transition filter only operates upon changes in its arguments. In this example, the argument never changes, so the transition filter can be removed without changing the behavior. In the final simplification, the above is equivalent to: Code:
So, I would not expect your supplies to ramp up like you want. Perhaps you can try something like the following: Code:
One more thing. You should never put a contribution statement in an event block. Fortunately, when you did it you contributed zero, which really doesn't do anything. If you have used a non-zero value you would have driven the circuit with impulses, which is always problematic. -Ken |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |