Verilog apply force to module output without changing internal state

chinocolerico

In my testbench, I want to simulate a system condition by forcing a certain module's output in the RTL:

force DUT.driving_module.xx = 0;

But when doing this with the force command, the wire that drives the output inside the module is also forced, which leads to other parts of the system being also affected. What I really need is to force the output of the module, without changing its internal state, like this:

enter image description here

I can't modify the RTL code at all. Is there a way to achieve this from the testbench?

dave_59

When you have a port with a wire on both sides of the port connection, the wire gets collapsed into a single wire.

The way to do this is use logic instead of wire inside your module. The only place you should be using wire anywhere in SystemVerilog is if the signal has multiple drivers.

In Verilog, you can always make the output port of a module a reg

In either case, an output port that is a variable creates an implicit continuous assignment to whatever it connected to in the higher level module. Continuous assignments are uni-directional and a force will not propagate back into the module.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Include a module in verilog

From Dev

How do I force jsonStringify to output an array without quotes?

From Dev

Verilog: How to instantiate a module

From Dev

Instantiation of a generic module in Verilog

From Dev

Connect internal signal to output port in MyHDL module

From Dev

Verilog Debouncing Module

From Dev

UI-router change state without changing url

From Dev

Show/Hide ReactJS components without losing their internal state?

From Dev

Using ui-router to simply launch a function without changing state

From Dev

changing state using $state.go doesn't apply scope

From Dev

Change state's array without changing the whole state (REACT / REDUX)

From Dev

Is it possible to change app display name without changing module name?

From Dev

Headphones with combo jack: Force internal mic for input and headphones for output

From Dev

React - force re-render of component by changing state not working

From Dev

Headphones with combo jack: Force internal mic for input and headphones for output

From Dev

Instantiation of a generic module in Verilog

From Dev

Apply bootstrap form styling to div elements without changing class

From Dev

Connect internal signal to output port in MyHDL module

From Dev

verilog code for a state machine

From Dev

Using ui-router to simply launch a function without changing state

From Dev

Verilog apply force to module output without changing internal state

From Dev

redux update state value without changing initial state

From Dev

How to iterate and add elements to a list in scala without changing state

From Dev

How to apply a list of modifciations on a scalaz State Monad without for comprehension

From Dev

Changing internal table without header using index

From Dev

Possible to iterate through characters in stringstream without changing its state?

From Dev

wrong values at adder output in verilog module

From Dev

How to force the browser to reload a cached URL without changing the URL

From Dev

Failure to release force register in verilog

Related Related

  1. 1

    Include a module in verilog

  2. 2

    How do I force jsonStringify to output an array without quotes?

  3. 3

    Verilog: How to instantiate a module

  4. 4

    Instantiation of a generic module in Verilog

  5. 5

    Connect internal signal to output port in MyHDL module

  6. 6

    Verilog Debouncing Module

  7. 7

    UI-router change state without changing url

  8. 8

    Show/Hide ReactJS components without losing their internal state?

  9. 9

    Using ui-router to simply launch a function without changing state

  10. 10

    changing state using $state.go doesn't apply scope

  11. 11

    Change state's array without changing the whole state (REACT / REDUX)

  12. 12

    Is it possible to change app display name without changing module name?

  13. 13

    Headphones with combo jack: Force internal mic for input and headphones for output

  14. 14

    React - force re-render of component by changing state not working

  15. 15

    Headphones with combo jack: Force internal mic for input and headphones for output

  16. 16

    Instantiation of a generic module in Verilog

  17. 17

    Apply bootstrap form styling to div elements without changing class

  18. 18

    Connect internal signal to output port in MyHDL module

  19. 19

    verilog code for a state machine

  20. 20

    Using ui-router to simply launch a function without changing state

  21. 21

    Verilog apply force to module output without changing internal state

  22. 22

    redux update state value without changing initial state

  23. 23

    How to iterate and add elements to a list in scala without changing state

  24. 24

    How to apply a list of modifciations on a scalaz State Monad without for comprehension

  25. 25

    Changing internal table without header using index

  26. 26

    Possible to iterate through characters in stringstream without changing its state?

  27. 27

    wrong values at adder output in verilog module

  28. 28

    How to force the browser to reload a cached URL without changing the URL

  29. 29

    Failure to release force register in verilog

HotTag

Archive