yosys-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
connect.cc File Reference
#include "kernel/register.h"
#include "kernel/rtlil.h"
#include "kernel/sigtools.h"
#include "kernel/celltypes.h"
#include "kernel/log.h"
+ Include dependency graph for connect.cc:

Go to the source code of this file.

Data Structures

struct  ConnectPass
 

Functions

USING_YOSYS_NAMESPACE static
PRIVATE_NAMESPACE_BEGIN void 
unset_drivers (RTLIL::Design *design, RTLIL::Module *module, SigMap &sigmap, RTLIL::SigSpec &sig)
 

Variables

ConnectPass ConnectPass
 

Function Documentation

USING_YOSYS_NAMESPACE static PRIVATE_NAMESPACE_BEGIN void unset_drivers ( RTLIL::Design design,
RTLIL::Module module,
SigMap sigmap,
RTLIL::SigSpec sig 
)
static

Definition at line 29 of file connect.cc.

30 {
31  CellTypes ct(design);
32 
33  RTLIL::Wire *dummy_wire = module->addWire(NEW_ID, sig.size());
34 
35  for (auto &it : module->cells_)
36  for (auto &port : it.second->connections_)
37  if (ct.cell_output(it.second->type, port.first))
38  sigmap(port.second).replace(sig, dummy_wire, &port.second);
39 
40  for (auto &conn : module->connections_)
41  sigmap(conn.first).replace(sig, dummy_wire, &conn.first);
42 }
CellTypes ct
Definition: opt_clean.cc:33
int size() const
Definition: rtlil.h:1019
std::vector< RTLIL::SigSig > connections_
Definition: rtlil.h:597
bool cell_output(RTLIL::IdString type, RTLIL::IdString port)
Definition: celltypes.h:193
RTLIL::Wire * addWire(RTLIL::IdString name, int width=1)
Definition: rtlil.cc:1331
#define NEW_ID
Definition: yosys.h:166
std::map< RTLIL::IdString, RTLIL::Cell * > cells_
Definition: rtlil.h:596

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation