Convolution of signals using VHDL -


i have been working on implementing convolution operation using vhdl in multisim student pe edition. following code compiles successfully, when click simulate getting following error:

# vsim  # start time: 10:32:20 on apr 26,2015 # loading std.standard # ** error: (vsim-13) recompile work.convolution because work.convolution has changed. #  # ** error (suppressible): (vsim-12) recompile work.convolution(behavioral) after work.convolution, work.convolution recompiled. #  # error loading design 

here source code:

library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all;  package convolution     type real_vector array(integer range <>) of real; end;  use work.convolution.all;  entity convolution     port (x:in real_vector(0 3);           h:in real_vector(0 1);           y:out real_vector (0 4)); end convolution;    architecture behavioral of convolution begin        process (x,h)     variable sum :real := 0.0;     variable temp :integer := 0;      begin     k in y'range loop         sum:=0.0;         n in h'range loop                 temp := k-n;             if temp >= 0                 sum := sum + h(n)*x(temp);  --we assuming singnals positively indexed, negative indices deafult 0.                    end if;             end loop;             y(k) <= sum ;     end loop;     end process; end behavioral; 

help me issue please.

you have name collision. have 2 primary units in same (working) library same name.

library ieee; use ieee.std_logic_1164.all; -- use ieee.std_logic_arith.all;  package convolution_pkg     type real_vector array(integer range <>) of real; end;  use work.convolution_pkg.all;  ... 

change name of 1 or other. (this shows changing package name).

you alternatively analyze convolution package different (e.g. it's own) library.

using same name in 2 primary units in same library bit of catch 22.

see ieee std 1076-2008, 13.5 order of analysis paragraph 5:

a given library unit potentially affected change in library unit name referenced within given library unit. secondary unit potentially affected change in corresponding primary unit. if library unit changed (e.g., reanalysis of corresponding design unit), library units potentially affected such change become obsolete , shall reanalyzed before can used again.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -