-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathahir.snippets
More file actions
82 lines (66 loc) · 1.95 KB
/
Copy pathahir.snippets
File metadata and controls
82 lines (66 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#This should be in ~/.vim/UtliSnips
snippet $module "AHIR module" b
$module [${1:<module-name>}] $in($2) $out($3) $is{
//code goes here
$4
}
endsnippet
snippet $pipe "AHIR pipe" b
$pipe ${1:<pipe-name>}: ${2:type=int/float}<$3> $depth ${4:integer} //$4-slot queue
endsnippet
snippet $lifo "AHIR pipe" b
$lifo $pipe ${1:<pipe-name>}: ${2:type=int/float}<$3> $depth ${4:integer} //$4-slot stack
endsnippet
snippet $constant "AHIR Constant" b
$constant ${1:<constant-name>}: ${2:<constant-type>} := ${3:<initial-value>}
endsnippet
snippet $call "AHIR function call" b
$call ${1:<function-name>} (${2:<input s>}) (${3:<output s>})
endsnippet
snippet $switch "AHIR switch syntax" b
$switch ${1:<var>} $when ${2:<condition>} $then ${3:<expr>}
$default ${4:<exp/$null>}
$endswitch
endsnippet
snippet $if "AHIR if syntax" b
$if (${1:condition}) $then
${3:<expr>}
$else
${4:<else-expr>}
$endif
endsnippet
snippet $dopipeline "pipelined loops" b
$dopipeline $depth ${1:<depth>} $buffering ${2:<buffering>} $fullrate
//statements ....
$3
$while ${4:<condition>}
endsnippet
snippet $storage "storage object"
$storage ${1:<storage-name>}: ${2:<data-type>}
endsnippet
snippet $array "Ahir Array"
$array [${1:<len>}] $of $${2:<type>}
endsnippet
snippet "\$operator|\$volatile|\$opaque|\$macro|\$foreign" "Module classes" rb
`!p snip.rv = match.group(0)` $module [${1:<module-name>}] $in($2) $out($3) $is{
//code goes here
$4
}
endsnippet
snippet "operator|volatile|opaque|macro|foreign" "Module classes" rb
$`!p snip.rv = match.group(0)` $module [${1:<module-name>}] $in($2) $out($3) $is{
//code goes here
$4
}
endsnippet
snippet $mux "multiplexer"
($mux (${1:<sel-var>}) (${2:<sel>}) (${3:<sel-bar>})
endsnippet
snippet $merge "merge statement"
$merge $entry ${1:<incoming-places>}
${1://add phi statement if required}
$endmerge
endsnippet
snippet $phi "phi statement"
$phi ${1:<var>} := ${2:<expr>} $on ${3:<incoming-place>} ${4:<expr2>} $on ${5:<incoming-place2>}
endsnippet