VHDL syntax problem? Xilinx problem?

J

jesse lackey

I'm using xilinx ISE 9.1.
On the below, I get:

ERROR:HDLParsers:164 - "F:/dev/len/4chan/vhdl_learning/try1.vhd" Line
243. parse error, unexpected IDENTIFIER, expecting COMMA or CLOSEPAR

on the line:
" if (which samp_out = 4) then "

and I'm at my wit's end. I'm new to VHDL so it is probably something
I'm doing. But I've spent an hour doing creative commenting-out (this
is part of a larger process) and getting nowhere and now it is a
showstopper.

my apologies for the poor formatting.
any advice greatly appreciated.

Thanks in advance.
Jesse



----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.ALL;


entity multiplexed_output is
Port (
m_clock : in STD_LOGIC; -- master clock
global_reset : in STD_LOGIC;
spdif_A_lr : out STD_LOGIC -- l/r signal (1=left)
);
end multiplexed_output;

architecture Behavioral of multiplexed_output is
begin
process (m_clock,global_reset)

variable spdif_lr_counter : integer range 0 to 1000;
variable spdif_lr_phase : STD_LOGIC;
variable spdif_lr_counter_top : integer range 0 to 1000;

variable which_samp_out : integer range 0 to 1000;

begin
if (global_reset = '1') then
spdif_lr_counter := 0;
spdif_lr_phase := '0';
which_samp_out := 0;
spdif_lr_counter_top := 128;
elsif (m_clock'EVENT and m_clock='1') then -- rising edge
spdif_lr_counter := spdif_lr_counter +1;
if (spdif_lr_counter = spdif_lr_counter_top) then -- time to flip l/r
to spdif transmitters
spdif_lr_counter := 0;
spdif_lr_phase := not spdif_lr_phase;
which_samp_out := which_samp_out +1;
if (which samp_out = 4) then
which_samp_out := 0;
end if;
end if;
spdif_A_lr <= spdif_lr_phase;
end if;
end process;
end Behavioral;
 
M

Mike Treseler

jesse said:
I'm using xilinx ISE 9.1.
On the below, I get:

ERROR:HDLParsers:164 - "F:/dev/len/4chan/vhdl_learning/try1.vhd" Line
243. parse error, unexpected IDENTIFIER, expecting COMMA or CLOSEPAR

on the line:
" if (which samp_out = 4) then "
which_samp_out

missed an underscore.

-- Mike Treseler
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top