Jump to content
  • 0

Digital Discovery, Play mode


AlanB

Question

I have a Digital Discovery, and can use the SDK to load a 32kSample pattern to be played back as described in the reference manual.  The SDK also mentions using Play Mode, and the examples refer to what appear to be much longer buffer sizes.  Is there any documentation about how Play Mode works, what sample rates can be achieved, etc?  Can I get the full amount of digital capture at the same time?  Does it depend on available USB bandwidth to the host?  While I can find many references to it being available, I can't find a description of what its capabilities are.

Link to comment
Share on other sites

18 answers to this question

Recommended Posts

  • 0

Hi @AlanB

Each digital-out (pattern generator) wire can be configured to generate independently a pulse or a custom pattern at a different rate, length... With the Digital Discovery up to 32Ki samples for each wire.
With the Play mode a digital pattern of 1, 2, 4, 8 or 16bit wide and up to 256MiByte can be downloaded to the device DDRam and generated at up to 100MHz. This will be output at the same rate on 1,2,4,8or16 consecutive wires.

Link to comment
Share on other sites

  • 1

Hi @SWC

See the following: DigitalDiscovery_PlayRepeat.py

In the above example DIO-24..31 are is outputs. To trigger on DIO-27 make this change:
dwf.FDwfDigitalInTriggerSet(hdwf, c_uint(0), c_uint(0), c_uint(1<<3), c_uint(0)) # rising edge of 3 which is DIO-27
and make sure the output is not enabled on this DIO!
I'm warning you because I've just spent some time with troubleshooting... the DIO I wanted to use for trigger input was set to be output :)

Link to comment
Share on other sites

  • 0

Hi @AlanB

See the WaveForms application Help and for custom application the SDK / samples/ py/ DigitalDiscovery_Play.py DigitalDiscovery_PlayRecord.py DigitalDiscovery_RecordToFile.py DigitalDiscovery_RecordToFile16.py
It can be used at up to 100MHz and 100M samples.

image.thumb.png.15ca1f21d34f7d3d5fc2b603db019b7e.png

Link to comment
Share on other sites

  • 0
33 minutes ago, attila said:

Hi @AlanB

See the WaveForms application Help and for custom application the SDK / samples/ py/ DigitalDiscovery_Play.py DigitalDiscovery_PlayRecord.py DigitalDiscovery_RecordToFile.py DigitalDiscovery_RecordToFile16.py
It can be used at up to 100MHz and 100M samples.

image.thumb.png.15ca1f21d34f7d3d5fc2b603db019b7e.png

Thanks for the references.  I'd found them, but they didn't really help me to understand what's going on.  The reference manual (https://digilent.com/reference/test-and-measurement/digital-discovery/reference-manual#multi-purpose_digital_io) talks about having 32kSamples/channel when used as a pattern generator.  How is play mode different?  Is the host streaming the samples?  The demo (DigitalDiscovery_Play.py) seems to show the pattern carrying on after the application has closed, so does it have the entire 100M samples stored on the Discovery unit?

Link to comment
Share on other sites

  • 0

@attila ah - that's really interesting.  So if I explicitly want to use the same rate for custom patterns for each of my (up-to-)16 outputs, I can have a far longer buffer using Play mode than if I use "normal" mode?  In normal mode I can have 32KiS/wire, but in Play mode I can have 128MiS (where each sample contains the bits for all 16 outputs).  And none of this depends on shuttling data to over USB mid-pattern?  If that's the case, then that helps a lot.

And to confirm - this can be used at the same time as using the logic analyser capture in the same way as when generating patterns in normal mode?

Link to comment
Share on other sites

  • 0

Hi @AlanB

Yes, it can be used together with Logic Analyzer.
The play data is aligned to the end of the DDRam and record data to the start. If the record overtakes the play it will generate bad data. 
Make sure the record to play start is less than the 256MiB-playdata and the record bitrate is less or equal to the play.

Link to comment
Share on other sites

  • 0

I have two follow-up questions. First, the MAC version SDK doesn't seem to have SDK / samples/ py/ DigitalDiscovery_Play.py. Second, can I have 256MiB played on 1 bit? That is, if the sample rate is 100MHz, the pattern will be 256s long? Thx.

Link to comment
Share on other sites

  • 0
On 1/28/2022 at 1:00 AM, attila said:

Hi @SWC

See a newer version: https://forum.digilentinc.com/topic/8908-waveforms-beta-download/

 

21.47483648 seconds = 2Gibit (256MiB) / 100MHz

For 1-bit output, I modified the DigitalDiscovery_Play.py only one line to 

dwf.FDwfDigitalOutPlayDataSet(hdwf, byref(rgwPlay), c_int(1), c_int(int(nPlay)))

and it generated something unexpected. Should the type of rgwPlay get changed as well? Do you have an example of single channel output?

 

Thanks..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...