2016年1月11日 星期一

performing FFT by WaveView



Main steps:
1. open the waveform file and click on ADC output signals
2. performing ADC function
3. performing DAC function
4. performing FFT function

Steps:
1. execute the waveview binary file
>> wv &


2. open the waveform file, arrange signals from MSB to LSB (top-to-down)
eg. ~/ADC/spectre/schematic/psf/tran.tran

 3. select all signals and then click on the ADC icon
 4. 


5. group the A2D signals as one signal





6. performing DAC function on the grouped signal


 7. select the reconstructed waveform and press the tools/FFT icon


































2015年11月13日 星期五

Centos 7 as my Desktop

x86_64 version
Softwares:

[chrome]
Recommended plugins:
line: for chattering

[dropbox]
download and install without any problems

[firefox]
Recommended plugins:
bbsfox: for telnet connection
adblocker: blocks some disturbing ads
downhelper: download youtube videos
torrent tornado: downlad files by torrent/magnetic links

[mplayer]
step 1: fedora sources
>> rpm -Uh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

step 2. ElRepo sources (http://elrepo.org/tiki/tiki-index.php)
Key:
>>rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
add sources
>>rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm (for RHEL-7, SL-7 or CentOS-7)

step 3:
.My RPM repositories for EL (RHEL, CentOS, ScientificLinux etc) (http://li.nux.ro/repos.html)
    EL7: yum -y install epel-release && rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
  [[ EL6: yum -y install epel-release && rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm  ]]
  

step 4: check epel,elrepo, nux-dextop
>> yum repolist

step 5: install required libraries
>> yum -y --enablerepo=nux-dextop install gstreamer-ffmpeg  vlc   gstreamer-plugins-ugly gstreamer-ffmpeg gstreamer-plugins-bad gstreamer-plugins-ugly ffmpeg libvdpau mpg123   mplayer mplayer-gui  gstreamer-plugins-bad-nonfree gstreamer1-libav gstreamer1-plugins-bad-freeworld gstreamer1-plugins-ugly

step 6: install
>> yum install mplayer

optional:
>> yum install vlc

step 7: done

step 8: bug and solutions
no sound for mp4 files when using mplaer

[Ref] http://junight.blog.51cto.com/10828785/1707807
[Ref] http://blog.csdn.net/sidely/article/details/44671257

[Skype]
http://tecadmin.net/install-skype-centos-rhel-fedora/

[XnViewMP]
>> yum install qt5-qtbase qt5-qtbase-common qt5-qtbase-gui qt5-qtscript xcb-util-renderutil xcb-util-wm qt5-qtmultimedia qt5-qtsensors qt5-qtsvg qt5-qtwebkit qt5-qtx11extras
>> wget http://download.xnview.com/XnViewMP-linux.x86_64.rpm
conflicts with filesystem:
>> yum install  rpmrebuild
>> rpmrebuild -ep XnViewMP-linux.x86_64.rpm
Your configured editor (probably vi) will pop up with an already loaded file.

Search for the lines containing / and /usr/bin (lines like %dir %attr(0755, root, root) "/"), and remove them. They are starting in about line 340.
(I removed the line with /usr as well.)

Save end exit.
Answer yes. It will then tell you the location of the fixed rpm.
 

>> rpm -ivh  XnViewMP-linux.x86_64.rpm
>> xnview &
done


[cadence/icfb&]
yum install glibc.i686
yum install libXt.{i686,x86_64}
yum install mesa-libGLw
yum install libXp libXp-devel
yum install xorg-x11-fonts-ISO8859-1-100dpi
yum install xorg-x11-fonts-ISO8859-1-75dpi
yum install liberation-mono-fonts liberation-fonts-common liberation-sans-fonts liberation-serif-fonts
yum install libXext.i686
yum install libXp
yum install xorg-x11-libs.i386
yum install glibc.i686 libX11.i686 libXext.i686 libstdc++.i686 pulseaudio-libs.i686
yum install libXext  libXrender  fontconfig  libfontconfig.so.1
yum install libXp.so.6
 
or 
 
yum install glibc.i686 libXt.{i686,x86_64} mesa-libGLw libXp libXp-devel xorg-x11-fonts-ISO8859-1-100dpi xorg-x11-fonts-ISO8859-1-75dpi liberation-mono-fonts liberation-fonts-common liberation-sans-fonts liberation-serif-fonts libXext.i686 libXp xorg-x11-libs.i386 glibc.i686 libX11.i686 libXext.i686 libstdc++.i686 pulseaudio-libs.i686 libXext  libXrender  fontconfig  libfontconfig.so.1 libXp.so.6 
 
reboot to load some fonts 
[ref] https://www.ptt.cc/bbs/Electronics/M.1437491329.A.8D4.html


[madedit-mod]

[Ultraedit]
>> mkdir ~/local
>> cd ~/local
>> rpm2cpio ultraedit.rpm | cpio -idmv
>> rm -rfd ~/.idm/uex
>> rm -rf ~/.idm/*.spl
>> rm -rf /tmp/*.spl
>> alias ue='rm -rfd ~/.idm/uex; rm -rf ~/.idm/*.spl; rm -rf /tmp/*.spl;  /usr/local/bin/uex &'



[vm tools share folder]
[ref] https://simukti.net/blog/2016/09/10/centos-7-vmware-tools-mount-shared-folder/
>> yum install open-vm-tools
>> yum -y install open-vm-tools open-vm-tools-devel
>> yum -y groupinstall "Development Tools"
insert vmtools cdrom to /run/media/VMtools/ & press enter all the way

>> ./vmware-install.pl
check for kernel module

>> lsmod | grep hgfs
Check service
>> systemctl status vmware-tools
Check shared folder
>> df -h
e.g. .host:/ 465G 221G 244G 48% /mnt/hgfs
enable on boot
>> systemctl enable vmware-tools


[python3.4]
>> yum install epel-release
>> yum search python3
>> yum install python34
>> yum install python34-setuptools
>> easy_install-3.4 pip
>> easy_install-3.4 requests
>> pip3 -V

[exFAT support]
>> yum -y install epel-release
>> yum localinstall -y --nogpgcheck http://download1.rpmfusion.org/free/el/updates/7/x86_64/f/fuse-exfat-1.2.7-1.el7.x86_64.rpm
>> yum install http://download1.rpmfusion.org/free/el/updates/7/x86_64/e/exfat-utils-1.2.7-1.el7.x86_64.rpm 

[suspend]
hold 'Alt' before press power button 

[NTFS support]
yum install epel-release
yum -y install ntfs-3g
yum install fuse
modprobe fuse

[bootloader scan]
yum install -y ntfs-3g 
grub2-mkconfig -o /boot/grub2/grub.cfg 



cat /boot/grub2/grub.cfg |grep menuentry
grub2-set-default "CentOS Linux (4.9.9-1.el7.elrepo.x86_64) 7 (Core)"
or  grub2-set-default 3
grub2-editenv list

[remove old kernels]
yum install yum-utils 
package-cleanup --oldkernels --count=2
 









2015年10月4日 星期日

Cadence IC5141 coexists with IC616



Results:

Key variable:
setenv CDS_VERSION IC616
setenv CDS_Netlisting_Mode Analog
setenv CDS_CONTROLLED_AMS_ULTRA_RELEASE_ENABLED
setenv CDS_ROOT ${cadpath}/cadence/IC/616
setenv CDSHOME ${CDS_ROOT}
setenv PSF_WRITE_CHUNKS_MODE_ON true
unsetenv OA_HOME
set path = (${CDSHOME}/tools/bin ${CDSHOME}/tools/dfII/bin ${path})

Ref:
1. http://bbs.eetop.cn/thread-318533-1-1.html

2014年7月31日 星期四

Centos 6 Samba Win 7 XP can't copy/write



Recently, I updated my server to CentOS 6.5 X64 version

I configured the machine usual
> yum install samba
I found out the samba service is ok from centos(server) to centos(client), but CentOS(server) <-> Win7(client) failed.

I can login and see files, but I can't copy files to the folder or edit it.

The root cause is that the protocol is changed by microsoft.

If you have the same question, do the following steps. It works for me.
Nothing is guaranteed.

> yum remove 'samba*'
yum install samba4* krb5* -y      

and according to the following setup

cp /etc/samba/smb.conf /etc/samba/smb.conf.bak    //備份一下samba的配置文件,        
vim /etc/samba/smb.conf          
下面綠色字體为原有的,粟色字體的为增加的,藍色字體为修改的        
#======================= Global Settings =====================================        
[global]
dos charset = GB2312            
unix charset = GB2312            
display charset = GB2312
# ----------------------- Network Related Options -------------------------        
workgroup = MYGROUP --改为-->  WORKGROUP         //指定機器在網络上所屬的NT域名或組名(可改可不改)        
server string = Samba Server Version %v                //此選項是可選的,主要作用是Samba服務Windows系統注釋        
netbios name = MYSAMBA        //這個改不改隨意,它就象windows裏的機器名        
interfaces = lo eth0192.168.88.35/24        //這裏寫本機IP地址,如果有多個網络也可以寫多個IP        
hosts allow = 127.192.168.88.            //設定允許訪問samba的IP地址或IP地址範圍        
wins support = yes    //設定samba提供WINS服務,通常無特殊原因設为no,除非所處網络上沒有主機提供WINS服務且需要samba提供WINS服務是才設yes        
dns proxy = yes  --改为--> no          
name resolve order = wins host lmhosts bcas            
bind interfaces only = yes
# --------------------------- Logging Options -----------------------------        
log file = /var/log/samba/log.%m        // log會在此目錄中为每個登陆用戶(Samba用戶)建立不同的日志文件        
log level = 2          
max log size = 500
# ----------------------- Standalone Server Options ------------------------        
security = user        //設定安全級別为user        
passdb backend = tdbsam --改为-->   smbpasswd:/etc/samba/smbpasswd
# --------------------------- Printing Options -----------------------------        
load printers = yes          
cups options = raw
#============================ Share Definitions ==============================        
#如果注釋掉了[homes]則用戶就看不到自己的家目錄        
#[homes]          
#        comment = Home Directories          
#       browseable = no          
#       writable = no          
#;       valid users = %S          
#;       valid users = MYDOMAIN\%S          
[printers]          
       comment = All Printers          
       path = /var/spool/samba          
       browseable = no          
       guest ok = no          
       writable = no          
       printable = yes
[share]            
        comment = Share        //定義共享目錄名稱,可用任意字符串        
path = /home/share       //設定共享目錄路徑        
public = no                       //指定該共享是否允許guest账戶訪問        
available = yes        //用來指定該共享資源是否可用        
admin users = itadmin    //指定該共享的管理員,對該共享具有完全控制權限,如果用戶驗證方式設置成“security=share”時,此項無效。        
valid users = +mgr,+periphery,+filemgr   //用來指定允許訪問該共享資源的用戶,單個用戶就直接寫用戶名,組就是“+組名”        
writable = yes                //是否允許寫入,這項對下面的幾項來說是首選,這項設置为NO,下面的create mask directory mask 等一系列預設值無效        
write list = +mgr,+periphery,+filemgr      //指定在該共享下有寫入權限的用戶        
create mask= 0755            //表示新建文件的預設值,文件所有者全部權限,組內用戶及其他用戶可讀可執行        
directory mask= 0755        //表示新建目錄的預設值,目錄所有者全部權限,組內用戶及其他用戶可讀可執行        
browseable = no    //指定該共享是否可以瀏覽        
[project]            
         comment = project            
         path = /home/project            
         public = no            
         available = yes            
         admin users = itadmin            
         writable = yes            
         write list = +periphery            
         valid users = +periphery            
         create mask= 0755            
         directory mask= 0755            
         browseable = no            
[projectmgr]            
         comment = projectmgr            
         path = /home/projectmgr            
         public = no            
         available = yes            
         admin users = itadmin            
         writable = yes            
         write list = +mgr            
         valid users = +mgr            
         create mask= 0755            
         directory mask= 0755            
         browseable = no            
[filemgr]            
         comment = filemgr            
         path = /home/filemgr            
         public = no            
         available = yes            
         admin users = itadmin            
         writable = yes            
         write list = +filemgr            
         valid users = +filemgr            
         create mask= 0755            
         directory mask= 0755            
         browseable = no
配置完後通過testparm來檢查        
說明一點:
samba3.x的早期版本默認使用tdb庫也就是smb.conf默認設定为passdb backend = tdbsam,只需要注釋掉該行添加smb passwd file = /etec/samba/smbpasswd即可使用smbpasswd存儲加密密鑰。從samba3.5.6開始samba規範了passdb backend参數的使用,取消了smb passwd file設定,如果簡單注釋掉passdb backend参數,密鑰文件也不會被存儲到smbpasswd。所以很多人說怎麼修改smb.conf的配置,smbpasswd文件都無法生成,就算手工創建,內容也是0字節。要用傳統的文本方式存儲只需這样設定passdb backend = smbpasswd:/etc/samba/smbpasswd(後面跟的是絕對路徑)>,不要再寫smb passwd file = /etc/samba/smbpasswd,該参數已經不适用於新版本的samba了。

启動smb及nmb服務        
service smb start        
service nmb start        
nmb 是Samba 的主要启動服務器,讓其它機器能知道此機器共享了什麼;如果不打開nmb服務器的話,只能通過IP來訪問            
注意:在Samba服務器運行其間,更改了配置最好用service smb reload命令,不要用restart,這样可以防止用戶在連接的過程中被中斷            
將smb與nmb加入启動服務
chkconfig --level 35 smb on          
chkconfig --level 35 nmb on

查看端口        
netstat -antup |grep smb          
netstat -antup |grep nmb          

第五步:設置用戶
smbpasswd -a itadmin
New SMB password:          
Retype new SMB password:          
Added user itadmin.          
注:如果想要讓/etc/samba/sabpasswd生效,要先启動samba,不然還是以默認的tdbsam方式來記錄密碼
刪除用戶:smbpasswd -x username

更改用戶密碼:smbpasswd username

[Ref] http://fanli7.net/a/caozuoxitong/OS/20130910/422195.html

2014年3月12日 星期三

Addon in Firefox for annoying Popups

OS: win7
Browser: firefox 26.0

Before:
Almost a third of the screen are occupied by the annoying popup

install

Adblock Plus Pop-up Addon

After:
Some ad is still there, but most of the ads are removed.