It's offen a headache for me to install a new version of gcc based on a older version gcc. There are some many dependencies of gcc and these dependencies also need tons of other dependencies. For old version of dependencies, you can update the libraries with yum or apt-get, but you can never get the newer versions.

Until yesterday, I read this article "How to install gcc on centos 6" I found this build-in script in gcc which will download the corresponding prerequisites. Everything then became great:

1. Install some basic tools needed for gcc

  sudo yum install svn texinfo-tex flex zip libgcc.i686 glibc-devel.i686  

2. Decide which version of GCC you want to install. This command will show you the "tags" for each of the versions available.

svn ls svn:// | grep gcc | grep release 

3. Get the source of the version of GCC you want. This will run for a few minutes. The rest of this article is written for gcc-5_1_0_release/ and will download the sources into ~/sourceInstallations/gcc_5_1_0_release/.

mkdir ~/sourceInstallations   
cd ~/sourceInstallations       
svn co svn://  

4.Get the source of additional prerequisites. Using v5.1.0, this downloads sources and adds them to the GCC build for MPFR v2.4.2, GMP 4.3.2, and MPC 0.8.1.

cd gcc_5_1_0_release/  
    --- Important, run this as shown, from the gcc_5_1_0_release directory.   
    ---   Do not cd to the contrib directory   

5. Build GCC

cd ..  
mkdir gcc_5_1_0_release_build/  
cd gcc_5_1_0_release_build/  
../gcc_5_1_0_release/configure && make && sudo make install && echo "success"  

  • 2016
    • Simultaneous Multikernel GPU: Multi-tasking Throughput Processors via Fine-Grained Sharing
      Zhenning Wang ( Shanghai Jiao Tong University ), Jun Yang, Rami Melhem, Bruce Childers, and Youtao Zhang (University of Pittsburgh), and Minyi Guo ( Shanghai Jiao Tong University )
    • MaPU: A Novel Mathematical Computing Architecture
      Donglin Wang, Shaolin Xie, et al. ( Chinese Academy of Science, Institute of Automation )
  • 2015
    • Coordinated Static and Dynamic Cache Bypassing for GPUs
      Xiaolong Xie, Yun Liang (Peking University, China), Yu Wang (Tsinghua University, China), Guangyu Sun, Tao Wang ( Peking University, China )
  • 2014
    • Improving System Throughput and Fairness Simultaneously in CMP Systems via Dynamic Bank Partitioning
      Mingli Xie (Peking University), Dong Tong (Peking University), Kan Huang (Peking University), Xu Cheng (Peking University )
  • 2013
    • Architecture Support for Guest-Transparent VM Protection from Untrusted Hypervisor and Physical Attacks
      Yubin Xia, Yutao Liu, and Haibo Chen ( Shanghai Jiao Tong University )
  • 2012
    • AgileRegulator: A Hybrid Voltage Regulator Scheme Redeeming DarkSilicon for Power Efficiency in a Multicore Architecture
      Guihai Yan (Institute of Computing Technology, Chinese Academy of Sciences), Yingmin Li (Qualcomm), Yinhe Han (Institute of Computing Technology, Chinese Academy of Sciences), Xiaowei Li (Institute of Computing Technology, Chinese Academy of Sciences), Minyi Guo (Shanghai Jiao Tong University), Xiaoyao Liang (Shanghai Jiao Tong University)
    • Statistical Performance Comparisons of Computers
      Tianshi Chen (Institute of Computing Technology, Chinese Academy of Sciences), Yunji Chen (Institute of Computing Technology, Chinese Academy of Sciences), Qi Guo (Institute of Computing Technology, Chinese Academy of Sciences), Olivier Temam (National Institute for Research in Computer and Control Sciences (INRIA), Saclay), Yue Wu (Institute of Computing Technology, Chinese Academy of Sciences), Weiwu Hu (Institute of Computing Technology, Chinese Academy of Sciences )
  • 2011
    • None
  • 2010
    • DMA cache: Using on-chip storage to architecturally separate I/O data from CPU data for improving I/O performance
      Dan Tang ; Key Laboratory of Computer System and Architecture, Institute of Computing Technology, Chinese Academy of Sciences ; Yungang Bao ; Weiwu Hu ; Mingyu Chen
    • SIF: Overcoming the limitations of SIMD devices via implicit permutation
      Libo Huang School of Computer, National University of Defense Technology, China Li Shen ; Zhiying Wang ; Wei Shi ; Nong Xiao ; Sheng Ma
  • 2009
    • Fast complete memory consistency verification
      Yunji Chen Institute of Computing Technology, Chinese Academy of Sciences , Beijing 100190, China Yi Lv ; Weiwu Hu ; Tianshi Chen ; Haihua Shen ; Pengyu Wang ; Hong Pan
  • 2008
    • None
  • 2007
    • None
  • 2006
    • None
  • brilliant and impressive
  • an intriguing design
  • appealing architecture
  • offers substantial improvements in an important domain.
  • In-Depth discussion of
  • to meet the requirements of ...
  • to accelerate ...
  • lack of flexibility
  • severely rely on
  • giving many new features and advantages.
  • is further enhances.
  • such as ..... as well as : 例如...还有...
    AppAISA conceptually consists of several distinctive features, such as cascadable function units, self-indexed register file and multi-granularity parallel memory system, as well as a novel precise programming model.
  • To prove the feasibility of the proposed ....:
  • aspects of productivity and maintenance
  • manifest :展现出,表现出
    It manifests remarkable power efficiency in out test cases.
  • investigate, explore 探索,调研
  • Despite of: 尽管....
  • The scope of applications is extremely limited due to the inflexibility
  • natively, intrinsically 本质上,内在地
  • FPGA solution, ASIC solution, GPU solution
  • sth as to be described in this section
  • be paired with, be equipped with :配备有
    Each function unit, in AppAISA, is paired with conjunctive register file.
  • has important advantages, first...., second or on the other hand. Meanwhile .... also ....:在表达某些设计特征之后,应该讨论这些特征所带来的好处。
  • can hardly provide parallel accessing to matrix data both in column order and in row order
  • therefore, so, thus, thereby, hence 因此
  • only G=W and G= element_size are meaningful in most of situations.
  • residual 残余的
  • At runtime, BIU is configured before the launch or invoking of ...
  • through --> via
  • cascade <--> concatenate
  • Intuitive 直观的
  • be done by two strategies
  • semantic : 语义
  • sustain 维持
    There's a sufficiency of drama in these lives to sustain your interest
  • penalty free branching,without overhead
  • adequate and eligible 合适的
  • In this case, In this scenario
  • centralized :集中在

