diff --git a/ivl.def b/ivl.def index d4a3a199c..764976cd1 100644 --- a/ivl.def +++ b/ivl.def @@ -1,5 +1,6 @@ EXPORTS +ivl_branch_island ivl_branch_terminal ivl_design_const diff --git a/ivl_target.h b/ivl_target.h index a18163c2f..3171472e6 100644 --- a/ivl_target.h +++ b/ivl_target.h @@ -422,11 +422,17 @@ typedef const struct ivl_attribute_s*ivl_attribute_t; /* BRANCH * Branches are analog constructs, a pair of terminals that is used in - * branch access functions. Terminal-1 is the reference node for the - * purposes of the access function that accesses it. + * branch access functions. Terminal-1 is the reference node (The + * "ground") for the purposes of the access function that accesses it. + * + * SEMANTIC NOTES + * All the branches in an island are connected by terminals or by + * expressions. The island is the connection of branches that must be + * solved together. */ /* extern ivl_scope_t ivl_branch_scope(ivl_branch_t obj); */ extern ivl_nexus_t ivl_branch_terminal(ivl_branch_t obj, int idx); +extern ivl_island_t ivl_branch_island(ivl_branch_t obj); /* DELAYPATH * Delaypath objects represent delay paths called out by a specify diff --git a/ivl_target_priv.h b/ivl_target_priv.h index fd5c1338f..67f4b9800 100644 --- a/ivl_target_priv.h +++ b/ivl_target_priv.h @@ -64,6 +64,7 @@ struct ivl_design_s { */ struct ivl_branch_s { ivl_nexus_t pins[2]; + ivl_island_t island; }; /* diff --git a/t-dll-api.cc b/t-dll-api.cc index 802584fc8..60ece7ebf 100644 --- a/t-dll-api.cc +++ b/t-dll-api.cc @@ -31,6 +31,11 @@ static StringHeap api_strings; /* THE FOLLOWING ARE FUNCTIONS THAT ARE CALLED FROM THE TARGET. */ +extern "C" ivl_island_t ivl_branch_island(ivl_branch_t net) +{ + return net->island; +} + extern "C" ivl_nexus_t ivl_branch_terminal(ivl_branch_t net, int idx) { assert(idx >= 0); diff --git a/t-dll.cc b/t-dll.cc index f81f48fe4..9b343778d 100644 --- a/t-dll.cc +++ b/t-dll.cc @@ -798,6 +798,8 @@ bool dll_target::branch(const NetBranch*net) obj->pins[1] = net->pin(1).nexus()->t_cookie(); nexus_bra_add(obj->pins[1], obj, 1); + obj->island = net->get_island(); + return true; }