o3-pipeview.py (8471:18e560ba1539) | o3-pipeview.py (9188:b91e4bec7a76) |
---|---|
1#! /usr/bin/env python 2 3# Copyright (c) 2011 ARM Limited 4# All rights reserved 5# 6# The license below extends only to copyright in the software and shall 7# not be construed as granting a license to any other intellectual 8# property including but not limited to intellectual property relating --- 119 unchanged lines hidden (view full) --- 128 'color': termcap.Cyan + termcap.Reverse, 129 'shorthand': 'c'}, 130 {'name': 'retire', 131 'color': termcap.Blue + termcap.Reverse, 132 'shorthand': 'r'}] 133 # Print 134 time_width = width * cycle_time 135 base_tick = (inst['fetch'] / time_width) * time_width | 1#! /usr/bin/env python 2 3# Copyright (c) 2011 ARM Limited 4# All rights reserved 5# 6# The license below extends only to copyright in the software and shall 7# not be construed as granting a license to any other intellectual 8# property including but not limited to intellectual property relating --- 119 unchanged lines hidden (view full) --- 128 'color': termcap.Cyan + termcap.Reverse, 129 'shorthand': 'c'}, 130 {'name': 'retire', 131 'color': termcap.Blue + termcap.Reverse, 132 'shorthand': 'r'}] 133 # Print 134 time_width = width * cycle_time 135 base_tick = (inst['fetch'] / time_width) * time_width |
136 num_lines = ((inst['retire'] - inst['fetch']) / time_width) + 1 | 136 # Timeline shorter then time_width is printed in compact form where 137 # the print continues at the start of the same line. 138 if ((inst['retire'] - inst['fetch']) < time_width): 139 num_lines = 1 # compact form 140 else: 141 num_lines = ((inst['retire'] - base_tick) / time_width) + 1 142 |
137 curr_color = termcap.Normal 138 for i in range(num_lines): 139 start_tick = base_tick + i * time_width 140 end_tick = start_tick + time_width 141 if num_lines == 1: # compact form 142 end_tick += (inst['fetch'] - base_tick) 143 events = [] 144 for stage_idx in range(len(stages)): --- 109 unchanged lines hidden --- | 143 curr_color = termcap.Normal 144 for i in range(num_lines): 145 start_tick = base_tick + i * time_width 146 end_tick = start_tick + time_width 147 if num_lines == 1: # compact form 148 end_tick += (inst['fetch'] - base_tick) 149 events = [] 150 for stage_idx in range(len(stages)): --- 109 unchanged lines hidden --- |