Can i force a weak 1 to an internal net in verilog?

Status
Not open for further replies.

kaushikrvs

Member level 5
Joined
Jan 27, 2017
Messages
82
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
613
Can i forcce a weak 1 to an internal net in verilog ?

I have a top level , Which has an internal net say VRR . The VRR is usually generated by an analog block , but for some reason , the analog block is still not functional.
I have to force a weak1 to the VRR signal.

I am able to do
force top.VRR = 1;
but when I tried to do;
force (weak1,weak0) top.VRR = 1; it throws an error.
 

Re: Can i forcce a weak 1 to an internal net in verilog ?


weak/strong is a verilog modelling artifice, it is not to be used as a possible value of a signal. signals can be x, z, 1, 0.
 

Re: Can i forcce a weak 1 to an internal net in verilog ?

You need to use a continuous assignment, and then procedurally set the value when you would have done the force.

reg fval = 1'bz;
assign (weak1,weak0) top.VRR = fval;

// in your procedural code
...
fval = 1; // instead of force
...
fval = 1'bz; // instead of release
 

Re: Can i forcce a weak 1 to an internal net in verilog ?

Hello Dave,
Will the above act like a force on a net? because the wire is being driven by some other analog block?
 

Re: Can i forcce a weak 1 to an internal net in verilog ?

A continuous assignment does no override any other stronger assignments. You may need to disconnect the signal manually, or insert a tranif primitive.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…