quic/qbox
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables
gs Namespace Reference

Tool which reads a Lua configuration file and sets parameters. More...

Classes

class  async_event
 
struct  biflow_bindable
 
struct  biflow_multibindable
 
class  biflow_router
 
class  biflow_router_socket
 
class  biflow_socket
 
class  biflow_socket_multi
 
class  cci_constructor_vl
 sc_module constructor container for CCI This uses the CCI Function container, and the FactoryMaker in order to parameterise the constructor and maintain type safety The actual parameters will be extracted (in a type safe manor) from a CCI list More...
 
class  cci_function
 Basic function container for CCI Packing and unpacking are not supported. More...
 
class  cci_function< T(U...)>
 
class  ConfigurableBroker
 Configurable Broker class, inherits from the 'standard' cci_utils broker, but adds 1/ The ability to be instanced in the constructor 2/ The ability to automatically load a configuration file 3/ Explicitly set parameters (from the constructor) are 'hidden' from the parent broker. More...
 
class  CSVRow
 
class  dmi_converter
 
class  global_pause
 
class  gs_bitfield
 Proxy for bitfield access to a register. More...
 
class  gs_field
 fields within registered encapsulated using a bitfield proxy. This field is constructed from a specific bit field in a specific register. The bitfield itself may be re-used to use the same field in another register. More...
 
class  gs_memory
 A gs_memory component that can add memory to a virtual platform project. More...
 
class  gs_register
 Class that encapsulates a 'register' that proxies it's data via a tlm interface, and uses callbacks (on a tlm interface) More...
 
class  HelpSingleton
 
class  inlinesync
 
class  loader
 
class  LocalPass
 
class  LuaFile_Tool
 
class  memory_dumper
 
class  MemoryServices
 
class  monitor
 
class  observer_event
 
class  pass
 
class  PassRPC
 
class  PathIDExtension
 
class  port_fnct
 A class that encapsulates a simple target port and a set of b_transport lambda functions for pre/post read/write. when b_transport is called port, the correct lambda's will be invoked. More...
 
class  PrivateConfigurableBroker
 
class  ProcAliveHandler
 
class  proxy_data
 A proxy data class that stores it's value using a b_transport interface Data is passed by value. More...
 
class  proxy_data_array
 A proxy data class that stores it's value using a b_transport interface Data is passed by pointer, array indexing (operator[]) is supported. More...
 
class  PyInterpreterManager
 
class  python_binder
 
class  reg_router
 
class  RemotePass
 
class  router
 
class  router_if
 
class  runonsysc
 
class  semaphore
 
class  ShmemIDExtension
 
class  SigHandler
 
class  tlm_bus_width_bridges
 
class  tlm_dmi_ex
 
class  tlm_fnct
 Provide a class to provide b_transport callback. More...
 
class  tlm_quantumkeeper_extended
 
class  tlm_quantumkeeper_freerunning
 
class  tlm_quantumkeeper_multi_adaptive
 
class  tlm_quantumkeeper_multi_quantum
 
class  tlm_quantumkeeper_multi_rolling
 
class  tlm_quantumkeeper_multithread
 
class  tlm_quantumkeeper_unconstrained
 
class  transaction_forwarder_if
 
class  UnderlyingDMITlmExtension
 

Typedefs

using py_char_array = pybind11::array_t< uint8_t, pybind11::array::c_style|pybind11::array::forcecast >
 

Enumerations

enum  ForwarderType { CONTAINER , PASS , SC_MODULE }
 
enum class  py_wait_type { SC_TIME , SC_EVENT , GS_ASYNC_EVENT , TIMED_SC_EVENT }
 

Functions

sc_core::sc_object * find_sc_obj (sc_core::sc_object *m, std::string name, bool test=false)
 Helper function to find a sc_object by fully qualified name throws SC_ERROR if nothing found.
 
template<typename T >
std::vector< T * > find_sc_objects (sc_core::sc_object *m=nullptr)
 Helper function to find a sc_objects of a given type.
 
std::string sc_cci_leaf_name (std::string name)
 return the leaf name of the given systemc hierarchical name
 
std::list< std::string > sc_cci_children (sc_core::sc_module_name name)
 return a list of 'unconsumed' children from the given module name, can be used inside or outside the heirarchy
 
std::list< std::string > sc_cci_list_items (sc_core::sc_module_name module_name, std::string list_name)
 return a list of 'unconsumed' items in the module matching the base name given, plus '_' and a numeric value typically this would be a list of items from an sc_vector Can be used inside or outside the heirarchy
 
std::string get_parent_name (sc_core::sc_module_name n)
 
cci::cci_value cci_get (cci::cci_broker_handle broker, std::string name)
 
template<typename T >
T cci_get (cci::cci_broker_handle broker, std::string name)
 
template<typename T >
T cci_get_d (cci::cci_broker_handle broker, std::string name, T default_val)
 
template<typename T >
bool cci_get (cci::cci_broker_handle broker, std::string name, T &param)
 
void cci_clear_unused (cci::cci_broker_handle broker, std::string name)
 
template<typename T >
std::vector< Tcci_get_vector (cci::cci_broker_handle broker, const std::string base)
 
std::shared_ptr< gs::tlm_quantumkeeper_extendedtlm_quantumkeeper_factory (std::string name)
 
template<typename T >
std::vector< T > & join (std::vector< T > &vector1, const std::vector< T > &vector2)
 
template<typename T >
std::vector< std::string > find_object_of_type (sc_core::sc_object *m=NULL)
 
void memorydumper_tgr_helper ()
 
std::vector< crow::json::wvalue > json_cci_params (sc_core::sc_object *obj)
 
crow::json::wvalue object_to_json (sc_core::sc_object *obj)
 
crow::json::wvalue json_object (sc_core::sc_object *obj)
 
unsigned charget_pybind11_buffer_info_ptr (const py_char_array &bytes)
 
bool sc_thread_try_wait (const pybind11::object &ret, py_wait_type type)
 
 PYBIND11_EMBEDDED_MODULE (sc_core, m)
 
 PYBIND11_EMBEDDED_MODULE (gs, m)
 
 PYBIND11_EMBEDDED_MODULE (tlm_generic_payload, m)
 
 SC_MODULE (realtimelimiter)
 realtimelimiter: sc_module which suspends SystemC if SystemC time drifts ahead of realtime
 

Variables

global_pause gp
 
unsigned int gp_ref_count = 0
 

Detailed Description

Tool which reads a Lua configuration file and sets parameters.

Bi-directional Flow controlled socket.

Helper macro to register an sc_module constructor, complete with its (typed) arguments.

Lua Config File Tool which reads a configuration file and uses the Tool_GCnf_Api to set the parameters during intitialize-mode.

One instance can be used to read and configure several lua config files.

The usage of this Tool:

The bi-directional flow controlled socket is intended to be used between devices and serial-like back-ends.

The socket transports 'standard' Generic Protocol TLM packets, but ONLY makes use of the data component. The socket is templated on a type (T) which is the unit of data that will be transmitted. (Default is uint8)

The interface allows the socket owner to allow a specific, or unlimited amount of data to arrive. Hence the owner may specify that only one item can arrive (hence use a send/acknowledge protocol), or it may use a limited buffer protocol (typical of a uart for instance) or, for instance, for an output to a host, which itself is normally buffered, the socket may be set to receive unlimited data.

**** NOTICE : async_detach_suspending / async_attach_suspending ****

The bidirectional socket will own an async_event, 'waiting' for the other side of the communication.

NOTE: Hence, all sockets start DETACHED, and will only be attached if/when a non-zero absolute value is received from the other side.

PythonBinder is not meant to be used as a full systemc/TLM C++ -> python binder, it is used to offload only part of the processing to a python script so that the powerful and rich python language constructs and packages can be used to extend the capabilities of QQVP. So, only the minimum required systemc/TLM classes/functions will have python bindings using pybind11.

Function Documentation

◆ find_sc_obj()

sc_core::sc_object * gs::find_sc_obj ( sc_core::sc_object *  m,
std::string  name,
bool  test = false 
)

Helper function to find a sc_object by fully qualified name throws SC_ERROR if nothing found.

Parameters
mcurrent parent object (use null to start from the top)
namename being searched for
Returns
sc_core::sc_object* return object if found

◆ find_sc_objects()

template<typename T >
std::vector< T * > gs::find_sc_objects ( sc_core::sc_object *  m = nullptr)

Helper function to find a sc_objects of a given type.

Parameters
mcurrent parent object (use null to start from the top)
Template Parameters
Ttypename being searched for
Returns
std::vector<sc_core::sc_object*> list of sc_objects found

◆ sc_cci_children()

std::list< std::string > gs::sc_cci_children ( sc_core::sc_module_name  name)

return a list of 'unconsumed' children from the given module name, can be used inside or outside the heirarchy

Parameters
name
Returns
std::list<std::string>

◆ sc_cci_leaf_name()

std::string gs::sc_cci_leaf_name ( std::string  name)

return the leaf name of the given systemc hierarchical name

Parameters
name
Returns
std::string

◆ sc_cci_list_items()

std::list< std::string > gs::sc_cci_list_items ( sc_core::sc_module_name  module_name,
std::string  list_name 
)

return a list of 'unconsumed' items in the module matching the base name given, plus '_' and a numeric value typically this would be a list of items from an sc_vector Can be used inside or outside the heirarchy

Parameters
module_name: name of the module
list_name: base name of the list (e.g. name of the sc_vector)
Returns
std::list<std::string>

◆ SC_MODULE()

gs::SC_MODULE ( realtimelimiter  )

realtimelimiter: sc_module which suspends SystemC if SystemC time drifts ahead of realtime

Parameters

RTquantum_ms : realtime tick rate between checks.

Parameters

SCTimeout_ms : If SystemC time is behind by more than this value, then generate a fatal abort (0 disables)

◆ sc_thread_try_wait()

bool gs::sc_thread_try_wait ( const pybind11::object &  ret,
py_wait_type  type 
)

FIXME: This is a work around to mitigate a problem happening in python implemented systemc thread functions, now pybind11 will fail to switch from a python function context after a systemc sc_core::wait() call and generates this exception: "loader_life_support: internal error", the current solution assumes that python systemc thread function which includes a sc_core::wait() call is implemented as a generator and yield is used instead of sc_core::wait(), and each time the python systemc thread function yields, a check for the yield value is done to execute the appropriate sc_core::wait() function. So, the actual systemc thread context switch will happen in C++ side not in python side.