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

20 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

  • 0
On 1/21/2022 at 4:40 AM, attila said:

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.

I am new to Diligent and am looking to purchase the Digital Discovery device.

I have used a different pattern generator previously and am looking for a useful replacement.

I am trying to generate an output bit pattern that has:
1. pattern definitions of 1024 bits in length, for example
2. there are 32 unique pattern definitions, for example
  2.1 if we name each pattern, we have patrn01, patrn02, ..., pattrn32
3. each output bit is a combination of a sequence of patterns
  3.1 D01 may have a definition of, N*patrn02 followed by M*patrn17 followed by P*patrn21, for example
  3.2 ...
  3.3 D16 may have a definition of, X*patrn03 followed by Y*patrn09 followed by Z*patrn31, for example
4. every output bit would have a total length of 512 pattern definitions
  4.1 output bit length would be 2^10 * 2^9 = 2^19 = 512Kbits long
5. want to infinitely repeat the output bit pattern 
  5.1 alternatively, want to have an external trigger repetitively trigger the pattern 

How can this be implemented?

Am aware of the 32Kbit length restriction on each output bit.

However, there is a mention of a 256MByte or equivalently 128MWord memory that is used in the Python code DigitalDiscovery_Play.py . Is it the case that I need to generate a 128MW pattern, load it into the memory, then have it played?

Can the 128MW memory be run by looping from address less-than-128MW to 128MW (there is a mention that Play data is aligned to the end of DDR memory) instead of playing the entire memory?

It would be helpful to identify the line of Python code that corresponds with the response to the question.  I'll try to figure it out from reviewing the code but sometimes it is not so obvious.  I have not purchased a device at this time.

Thank you.

Link to comment
Share on other sites

  • 0

Hi @QTang

Each DIO can generate custom pattern up to device buffer size (up 32ki) even at different rates.
The Play mode with DigitalDiscovery reads samples (1,2,3,4,8,16 bit) from deep DDR-RAM (up to 256MiB), so these are output at the same rate for the given number of DIOs. This can be used for finite or infinite run (with pattern repeat).

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...