Neuron Model

  1. NEURON : Developed by Duke & Yale university, used by Markram, the HBP leader. multi-compartmental models

  2. GENESIS : counterpart of NEURON , multi-compartmental models. currently release is GENESIS 2.4, there are two simulation core for GENESIS 3:

  3. HTM : abstract simulation algorithm for learning.

  4. Nengo : a frame work for conganatve framework ,used by SpiNNaker and standford Brain in Sillicon

  5. Brain : The Brian spiking neural network simulator. single compartmental model

  6. Nest : spiking neural network models, including large-scale neuronal networks, single compartmental model, Very Active

  7. PCSim : A Parallel neural Circuit SIMulator, supported by the FACETS EU-Project.

  8. PyNN : a simulator-independent language for building neuronal network models. Supported by BrainScaleS project.

  9. Topographica : interact with multiple neural simulators with a high-level API. focus on topographic and sensory pathways, supported by USA brain project.

A more comprehensive list can be found at
While doing floating number circuit design and verification, it is usually have to get the byte representation of a specific IEEE 754 floating number. Here I conclude the methods in various language.

C language : Using union


typedef union  {
  unsigned int Integer;
  float        Float ;
}ByteRep ;

int main(int argc ,char *argv[] ){
  ByteRep uData;

  uData.Float = 1.0;

  printf("Floating number: %f, Bytes:%08x \n", uData.Float, uData.Integer);
  return 0;


The output of above code snippet is :
Floating number: 1.000000, Bytes:3f800000

Python: Using ctypes

from ctypes import *
class Dim ( Union ):
  _fields_ = [ ('Integer', c_uint32),
               ('Float', c_float)]

if __name__ == '__main__':

  hDim = Dim();
  hDim.Float = 1.0;
  print "Floating number:",hDim.Float, "Bytes:{0:08x}".format(hDim.Integer)

The output of above code snippet is :
Floating number: 1.0 Bytes:3f800000

SystemVerilog : Using $shortrealtobits or $bitstoshortreal task

program Test():
  bit[31:0] Integer;
  shortreal Float;
initial begin
  Float = 1.0;
  Integer = $shortrealtobits( Float );
  $display("Floating number:%f, Bytes:%h", Float, Integer);
The output of above code snippet is :
Floating number: 1.0 Bytes:3f800000

Matlab : Using typecase function

This is usually used for generation stimuli for floating arithmatic unit.
Float = 1.0;
Integer = typecase( single( Float ), 'uint8');
s= sprintf('Floating number:%f, Bytes:%02x%02x%02x%02x', a, b(4), b(3), b(2),b(1) );
The output of above code snippet is :
Floating number: 1.0 Bytes:3f800000
Today when I try to parse some bit stream with ctypes in python, an strange problem occurred. Here is the structure written in C:
#pragma pack(1)
struct _test{
  unsigned long  KE: 18;
  unsigned long  KI: 18;
  unsigned long  KC: 18;
  unsigned long  KS: 18;
  unsigned long  KB: 24;
int main (int argc, char *argv[]){
  printf ("size of test is %d\n", sizeof(test));
  return 0;

The output of the above code snippet is :
size of test is 12
This is the expected result. The overall bits is 18*4+24 = 96 bits, which is 12 bytes. But while using ctypes in python, the outputs is not 12bytes:
from ctypes import *
class Dim ( Structure ):
  _pack_   = 1;
  _fields_ = [ ('KE', c_uint32, 18), 
               ('KI', c_uint32, 18),
               ('KC', c_uint32, 18),
               ('KS', c_uint32, 18),
               ('KB', c_uint32, 24) ,]
if __name__ == '__main__':
  print (Dim.KE);
  print (Dim.KI);
  print (Dim.KC);
  print (Dim.KS);
  print (Dim.KB);
  print ("size of Dim is ", sizeof(Dim));

The output of the python script is :

size of Dim is  20
I do have set the _pack_ to 1 but the python still set the align boundary to 4bytes, and the overall size of the struct is 20 bytes , not the expected 12 bytes. What's Wrong ?
Syntax highlighting is a necessary for who want to put code snippet in his blog. I have googled a while and found there are two choose: one is google-code-prettify ,the other is Syntax Highlighter,written by Alex Gorbatchev. As the google has been blocked in my country, Syntax Highlighter is my only choice.
It took me a whole day to get the Syntax Highlighter work.

I found SyntaxHighlighter is really harmful to the performance of the web, so I decide to stop using it. Instead I found Code2html pretty handy and neat.

Finally, my first personal website is online. It took me almost half a year to learn, code, debug and deploy this website from the very beginning. This work is continually interrupted by family affairs and tasks at work. But I'm happy to say ,this work is almost done , and I satisfy with it.

I wrote what I have done in this blog, hoping it would be useful for someone who is interest in building website from the ground up.

  • PHP learning

  • I recommend the book "PHP for absolute Beginners" ,wrote by Jason Lengstorf. This book not only talks about the grammar of the PHP, but also tell you what is HTML , how to set up web server and so on. As the name of the book, it is very suite for those who have no idea of PHP

  • Model View Controller Framework

  • Model View Controller Framwork, usally be called MVC framwork, is not a language, but a program pattern , which tells you how to organize you code structurally. Simple MVC Framework ,which is this website based on, is a good start point.

  • CSS & layout

  • Just downloaded from the internet. Thanks to Inf , who have released many beautiful templates.
  • JavaScript,HTML

  • w3school is all you want!