Has anyone successfully created a Verilog or vhdl of the above project?
I have been trying to reproduce the Configurable CIC Filter that is presented here. I downloaded the latest release (cic-0.3.tar.gz). I run the following python code to create a Verilog output and get the subsequent error if Type is set to other than None.:
from cic_hdl import *
M = 3
D = 2
R = 8
Q = 24
Type = ‘Dec’
Parameters / Globals
MaxGain = DM# Max gain of the CIC
L = 2(Q)# Max value for input
maxV = L * 2*MaxGain# Max Value for output
minV = -maxV# Min Value for output
Signals
clk = Signal(False)
rst = Signal(False)
x = Signal(intbv(0, min=-L, max=L))
y = Signal(intbv(0, min=minV, max=maxV))
dvi = Signal(True)
dvo = Signal(False)
toVerilog(cic_filter, clk, rst, x, dvi, y, dvo, M, D, R, Q, Type)
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32
Type “copyright”, “credits” or “license()” for more information.
RESTART: D:\Electronics\Digital Filter\MyHdl CIC\releases\cic-0.3\hdl\to_verilog.py
decimate Qc 3 R 8
Traceback (most recent call last):
File “D:\Electronics\Digital Filter\MyHdl CIC\releases\cic-0.3\hdl\to_verilog.py”, line 27, in
toVerilog(cic_filter, clk, rst, x, dvi, y, dvo, M, D, R, Q, Type)
File “C:\Python27\lib\site-packages\myhdl\conversion_toVerilog.py”, line 152, in call
siglist, memlist = _analyzeSigs(h.hierarchy)
File “C:\Python27\lib\site-packages\myhdl\conversion_analyze.py”, line 107, in _analyzeSigs
raise ConversionError(_error.UndefinedBitWidth, s._name)
ConversionError: Signal has undefined bit width: Dec_cnt