summaryrefslogtreecommitdiffstats
path: root/src/misc/tim/timBox.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-11-24 19:29:42 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2014-11-24 19:29:42 -0800
commit6ed334d41baf90f73b2c3278853ce4b08c8fb08e (patch)
tree226fd3e24899e26305c1aa37656b4b2c262eddc8 /src/misc/tim/timBox.c
parent8feac565092020a23a5789a530d94a2168e6ddcd (diff)
downloadabc-6ed334d41baf90f73b2c3278853ce4b08c8fb08e.tar.gz
abc-6ed334d41baf90f73b2c3278853ce4b08c8fb08e.tar.bz2
abc-6ed334d41baf90f73b2c3278853ce4b08c8fb08e.zip
Improvements to handling boxes and flops.
Diffstat (limited to 'src/misc/tim/timBox.c')
-rw-r--r--src/misc/tim/timBox.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/misc/tim/timBox.c b/src/misc/tim/timBox.c
index bff7b39c..a1526673 100644
--- a/src/misc/tim/timBox.c
+++ b/src/misc/tim/timBox.c
@@ -126,6 +126,22 @@ int Tim_ManBoxInputFirst( Tim_Man_t * p, int iBox )
/**Function*************************************************************
+ Synopsis [Returns the last input of the box.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+int Tim_ManBoxInputLast( Tim_Man_t * p, int iBox )
+{
+ return Tim_ManBox(p, iBox)->Inouts[0] + Tim_ManBoxInputNum(p, iBox) - 1;
+}
+
+/**Function*************************************************************
+
Synopsis [Returns the first output of the box.]
Description []
@@ -142,6 +158,22 @@ int Tim_ManBoxOutputFirst( Tim_Man_t * p, int iBox )
/**Function*************************************************************
+ Synopsis [Returns the last output of the box.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+int Tim_ManBoxOutputLast( Tim_Man_t * p, int iBox )
+{
+ return Tim_ManBox(p, iBox)->Inouts[Tim_ManBox(p, iBox)->nInputs] + Tim_ManBoxOutputNum(p, iBox) - 1;
+}
+
+/**Function*************************************************************
+
Synopsis [Returns the number of box inputs.]
Description []