what's wrong with this piece of code

P

peter.linotte

Dear all,

My simulator thinks it's fine, but maxplus II gives errors on this
piece of code.

level_1_proc: process(clk)
begin
if clk'event and clk='1' then
for i in 0 to 15 loop
sum_1(i*17+16 downto i*17)<=sxt(fifo((2*i)*16+15 downto
2*i*16),17) +

sxt(fifo((2*i+1)*16+15 downto (2*i+1)*16),17); --length is 17
dif_1(i*17+16 downto i*17)<=sxt(fifo((2*i)*16+15 downto
2*i*16),17) -
sxt(fifo((2*i+1)*16+15
downto (2*i+1)*16),17); --length is 17
end loop;
end if;
end process;

As you see it's a clock sync process, but the trap has (I think)
something to do with the index of e.g. sum_1. Is it possible to do it
like i*17+16 etc? If not, are there settings in Maxplus or Quartuss II
to solve this problem?

Thanks
Peter.
 
P

peter.linotte

Hi Mike,

Up to now, I just used the sim to compile my code and to check for
syntax errors etc.

At work I've got Quartus...I think I'll try it there and get back here
in case there are still errors.

Regards,
 
H

hnain.said

Hi Mike,

Up to now, I just used the sim to compile my code and to check for
syntax errors etc.

At work I've got Quartus...I think I'll try it there and get back here
in case there are still errors.

Regards,


hi,
just one more info : it's better to use

"if rising_edge(clk)" rather than "if clk'event and clk = '1' "

warm regards
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top