From af40db932b991d4fec47a2e33cedee40c7794370 Mon Sep 17 00:00:00 2001
From: cheba37 <cheolyoung.bae@liu.se>
Date: Wed, 22 Jan 2025 17:24:40 +0100
Subject: [PATCH] Changes to print values nicer

---
 README.md    |  2 +-
 ols_final.py |  2 +-
 ols_first.py | 17 +++++++++++++++--
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 32dc2ea..8a4764b 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,7 @@ The `OverlapSave` object (`o`) provides the following attributes to analyze the
 #### `o.first_o_delays`
 - **Description:** A list of delays required for output row $p \in \{0,1,\dots, P-1\}$.
 - **Type:** `list`
-- **Example:** `[1, 1, 0, 0]`
+- **Example:** `[2, 2, 1, 1, 0, 0]`
 
 #### `o.total`
 - **Description:** Total delays used for the setup.
diff --git a/ols_final.py b/ols_final.py
index df67681..b012c8e 100644
--- a/ols_final.py
+++ b/ols_final.py
@@ -29,7 +29,7 @@ class OverlapSave_final():
         
         self.final_delay()        
         
-        print("final delays = {}".format(self.get_optimized_delay_final()))
+        # print("final delays = {}".format(self.get_optimized_delay_final()))
         self.total = self.get_optimized_delay_final()
         if Code == True:
             self.generate_code_final(B)
diff --git a/ols_first.py b/ols_first.py
index aa424a5..9acabdf 100644
--- a/ols_first.py
+++ b/ols_first.py
@@ -30,14 +30,27 @@ class OverlapSave():
         self.first_i = dict()
         self.first_i_delays = dict()
         self.first_o_delays = dict()
+        self.first_o_delays_tmp = [0]*self.P
         self.first_o = dict()
         
         self.retiming_delay()
-        # print('retiming delays')
         self.total = self.get_total()
-        print("Delays = {}".format(self.total))
+        # print("Delays = {}".format(self.total))
         if Code == True:
             self.generate_code(B)
+            
+        # To print whole output port
+        tmpI = math.ceil(self.P/self.L)
+        for p in range(self.P):
+            if p < self.P-self.L:
+                pp = (tmpI*self.L-self.P+p)%self.L
+                Dp = round(self.first_o_delays[pp])+math.ceil((self.P-self.L-p)/self.L)*self.C
+                self.first_o_delays_tmp[p] = Dp
+            else:
+                pp = p-(self.P-self.L)
+                Dp = round(self.first_o_delays[pp])
+                self.first_o_delays_tmp[p] = self.first_o_delays[pp]
+        self.first_o_delays = self.first_o_delays_tmp
         
     def retiming_delay(self):
         self.first_i_delays = [0]*self.L
-- 
GitLab