jhunterh / Cache-Hierarchy-Simulation-Tool

This tool is a highly configurable cache hierarchy simulator for use in computer architecture research and study.
0 stars 0 forks source link

Create cleaner way to instantiate cache #26

Open CapdinCrando opened 4 months ago

CapdinCrando commented 4 months ago

Currently there are 7 cache constructor inputs. It may be worthwhile to put certain ones in a struct, or move some to setter function.

jhunterh commented 4 months ago

Might be a good case for the builder pattern. https://refactoring.guru/design-patterns/builder

CapdinCrando commented 3 months ago

Looks like a good solution. We could also potentially have the builder choose Cache type (Set Associative), etc, based on called commands.