Still a Beginner: Accumulator has no reset

Xilinx ISE 9.2 and ISE 10.1 I wanted to design a simple correlator which correlates a 15 bit sequence with another sequence of 15 bytes (8 bit signed values = Sample below). I needed to zero the summation result after 15 samples, so I did. But compiler didn't. There is no warning but even the simulator does not seem to notice ACC

Reply to
meralonurlu
Loading thread data ...

Hi,

In the if-else immediately following your reset of ACC, you assign to ACC again, overriding any previous assignment. Depending on the intended behavior of your circuit you could switch to using variables or reorganize your if's in a way that ACC is assigned only once.

Regards,

-- Hauke D

Reply to
Hauke D

The clearing of the ACC will most likely be cancelled by the RN(cntr) = '1' IF-block. This block should have been made dependend on the first condition:

if(cntr=0) then Corr

Reply to
Alvin Andries

Thanks to Alvin A. and Hauke D. I used a variable and it worked. I will surely remember that it is not a C/pascal program but a circuit description.

Reply to
meralonurlu

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.