Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

TCL script usage

I have an NCO function that plays waveforms from an sp ram that I initialize using a mif file. I then recapture the waveform using an ADC and store it in another SP ram. I would like to test different waveforms, the problem is it is very time consuming to, load a mif file, recompile, run, etc... So would it be possible to use a TCL script and the in system memory content editor to do this? I envision the following:

1) Run project

2) Load script which does the following:

- Initialize ram with waveform using memory content editor

- --new waveform is transmitted---

- capture waveform in sp ram

- dump ram contents to file

- repeat with different waveform.

Before I get my hopes up and try this only to run into problems, could someone verify that what I am envisioning is doable?

Thanks

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I have an NCO function that plays waveforms from an sp ram that I initialize using a mif file. I then recapture the waveform using an ADC and store it in another SP ram. I would like to test different waveforms, the problem is it is very time consuming to, load a mif file, recompile, run, etc... So would it be possible to use a TCL script and the in system memory content editor to do this?

    --- Quote End ---

    Create an SOPC System containing an JTAG-to-Avalon-MM master bridge, and your RAM components.

    You can then write to the DAC RAM and read from the ADC RAM using Tcl scripts running under SystemConsole.

    If you make the RAMs dual-ported, then you can read/write to them from the SOPC system clock domain, and the DAC and ADC can read/write to the other port from their respective clock domains.

    If your development kit has an ethernet interface, then you can also consider using a NIOS II processor and a TCP/IP connection to perform much the same tasks.

    Cheers,

    Dave
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks Dave, it seems that there are a few ways to do this. Right now I have two RAMs, one with a waveform for the DAC, another connected to the ADC. I can load a waveform into the DAC RAM and see it get filled into the ADC RAM. Im now about to write up some TCL scripts that use the 'in-system' memory content editor. Is this a bad way of doing things? I know it is quick and dirty, but it seems to be working.

    Thanks

    Matt
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Matt,

    --- Quote Start ---

    Right now I have two RAMs, one with a waveform for the DAC, another connected to the ADC. I can load a waveform into the DAC RAM and see it get filled into the ADC RAM. Im now about to write up some TCL scripts that use the 'in-system' memory content editor. Is this a bad way of doing things? I know it is quick and dirty, but it seems to be working.

    --- Quote End ---

    If there are Tcl commands for the in-system memory editor, then by all means, go for it. I haven't used that particular tool, so can't comment on how efficient it is.

    If you want to have a design that you can also simulate in Modelsim, then take a look at the JTAG components, or ask, and I'll show you how to use them.

    Cheers,

    Dave