mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
refactor Core::configure() to Core::parse()
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
parent
0959809573
commit
09af6d9e88
12 changed files with 17 additions and 17 deletions
|
@ -305,7 +305,7 @@ protected:
|
|||
|
||||
// Configure IP instance from JSON config
|
||||
virtual
|
||||
void configure(Core &, json_t *)
|
||||
void parse(Core &, json_t *)
|
||||
{ }
|
||||
|
||||
private:
|
||||
|
|
|
@ -57,7 +57,7 @@ private:
|
|||
class BramFactory : public CoreFactory {
|
||||
public:
|
||||
|
||||
void configure(Core &ip, json_t *cfg);
|
||||
void parse(Core &ip, json_t *cfg);
|
||||
|
||||
Core* create()
|
||||
{
|
||||
|
|
|
@ -175,7 +175,7 @@ public:
|
|||
}
|
||||
|
||||
virtual
|
||||
void configure(Core& ip, json_t* json) override;
|
||||
void parse(Core& ip, json_t* json) override;
|
||||
|
||||
virtual void
|
||||
configurePollingMode(Core& ip, PollingMode mode) override
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
return "xilinx.com:ip:axi_pcie:";
|
||||
}
|
||||
|
||||
void configure(Core &ip, json_t *cfg);
|
||||
void parse(Core &ip, json_t *cfg);
|
||||
|
||||
Core* create()
|
||||
{
|
||||
|
|
|
@ -79,7 +79,7 @@ public:
|
|||
return "xilinx.com:ip:axis_switch:";
|
||||
}
|
||||
|
||||
void configure(Core &ip, json_t *cfg);
|
||||
void parse(Core &ip, json_t *cfg);
|
||||
|
||||
Core* create()
|
||||
{
|
||||
|
|
|
@ -167,7 +167,7 @@ public:
|
|||
using CoreFactory::CoreFactory;
|
||||
|
||||
virtual
|
||||
void configure(Core &ip, json_t *cfg);
|
||||
void parse(Core &ip, json_t *cfg);
|
||||
};
|
||||
|
||||
} /* namespace ip */
|
||||
|
|
|
@ -245,7 +245,7 @@ CoreFactory::make(PCIeCard* card, json_t *json_ips)
|
|||
}
|
||||
|
||||
// IP-specific setup via JSON config
|
||||
CoreFactory->configure(*ip, json_ip);
|
||||
CoreFactory->parse(*ip, json_ip);
|
||||
|
||||
// Set polling mode
|
||||
CoreFactory->configurePollingMode(*ip, (card->polling ? PollingMode::POLL : PollingMode::IRQ));
|
||||
|
|
|
@ -27,9 +27,9 @@ using namespace villas::fpga::ip;
|
|||
|
||||
static BramFactory factory;
|
||||
|
||||
void BramFactory::configure(Core &ip, json_t* cfg)
|
||||
void BramFactory::parse(Core &ip, json_t* cfg)
|
||||
{
|
||||
CoreFactory::configure(ip, cfg);
|
||||
CoreFactory::parse(ip, cfg);
|
||||
|
||||
auto &bram = dynamic_cast<Bram&>(ip);
|
||||
|
||||
|
|
|
@ -618,9 +618,9 @@ void Dma::dump()
|
|||
logger->info("MM2S_DMASR: {:x}", XAxiDma_ReadReg(xDma.RegBase, XAXIDMA_TX_OFFSET + XAXIDMA_SR_OFFSET));
|
||||
}
|
||||
|
||||
void DmaFactory::configure(Core &ip, json_t *cfg)
|
||||
void DmaFactory::parse(Core &ip, json_t *cfg)
|
||||
{
|
||||
NodeFactory::configure(ip, cfg);
|
||||
NodeFactory::parse(ip, cfg);
|
||||
|
||||
auto &dma = dynamic_cast<Dma&>(ip);
|
||||
|
||||
|
|
|
@ -113,9 +113,9 @@ AxiPciExpressBridge::init()
|
|||
}
|
||||
|
||||
void
|
||||
AxiPciExpressBridgeFactory::configure(Core &ip, json_t *cfg)
|
||||
AxiPciExpressBridgeFactory::parse(Core &ip, json_t *cfg)
|
||||
{
|
||||
CoreFactory::configure(ip, cfg);
|
||||
CoreFactory::parse(ip, cfg);
|
||||
|
||||
auto logger = getLogger();
|
||||
auto &pcie = dynamic_cast<AxiPciExpressBridge&>(ip);
|
||||
|
|
|
@ -128,9 +128,9 @@ int AxiStreamSwitch::portNameToNum(const std::string &portName)
|
|||
return std::stoi(number);
|
||||
}
|
||||
|
||||
void AxiStreamSwitchFactory::configure(Core &ip, json_t *cfg)
|
||||
void AxiStreamSwitchFactory::parse(Core &ip, json_t *cfg)
|
||||
{
|
||||
NodeFactory::configure(ip, cfg);
|
||||
NodeFactory::parse(ip, cfg);
|
||||
|
||||
auto logger = getLogger();
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@ using namespace villas::fpga::ip;
|
|||
StreamGraph
|
||||
Node::streamGraph;
|
||||
|
||||
void NodeFactory::configure(Core &ip, json_t *cfg)
|
||||
void NodeFactory::parse(Core &ip, json_t *cfg)
|
||||
{
|
||||
CoreFactory::configure(ip, cfg);
|
||||
CoreFactory::parse(ip, cfg);
|
||||
|
||||
auto &Node = dynamic_cast<ip::Node&>(ip);
|
||||
auto logger = getLogger();
|
||||
|
|
Loading…
Add table
Reference in a new issue