{"id":30514,"date":"2024-02-29T02:00:11","date_gmt":"2024-02-29T10:00:11","guid":{"rendered":"https:\/\/digilent.com\/blog\/?p=30514"},"modified":"2025-01-14T16:12:03","modified_gmt":"2025-01-15T00:12:03","slug":"behind-the-scenes-making-a-whitepaper","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/behind-the-scenes-making-a-whitepaper\/","title":{"rendered":"Behind the Scenes: Making a Whitepaper"},"content":{"rendered":"<p><span data-contrast=\"auto\">We recently published a whitepaper <\/span><span data-contrast=\"auto\">\u201c<a href=\"https:\/\/files.digilent.com\/resources\/whitepapers\/precision-debugging-with-adp2230.pdf\">Precision Debugging with the Analog Discovery Pro (ADP2230)<\/a>\u201d.<\/span><span data-contrast=\"auto\"> This whitepaper was originally going to be using the <a href=\"https:\/\/digilent.com\/shop\/analog-discovery-3\/?utm_source=bing&amp;utm_medium=cpc&amp;utm_campaign=482334923&amp;utm_content=1230354503569077&amp;utm_term=analog%20discovery%203&amp;msclkid=2928a7e1d5eb13f39486c23cd1157640\">Analog Discovery 3<\/a>, however, as can be seen in the name of the paper, we didn\u2019t end up going with that. That begs the question: Why? <a href=\"https:\/\/files.digilent.com\/resources\/whitepapers\/precision-debugging-with-adp2230.pdf\">The paper<\/a>, includes recording a relatively long series of SPI transactions, part of the boot sequence for an FPGA. Back when we were working on this in early August, after the first draft was done, we realized that the 32k input buffers of the AD3 weren\u2019t going to be big enough for this transaction. A fair bit of discussion about what to do about this issue and how to fix it followed.\u00a0<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\"><a href=\"https:\/\/digilent.com\/blog\/behind-the-scenes-making-a-whitepaper\/adp2230-whitepaper-fig5-580x380\/\" rel=\"attachment wp-att-30515\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2024\/02\/ADP2230-Whitepaper-fig5-580x380-1.png\" alt=\"\" width=\"580\" height=\"380\" class=\"alignnone size-full wp-image-30515\" \/><\/a><\/span><\/p>\n<p><span data-contrast=\"auto\">Let\u2019s explain: The whitepaper involves recording 200k digital samples over a time period of 4 ms, with a sample rate of 50 MS\/s. The AD3 features 32 kS input buffers \u2013 clearly this is not enough memory to store the entire transaction locally. The AD3 (and all of our other WaveForms-supported T&amp;M devices) features a <\/span><i><span data-contrast=\"auto\">Record <\/span><\/i><span data-contrast=\"auto\">mode, which allows the device to stream data back to a host, bypassing the buffers. However, in record mode, max sample rates can be limited by the connection between the device and host. The AD3 can stream around 10 MS\/s back to a host over USB, which was also insufficient for this task.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">So, what do you do when you realize your instrument isn\u2019t best suited to the task you\u2019re trying to make it perform? You can find manual workarounds, you can try to leverage complex features of the device to get an automatic workaround, or you can upgrade. Let\u2019s go through these in order:<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">1. We could rewrite the paper to make better use of the Analog Discovery 3. This could have involved only checking the Chip Select signal for the full transaction time, then zooming in on a narrow portion of the transfer, which could fit into a single 32 kS acquisition, to check the other signals. That said, in a real-life scenario, where you\u2019re trying to find a bug that could occur anywhere in a long period of time, using this approach could get tedious, requiring you to make many acquisitions, adjusting the trigger position and time base every time, to find the one spot where an error occurred. The more samples and the longer the acquisition, the worse the prospects get.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">2. We could use other features of the Analog Discovery 3 to reduce the amount of data moving over USB.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<ol><\/ol>\n<p><span data-contrast=\"auto\">3. We investigated the data compression feature of the logic analyzer instrument. This feature is capable of significantly reducing the amount of space an acquisition takes up, by storing only the samples where the state of any active DIO line changed, in addition to a time stamp indicating how long it had been since the last sample was taken. With 16-bit samples and 16-bit timestamps, if the state changes in less than 50% of samples, this immediately starts to reduce the amount of data captured. Unfortunately, this feature did not help in this specific case, due to the SPI clock frequency being high enough that USB still couldn\u2019t handle it, with only a ~1.25x reduction (SPI clock has two states, runs at 10 MHz, with sampling rate of 50 MHz, and memory usage is doubled for timestamps) in data rate.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">4. We also briefly looked into using the SPI clock to sample the incoming data. The Logic Instrument has a Sync mode that can be used to use one of the digital inputs as the instrument&#8217;s clock. With this, data is sampled on the rising or falling edge of that DIO. In this case, it might have reduced the amount of data captured by 5x, which might have been able to fit through USB, however, it would also lose us the ability to check some properties of the SPI bus. For example, we wouldn\u2019t be able to double check the clock polarity.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">5. We could just use a different, more capable device. This is the one we went with. Since all the issues stemmed from the input buffers on the AD3 being too small to fit the acquisition we wanted to do, we would need a device with larger buffers. Any of the Analog Discovery Pro line devices are capable of this. The ADP3450 and ADP3250 have DDR memory that lets the logic analyzer buffers store up to 64 MS per channel in Record mode. A recent WaveForms update upgraded the ADP3450\/ADP3250\u2019s capabilities by adding the ability to stream acquisitions into DDR memory at the full sample rate of the device. The same feature was introduced for the Eclypse Z7 image that adds WaveForms support to that device. The ADP5250 could also handle it, with an MS of buffer per channel. We decided to go with the newest addition to the Analog Discovery Pro line \u2013 the <a href=\"https:\/\/digilent.com\/shop\/adp2230\/\">ADP2230<\/a> \u2013 which makes these devices more accessible by providing the lowest-cost option to feature deep memory buffers \u2013 up to 128 MS per channel for the digital inputs.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Creating the whitepaper &#8220;<\/span><span data-contrast=\"none\">Precision Debugging with the Analog Discovery Pro (ADP2230<\/span><span data-contrast=\"auto\">)&#8221; emphasized to us the importance of selecting the right tools. When faced with challenges like using the small memory buffers of the <\/span><a href=\"https:\/\/digilent.com\/shop\/analog-discovery-3\/?utm_source=bing&amp;utm_medium=cpc&amp;utm_campaign=482334923&amp;utm_content=1230354503569077&amp;utm_term=analog%20discovery%203&amp;msclkid=2928a7e1d5eb13f39486c23cd1157640\"><span data-contrast=\"none\">Analog Discovery 3<\/span><\/a><span data-contrast=\"auto\"> to record for a long period of time, exploring various strategies is crucial. From investigating manual solutions to upgrading to the <a href=\"https:\/\/digilent.com\/shop\/adp2230\/\">ADP2230<\/a>, thoughtful tool selection is essential for attaining accurate debugging results. Moving forward, we urge readers to assess their instrumentation needs carefully. Explore our shop pages on Digilent&#8217;s website for our product range, including the <\/span><span data-contrast=\"none\">Analog Discovery Pro line,<\/span><span data-contrast=\"auto\"> specifically the newest addition, the <\/span><a href=\"https:\/\/digilent.com\/shop\/adp2230\/\"><span data-contrast=\"none\">Analog Discovery Pro (ADP2230)<\/span><\/a><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Access additional resources in <\/span><a href=\"https:\/\/digilent.com\/reference\/\"><span data-contrast=\"none\">Reference<\/span><\/a><span data-contrast=\"auto\"> and get answers to specific questions in our <\/span><a href=\"https:\/\/forum.digilent.com\/\"><span data-contrast=\"none\">user forum<\/span><\/a><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-30514 jlk' data-task='like' data-post_id='30514' data-nonce='8896bc70a6' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-30514 lc'>0<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-30514 jlk' data-task='unlike' data-post_id='30514' data-nonce='8896bc70a6' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-30514 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-30514 status align-left'>Be the 1st to vote.<\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>We recently published a whitepaper \u201cPrecision Debugging with the Analog Discovery Pro (ADP2230)\u201d. This whitepaper was originally going to be using the Analog Discovery 3, however, as can be seen &hellip; <\/p>\n","protected":false},"author":52,"featured_media":30515,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1553,4325,4267,1563],"tags":[4432,4633,4644,4638,4643,1662,4640,4639,4641,4642,4637],"ppma_author":[4462],"class_list":["post-30514","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-around-digilent","category-debug-validation-test","category-featured","category-guide","tag-ad3","tag-adp2230","tag-buffers","tag-debugging","tag-digital-samples","tag-fpga","tag-memory-buffers","tag-precision-debugging","tag-spi","tag-spi-traction","tag-whitepaper"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2024\/02\/ADP2230-Whitepaper-fig5-580x380-1.png","jetpack_sharing_enabled":true,"authors":[{"term_id":4462,"user_id":52,"is_guest":0,"slug":"abrown","display_name":"Arthur Brown","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/60e7f8e1b3a55e2e20ee541df1f393c2acbcee9fd05fd3e38d07e25a2e6fd237?s=96&d=mm&r=g","1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":"","9":"","10":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/30514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/52"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=30514"}],"version-history":[{"count":2,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/30514\/revisions"}],"predecessor-version":[{"id":31277,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/30514\/revisions\/31277"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/30515"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=30514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=30514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=30514"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=30514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}