Knowledge Base Article
How can I simulate pull-up and pull-down resistors in the ModelSim® software?
Description
You can use two variable types,tri0 and tri1, to simulate pull-up and pull-down resistors when connecting the module's output/bidirectional net signals. These two variable types simulate the net signals being pulled-down or pulled-up when this signal is not driven. An example declaration is as follows:
module pullup_tb;
reg a, b, d, clk; //these are inputs
tri1 c,q; //these are outputs; instead of: wire c, q;
weak_pullupmodelsim my_wkpu( .a(a),
.b(b),
.c(c),
.d(d),
.clk(clk),
.q(q)
);
Simulating the above example will pull-up net signals c and q to simulate the way these signals would act on the board.
Updated 3 months ago
Version 2.0No CommentsBe the first to comment