# AttributeError: 'List' object has no attribute 'vhd'...I m getting this error while i want to make a circuit that does the convolution of square wave and triangular wave ...Please suggest me any modifications in this code so that i will get the desired op

**URL:** <https://discourse.myhdl.org/t/attributeerror-list-object-has-no-attribute-vhd-i-m-getting-this-error-while-i-want-to-make-a-circuit-that-does-the-convolution-of-square-wave-and-triangular-wave-please-suggest-me-any-modifications-in-this-code-so-that-i-will-get-the-desired-op/565>\
**Category:** Uncategorized\
**Created:** [March 18, 2024, 12:29am UTC](https://discourse.myhdl.org/t/attributeerror-list-object-has-no-attribute-vhd-i-m-getting-this-error-while-i-want-to-make-a-circuit-that-does-the-convolution-of-square-wave-and-triangular-wave-please-suggest-me-any-modifications-in-this-code-so-that-i-will-get-the-desired-op/565 "2024-03-18T00:29:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![muzaim11](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@muzaim11](https://discourse.myhdl.org/u/muzaim11)\
**Post date:** [March 18, 2024, 12:29am UTC](https://discourse.myhdl.org/t/attributeerror-list-object-has-no-attribute-vhd-i-m-getting-this-error-while-i-want-to-make-a-circuit-that-does-the-convolution-of-square-wave-and-triangular-wave-please-suggest-me-any-modifications-in-this-code-so-that-i-will-get-the-desired-op/565/1 "2024-03-18T00:29:24Z")

</div>

```auto
from myhdl import *
import matplotlib.pyplot as plt

from mmm import sig_square,sig_triag
@block
def sin_1( sel,out):
    sig1=tuple([(sig_square(x//100)) for x in range(1000)])
    sig2=tuple([(sig_triag(x//100)) for x in range(200)])
    
    @always_comb
    def hdl_1():
        
        
        if sel==0:
            
            
            conv=(len(str(sig1))-len(str(sig2)))*[0]
            for l in range (len(str(conv))):
                
                for i in range(len(str(sig2))):
                    
                    conv[l] +=(sig1[l-i+len(str(sig2))]*sig2[i])
                conv[l]/=(len(str(sig2)))
                out.next=conv[l]
            #plt.plot(conv) 
            #plt.show()
                    
    return hdl_1
def convert_1(hdl):
    m=32
    sel=Signal(intbv(0)[1:])
    out=Signal(modbv(0)[m:])
    inc= sin_1( sel,out)
    inc.convert(hdl=hdl)

convert_1(hdl='Verilog')
convert_1(hdl='VHDL')

![Capture|690x479](upload://gT92jGPASWkdMxJQRZ5MK0Ql5fE.png)
```

---

<div class="post-metadata">

**Author:** ![josyb](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.myhdl.org/josyb/32/5_2.png) [@josyb](https://discourse.myhdl.org/u/josyb)\
**Post date:** [March 18, 2024, 10:00am UTC](https://discourse.myhdl.org/t/attributeerror-list-object-has-no-attribute-vhd-i-m-getting-this-error-while-i-want-to-make-a-circuit-that-does-the-convolution-of-square-wave-and-triangular-wave-please-suggest-me-any-modifications-in-this-code-so-that-i-will-get-the-desired-op/565/2 "2024-03-18T10:00:26Z")

</div>

These functions are missing:  
`from mmm import sig_square,sig_triag`

---

<div class="post-metadata">

**Author:** ![josyb](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.myhdl.org/josyb/32/5_2.png) [@josyb](https://discourse.myhdl.org/u/josyb)\
**Post date:** [March 18, 2024, 10:09am UTC](https://discourse.myhdl.org/t/attributeerror-list-object-has-no-attribute-vhd-i-m-getting-this-error-while-i-want-to-make-a-circuit-that-does-the-convolution-of-square-wave-and-triangular-wave-please-suggest-me-any-modifications-in-this-code-so-that-i-will-get-the-desired-op/565/3 "2024-03-18T10:09:11Z")

</div>

I had a short look at the code, but this is far away from being ‘convertible’ at all.
