| View previous topic :: View next topic |
| Author |
Message |
ywu
Joined: 03 Sep 2009 Posts: 40
|
Posted: Mon Mar 22, 2010 8:14 am Post subject: using logic write in wave example |
|
|
I tried to set the Config 0x3 to turn on invsinc for DAC.
I set addr to 0x6 and data to 0x4381, and click on the the logic write button on the debug manual of X5-400M wave example.
When I transmit through DAC, I do not see any invsinc correction on the DAC's output.
Please advise!
Thanks, |
|
| Back to top |
|
 |
jhenderson Site Admin
Joined: 07 Mar 2006 Posts: 1178 Location: So. Cal. USA
|
Posted: Mon Mar 22, 2010 8:53 am Post subject: |
|
|
Modification of the D/A configuration must occur after streaming is underway, since the Malibu libraries initialize the D/A registers as streaming starts. See the method X5_400MOutputDevice::ConfigureHardware() within the file X5_400MDeviceMap_Mb.cpp for details on the initialization performed by Malibu.
Use the X5_400M::Output().Spi() property to write to the D/A registers within the ApplicationIo::HandleAfterStreamStart() event callback to initialize any registers to non-default values. |
|
| Back to top |
|
 |
ywu
Joined: 03 Sep 2009 Posts: 40
|
Posted: Mon Mar 22, 2010 9:37 am Post subject: |
|
|
Jim, Thanks,
I just set the FsincEnable to true in X5_400MDeviceMap_Mb.cpp in the initialization. |
|
| Back to top |
|
 |
jhenderson Site Admin
Joined: 07 Mar 2006 Posts: 1178 Location: So. Cal. USA
|
Posted: Mon Mar 22, 2010 9:44 am Post subject: |
|
|
| I do not recommend that you make changes to the Malibu libraries directly. Your changes will not be incorporated into the next release unless it is universally applicable and this change does not meet that criteria. It would be better for you to apply the change in AfterStreamStart. |
|
| Back to top |
|
 |
ywu
Joined: 03 Sep 2009 Posts: 40
|
Posted: Mon Mar 22, 2010 4:03 pm Post subject: |
|
|
I tried Module::Output().Spi(0x3,0x1) and then SpiDump() in HandleAfterStreamStart. It still does not turn on the invsinc.
But the SpiDump gave the addr from 24 to 31. |
|
| Back to top |
|
 |
jhenderson Site Admin
Joined: 07 Mar 2006 Posts: 1178 Location: So. Cal. USA
|
Posted: Tue Mar 23, 2010 6:46 am Post subject: |
|
|
I am not sure why
did not work properly. But, to enable the sinc filter, call
| Code: | | Module::Output().SincFilterEnabled(true); |
prior to Stream.Start(). |
|
| Back to top |
|
 |
ywu
Joined: 03 Sep 2009 Posts: 40
|
Posted: Tue Mar 23, 2010 12:15 pm Post subject: |
|
|
I tried all; it did not turn invsinc on.
When Spi(0x01,0x00), Spi(0x02,0x10), and Spi(0x03,0x81), in return, Spi(0x01), Spi(0x02), and Spi(0x03), all returns the same value 0x81. That's strange.
We know our fpga bit image has zero timing error. |
|
| Back to top |
|
 |
jhenderson Site Admin
Joined: 07 Mar 2006 Posts: 1178 Location: So. Cal. USA
|
Posted: Tue Mar 23, 2010 12:27 pm Post subject: |
|
|
The software call mentioned above is known to work with the stock firmware. You are encouraged to reload the stock logic and test this feature. Assuming it works with the factory logic, try recompiling the stock factory firmware without modification and verify that the SPI functionality remains.
If both of the above tests work, we must conclude that some defect exists in your custom firmware. |
|
| Back to top |
|
 |
ywu
Joined: 03 Sep 2009 Posts: 40
|
Posted: Tue Mar 23, 2010 2:13 pm Post subject: |
|
|
I turned off the PC and power back on to load the factory image.
The Spi does the same thing again. |
|
| Back to top |
|
 |
jhenderson Site Admin
Joined: 07 Mar 2006 Posts: 1178 Location: So. Cal. USA
|
Posted: Tue Mar 23, 2010 3:06 pm Post subject: |
|
|
The Spi readback function is not operational on the stock factory firmware. This is a known limitation. But, the Malibu libraries use the Spi() write method to initialize the D/A device during stream start configuration.
In addition, we successfully used the sinc filter enable within a recent custom application to meet a customer requirement. So, this feature was known to be viable at that time. |
|
| Back to top |
|
 |
bkao
Joined: 09 Feb 2007 Posts: 109 Location: Innovative Integration
|
Posted: Tue Mar 23, 2010 3:30 pm Post subject: |
|
|
You can turn on CONFIG2 bit 0 to enable invsinc.
If you are not doing interpolation, set CONFIG1 bit 1:0 to be "10". So that you disable FIR1, FIR2, FIR3, and keep FIR4 active for invsinc function.
Billy |
|
| Back to top |
|
 |
ywu
Joined: 03 Sep 2009 Posts: 40
|
Posted: Wed Mar 24, 2010 8:47 am Post subject: |
|
|
I have the rev a and b X5-400M boards here.
Should they be hardware-wise OK?
The only concern is the firmware, right? Or any other issues on the Wave and Malibu?
Thanks,
V/R, |
|
| Back to top |
|
 |
ywu
Joined: 03 Sep 2009 Posts: 40
|
Posted: Wed Mar 24, 2010 8:48 am Post subject: |
|
|
Typos:
I have the rev a and "c" X5-400M boards here. |
|
| Back to top |
|
 |
jhenderson Site Admin
Joined: 07 Mar 2006 Posts: 1178 Location: So. Cal. USA
|
Posted: Wed Mar 24, 2010 9:14 am Post subject: |
|
|
| Both boards should work ok in this regard, assuming use of the stock firmware. Use x5_400m_routed.bit dated 9/22/09 5:51p from the Images\RevB folder and the latest beta software from the website. |
|
| Back to top |
|
 |
ywu
Joined: 03 Sep 2009 Posts: 40
|
Posted: Thu Mar 25, 2010 3:22 pm Post subject: |
|
|
I downloaded the exact bit image, and Wave still Spi the wrong value.
I'm puzzled at the DAC setup. We have a sysclk of 200 MHz from the FPGA side that generates 200 Msps data, and on the other hand a crystal feeds an independent 400 MHz clk to DAC. The default mode of DAC is X2. So the 200 Msps data will be up-sampled to 400 Msps that will match DAC's 400 MHz clock.
But the DAC input FIFO is clocked at 400 MHz. So should we turn off all the FIR filters including FIR3 in X3 mode as bkao suggested? |
|
| Back to top |
|
 |
|