2016年12月29日 星期四

[GIT] google cloude git on windows 7

 

l   gcloud init

 

l   git config credential.helper gcloud.cmd

//copy remote resource to client, folder = default

 

l   git config --system --unset credential.helper

 

l   gcloud source repos clone default

 

l   push
git push google master

 

l   clone
gcloud source repos clone default

 

l   debug

git config credential.helper gcloud.cmd

 

 

git push origin

 

 

 

Another cmd

 

l   git config --list

 

 

l   google ssd setting

 

[remote "project-ssd"]

        url = https://source.developers.google.com/p/project-ssd/r/default

        fetch = +refs/heads/*:refs/remotes/project_ssd/*

       

[remote "google"]

        url = https://source.developers.google.com/p/project-ssd/

        fetch = +refs/heads/*:refs/remotes/google/*

 

 

my google project

https://console.cloud.google.com/iam-admin/projects

 

 

 

Ref:

 

Basic cmd

https://cloud.google.com/source-repositories/docs/adding-repositories-as-remotes

 

 

ERR: ERROR: (gcloud.auth.git-helper) Invalid input line format: [path=].

SOL: try cmd : credential.helper=gcloud.cmd

https://groups.google.com/forum/#!topic/google-cloud-sdk/8SfiaKEYXTM

________________________________________ 3S CONFIDENTIALITY NOTICE: This message and all attachments may contain legally privileged and confidential information. Any unauthorized review, use or distribution by anyone other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by replying to the message and delete all copies. Thank you.

2016年12月27日 星期二

[SSD] MEETING

Coding style

l   須加inout

l   return value,判斷return

l   少用global variable

l   Point 需加p

l   Global variable 需加g

l   Define 取代特殊number, ex:0x66

l   多加註解

 

 

MY JOB:

Bin grade tool,

-sorting flash r/w

 

 

MP-UI:

特定pcrow safe mode 無反應,ondevicechange失效,需加polling

 

________________________________________ 3S CONFIDENTIALITY NOTICE: This message and all attachments may contain legally privileged and confidential information. Any unauthorized review, use or distribution by anyone other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by replying to the message and delete all copies. Thank you.

[GIT] GITHUB , SSH KEY, PULL, PUSH , REBASE


<![if !supportLists]>1.         <![endif]>GITHUB create new repository
<![if !supportLists]>l   <![endif]>EX: https://github.com/RealCool1983/python

<![if !supportLists]>2.         <![endif]>Create RSA key
144  ssh-keygen -t rsa -C "abc@kimo.com.tw"
145  ssh -T git@github.com
<![if !supportLists]>3.         <![endif]>Add pub key to github
FROM C:\Users\Rex_wu\.ssh\id_rsa.pub
TO https://github.com/settings/keys

<![if !supportLists]>4.         <![endif]>Set git config
[remote "origin"]
    url = git@github.com:RealCool1983/python.git
    fetch = +refs/heads/master:refs/remotes/origin/master
    puttykeyfile = C:\\Users\\Rex_wu\\.ssh\\puttyKey.ppk
   
[remote "toolgit"]
    fetch = +refs/heads/*:refs/remotes/origin/*
<![if !supportLists]>5.         <![endif]>Git done
EX CMD:
  169  git push toolgit
  171  git pull origin
  172  git rebase master
  173  git push toolgit
  174  git pull

_______________________________________

2016年12月19日 星期一

[SSD]synchronous, asynchronous

如何分辨NAND FLASH 等級不同的差異!? SSD效能壽命關鍵!! - PSSD秘密實驗室

2012411 9:08

HI~~大家好,我是小P

P用兩週的篇幅好不容易將SSDController介紹完畢了,接下來要講的是比較沒有人注意到的小細節---NAND FLASH顆粒。

大家有沒有想過有些SSD品牌不同,Controller選擇同一品牌,但是價格卻差了一大截?難道是該公司特別佛心嗎?當然不是的,秘密就在於「NAND FLASH」,這個通常不會寫在規格表的另一個關鍵因素。

NAND FLASH在顆粒上有「同步顆粒」(synchronous NAND flash)與「非同步顆粒」(asynchronous NAND flash)的差別,簡單的來說在大量生產NAND flash時等級較高的就是「同步顆粒」,而在品管階段達不到同步顆粒的效能等級的NAND FLASH就被歸類為「非同步顆粒」,一般來說非同步顆粒的效能與壽命都比同步顆粒的NAND FLASH差。

而您買的SSD到底使用的是同步或非同步顆粒,說實在話除非你將SSD拆開查詢批號,否則永遠都不會知道,有的製造商甚至會將NAND FLASH上面的批號打磨掉(除非像Plextor敢強調是使用同步顆粒,http://www.chiphell.com/thread-346363-1-1.html 的中後段有部分SSD所採用的顆粒批號與種類給大家參考)。

既然「非同步顆粒」效能比較差,那為什麼有的廠商會使用非同步顆粒來製造SSD呢?想當然爾,因為非同步顆粒的成本較低,但在搭配部分Controller之下,如果不做詳細測試看不出差別的,以下圖來說,這是兩款都使用SandForce SF2281控制器,但搭載同步與不同步顆粒的SSD

▲在規格上幾乎看不出差異。

而且跑ATTO DISK BENCHMARK時也沒有很明顯差別:

 

但是只要用HD Tune ProCrystalDiskMark測試讀寫效能馬上高低立見,這是因為這兩個軟體都不能透過資料壓縮的方式進行測試,所以品質較差的非同步顆粒效能就被比了下去(尤其是CDM中的連續存取與512K這兩個區段)。

 

 

其他在Windows的各項運作表現上同步顆粒的表現也會好上許多(如軟體讀取、遊戲、開機….):

 

 

 

最後除了NAND FLASH顆粒等級的不同以外,最後影響效能的就是資料傳輸介面,目前有三種:EDOONFIToggle Mode

EDOextended data output):這個規格最舊,最大讀取速度只有40MB/s

ONFIOpen NAND Flash Interface):此技術的優點就是非同步顆粒也可以使用,最新的ONFI 2.2的雙通道顆粒輸入200MB/sSandForce採用的就是此技術。

Toggle Mode:採用類似DRAM傳輸的方式,寫入速度達320MB/s,仍然高過ONFI的雙通道顆粒寫入速度,這也是Marvell採用的技術。

但是不管ONFIToggle Mode哪一個傳輸介面,目前8通道讀取的SSD,都已接近SATA2/SATA3介面傳輸速度的上限,而連續寫入是看使用Flash品質,Flash寫不進去這麼快,Controller再快也是枉然。所以聰明的您應該知道應該要挑選那一個傳輸介面與NAND FLASH顆粒的SSD了吧?(給您點小提示,Plextor SSD就是採用Toggle Mode技術與同步顆粒NAND FLASH

以上資料引用自:

http://www.hardocp.com/article/2011/08/07/nand_flash_faces_off_synchronous_vs_asynchronous/5

http://tw.myblog.yahoo.com/mingolin-2008/article?mid=183&prev=184&next=182

http://www.chiphell.com/thread-346363-1-1.html

________________________________________ 3S CONFIDENTIALITY NOTICE: This message and all attachments may contain legally privileged and confidential information. Any unauthorized review, use or distribution by anyone other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by replying to the message and delete all copies. Thank you.

2016年12月2日 星期五

[c++] IGPIBDevice

IGPIBDevice.h

IGPIBDevice.cpp

 

iGPIBInterfaceID = 0

iGPIBCardAddress = 20

 

bool IGPIBDevice::DetectGPIBDevice(int iGPIBInterfaceID, int iGPIBCardAddress)

{

        g_iGPIBInterfaceID = iGPIBInterfaceID;

        g_iGPIBCardAddress = iGPIBCardAddress;

        g_vDeviceName.clear();

        g_vNI488Address.clear();

        g_vPrimaryAddress.clear();

        g_vSecondaryAddress.clear();

 

        int iUD = 0;

 

        Addr4882_t instruments[32];

        Addr4882_t result[32];

        Addr4882_t deviceFound[32];

        int iListnerCount = 0;

 

        // Initial variables

        for (int i = 0; i < 32; ++i)

        {

                instruments[i] = i;

                result[i] = 0;

                deviceFound[i] = 0;

        }

        instruments[31] = NOADDR;

 

        // Initial GPIB interface

        CString cstrGPIBInterface;

        cstrGPIBInterface.Format(_T("GPIB%d"), g_iGPIBInterfaceID);

        CT2A szGPIBInterface(cstrGPIBInterface);

 

        iUD = ibfind(szGPIBInterface);

        if (ibsta & ERR)

                return false;

 

        ibrsc(iUD, 1);

        if (ibsta & ERR)

                return false;

 

        ibsic(iUD);

        if (ibsta & ERR)

                return false;

 

        ibsre(iUD, 1);

        if (ibsta & ERR)

                return false;

 

        ibconfig(iUD, IbcTIMING, 1);

        if (ibsta & ERR)

                return false;

 

        // Find GPIB devices

        FindLstn(g_iGPIBInterfaceID, instruments, result, 31);

        if (ibsta & ERR)

                return false;

 

        // Calculate GPIB device counts

        for (int i = 0; i < ibcntl; ++i)

        {

                if (result[i] > 1)

                {

                        deviceFound[iListnerCount] = result[i];

                        ++iListnerCount;

                }

        }

 

        // Get GPIB device name, PAD, SAD

        for (int i = 0; i < iListnerCount; ++i)

        {

                char szDeviceName[128];

                memset(szDeviceName, 0, 128);

 

                int iPAD = GetPAD(deviceFound[i]);

                int iSAD = GetSAD(deviceFound[i]);

 

                int iDD = ibdev(0, iPAD, iSAD, T10s, 1, 0);

                if (ibsta & ERR)

                        return false;

 

                ibclr(iDD);

                if (ibsta & ERR)

                        return false;

 

                ibwrt(iDD, (void*)"*IDN?", 5);

                if (ibsta & ERR)

                        return false;

 

                ibrd(iDD, (void*)szDeviceName, 127);

                if (ibsta & ERR)

                        return false;

 

                ibonl(iDD, 0);

                if (ibsta & ERR)

                        return false;

 

                bool bExist = false;

                std::string strDeviceName(szDeviceName);

 

                for (int j = 0; j < (signed)g_vDeviceName.size(); ++j)

                {

                        if (g_vDeviceName[j] == strDeviceName && g_vPrimaryAddress[j] == iPAD)

                        {

                                bExist = true;

                                break;

                        }

                }

 

                if (! bExist)

                {

                        g_vDeviceName.push_back(strDeviceName);

                        g_vNI488Address.push_back(deviceFound[i]);

                        g_vPrimaryAddress.push_back(iPAD);

                        g_vSecondaryAddress.push_back(iSAD);

                }

        }

 

        return true;

}

 

 

**********************Confidentiality Notice************************
The opinions and views expressed in this e-mail are solely those of the author and do not necessarily represent our company and its affiliates. If this e-mail is not originally intended for you, or received by you in error, do not disclose its content to anyone and delete it immediately. This e-mail may contain information that is legally privileged, confidential or exempt from disclosure.