Cerata
A library to generate structural hardware designs
cerata::vhdl::Resolve Struct Reference

Functions to resolve VHDL-specific problems with graphs. More...

#include <resolve.h>

Static Public Member Functions

static ComponentSignalizePorts (Component *comp)
 Transforms the component, inserting signals for every instance port. More...
 

Detailed Description

Functions to resolve VHDL-specific problems with graphs.

Definition at line 24 of file resolve.h.

Member Function Documentation

◆ SignalizePorts()

Component * cerata::vhdl::Resolve::SignalizePorts ( Component comp)
static

Transforms the component, inserting signals for every instance port.

Many things are terrible in VHDL when it comes to instance ports.

  • We cannot have port-to-port connections of instances.
  • We cannot use VHDL generics on the left hand side of port map associativity lists.
  • We cannot read from output ports.
  • ...

To solve this elegantly and in a "readable" way (similar to how handcrafted designs would do it)turns out to be slightly non-trivial, as there are an incredible bunch of combinations to consider.

We choose to solve this by just inserting signals for every port onto the component and reroute all connections through the signals. This generates a massive amount of signals, but hey, at least I haven't thrown myself out of a window yet.

Parameters
compThe component to transform.
Returns
The transformed component.

Definition at line 69 of file resolve.cc.


The documentation for this struct was generated from the following files: