qualcomm/qbox
Loading...
Searching...
No Matches
gs::loader< BUSWIDTH > Class Template Reference
Inheritance diagram for gs::loader< BUSWIDTH >:
Collaboration diagram for gs::loader< BUSWIDTH >:

Public Member Functions

 loader (sc_core::sc_module_name name)
void doreset (bool value)
 loader (sc_core::sc_module_name name, std::function< void(const uint8_t *data, uint64_t offset, uint64_t len)> _write)
void file_load (std::string &filename, uint64_t addr, uint64_t file_offset=0, uint64_t file_data_len=std::numeric_limits< uint64_t >::max())
 This function reads a file into memory and can be used to load an image.
void zip_file_load (zip_t *p_archive, const std::string &archive_name, uint64_t addr, const std::string &file_name="", uint64_t file_offset=0, uint64_t file_data_len=0, bool is_compressed=false, const std::string &uncompressed_file_name="")
void csv_load (std::string filename, uint64_t offset, std::string addr_str, std::string value_str, bool byte_swap)
void str_load (std::string data, uint64_t addr)
void ptr_load (uint8_t *data, uint64_t addr, uint64_t len)
void elf_load (const std::string &path)

Public Attributes

simple_initiator_socket_zero< loader< BUSWIDTH > > initiator_socket
TargetSignalSocket< bool > reset
onMethodHelper m_onMethod

Protected Member Functions

void load (std::string name)
void end_of_elaboration ()

Member Function Documentation

◆ file_load()

template<unsigned int BUSWIDTH = DEFAULT_TLM_BUSWIDTH>
void gs::loader< BUSWIDTH >::file_load ( std::string & filename,
uint64_t addr,
uint64_t file_offset = 0,
uint64_t file_data_len = std::numeric_limits<uint64_t>::max() )
inline

This function reads a file into memory and can be used to load an image.

Parameters
filenameName of the file
addrthe address where the memory file is to be read

The documentation for this class was generated from the following file:
  • systemc-components/common/include/loader.h