22 cci::cci_param<std::string> p_shm_path;
23 cci::cci_param<uint32_t> p_shm_size;
27 ivshmem_plain(
const sc_core::sc_module_name& name, sc_core::sc_object*
o, sc_core::sc_object*
t)
33 , p_shm_path(
"shm_path",
"",
"path of shm file (i.e. /dev/shm/<name of the shm segment>)")
34 , p_shm_size(
"shm_size", 1024,
"size of the shm in MB")
35 , p_shm_id(std::string(sc_core::sc_module::name()) +
"-id")
38 object_string <<
"memory-backend-file,size=" << p_shm_size.get_value()
39 <<
"M,mem-path=" << p_shm_path.get_value() <<
",share=on,id=" << p_shm_id;
44 gpex->add_device(*
this);
47 void before_end_of_elaboration()
override
49 qemu_gpex::Device::before_end_of_elaboration();
50 m_dev.set_prop_str(
"memdev", p_shm_id.c_str());
56 unlink(p_shm_path.get_value().c_str());
void add_arg(const char *arg)
Add a command line argument to the qemu instance.
Definition qemu-instance.h:329