22    cci::cci_param<std::string> p_mac;
 
   23    std::string m_netdev_id;
 
   24    cci::cci_param<std::string> p_netdev_str;
 
   27    rtl8139_pci(
const sc_core::sc_module_name& name, sc_core::sc_object* 
o, sc_core::sc_object* 
t)
 
   33        , p_mac(
"mac", 
"", 
"MAC address of NIC")
 
   34        , m_netdev_id(std::string(sc_core::sc_module::name()) + 
"-id")
 
   35        , p_netdev_str(
"netdev_str", 
"type=user", 
"netdev string for QEMU (do not specify ID)")
 
   37        std::stringstream 
opts;
 
   38        opts << p_netdev_str.get_value();
 
   39        opts << 
",id=" << m_netdev_id;
 
   44        gpex->add_device(*
this);
 
   47    void before_end_of_elaboration()
 override 
   49        qemu_gpex::Device::before_end_of_elaboration();
 
   51        if (!p_mac.get_value().empty()) m_dev.set_prop_str(
"mac", p_mac.get_value().c_str());
 
   52        m_dev.set_prop_str(
"netdev", m_netdev_id.c_str());
 
   54        m_dev.set_prop_str(
"romfile", 
"");
 
 
void add_arg(const char *arg)
Add a command line argument to the qemu instance.
Definition qemu-instance.h:331