| typedef hash_map<key_assoc_tree_handle, tree_instance_deco, hash_key_assoc_tree_handle, equal_to_key_assoc_tree_handle > pinapa::assoc_tree_handle |
| typedef hash_map<key_assoc_tree_module, tree_instance_module_deco, hash_key_assoc_tree_module, equal_to_key_assoc_tree_module > pinapa::assoc_tree_module |
| typedef st_c_value* pinapa::c_value |
| typedef st_deco_b* pinapa::deco_b |
| typedef st_dependant_deco* pinapa::dependant_deco |
| typedef vector<event_assoc_unit> pinapa::event_assoc |
association (sc_process -> sc_event). This could have been done with a hashtable, but is probably more efficient like this.
| typedef st_event_deco* pinapa::event_deco |
| typedef st_export_deco* pinapa::export_deco |
| typedef hash_set<tree> pinapa::function_set_t |
| typedef st_hook_param* pinapa::hook_param |
| typedef st_module_deco* pinapa::module_deco |
| typedef vector<port_assoc_unit> pinapa::port_assoc |
association (sc_process -> sc_port). This could have been done with a hashtable, but is probably more efficient like this.
| typedef st_port_deco* pinapa::port_deco |
| typedef st_process_deco* pinapa::process_deco |
| typedef st_sensitivity* pinapa::sensitivity |
| typedef st_signal_deco* pinapa::signal_deco |
| typedef st_deco_first<st_systemc_deco_t,void> pinapa::st_scdummy_deco_t |
| typedef st_deco_first< st_tree_deco_t, tree_node > pinapa::st_tree_deco |
| typedef st_deco_first<st_tree_instance_module_deco_t, key_assoc_tree_module> pinapa::st_tree_instance_module_deco |
| typedef st_tree_deco * pinapa::tree_deco |
| typedef st_tree_deco_t* pinapa::tree_deco_t |
| typedef st_type_deco* pinapa::type_deco |
| typedef st_wait_deco* pinapa::wait_deco |
| enum pinapa::rw |
Type of statement or object in SystemC.
| CPP_STANDARD | C++ code unrelated to SystemC |
| CPP_FUNC_DECL | C++ function declaration |
| CPP_DATA_MEMBER | A variable which is a data-member of a class |
| SC_VARIABLE_DECL | Declaration of a variable which is of a SC or TLM primitive time |
| PINAPA_TYPE | Type. (decoration of TREE_TYPE field in the tree) |
| SC_PORT | An object of type sc_in sc_out or sc_inout |
| SC_WRITE |
A function call port.write(value) |
| SC_READ |
A function call port.read(value) |
| SC_MODULE | A module in SystemC |
| SC_WAIT |
A function call wait(...) |
| PINAPA_BASIC_SEQ_WRITE | Obsolete |
| PINAPA_BASIC_ARBITER_WRITE | Obsolete |
| PINAPA_BASIC_SEQ_READ | Obsolete |
| PINAPA_BASIC_ARBITER_READ | Obsolete |
| PINAPA_TAC_ROUTER_READ | Obsolete |
| PINAPA_TAC_ARBITER_READ | Obsolete |
| PINAPA_TAC_SEQ_READ | Obsolete |
| PINAPA_TAC_ROUTER_WRITE | Obsolete |
| PINAPA_TAC_ARBITER_WRITE | Obsolete |
| PINAPA_TAC_SEQ_WRITE | Obsolete |
| PINAPA_TAC_SET_ACCESS_ERROR | set_access_error in a TAC slave method |
| TLM_IS_ERROR | tlm_status::is_error() |
| TLM_IS_OK | tlm_status::is_ok() |
| TLM_IS_OVERLAP | Obsolete |
| TLM_IS_NO_RESPONSE | tlm_status::is_no_response() |
| TLM_SET_OK | tlm_status::set_ok() |
| TLM_SET_ERROR | tlm_status::set_error() |
| SC_NOTIFY | Event notification in SystemC |
| SC_NEXT_TRIGGER | Call to a next_trigger() function in SystemC |
| PINAPA_TLM_BASIC_READ |
A function call port.read(value) on a TLM Basic port |
| PINAPA_TLM_BASIC_WRITE |
A function call port.write(value) on a TLM Basic port |
| PINAPA_TLM_TAC_READ |
A function call port.read(value) on a TLM Tac port |
| PINAPA_TLM_TAC_WRITE |
A function call port.write(value) on a TLM Tac port |
| TLM_PV_WAIT |
A function call module.pv_wait() on a TLM module |
| TLM_PV_NEXT_TRIGGER |
A function call module.pv_next_trigger() on a TLM module |
| TLM_IS_SYNCHRO | tlm_status::is_synchro() |
| enum pinapa::type_of_type |
Types in the source code can be primitive types of SystemC or TLM. This enumeration lists the primitive types.
| void pinapa::__do_analyze_function | ( | tree | body, | |
| tree | module, | |||
| const vector< sc_process_b * > & | vh | |||
| ) |
| void pinapa::analyze_function_body | ( | tree | body, | |
| tree | module, | |||
| const vector< sc_process_b * > & | vh | |||
| ) |
top-level function to call to analyze the body of the function.
References __do_analyze_function(), pinapa::simcontext::hook3, and s_process_analyzed.
Referenced by pinapa_gcc_analyze_function_hook().
| void pinapa::analyze_notify | ( | tree | function, | |
| tree | module, | |||
| vector< sc_process_b * > | vh | |||
| ) |
| void pinapa::analyze_read_or_write | ( | rw | rw, | |
| tree | function, | |||
| tree | module, | |||
| vector< sc_process_b * > | vh | |||
| ) |
Analyze a call to a function whose name is "write".
This is mostly BASIC and TAC write, but could be extended later.
References pinapa::st_deco_first< deco, parent >::attach(), pinapa::treeFacade::compare_templates(), pinapa::st_deco_first< deco, parent >::get(), pinapa::st_deco_first< deco, parent >::get_deco(), NULL, PINAPA_ASSERT, PINAPA_ASSERT_WARNING, PINAPA_TLM_ADDRESS_TYPE, PINAPA_TLM_BASIC_READ, PINAPA_TLM_BASIC_WRITE, PINAPA_TLM_TAC_READ, PINAPA_TLM_TAC_WRITE, PINAPA_WARN_NOT_IMPLEMENTED, read, SC_PORT, SC_READ, SC_WRITE, pinapa::treeFacade::skip_nop(), and this_one_may_be_a().
Referenced by pinapa::function_body_visitor::visitCallExpr().
| tree_deco pinapa::analyze_wait_or_nt_arguments | ( | sc_primitive_t | primitive, | |
| tree | list_args, | |||
| tree | module, | |||
| const vector< sc_process_b * > & | vh, | |||
| tree | to_be_decorated | |||
| ) |
Same for events
References pinapa::st_sensitivity_list::add_elem(), pinapa::treeFacade::adjust_shift(), pinapa::st_deco_first< deco, parent >::get(), pinapa::st_deco_first< deco, parent >::get_deco(), pinapa::st_tree_deco_t::get_input_filename(), pinapa::st_tree_deco_t::get_input_line(), pinapa::treeFacade::get_shift(), pinapa::treeFacade::inherits_type(), NULL, PINAPA_ASSERT, PINAPA_REPORT_WARNING, and sc_core::SC_ZERO_TIME.
Referenced by pinapa::function_body_visitor::visitCallExpr().
| string pinapa::build_gcc_command | ( | const string & | tmpfilename, | |
| const string & | libfilename | |||
| ) |
Returns a GCC command to be executed to generate the loadable module to extract the initial values of data-members of objects. See file pinapa-get-initial-values.h
References defensive_getenv(), and parser_getopt_file_to_parse().
Referenced by pinapa::get_initial_values::do_decoration().
| int pinapa::call_gcc | ( | ) |
References exit(), parser_getopt_file_to_parse(), parser_getopt_gcc_permissive(), parser_getopt_retrieve_source_locations(), pinapa_gcc_analyze_function_hook(), pinapa_gcc_build_tree_node_hook(), pinapa_gcc_keep_old_node_hook(), and pinapa_named_return_value_optimisation_hook().
Referenced by parser_start().
| void pinapa::connect_interfaces_to_slave | ( | ) |
References sc_core::sc_object_manager::first_object(), pinapa::st_deco_first< deco, parent >::get(), sc_core::sc_export_base::get_interface(), sc_core::sc_port_base::get_interface(), pinapa::sc_interface_list_hook::get_list_interface(), sc_core::sc_simcontext::get_object_manager(), sc_core::sc_port_base::kind(), sc_core::sc_object_manager::next_object(), PINAPA_REPORT_WARNING, and sc_core::sc_get_curr_simcontext().
Referenced by parser_start().
| inst_dependant_deco pinapa::decoration_for | ( | sc_type_of_object * | obj | ) | [inline] |
| inst_dependant_deco pinapa::decoration_for< sc_event > | ( | sc_event * | obj | ) | [inline] |
| inst_dependant_deco pinapa::decoration_for< sc_port_base > | ( | sc_port_base * | obj | ) | [inline] |
| string pinapa::defensive_getenv | ( | const char * | variable | ) | [inline] |
devensive version of GETENV. Stops the program if the variable is not defined.
References NULL, and PINAPA_ASSERT.
Referenced by build_gcc_command().
| bool pinapa::end_with | ( | string & | Source, | |
| const string & | End | |||
| ) | [inline] |
Referenced by end_with__test().
| void pinapa::end_with__test | ( | ) | [inline] |
References end_with().
| void pinapa::finalize | ( | ) |
| void pinapa::finish_proc_analysisses | ( | ) |
further analyze processes by following function calls
References pinapa::treeVisitor::accept(), pinapa::analysis_set::body, pinapa::analysis_set::module, pinapa::analysis_set::process_vect, and s_process_analyzed.
Referenced by finalize().
| void pinapa::gdb_dump_instance_deco | ( | ) |
| void* pinapa::get_decoration | ( | parent & | p | ) | [inline] |
parent == grandparent. First decoration of a chain.
Function used by the decoration infrastructure to access the field pinapa_decoration. This is a template that can be specialized to make more fancy decorations
| void* pinapa::get_decoration< key_assoc_tree_handle > | ( | key_assoc_tree_handle & | th | ) | [inline] |
| void* pinapa::get_decoration< key_assoc_tree_module > | ( | key_assoc_tree_module & | th | ) | [inline] |
| char * pinapa::get_doc | ( | sc_primitive_t | prim | ) |
References PINAPA_REPORT_ERROR.
| char * pinapa::get_name | ( | sc_primitive_t | prim | ) |
References PINAPA_REPORT_ERROR.
Referenced by pinapa::st_systemc_deco_t::get_static_names(), and print_primitive().
| void pinapa::get_value_at_address | ( | tree | type, | |
| int | address | |||
| ) |
Gets the value of type "type" in memory at the address "address"
References DCOUT, PINAPA_NOT_IMPLEMENTED, and TREE_SWITCH.
Referenced by get_value_at_end_of_elaboration().
| void pinapa::get_value_at_end_of_elaboration | ( | tree | body, | |
| const vector< sc_process_b * > & | vh | |||
| ) |
Gets the value of the actual variable at the end of elaboration. Since we are at the end of elaboration, the value should be initialized.
See Initial values of data-members for more information.
References get_value_at_address(), PINAPA_ASSERT, and sc_core::sc_object::pinapa_get_class_name().
| size_t pinapa::hash_ptr_fct | ( | const void * | ptr | ) | [inline] |
| void pinapa::initialize | ( | ) |
Referenced by main(), and pinapa_initialize_decoration().
| bool pinapa::instance_of | ( | P | p | ) | [inline] |
Test whether the given pointer points to an instance of the template parameter.
References NULL.
| int pinapa::main | ( | int | argc, | |
| char * | argv[], | |||
| pinapa::st_backend * | destination | |||
| ) |
The function pinapa::main is the one to call to do all the job of the parser.
The function pinapa::main() is the one to call to do all the job of the parser.
References go_back_to, initialize(), and sc_real_main().
decorates only function calls embedded in the function.
References pinapa::treeVisitor::accept().
Referenced by pinapa_gcc_analyze_function_hook().
| void pinapa::parser_enable_process_analysis | ( | const bool | flag = true |
) |
References parser_getopt::enable_process_analysis.
| void pinapa::parser_gcc_permissive | ( | const bool | flag = true |
) |
References parser_getopt::gcc_permissive.
| bool pinapa::parser_getopt_enable_process_analysis | ( | ) |
References parser_getopt::enable_process_analysis.
Referenced by pinapa::simcontext::__my_decorate_process().
| string pinapa::parser_getopt_file_to_parse | ( | ) |
References parser_getopt::file_to_parse.
Referenced by build_gcc_command(), call_gcc(), and pinapa::get_initial_values::do_decoration().
| bool pinapa::parser_getopt_gcc_permissive | ( | ) |
| set< pair< string, string > > pinapa::parser_getopt_hightlight_slaves | ( | ) |
| string pinapa::parser_getopt_lib_to_load | ( | ) |
| bool pinapa::parser_getopt_retrieve_source_locations | ( | ) |
References parser_getopt::retrieve_source_locations.
Referenced by call_gcc(), pinapa::st_tree_deco_t::get_input_filename(), and pinapa::st_tree_deco_t::get_input_line().
| void pinapa::parser_highlight_slave | ( | const string & | slave_base, | |
| const string & | slave_method | |||
| ) |
References parser_getopt::highlight_slaves.
| void pinapa::parser_highlight_slaves_include | ( | const string & | file_name | ) |
References parser_getopt::highlight_slaves.
| void pinapa::parser_initialize_lib_to_load | ( | const string & | lib_to_load | ) |
References parser_getopt::lib_to_load.
| void pinapa::parser_initialize_parse_file | ( | const string & | parser_file_to_parse | ) |
References parser_getopt::file_to_parse.
| void pinapa::parser_retrieve_source_locations | ( | const bool | flag = true |
) |
References parser_getopt::retrieve_source_locations.
| void pinapa::parser_start | ( | ) |
This function replaces the call to sc_start when compiling in parser mode. The simulation is replaced by a call to the C++ front-end. The front-end is a modified version of GCC, which will call the function sc_analyze_function.
References call_gcc(), pinapa::simcontext::calls, connect_interfaces_to_slave(), finalize(), pinapa::st_deco_first< deco, parent >::get(), pinapa::simcontext::get_first(), pinapa::simcontext::get_next_sibling(), pinapa::simcontext::hits1, pinapa::simcontext::hits2, pinapa::simcontext::hits3, pinapa::simcontext::hook1, pinapa::simcontext::hook2, pinapa::simcontext::hook3, pinapa::simcontext::hook4, pinapa::simcontext::hook5, pinapa::simcontext::hook6, sc_core::sc_simcontext::initialize(), pinapa::simcontext::needs, NULL, sc_core::sc_get_curr_simcontext(), pinapa::simcontext::THREAD, and pinapa::simcontext::Cursor::undefined.
Referenced by sc_core::sc_start().
| void pinapa::print_primitive | ( | sc_primitive_t | sc_primitive | ) |
References get_name().
Get informations about the type. body must be a type.
References pinapa::st_deco_first< deco, parent >::get(), NULL, PINAPA_TLM_ADDRESS_TYPE, and PINAPA_TLM_DATA_TYPE.
Referenced by pinapa::function_body_visitor::visitComponentRef(), and pinapa::function_body_visitor::visitSwitchStmt().
| void pinapa::push_split | ( | const string & | str, | |
| const string & | sep, | |||
| vector< string > & | dest | |||
| ) | [inline] |
Referenced by push_split__test().
| void pinapa::push_split__test | ( | ) | [inline] |
References push_split().
| void pinapa::replace | ( | string & | Source, | |
| const string & | Find, | |||
| const string & | Replacement | |||
| ) | [inline] |
| int pinapa::sc_main_in_parser | ( | int | argc, | |
| char * | argv[] | |||
| ) |
Just calls sc_main with the same arguments. The reason for this function being here is just that a direct call from libsystemc.a to libTLMrun.a wasn't accepted at link time.
The function pinapa::main_in_parser makes a call to the function sc_main located in the dynamic library libTLMrun.so. It will dlopen this library for this purpose.
| void pinapa::set_decoration | ( | parent & | p, | |
| void * | c | |||
| ) | [inline] |
Function used by the decoration infrastructure to set the field pinapa_decoration. This is a template that can be specialized to make more fancy decorations
| void pinapa::set_decoration< key_assoc_tree_handle > | ( | key_assoc_tree_handle & | th, | |
| void * | d | |||
| ) | [inline] |
| void pinapa::set_decoration< key_assoc_tree_module > | ( | key_assoc_tree_module & | th, | |
| void * | d | |||
| ) | [inline] |
| string pinapa::string_from | ( | const T & | val, | |
| ios_base &(*)(ios_base &) | f = dec | |||
| ) | [inline] |
Converter to string for anything convertible
Referenced by pinapa::get_initial_values::do_decoration(), and pinapa::st_process_deco_t::get_uniq().
| vector<assoc_unit> pinapa::this_one_may_be_a | ( | tree | port, | |
| tree | module, | |||
| const vector< sc_process_b * > & | vh | |||
| ) | [inline] |
Returns an association (sc_process -> sc_port) corresponding to the port "port" from GCC's AST.
The association is empty if the object is not a port.
port.write(true) is transformed into write(this->port, true), which becomes write((port *)(this + port_offset), true) We've got the first argument, so, this is (port *)(this + port_offset)
This method has initialy been written for ports, but the template allows the extension to events.
References pinapa::treeFacade::adjust_shift(), DCOUT, pinapa::st_deco_first< deco, parent >::get(), NULL, PINAPA_ASSERT, PINAPA_DEBUG_CODE, PINAPA_NOT_IMPLEMENTED, and pinapa::treeFacade::skip_nop().
Referenced by analyze_notify(), and analyze_read_or_write().
| T pinapa::to | ( | const std::string & | s, | |
| std::ios_base &(*)(std::ios_base &) | f = std::dec | |||
| ) | [inline] |
Converter from string. Throws 333 on problem
Referenced by pinapa_gcc_analyze_function_hook(), and pinapa_named_return_value_optimisation_hook().
Function-class to be called to return to the backend
Referenced by main().
| bool pinapa::named_return_value_attach_it = false |
Referenced by pinapa_gcc_analyze_function_hook(), and pinapa_named_return_value_optimisation_hook().
Referenced by pinapa_gcc_analyze_function_hook(), and pinapa_named_return_value_optimisation_hook().
vector<analysis_set> pinapa::s_process_analyzed [static] |
Referenced by analyze_function_body(), and finish_proc_analysisses().
| hash_map< tree, tree_deco > pinapa::tree_decoration_map |
Hash map used to associate a decoration to a tree.
Historically, this used to be a "void *" field in the common part of tree_node, in GCC, but GCC 3.4 has a special thing that seems to prevent me from adding a field there. Therefore, I'm using this hash_map.
Referenced by pinapa::st_tree_deco_t::get().