2013年4月15日 星期一

SVN on Ubuntu 12.10


使用svn co https://xxx.xxx/xxx時出現SSL handshake failed: SSL error: Key usage violation in certificate has been detected.


原來是ssl版本的問題,
$sudo apt-get install libneon27
$sudo mv /usr/lib/libneon-gnutls.so.27 /usr/lib/libneon-gnutls.so.27.old
$sudo ln -s /usr/lib/libneon.so.27 /usr/lib/libneon-gnutls.so.27 

Reference
http://stackoverflow.com/questions/10062095/svn-on-ubuntu-sslhandshake-failed


2013年4月9日 星期二

parser - Flex & Bison

  1. 加入 %option c++在xxx.l檔的第一行
  2. 實作yyFlexLexer::yywrap()在xxx.l的c++ code 區
  3. 產生lex.yy.cc而非lex.yy.c,且指令變成flex -+ xxx.l
  4. 在main.cpp #include "FlexLexer.h"
  5. 之後就使用class yyFlexLexer

2013年4月8日 星期一

PC/ FPGA communication

和Altera FPGA通訊最容易的方式應該就是透過USB-blaster了,如果不想花太多時間debug硬體的話,其實只要用Qsys加入NIOS, no chip memory和jtag_uart,然後再用NIOS IDE寫printf/ scanf就能send/recv message from Jtag
然後配上這個程式就可以從PC收發資料了,原始的程式是自http://www.alteraforum.com/forum/showthread.php?t=2199找到的。

2013年4月3日 星期三

擴充Notepad++ Language style

Notepad++ 除了內建的language style外,還可以擴充任何需要的語言
方法是從http://www.noanylove.com/2012/07/notepad-add-user-defined-language/看來的,不過其中翻譯的詞都不同,可能是版本有差吧!


  1.  menu ->檢視 ->自訂語法對話窗
  2. 在http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=User_Defined_Language_Files有  各種語言的定義,下載所需的之後
  3. 選import 即可


不過下載下來的CUDA定義的字型我不喜歡,所以把它都改回notepad++預設的字型
我的CUDA定義
Flex Bison定義