Skip to content

Commit a109d33

Browse files
committed
Merge branch 'develop'
2 parents 0747703 + e457552 commit a109d33

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

cachesimulator/simulator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
REF_COL_NAMES = ('WordAddr', 'BinAddr', 'Tag', 'Index', 'Offset', 'Hit/Miss')
1212
# The minimum number of bits required per group in a prettified binary string
1313
MIN_BITS_PER_GROUP = 3
14+
# The default column width of the displayed results table
15+
DEFAULT_TABLE_WIDTH = 80
1416

1517

1618
# Retrieves the binary address of a certain length for a base-10 word address
@@ -305,7 +307,8 @@ def run_simulation(num_blocks_per_set, num_words_per_block, cache_size,
305307

306308
# The character-width of all displayed tables
307309
# Attempt to fit table to terminal width, otherwise use default of 80
308-
table_width = shutil.get_terminal_size((80, 20)).columns
310+
table_width = max((shutil.get_terminal_size(
311+
(DEFAULT_TABLE_WIDTH, 20)).columns, DEFAULT_TABLE_WIDTH))
309312

310313
print()
311314
display_addr_refs(refs, ref_statuses, table_width)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_long_description():
1616

1717
setup(
1818
name='cache-simulator',
19-
version='1.0.1r1',
19+
version='1.0.2',
2020
description='A processor cache simulator for the MIPS ISA',
2121
long_description=get_long_description(),
2222
url='https://github.com/caleb531/cache-simulator',

0 commit comments

Comments
 (0)