Skip to content
Snippets Groups Projects
Commit af40db93 authored by cheba37's avatar cheba37
Browse files

Changes to print values nicer

parent 23676874
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,7 @@ The `OverlapSave` object (`o`) provides the following attributes to analyze the ...@@ -56,7 +56,7 @@ The `OverlapSave` object (`o`) provides the following attributes to analyze the
#### `o.first_o_delays` #### `o.first_o_delays`
- **Description:** A list of delays required for output row $p \in \{0,1,\dots, P-1\}$. - **Description:** A list of delays required for output row $p \in \{0,1,\dots, P-1\}$.
- **Type:** `list` - **Type:** `list`
- **Example:** `[1, 1, 0, 0]` - **Example:** `[2, 2, 1, 1, 0, 0]`
#### `o.total` #### `o.total`
- **Description:** Total delays used for the setup. - **Description:** Total delays used for the setup.
......
...@@ -29,7 +29,7 @@ class OverlapSave_final(): ...@@ -29,7 +29,7 @@ class OverlapSave_final():
self.final_delay() 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() self.total = self.get_optimized_delay_final()
if Code == True: if Code == True:
self.generate_code_final(B) self.generate_code_final(B)
......
...@@ -30,14 +30,27 @@ class OverlapSave(): ...@@ -30,14 +30,27 @@ class OverlapSave():
self.first_i = dict() self.first_i = dict()
self.first_i_delays = dict() self.first_i_delays = dict()
self.first_o_delays = dict() self.first_o_delays = dict()
self.first_o_delays_tmp = [0]*self.P
self.first_o = dict() self.first_o = dict()
self.retiming_delay() self.retiming_delay()
# print('retiming delays')
self.total = self.get_total() self.total = self.get_total()
print("Delays = {}".format(self.total)) # print("Delays = {}".format(self.total))
if Code == True: if Code == True:
self.generate_code(B) 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): def retiming_delay(self):
self.first_i_delays = [0]*self.L self.first_i_delays = [0]*self.L
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment