# Evaluating bools implicitly/explicitly

**URL:** <https://discourse.myhdl.org/t/evaluating-bools-implicitly-explicitly/446>\
**Category:** Uncategorized\
**Created:** [February 3, 2021, 5:33pm UTC](https://discourse.myhdl.org/t/evaluating-bools-implicitly-explicitly/446 "2021-02-03T17:33:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kc64](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.myhdl.org/kc64/32/83_2.png) [@kc64](https://discourse.myhdl.org/u/kc64)\
**Post date:** [February 3, 2021, 5:33pm UTC](https://discourse.myhdl.org/t/evaluating-bools-implicitly-explicitly/446/1 "2021-02-03T17:33:07Z")

</div>

I have a design with the following:

```
@block
def x(...):
    write = Signal(False)
    ...
    @always_seq(clock.posedge, reset=reset)
    def logic():
        ...
        if write == True:
        ...

```

and I get this error on conversion:

```
AttributeError: 'Constant' object has no attribute 'signed'

```

If I change the last line of the above code to:

```
if write:

```

conversion is successful. I’m puzzled. I hope I haven’t oversimplified this. I’ve been searching for hours for the reason but have not found it yet.

---

<div class="post-metadata">

**Author:** ![JanCoombs](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@JanCoombs](https://discourse.myhdl.org/u/JanCoombs)\
**Post date:** [February 4, 2021, 2:51am UTC](https://discourse.myhdl.org/t/evaluating-bools-implicitly-explicitly/446/2 "2021-02-04T02:51:41Z")

</div>

I’ve not seen signals declared like this, more usually like these here:

[http://docs.myhdl.org/en/stable/manual/structure.html#introduction](http://docs.myhdl.org/en/stable/manual/structure.html#introduction)

Jan
