"The Lord of War" <
[email protected]> wrote in message
news:
[email protected]..
> Sadly I'm on my own, and what I'm trying to do is sample an analog signal
> save is in digital form in some kind of buffer (here comes the sram role)
> and then read it back after some time and convert it back to analog, thus
> producing a delay that can be controlled. and I need to do long delays so
> I
> nee a big buffer or memory. I checked the xilinx website there is no
> mention on the use of the onboard ram, so if any one have a lead on the
> subject please help, I need to know HOW to do this, a tutorial is good
> too.
> I'll keep searching and I'll post if I find anything new.
The help we give can only be as specific as the information you give us. We
don't know the sample rate from your ADC; we don't know anything about your
board; we don't know anything about the synchronous RAM on your board.
Research this:
Find the documentation for your board. Identify the memory device you are
trying to read and write. Make note of what signals connect to the
fpga.
Identify the pins on the
fpga that connect to the memory device.
Find the documentation for the memory device. Make note of the functions of
the signals connected to the
fpga. Make note of the timing information.
You will program the
fpga to generate the signals to read and write the
device. Begin forming in your mind the operations the
fpga must perform to
do this.
You will read and write one or possibly more data words on each ADC sample.
How many bits in a data sample? How many bits in a memory data word? Does
the data sample fit in a memory word? Does the sample rate leave enough time
to read one sample and write a new sample on each cycle?
A ring buffer is suitable for use as a delay line. Define the delay time in
terms of sample time. For each sample, read the old sample value, and
overwrite it with the new sample. Advance to the next memory location. A
modulo-N counter can be used to drive the memory address lines. It counts up
to N-1 and then starts over at 0.
The memory device has a number of control lines. What are their functions?
What signals will you drive to read a memory location? What signals will you
drive to write a memory location?
The ADC sample rate will almost certainly be different from this circuit's
clock rate. How will you signal the start of a sample period?
Since you didn't ask about the ADC or DAC, I presume you have this part
under control. The memory is only moderately more complex than reading and
writing those other devices.
You will also need a one time reset to initialize the ring buffer contents
to an unobnoxious value. Alternatively, consider just not sending the
garbage values read during the first delay cycle.
I would go about building things in this order:
Write the HDL for the modulo-N counter. Simulate and verify its operation.
Add the memory control lines. Add this to the simulation and verify its
operation.
Write a testbench to generate data samples and simulate the memory device.
Verify the module's operation in the simulator.
Wire the module to your (presumably) already working ADC and DAC modules.
Good luck.