This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
resources:tools-software:sigmastudio:usingsigmastudio:samplingrateconsiderations [18 Jun 2012 22:44] – created William Jahn | resources:tools-software:sigmastudio:usingsigmastudio:samplingrateconsiderations [21 Jun 2012 20:41] – Updated instructions per sample terminology Brett Gildersleeve | ||
---|---|---|---|
Line 5: | Line 5: | ||
\\ | \\ | ||
\\ | \\ | ||
- | The number of instructions available on the DSP (MIPS) | + | The number of instructions available on the DSP per audio sample |
- | + | | |
- | | + | * 1536 instructions |
- | * 1536 instructions at 44.1 kHz | + | * 1536 instructions |
- | * 1536 instructions at 48 kHz | + | * 768 instructions |
- | * 768 instructions at 96 kHz | + | * 384 instructions |
- | * 384 instructions at 192 kHz | + | |
- | |||
The sample rate should be set by the program-length bits in the core control register. SigmaStudio defaults to 44.1-kHz sampling, the CD red-book standard. If you want to use another rate, select it prior to your design from the **New Item Sample Rate** drop-down list in the top toolbar. Now any blocks added to your schematic will be set to that sampling rate. | The sample rate should be set by the program-length bits in the core control register. SigmaStudio defaults to 44.1-kHz sampling, the CD red-book standard. If you want to use another rate, select it prior to your design from the **New Item Sample Rate** drop-down list in the top toolbar. Now any blocks added to your schematic will be set to that sampling rate. | ||
- | |||
- | |||
You also can change the sampling rate mid-design by either setting the sample rate for all blocks in the design, or you can change the sample rate of each input individually. | You also can change the sampling rate mid-design by either setting the sample rate for all blocks in the design, or you can change the sample rate of each input individually. | ||
- | **1. To change the sampling | + | In order to change the sample |
- | Select | + | ---- |
- | \\ | + | |
- | {{samplingratepic1.png}}\\ | + | ===== Setting Software Sample Rate ===== |
- | \\ | + | |
+ | Locate | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Click the drop-down | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Click the "Set System | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Click the **Yes** button to confirm the sample rate change. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Link-Compile-Download the project in order to calculate and download the new coefficients for time-dependent algorithms. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Setting Hardware Sample Rate ===== | ||
+ | |||
+ | Locate the core frame rate register in the Register Control Window and set it to the new sample rate. The name and address of this register differs depending on which IC is being used. Here are a few examples: | ||
+ | ==== AD194x: ==== | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ==== ADAU144x: ==== | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ==== ADAU170x/ | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ==== ADAU176x: ==== | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Setting " | ||
+ | |||
+ | If you are using a non-standard sample rate by scaling the master clock in the system (for example, scaling the MCLK down from 12.288 MHz to 12 MHz, effectively bringing the sample rate down from 48 kHz to 46.875 kHz), you need to manually enter the sample rate. | ||
+ | |||
+ | Right click the input cell, select set sample rate, and enter the sample rate manually in Hertz. You can type in any number. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Click **propagate sample rate**. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | You can also do this from the Action menu, or with the keyboard shortcut **Ctrl+Q**. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | In this case of a non-standard sample rate, you do not need to change the hardware register settings from their original settings, since the master clock frequency in the system is simply being scaled. You do, however, need to make sure that the new MCLK frequency is within the allowable range of frequencies for the input to the PLL. This can be verified by checking the timing specifications on the datasheet for the SigmaDSP in use. | ||
+ | |||
+ | You may use a " | ||
+ | |||
+ | * Set the hardware registers to the fs * 2 (96 kHz) mode | ||
- | **2. To change sampling rate individually for each input:** | + | {{:resources: |
- | Right-click on the input or source blocks and select **Set Sample Rate** from the menu which will open the sampling rate window shown below. | + | |
- | \\ | + | |
- | {{samplingratepic2.png}}\\ | + | |
- | \\ | + | |
- | At this point only the input or source blocks rate has been changed. | + | {{: |
- | \\ | + | |
- | {{samplingratepic3.png}} | + | |
- | + | ||
+ | * Propagate Sampling Rate | ||
+ | {{: | ||