Refactored file dependencies to decouple components
This commit is contained in:
@ -110,12 +110,24 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline sysc::gpio_regs::gpio_regs(sc_core::sc_module_name nm)
|
||||
: sc_core::sc_module(nm), NAMED(value, r_value, 0, *this), NAMED(input_en, r_input_en, 0, *this),
|
||||
NAMED(output_en, r_output_en, 0, *this), NAMED(port, r_port, 0, *this), NAMED(pue, r_pue, 0, *this),
|
||||
NAMED(ds, r_ds, 0, *this), NAMED(rise_ie, r_rise_ie, 0, *this), NAMED(rise_ip, r_rise_ip, 0, *this),
|
||||
NAMED(fall_ie, r_fall_ie, 0, *this), NAMED(fall_ip, r_fall_ip, 0, *this), NAMED(high_ie, r_high_ie, 0, *this),
|
||||
NAMED(high_ip, r_high_ip, 0, *this), NAMED(low_ie, r_low_ie, 0, *this), NAMED(low_ip, r_low_ip, 0, *this),
|
||||
NAMED(iof_en, r_iof_en, 0, *this), NAMED(iof_sel, r_iof_sel, 0, *this), NAMED(out_xor, r_out_xor, 0, *this) {}
|
||||
: sc_core::sc_module(nm)
|
||||
, NAMED(value, r_value, 0, *this)
|
||||
, NAMED(input_en, r_input_en, 0, *this)
|
||||
, NAMED(output_en, r_output_en, 0, *this)
|
||||
, NAMED(port, r_port, 0, *this)
|
||||
, NAMED(pue, r_pue, 0, *this)
|
||||
, NAMED(ds, r_ds, 0, *this)
|
||||
, NAMED(rise_ie, r_rise_ie, 0, *this)
|
||||
, NAMED(rise_ip, r_rise_ip, 0, *this)
|
||||
, NAMED(fall_ie, r_fall_ie, 0, *this)
|
||||
, NAMED(fall_ip, r_fall_ip, 0, *this)
|
||||
, NAMED(high_ie, r_high_ie, 0, *this)
|
||||
, NAMED(high_ip, r_high_ip, 0, *this)
|
||||
, NAMED(low_ie, r_low_ie, 0, *this)
|
||||
, NAMED(low_ip, r_low_ip, 0, *this)
|
||||
, NAMED(iof_en, r_iof_en, 0, *this)
|
||||
, NAMED(iof_sel, r_iof_sel, 0, *this)
|
||||
, NAMED(out_xor, r_out_xor, 0, *this) {}
|
||||
|
||||
template <unsigned BUSWIDTH> inline void sysc::gpio_regs::registerResources(sysc::tlm_target<BUSWIDTH> &target) {
|
||||
target.addResource(value, 0x0UL);
|
||||
|
@ -79,9 +79,12 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline sysc::plic_regs::plic_regs(sc_core::sc_module_name nm)
|
||||
: sc_core::sc_module(nm), NAMED(priority, r_priority, 0, *this), NAMED(pending, r_pending, 0, *this),
|
||||
NAMED(enabled, r_enabled, 0, *this), NAMED(threshold, r_threshold, 0, *this),
|
||||
NAMED(claim_complete, r_claim_complete, 0, *this) {}
|
||||
: sc_core::sc_module(nm)
|
||||
, NAMED(priority, r_priority, 0, *this)
|
||||
, NAMED(pending, r_pending, 0, *this)
|
||||
, NAMED(enabled, r_enabled, 0, *this)
|
||||
, NAMED(threshold, r_threshold, 0, *this)
|
||||
, NAMED(claim_complete, r_claim_complete, 0, *this) {}
|
||||
|
||||
template <unsigned BUSWIDTH> inline void sysc::plic_regs::registerResources(sysc::tlm_target<BUSWIDTH> &target) {
|
||||
target.addResource(priority, 0x4UL);
|
||||
|
@ -152,12 +152,23 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline sysc::spi_regs::spi_regs(sc_core::sc_module_name nm)
|
||||
: sc_core::sc_module(nm), NAMED(sckdiv, r_sckdiv, 0, *this), NAMED(sckmode, r_sckmode, 0, *this),
|
||||
NAMED(csid, r_csid, 0, *this), NAMED(csdef, r_csdef, 0, *this), NAMED(csmode, r_csmode, 0, *this),
|
||||
NAMED(delay0, r_delay0, 0, *this), NAMED(delay1, r_delay1, 0, *this), NAMED(fmt, r_fmt, 0, *this),
|
||||
NAMED(txdata, r_txdata, 0, *this), NAMED(rxdata, r_rxdata, 0, *this), NAMED(txmark, r_txmark, 0, *this),
|
||||
NAMED(rxmark, r_rxmark, 0, *this), NAMED(fctrl, r_fctrl, 0, *this), NAMED(ffmt, r_ffmt, 0, *this),
|
||||
NAMED(ie, r_ie, 0, *this), NAMED(ip, r_ip, 0, *this) {}
|
||||
: sc_core::sc_module(nm)
|
||||
, NAMED(sckdiv, r_sckdiv, 0, *this)
|
||||
, NAMED(sckmode, r_sckmode, 0, *this)
|
||||
, NAMED(csid, r_csid, 0, *this)
|
||||
, NAMED(csdef, r_csdef, 0, *this)
|
||||
, NAMED(csmode, r_csmode, 0, *this)
|
||||
, NAMED(delay0, r_delay0, 0, *this)
|
||||
, NAMED(delay1, r_delay1, 0, *this)
|
||||
, NAMED(fmt, r_fmt, 0, *this)
|
||||
, NAMED(txdata, r_txdata, 0, *this)
|
||||
, NAMED(rxdata, r_rxdata, 0, *this)
|
||||
, NAMED(txmark, r_txmark, 0, *this)
|
||||
, NAMED(rxmark, r_rxmark, 0, *this)
|
||||
, NAMED(fctrl, r_fctrl, 0, *this)
|
||||
, NAMED(ffmt, r_ffmt, 0, *this)
|
||||
, NAMED(ie, r_ie, 0, *this)
|
||||
, NAMED(ip, r_ip, 0, *this) {}
|
||||
|
||||
template <unsigned BUSWIDTH> inline void sysc::spi_regs::registerResources(sysc::tlm_target<BUSWIDTH> &target) {
|
||||
target.addResource(sckdiv, 0x0UL);
|
||||
|
@ -103,9 +103,14 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline sysc::uart_regs::uart_regs(sc_core::sc_module_name nm)
|
||||
: sc_core::sc_module(nm), NAMED(txdata, r_txdata, 0, *this), NAMED(rxdata, r_rxdata, 0, *this),
|
||||
NAMED(txctrl, r_txctrl, 0, *this), NAMED(rxctrl, r_rxctrl, 0, *this), NAMED(ie, r_ie, 0, *this),
|
||||
NAMED(ip, r_ip, 0, *this), NAMED(div, r_div, 0, *this) {}
|
||||
: sc_core::sc_module(nm)
|
||||
, NAMED(txdata, r_txdata, 0, *this)
|
||||
, NAMED(rxdata, r_rxdata, 0, *this)
|
||||
, NAMED(txctrl, r_txctrl, 0, *this)
|
||||
, NAMED(rxctrl, r_rxctrl, 0, *this)
|
||||
, NAMED(ie, r_ie, 0, *this)
|
||||
, NAMED(ip, r_ip, 0, *this)
|
||||
, NAMED(div, r_div, 0, *this) {}
|
||||
|
||||
template <unsigned BUSWIDTH> inline void sysc::uart_regs::registerResources(sysc::tlm_target<BUSWIDTH> &target) {
|
||||
target.addResource(txdata, 0x0UL);
|
||||
|
Reference in New Issue
Block a user