HAHAHAHA(HAx4)'s       




 Lab Notes - Altera LVDS Transmitter / Receiver 5/11/2013

If your FPGA device does not have hardcore SERDES, or if all you need is just a no-nonsense differential transceiver that could transfer data from one FPGA to another through a bunch of differential pairs, you might consider using the Megafunction in Ref[1].

To do that

(1)    Make sure TX and RX FPGAs work from the same oscillator.

(2)    Enable fast input/output registers

(3)    Enable differential termination

(4)    It is better to enable DPA at the receiver side, and wait until all the channels are locked on DPA

(5)    After DPA is locked, the word boundary should be aligned. i.e, the bit-slip should be handled for each channel individually by toggling the  rx_channel_data_align pin

(6)   To handle bit-slip, the TX should be composed of into two states: alignment and normal. In alignment state, the TX should keep sending out a sync word, such as 0x5C until it gets an indication from RX that all channels are aligned. Such indication can be realized by using a GPIO from RX back to TX

(7)    The receiver should keep doing the word-boundary-alignment until
        (A)    all channels are receiving the sync word correctly
        (B)    The sync word has been successfully received on all channels for a continuous number of cycles (set a threshold for this)

(8)    After the alignment is finished, the receiver should notify the TX through something like a GPIO so that the TX can start its normal transmission.

(9)    For megafunction setting, both TX and RX can be set with 180 degree phase offset between data and clock

(10)     At the receiver side, the data is received on the clock out of LVDS_RX megafunction. You can use a FIFO to transfer the data to another clock domain. And start reading the data from FIFO when the FIFO is half full

References:
[1] LVDS SERDES Transmitter / Receiver (ALTLVDS_TX and ALTLVDS_RX) Megafunction User Guide Ver 12.0, Altera Corp, Oct 2012

Labels: , ,

    Posted by HAx4 at 1:44 AM 0 Comments  

 Lab Notes - SDC file for Quartus II 5/08/2013

(1) You can use create_generated_clock to create clock manually, or you can let the tool do that for you by using "derive_pll_clocks -create_base_clocks". The down side of the latter is that the clock name becomes a long string like {x_pll|pll_y_inst|altera_pll_i|general[0].gpll~.....}. But you can use set clk_name "...." to rename it.

(2) For source synchronous clock, start with "AN 433: Constraining and Analyzing Source-Synchronous Interfaces"

(3) For output delay, you could also use "-reference_pin" in set_output_delay statement (Ref[1])

(4) System Centric and FPGA centric


References:

[1] TimeQuest Example: Basic Source Synchronous Output

Labels: , ,

    Posted by HAx4 at 10:37 AM 0 Comments  

 Lab Notes - Fs over 4 4/30/2013

I honestly think it is better to be a failure at something you love than to be a success at something you hate.

-- George Burns



IF signals can be expressed as
I * cos (2*pi * fc /fs * n) - Q * sin(2*pi*fc/fs*n) = real ((I+j*Q)*(exp(j*2*pi*fc/fs*n)))

If fs = fc * 4, the sample points become
I, (-Q), (-I), Q ...,

So the base band signal can be extracted in this case without any multiplication. However, the  I and Q samples gathered in this method are offset with by 1/Fs in time.
You can live with such I/Q imbalance if the sample rate is high relative to symbol rate. Or you can do an interpolation/resampling to compensate for the 1/Fs offset.

References:

[1] Richard G. Lyons, Digital Signal Processing Tricks - Frequency Translation without multiplication, September 24, 2007

Labels:

    Posted by HAx4 at 12:09 AM 0 Comments  

 Don't give up on yourself! 9/15/2012

There’s nothing noble in being superior to your fellow men. True nobility is being superior to your former self.

– Hemingway




    Posted by HAx4 at 11:44 PM 0 Comments  

 Lab Notes - Access NTFS mount through cygwin 8/13/2012

The project I've joined recently has some restrictive rules for security reasons. One of them is to only store data on a specific network drive. In this case, it is a NTFS share. I have got authorization through my Windows Domain account, and everything works fine. However, when I start to access this NTFS share under Cygwin, I found that I can only get read access. And all the attempts to chown/chmod failed. And unfortunately, the IT guy was not immediately available at that moment. After spending half an hour trouble-shooting, I found that the Cywin mount has to be set like

mount -f -o noacl Z:/abc /home/hax4/abc

Thought it might be useful to write it down.

Labels: , , ,

    Posted by HAx4 at 12:56 AM 0 Comments  

 The Demise of ESD Magazine 6/25/2012

The future is a bit murky, at least to me, but the staff is busily getting all of the old issues online and are working on a revamped Embedded.com.


-- Jack Ganssle


Time has not been kind to the printing business. Finally, ESD, one of my two favorite magazines (The other is EDN) folded under the stampede of online content, leaving behind 11 years of good memory for me.

But if there is any silver lining, the last thing I got from reading its final issue is that C language is still the number one choice when it comes to embedded programming. As Dennis Ritchie (1941 – 2011) had put it in this way:

When I read commentary about suggestions for where C should go, I often think back and give thanks that it wasn't developed under the advice of a worldwide crowd.
     
So, Goodbye, ESD! And Good Luck, Embedded System Professionals!

In the past 10 years, I have seen so many ups and downs, and "forever" has never been in the vocabulary of this business. God, please tell me it's not the beginning of end for embedded system professions.

Labels: , ,

    Posted by HAx4 at 11:02 PM 0 Comments  

 I'm a HAM, officially! 5/26/2012

It is only a technician class. But now I can put some good use in my Baofeng UV-3R+ :-)

    Posted by HAx4 at 2:07 AM 0 Comments  

   

 

    

    
Follow hahahaha_hax4 on Twitter
    

Features

*) Grand Opening
*) Why HAHAHAHA
*) Stay Foolish
*) Rabbit Hole
*) Sharepoint
*) Blotter
*) Notebook

Labels

*) Limerick
*) Movie
*) Tech
 +) Embedded Systems
 +) FPGA-ASIC-HW
 +) Linux
 +) Software
 +) Windows

Links

*) Blotter (Obsolete)
*) Notebook
*) Rabbit Hole
*) New Sharepoint


*) TEXT2PNG
*) China Blog List


*) FCC Wireless
*) ARRL

Archives
  • May 2004
  • November 2004
  • December 2004
  • January 2005
  • February 2005
  • March 2005
  • April 2005
  • May 2005
  • June 2005
  • July 2005
  • August 2005
  • September 2005
  • October 2005
  • November 2005
  • December 2005
  • January 2006
  • February 2006
  • March 2006
  • April 2006
  • May 2006
  • June 2006
  • July 2006
  • August 2006
  • September 2006
  • October 2006
  • December 2006
  • January 2007
  • February 2007
  • March 2007
  • April 2007
  • May 2007
  • June 2007
  • July 2007
  • August 2007
  • September 2007
  • October 2007
  • November 2007
  • December 2007
  • February 2008
  • March 2008
  • April 2008
  • June 2008
  • August 2008
  • January 2009
  • February 2009
  • March 2009
  • May 2009
  • June 2009
  • July 2009
  • October 2009
  • November 2009
  • December 2009
  • January 2010
  • February 2010
  • April 2010
  • May 2010
  • June 2010
  • July 2010
  • September 2010
  • January 2011
  • May 2011
  • June 2011
  • August 2011
  • October 2011
  • November 2011
  • April 2012
  • May 2012
  • June 2012
  • August 2012
  • September 2012
  • April 2013
  • May 2013