網頁
2010年5月12日 星期三
Linux Highlight (1)
HW/SW Co-Design Note
Synthesis 合成 Allocation + Binding + Scheduling
排程(scheduling)、連結(binding)、與分配(allocation)
(運算對資源的指定) (貼標籤)
Problem : what is the goal? (計算)
Architecture : system arch. (表示component 與其連接)
Specification : Possible Mapping
partitioning - optimization
computation < --------------MAPPING--------------- > component
Bi-partitioning : SW + HW
processor + ASIC
Partitioning (Level of Abstraction)
functional - system level - system parameter unknown
structural - RTL level , netlist level
[Reference]
http://www.nioswiki.com/
排程(scheduling)、連結(binding)、與分配(allocation)
(運算對資源的指定) (貼標籤)
Problem : what is the goal? (計算)
Architecture : system arch. (表示component 與其連接)
Specification : Possible Mapping
partitioning - optimization
computation < --------------MAPPING--------------- > component
Bi-partitioning : SW + HW
processor + ASIC
Partitioning (Level of Abstraction)
functional - system level - system parameter unknown
structural - RTL level , netlist level
[Reference]
http://www.nioswiki.com/
2010年5月11日 星期二
AWK
Pattern { Action }
-> If Pattern is true, do Action.
Pattern will exploit "Relational Expression".
[Relational Expression]
>, <, ==, != ...etc.
~(match)
!~(Not Match)
[EXE]
1. awk -f awkfile [file]
2. $ awk 'shell action' [file]
3. script and chmod +x to instruction
[awk action format]
awk 'pattern' file : display rows which match patterns
awk '{action}' file : execute the action in {} for every row
awk 'pattern{action}' file: execute the action for the rows which match patterns
[argument passing]
awk -v varible 'pattern' file
ex: awk -v avar="$svar" '$0 == avar' file
[Reference]
AWK tutorial
-> If Pattern is true, do Action.
Pattern will exploit "Relational Expression".
[Relational Expression]
>, <, ==, != ...etc.
~(match)
!~(Not Match)
[EXE]
1. awk -f awkfile [file]
2. $ awk 'shell action' [file]
3. script and chmod +x to instruction
[awk action format]
awk 'pattern' file : display rows which match patterns
awk '{action}' file : execute the action in {} for every row
awk 'pattern{action}' file: execute the action for the rows which match patterns
awk -v varible 'pattern' file
ex: awk -v avar="$svar" '$0 == avar' file
[Reference]
AWK tutorial
Regular Expression
regular expression
一個 regular expression是被表示於斜線( / / )之間,並且比對是採用 =~ 為操作子
. # 任何單一字元除了 newline
^ # 一行或一字串的起始 [限制字串出現於行首]
$ # 一行或一字串的尾端 [限制字串出現於行末]
* # 零或多個最後的字元 [重複出現 - 可以沒有]
+ # 一或多個最後的字元 [重複出現 - 至少一個]
? # 零或一個最後的字元 [重複0或1個]
一個 regular expression是被表示於斜線( / / )之間,並且比對是採用 =~ 為操作子
. # 任何單一字元除了 newline
^ # 一行或一字串的起始 [限制字串出現於行首]
$ # 一行或一字串的尾端 [限制字串出現於行末]
* # 零或多個最後的字元 [重複出現 - 可以沒有]
+ # 一或多個最後的字元 [重複出現 - 至少一個]
? # 零或一個最後的字元 [重複0或1個]
Network Simulation Evaluation (NS2)
Wireless new trace format
[Example]
s -t 0.001978125 -Hs 12 -Hd -2 -Ni 12 -Nx 0.00 -Ny 0.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md c000000 -Ms ffff0008 -Mt message -Is 12.42 -Id -1.42 -It message -Il 30 -If 0 -Ii 2 -Iv 32
[Example]
s -t 0.001978125 -Hs 12 -Hd -2 -Ni 12 -Nx 0.00 -Ny 0.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md c000000 -Ms ffff0008 -Mt message -Is 12.42 -Id -1.42 -It message -Il 30 -If 0 -Ii 2 -Iv 32
1st field - Packet event
s: send
r: recv
d:drop
f: forward
2nd field - Event time
-t time
3rd field - Next hop info
-Hs: id for this node
-Hd: id to the next hop towards the destination
-> -1 broadcast
-> -2 not deployed yet
4th field - Node property
-Ni:
-Nx -Ny -Nz : node's coordinate
Ne: node energy level
Nl: trace level (ex: AGT..etc)
Nw: reason for the event -
“END” DROP_END_OF_SIMULATION“COL” DROP_MAC_COLLISION“DUP” DROP_MAC_DUPLICATE“ERR” DROP_MAC_PACKET_ERROR“RET” DROP_MAC_RETRY_COUNT_EXCEEDED“STA” DROP_MAC_INVALID_STATE“BSY” DROP_MAC_BUSY“NRTE” DROP_RTR_NO_ROUTE
“LOOP” DROP_RTR_ROUTE_LOOP
“TTL” DROP_RTR_TTL
“TOUT” DROP_RTR_QTIMEOUT
“CBK” DROP_RTR_MAC_CALLBACK“IFQ” DROP_IFQ_QFULL
“ARP” DROP_IFQ_ARP_FULL
“OUT” DROP_OUTSIDE_SUBNET
“LOOP” DROP_RTR_ROUTE_LOOP
“TTL” DROP_RTR_TTL
“TOUT” DROP_RTR_QTIMEOUT
“CBK” DROP_RTR_MAC_CALLBACK“IFQ” DROP_IFQ_QFULL
“ARP” DROP_IFQ_ARP_FULL
“OUT” DROP_OUTSIDE_SUBNET
5th field - Packet info at IP level
-Is: source address.port
-Id: dst address.port
-It: packet type
-Il: packet size
-If: flow id
-Ii: unique id
-Iv: time to live
6th field - Packet info at MAC level
-Ma: duration
-Md: destination's addr
-Ms: source's addr
-Mt: ethernet type
2010年5月7日 星期五
[轉錄] struct的初始化,拷貝及指標成員的使用技巧
|
訂閱:
文章 (Atom)
