RosesAreRed
Newbie level 2
Okay. So, I was working on a project related to simulation of a PAM modulator. I wrote the MATLAB function and test bench, which was pretty easy. Then, I converted to code to VHDL through HDL Coder in MATLAB in order to simulate it on FPGA. I have access to Spartan 3 model "xc3s400". However, I ran through an error in simulation by misfortune. So, I would appreciate any help in eliminating this error: "HDLParsers:164 Line 40. parse error, unexpected SIGNAL"
By line 40, it means the line I have bolded
Here's the function code:
Cheers!
By line 40, it means the line I have bolded
Here's the function code:
Code:
entity PAM_funct is
Port ( OSR_1 : in STD_LOGIC;
Rolloff_1 : in STD_LOGIC;
FiltOrder_1 : in STD_LOGIC;
Input : in STD_LOGIC;
M : in STD_LOGIC;
Trans_Flt : out STD_LOGIC);
end PAM_funct;
-- Signals
[B]SIGNAL OSR_1_unsigned : unsigned(1 DOWNTO 0)[/B]; -- ufix2
SIGNAL Rolloff_1_unsigned : unsigned(13 DOWNTO 0); -- ufix14_En14
SIGNAL FiltOrder_1_unsigned : unsigned(6 DOWNTO 0); -- ufix7
SIGNAL Input_unsigned : vector_of_unsigned4(0 TO 999); -- ufix4 [1000]
SIGNAL M_unsigned : unsigned(4 DOWNTO 0); -- ufix5
architecture Behavioral of PAM_funct is
OSR_1_unsigned <= unsigned(OSR_1);
Rolloff_1_unsigned <= unsigned(Rolloff_1);
FiltOrder_1_unsigned <= unsigned(FiltOrder_1);
begin
outputgen: FOR k IN 0 TO 999 GENERATE
Input_unsigned(k) <= unsigned(Input(k));
END GENERATE;
M_unsigned <= unsigned(M);
Trans_Flt <= '0';
END rtl;
Cheers!