diff --git a/README.md b/README.md index 32dc2ea401c314a1af54f95339ffb624b12357fb..8a4764bae1f3f98bfa2e9d081317f9309f51ae3c 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 df676814b03b3aeb3f7fadaae8eb3e11ee50493d..b012c8e81d1e6870f263b8c58cdc7d3e915e0d54 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 aa424a54a6fa4d16be1451eed1b9f395a105a2da..9acabdf9c8b154b079588597085b7e55e2fd5836 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