25 cci::cci_param<unsigned int> p_baudbase;
26 cci::cci_param<unsigned int> p_regshift;
32 uart_16550(
const sc_core::sc_module_name& name, sc_core::sc_object* o)
36 uart_16550(
const sc_core::sc_module_name& n,
QemuInstance& inst)
38 , p_baudbase(
"baudbase", 38400000,
39 "Base frequency from which the baudrate "
41 , p_regshift(
"regshift", 2,
42 "Shift to apply to the MMIO register map "
43 "(2 means one reg = 32 bits)")
49 void before_end_of_elaboration()
override
51 QemuDevice::before_end_of_elaboration();
53 m_dev.set_prop_int(
"baudbase", p_baudbase);
54 m_dev.set_prop_int(
"regshift", p_regshift);
57 m_chardev = m_inst.get().chardev_new(
"uart",
"stdio");
58 m_dev.set_prop_chardev(
"chardev", m_chardev);
61 void end_of_elaboration()
override
63 QemuDevice::set_sysbus_as_parent_bus();
64 QemuDevice::end_of_elaboration();
69 irq_out.init_sbd(sbd, 0);