Added configurability of WS output

This commit is contained in:
2017-11-24 07:02:28 +01:00
parent 7b7648d8cc
commit cb496a9543
12 changed files with 68 additions and 36 deletions

View File

@ -18,6 +18,7 @@
#define _GPIO_H_
#include "scc/tlm_target.h"
#include "scc/ext_attribute.h"
#include <sysc/communication/sc_signal_rv_ports.h>
namespace sysc {
@ -35,11 +36,13 @@ public:
gpio(sc_core::sc_module_name nm);
virtual ~gpio() override; // need to keep it in source file because of fwd declaration of gpio_regs
scc::ext_attribute<bool> write_to_ws;
protected:
void clock_cb();
void reset_cb();
void update_pins();
void pins_cb();
void before_end_of_elaboration();
sc_core::sc_time clk;
std::unique_ptr<gpio_regs> regs;
std::shared_ptr<sysc::WsHandler> handler;

View File

@ -17,6 +17,7 @@
#ifndef _UART_H_
#define _UART_H_
#include "scc/ext_attribute.h"
#include "scc/tlm_target.h"
namespace sysc {
@ -32,10 +33,12 @@ public:
uart(sc_core::sc_module_name nm);
virtual ~uart() override;
scc::ext_attribute<bool> write_to_ws;
protected:
void clock_cb();
void reset_cb();
void transmit_data();
void before_end_of_elaboration();
sc_core::sc_time clk;
std::unique_ptr<uart_regs> regs;
std::vector<uint8_t> queue;