# Setundef doesn't respect selection

**URL:** <https://yosyshq.discourse.group/t/setundef-doesnt-respect-selection/114>\
**Category:** Users\
**Created:** [January 21, 2026, 5:53pm UTC](https://yosyshq.discourse.group/t/setundef-doesnt-respect-selection/114 "2026-01-21T17:53:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkudinov](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@mkudinov](https://yosyshq.discourse.group/u/mkudinov)\
**Post date:** [January 21, 2026, 5:53pm UTC](https://yosyshq.discourse.group/t/setundef-doesnt-respect-selection/114/1 "2026-01-21T17:53:24Z")

</div>

I’m trying to apply `setundef` only to the part of my design, but seems like it doesn’t respect selection. For example:

```auto
module test;
     wire a = 1'bx;
     wire b = 1'bx;
endmodule

```

After running `setundef -zero w:a` I expect that `x` would be changed for `0` only on wire `a`, but it changes the value of `b` as well for some reason.

---

<div class="post-metadata">

**Author:** ![mkudinov](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@mkudinov](https://yosyshq.discourse.group/u/mkudinov)\
**Post date:** [January 21, 2026, 6:25pm UTC](https://yosyshq.discourse.group/t/setundef-doesnt-respect-selection/114/2 "2026-01-21T18:25:43Z")

</div>

Confirmed in the matrix chat that this is a bug, opened a GitHub [issue](https://github.com/YosysHQ/yosys/issues/5624).
