Commit Graph

37 Commits

Author SHA1 Message Date
Adam Goldsmith bd06a5c208 Make verbose printing closer to reference simulator 2016-04-28 20:53:59 -04:00
Jacob 189807e834 Reordered functions.
Moved functions into labelled sections.
Made function definition order consistent with prototype order.
Todo: Add section descriptions, break out additional functions, add doc comments.
2016-04-28 12:03:18 -04:00
Jacob 927b7bd6a7 Renamed set_indices to num_sets. Commented out extraneous VERBOSE print_cache call. 2016-04-28 01:46:49 -04:00
Adam Goldsmith ca9f6ddc77 Improve verbose printing 2016-04-28 01:55:38 -04:00
Adam Goldsmith e457f4dee0 Fix cache_access 2016-04-28 01:55:38 -04:00
Adam Goldsmith 9997f58137 Mostly functional cache_access 2016-04-28 01:55:38 -04:00
Adam Goldsmith 27b90ae3ed Add missing function prototypes 2016-04-28 01:55:38 -04:00
Adam Goldsmith 8548d6ede5 Move print_cache into main loop 2016-04-28 01:55:38 -04:00
Adam Goldsmith 60fc5d1f0a Use struct for score, add function to increment from char 2016-04-28 01:55:38 -04:00
Adam Goldsmith a31fde98e4 Add find_line 2016-04-28 01:55:38 -04:00
Jacob 88240dab06 Added make test, which uses -Wextra, and doesn't use -Werror. 2016-04-27 22:29:16 -04:00
Adam Goldsmith 29e74799e3 Actually use hits, misses and evictions in printSummary 2016-04-27 22:26:04 -04:00
Adam Goldsmith 92ae2a0a2b Add function to print cache 2016-04-27 22:16:16 -04:00
Adam Goldsmith c26d27db9d Fix number of sets/lines created 2016-04-27 22:16:01 -04:00
Jacob b556be1622 Implemented linked_lines and modified cache creation/deletion.
Replaced struct line_s and typedef line with linked_line_s and linked_line.
Added make_set() and free_set().
Modified make_cache() and free_cache() to call make_set() and free_set().
2016-04-27 21:24:53 -04:00
Jacob 7f254fd50b Fixed types.
size_t -> long
uint8_t -> uint8_t or int
2016-04-27 18:18:30 -04:00
Adam Goldsmith acb6900502 Properly close file 2016-04-27 16:15:02 -04:00
Adam Goldsmith 2fc771d08e Add cache allocation and free functions 2016-04-27 16:13:27 -04:00
Jacob d16bf870f6 Ignoring test files, emacs drafts, and emacs buffers. 2016-04-27 16:00:51 -04:00
Jacob fb6c9e3a27 Various minor changes.
Renamed lines to num_lines.
Removed trailing whitespaces.
Fixed some indentation and comments.
Fixed usage string.
2016-04-27 15:55:27 -04:00
Jacob 50ee8769fa See previous commit.
I did that slightly wrong, not quite sure how. But this one is the most-changed, and all the notes are in the last commit.
2016-04-27 13:41:51 -04:00
Jacob 3b97949150 Implemented size calculation. Various minor changes.
Replaced repeated "printf(...);exit(1)" with bad_usage_error().
Added bits_to_size().
Reorganized code above main().
Added file doc comment.
Expanded argument-printing statement for better testing.
2016-04-27 13:40:58 -04:00
Adam Goldsmith 4f09ea0249 Add basic file parsing 2016-04-27 12:12:11 -04:00
Jacob 8d8568fce1 Fixed compilation issues.
- Removed unused variable argflags.
- Fixed variable name (index_bits -> set_index_bits).
2016-04-27 12:07:51 -04:00
Jacob 0fc77a6828 Moved print_usage and parse_int_arg below main. 2016-04-27 12:03:51 -04:00
Jacob 490d8cafde Restored old method of checking for presence of arguments. 2016-04-27 12:00:34 -04:00
Jacob dc67c24899 New and improved argument parsing with getopt.
Added checking that all arguments were provided.
Switched many variables to use size_t, and int8_t where appropriate.
Moved opening braces on to previous lines, except function braces.
Renamed set_bits to more-accurate index_bits.
2016-04-27 12:00:34 -04:00
Adam Goldsmith 0a660b8939 Convert spaces to tabs 2016-04-26 10:44:50 -04:00
Adam Goldsmith 03d08c71af Move verbose to global VERBOSE 2016-04-26 10:31:37 -04:00
Adam Goldsmith 0b947b701f Improve int argument parsing 2016-04-26 10:22:34 -04:00
Adam Goldsmith 70b79a8b56 Add .gitignore 2016-04-26 10:22:15 -04:00
Jacob 0a3f87840d Added usage string. 2016-04-26 10:03:04 -04:00
Adam Goldsmith 210eeb05dd Correct python version in driver.py 2016-04-25 23:59:12 -04:00
Adam Goldsmith 2a8124df09 Added basic argument parsing 2016-04-25 17:07:24 -04:00
Adam Goldsmith 568fa2a6f8 More trailing whitespace 2016-04-24 20:32:36 -04:00
Adam Goldsmith 483fa8458d delete trailing newlines 2016-04-24 20:12:20 -04:00
Adam Goldsmith b4e31f122a Initial Commit 2016-04-24 20:07:46 -04:00