How to check for weak pull downs on a bus?

A

Anand

Guest
Hi

I have a bus in the design that need to be self biased to low
(weak pull downs). Question is, what statement can i use to check that
it is indeed a weak pull down in my test?

Thanks
 
Hi Anand,

Checking Strength of the signal is not supported in verilog constructs
checking (as You may have tried also). Strength modeling is allowed
only through gate primitives only like buf, nmos,... So if you are
assigning strength using some control signal (like in bufif
statements), simultaneously you can try to generte corresponding flag
which goes high/low with above strength assigning statements. And then
you can check that flag as conditonal check to do any specific
operation.
You can try in this manner. IF you find any other alternative, please
share it with us.

-AArora

Anand wrote:
Hi

I have a bus in the design that need to be self biased to low
(weak pull downs). Question is, what statement can i use to check that
it is indeed a weak pull down in my test?

Thanks
 
Anand -

The following may work, five it a try


module test;


tri0 weak0_wire;
wire hard0_wire = 1'b0;


reg drive1;
reg drive0;


assign weak0_wire = drive1 ? 1'b1 : 1'bz;
assign hard0_wire = drive1 ? 1'b1 : 1'bz;

assign weak0_wire = drive0 ? 1'b0 : 1'bz;
assign hard0_wire = drive0 ? 1'b0 : 1'bz;

initial
begin
$display("Starting test");

// check how floating affects wires
drive1 = 1'b0;
drive0 = 1'b0;

#0;
if (weak0_wire !== 1'b0)
$display("ERROR: Weak0 not 0 by default");
if (hard0_wire !== 1'b0)
$display("ERROR: Hard0 not 0 by default");

// check how driving high affects wires
drive1 = 1'b0;
drive1 = 1'b1;

#0;
if (weak0_wire !== 1'b1)
$display("ERROR: Weak0 not driven to 1");
if (hard0_wire !== 1'bx)
$display("ERROR: Hard0 not driven to X");


// check how driving low affects wires
drive1 = 1'b1;
drive1 = 1'b0;

#0;
if (weak0_wire !== 1'b0)
$display("ERROR: Weak0 not driven to 0");
if (hard0_wire !== 1'b0)
$display("ERROR: Hard0 not driven to 0");

#10;
$display("Done");
end


endmodule


John Providenza
 

Welcome to EDABoard.com

Sponsor

Back
Top