systemc-clang 2.0.0
Parsing SystemC constructs
|
Public Member Functions | |
__init__ (self) | |
get_current_scope_type (self) | |
push_current_scope_type (self, scope) | |
pop_current_scope_type (self) | |
start (self, tree) | |
modulelist (self, tree) | |
nonrefexp (self, tree) | |
hmethodcall (self, tree) | |
hwait (self, tree) | |
hvarinitlist (self, tree) | |
blkassign (self, tree) | |
syscwrite (self, tree) | |
numlitwidth (self, tree) | |
hcondop (self, tree) | |
hliteral (self, tree) | |
hvarref (self, tree) | |
syscread (self, tree) | |
harrayref (self, tree) | |
hsigassignl (self, tree) | |
hbinop (self, tree) | |
hpostfix (self, tree) | |
hprefix (self, tree) | |
hunop (self, tree) | |
hcstmt (self, tree) | |
continuestmt (self, tree) | |
get_current_ind_prefix (self) | |
casevalue (self, tree) | |
switchbody (self, tree) | |
casestmt (self, tree) | |
switchcond (self, tree) | |
switchstmt (self, tree) | |
breakstmt (self, tree) | |
stmt (self, tree) | |
hnoop (self, tree) | |
whilestmt (self, tree) | |
dostmt (self, tree) | |
stmts (self, tree) | |
inc_indent (self) | |
dec_indent (self) | |
push_indent (self) | |
pop_indent (self) | |
ifstmt (self, tree) | |
forinit (self, tree) | |
forcond (self, tree) | |
forpostcond (self, tree) | |
forbody (self, tree) | |
forstmt (self, tree) | |
hsensvars (self, tree) | |
npa (self, tree) | |
hsensedge (self, tree) | |
get_sense_list (self) | |
hsenslist (self, tree) | |
hvalchange (self, tree) | |
set_current_proc_name (self, name) | |
reset_current_proc_name (self) | |
get_current_proc_name (self) | |
hprocess (self, tree) | |
htype (self, tree) | |
hreturnstmt (self, tree) | |
funcparami (self, tree) | |
funcparamio (self, tree) | |
vardeclinit (self, tree) | |
hbindingarrayref (self, tree) | |
expand_binding_ref (self, tree) | |
moduleinst (self, tree) | |
hlrotate (self, tree) | |
horreduce (self, tree) | |
hconcat (self, tree) | |
vardecl (self, tree) | |
prevardecl (self, tree) | |
htypeinfo (self, tree) | |
func_param_name_stub (self, tree) | |
hfunctionparams (self, tree) | |
hfunctionrettype (self, tree) | |
htouint (self, tree) | |
htoint (self, tree) | |
htoulong (self, tree) | |
htolong (self, tree) | |
hfunctionlocalvars (self, tree) | |
hfunction (self, tree) | |
collect_type (self, port_or_sig) | |
sigdecltype (self, tree) | |
portdecltype (self, tree) | |
modportsiglist (self, tree) | |
get_current_module_var_type (self, id) | |
get_current_module_var_type_or_default (self, id, default=None) | |
reset_current_module_var_type (self) | |
insert_current_module_var_type (self, id, tpe) | |
hthread (self, tree) | |
hthreadsync (self, tree) | |
hthreadswitch (self, tree) | |
hmodule (self, tree) | |
hbuiltin (self, tree) | |
hscmax (self, tree) | |
hscmin (self, tree) | |
Public Member Functions inherited from parselib.transforms.top_down.TopDown | |
__default__ (self, t) | |
Public Attributes | |
str | indent_character = ' ' |
int | current_indent = 0 |
int | indent_inc = 2 |
indent_stack = list() | |
bindings = dict() | |
local_variables = set() | |
bool | in_for_init = False |
module_var_type = None | |
current_proc_name = None | |
bool | is_in_thread = False |
bool | thread_comb = False |
dict | senselist |
current_module | |
list | bindings = [] |
thread_name = tree.children[0] | |
list | senselist = [] |
str | bindings = 'portbindinglist': |
Protected Member Functions | |
_clean_harrayref (self, harrayref_node) | |
Private Member Functions | |
__get_var_name (self, tree) | |
__get_var_names (self, tree) | |
__check_const (self, tree) | |
__is_local_variable (self, var_name) | |
__all_local_variables (self, var_names) | |
__is_synchronous_sensitivity_list (self, sense_list) | |
__reset_local_variables (self) | |
__add_local_variables (self, var_name) | |
__gen_funcparam (self, tree) | |
__generate_hthread_block (self, tree, is_sync) | |
__is_generated_signal (self, name) | |
__generate_vars_decl (self, ind, res, vars) | |
Private Attributes | |
list | __current_scope_type = [None] |
Translate low-level format of the _hdl.txt into Verilog Note that type defs are already expanded at this point, so all htypeinfo/htype should only include primitive types This pass does not perform any tree transformation that alters the semantics, but **only** generates Verilog
Definition at line 11 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.__init__ | ( | self | ) |
Reimplemented from parselib.transforms.top_down.TopDown.
Definition at line 16 of file verilog_tranlation.py.
|
private |
Definition at line 620 of file verilog_tranlation.py.
|
private |
Definition at line 265 of file verilog_tranlation.py.
|
private |
check whether the tree valuates to constant
Definition at line 205 of file verilog_tranlation.py.
|
private |
Definition at line 646 of file verilog_tranlation.py.
|
private |
Definition at line 934 of file verilog_tranlation.py.
|
private |
Definition at line 1143 of file verilog_tranlation.py.
|
private |
Definition at line 59 of file verilog_tranlation.py.
|
private |
return a list of variable names
Definition at line 69 of file verilog_tranlation.py.
|
private |
Definition at line 1140 of file verilog_tranlation.py.
|
private |
Definition at line 262 of file verilog_tranlation.py.
|
private |
Definition at line 577 of file verilog_tranlation.py.
|
private |
Definition at line 617 of file verilog_tranlation.py.
|
protected |
Definition at line 215 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.blkassign | ( | self, | |
tree ) |
Definition at line 89 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.breakstmt | ( | self, | |
tree ) |
Definition at line 362 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.casestmt | ( | self, | |
tree ) |
Definition at line 342 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.casevalue | ( | self, | |
tree ) |
Definition at line 332 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.collect_type | ( | self, | |
port_or_sig ) |
Definition at line 882 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.continuestmt | ( | self, | |
tree ) |
Definition at line 325 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.dec_indent | ( | self | ) |
Definition at line 444 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.dostmt | ( | self, | |
tree ) |
Definition at line 422 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.expand_binding_ref | ( | self, | |
tree ) |
Definition at line 689 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.forbody | ( | self, | |
tree ) |
Definition at line 492 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.forcond | ( | self, | |
tree ) |
Definition at line 484 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.forinit | ( | self, | |
tree ) |
Definition at line 473 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.forpostcond | ( | self, | |
tree ) |
Definition at line 488 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.forstmt | ( | self, | |
tree ) |
Definition at line 496 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.func_param_name_stub | ( | self, | |
tree ) |
Definition at line 809 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.funcparami | ( | self, | |
tree ) |
Definition at line 657 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.funcparamio | ( | self, | |
tree ) |
Definition at line 660 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.get_current_ind_prefix | ( | self | ) |
Definition at line 328 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.get_current_module_var_type | ( | self, | |
id ) |
Definition at line 904 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.get_current_module_var_type_or_default | ( | self, | |
id, | |||
default = None ) |
Definition at line 907 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.get_current_proc_name | ( | self | ) |
Definition at line 574 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.get_current_scope_type | ( | self | ) |
denotes one of four types of scope: loop, switch, branch, None currently, this is only useful for determine the handling of breaks
Definition at line 31 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.get_sense_list | ( | self | ) |
Definition at line 528 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.harrayref | ( | self, | |
tree ) |
Definition at line 222 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hbindingarrayref | ( | self, | |
tree ) |
this expansion should only be invoked by expanding_binding_ref and should not be invoked elsewhere the reason is that we need to collect binding information per arry-like port
Definition at line 681 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hbinop | ( | self, | |
tree ) |
Definition at line 268 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hbuiltin | ( | self, | |
tree ) |
Definition at line 1122 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hconcat | ( | self, | |
tree ) |
Definition at line 786 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hcondop | ( | self, | |
tree ) |
Definition at line 183 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hcstmt | ( | self, | |
tree ) |
Definition at line 317 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hfunction | ( | self, | |
tree ) |
Definition at line 850 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hfunctionlocalvars | ( | self, | |
tree ) |
Definition at line 846 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hfunctionparams | ( | self, | |
tree ) |
Definition at line 817 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hfunctionrettype | ( | self, | |
tree ) |
Definition at line 821 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hliteral | ( | self, | |
tree ) |
stops at literal, it is some kinds of terminal
Definition at line 187 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hlrotate | ( | self, | |
tree ) |
Definition at line 777 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hmethodcall | ( | self, | |
tree ) |
Definition at line 77 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hmodule | ( | self, | |
tree ) |
Definition at line 974 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hnoop | ( | self, | |
tree ) |
Definition at line 406 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.horreduce | ( | self, | |
tree ) |
Definition at line 781 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hpostfix | ( | self, | |
tree ) |
Definition at line 289 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hprefix | ( | self, | |
tree ) |
Definition at line 293 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hprocess | ( | self, | |
tree ) |
Definition at line 580 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hreturnstmt | ( | self, | |
tree ) |
Definition at line 631 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hscmax | ( | self, | |
tree ) |
Definition at line 1126 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hscmin | ( | self, | |
tree ) |
Definition at line 1133 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hsensedge | ( | self, | |
tree ) |
Definition at line 524 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hsenslist | ( | self, | |
tree ) |
Definition at line 531 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hsensvars | ( | self, | |
tree ) |
Definition at line 517 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hsigassignl | ( | self, | |
tree ) |
Definition at line 258 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hthread | ( | self, | |
tree ) |
Definition at line 920 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hthreadswitch | ( | self, | |
tree ) |
Definition at line 968 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hthreadsync | ( | self, | |
tree ) |
Definition at line 964 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.htoint | ( | self, | |
tree ) |
Definition at line 834 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.htolong | ( | self, | |
tree ) |
Definition at line 842 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.htouint | ( | self, | |
tree ) |
Definition at line 830 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.htoulong | ( | self, | |
tree ) |
Definition at line 838 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.htype | ( | self, | |
tree ) |
Definition at line 624 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.htypeinfo | ( | self, | |
tree ) |
Definition at line 804 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hunop | ( | self, | |
tree ) |
Definition at line 297 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hvalchange | ( | self, | |
tree ) |
Definition at line 563 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hvarinitlist | ( | self, | |
tree ) |
Definition at line 85 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hvarref | ( | self, | |
tree ) |
Definition at line 193 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.hwait | ( | self, | |
tree ) |
Definition at line 81 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.ifstmt | ( | self, | |
tree ) |
Definition at line 454 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.inc_indent | ( | self | ) |
Definition at line 441 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.insert_current_module_var_type | ( | self, | |
id, | |||
tpe ) |
Definition at line 915 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.modportsiglist | ( | self, | |
tree ) |
Definition at line 900 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.moduleinst | ( | self, | |
tree ) |
Definition at line 695 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.modulelist | ( | self, | |
tree ) |
Definition at line 49 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.nonrefexp | ( | self, | |
tree ) |
Definition at line 54 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.npa | ( | self, | |
tree ) |
Definition at line 521 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.numlitwidth | ( | self, | |
tree ) |
Definition at line 176 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.pop_current_scope_type | ( | self | ) |
Definition at line 41 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.pop_indent | ( | self | ) |
Definition at line 451 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.portdecltype | ( | self, | |
tree ) |
Definition at line 895 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.prevardecl | ( | self, | |
tree ) |
Definition at line 796 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.push_current_scope_type | ( | self, | |
scope ) |
Definition at line 37 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.push_indent | ( | self | ) |
used to service temporary indent removal, such as that in for condition
Definition at line 447 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.reset_current_module_var_type | ( | self | ) |
Definition at line 912 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.reset_current_proc_name | ( | self | ) |
Definition at line 571 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.set_current_proc_name | ( | self, | |
name ) |
Definition at line 568 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.sigdecltype | ( | self, | |
tree ) |
Definition at line 890 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.start | ( | self, | |
tree ) |
Definition at line 45 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.stmt | ( | self, | |
tree ) |
Definition at line 370 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.stmts | ( | self, | |
tree ) |
Definition at line 436 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.switchbody | ( | self, | |
tree ) |
Definition at line 336 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.switchcond | ( | self, | |
tree ) |
Definition at line 350 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.switchstmt | ( | self, | |
tree ) |
Definition at line 354 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.syscread | ( | self, | |
tree ) |
syscread: hsigassignr, token
Definition at line 200 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.syscwrite | ( | self, | |
tree ) |
Definition at line 169 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.vardecl | ( | self, | |
tree ) |
Definition at line 792 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.vardeclinit | ( | self, | |
tree ) |
Definition at line 663 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.whilestmt | ( | self, | |
tree ) |
Definition at line 410 of file verilog_tranlation.py.
|
private |
Definition at line 27 of file verilog_tranlation.py.
list parselib.transforms.verilog_tranlation.VerilogTranslationPass.bindings = dict() |
Definition at line 22 of file verilog_tranlation.py.
list parselib.transforms.verilog_tranlation.VerilogTranslationPass.bindings = [] |
Definition at line 703 of file verilog_tranlation.py.
str parselib.transforms.verilog_tranlation.VerilogTranslationPass.bindings = 'portbindinglist': |
Definition at line 982 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.current_indent = 0 |
Definition at line 19 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.current_module |
Definition at line 598 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.current_proc_name = None |
Definition at line 26 of file verilog_tranlation.py.
bool parselib.transforms.verilog_tranlation.VerilogTranslationPass.in_for_init = False |
Definition at line 24 of file verilog_tranlation.py.
str parselib.transforms.verilog_tranlation.VerilogTranslationPass.indent_character = ' ' |
Definition at line 18 of file verilog_tranlation.py.
int parselib.transforms.verilog_tranlation.VerilogTranslationPass.indent_inc = 2 |
Definition at line 20 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.indent_stack = list() |
Definition at line 21 of file verilog_tranlation.py.
bool parselib.transforms.verilog_tranlation.VerilogTranslationPass.is_in_thread = False |
Definition at line 28 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.local_variables = set() |
Definition at line 23 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.module_var_type = None |
Definition at line 25 of file verilog_tranlation.py.
dict parselib.transforms.verilog_tranlation.VerilogTranslationPass.senselist |
Definition at line 534 of file verilog_tranlation.py.
list parselib.transforms.verilog_tranlation.VerilogTranslationPass.senselist = [] |
Definition at line 978 of file verilog_tranlation.py.
bool parselib.transforms.verilog_tranlation.VerilogTranslationPass.thread_comb = False |
Definition at line 29 of file verilog_tranlation.py.
parselib.transforms.verilog_tranlation.VerilogTranslationPass.thread_name = tree.children[0] |
Definition at line 928 of file verilog_tranlation.py.