 |
Cerata
A library to generate structural hardware designs
|
20 #include "cerata/node.h"
62 std::shared_ptr<Object>
Copy()
const override;
66 std::string
ToString()
const override;
70 std::shared_ptr<Port>
port(
const std::string &name,
71 const std::shared_ptr<Type> &type,
75 std::shared_ptr<Port>
port(
const std::shared_ptr<Type> &type,
std::shared_ptr< Object > Copy() const override
Deep-copy the port.
Port & Reverse()
Invert the direction of this port. Removes any edges.
A terminator structure to enable terminator sanity checks.
static std::string str(Dir dir)
Convert a Dir to a human-readable string.
Dir dir() const
Return the direction of this terminator.
Contains every Cerata class, function, etc...
Term(Dir dir)
Construct a new Term.
Class to mark nodes with information for synchronous designs, e.g. clock domain.
std::string name() const
Return the name of the object.
A single-input, multiple-outputs node.
std::string ToString() const override
Return a human-readable string of this node.
static Dir Reverse(Dir dir)
Return the inverse of a direction.
Port(std::string name, std::shared_ptr< Type > type, Term::Dir dir, std::shared_ptr< ClockDomain > domain)
Construct a new port.
bool IsOutput()
Return true if this Term is an output, false otherwise.
std::shared_ptr< ClockDomain > default_domain()
Return a static default clock domain.
std::shared_ptr< ClockDomain > domain() const
Return the clock domain to which something is synchronized.
Dir dir_
The direction of this terminator.
A port is a terminator node on a graph.
bool IsInput()
Return true if this Term is an input, false otherwise.
std::shared_ptr< Port > port(const std::string &name, const std::shared_ptr< Type > &type, Term::Dir dir, const std::shared_ptr< ClockDomain > &domain)
Make a new port with some name, type and direction.
Type * type() const
Return the node Type.