> On Aug. 18, 2015, 11:09 p.m., Andreas Hansson wrote: > > configs/learning_gem5/part1/caches.py, line 57 > > <http://reviews.gem5.org/r/2971/diff/3/?file=49074#file49074line57> > > > > There is an assymmetry here between calling connectCPU with a port, vs > > connectBus with the actual crossbar. > > > > Perhaps move connectCPU to I and D Cache subclasses and connect to the > > appropriate port? > > > > I am also not sure about the value of hiding this. It definitley does > > not save any typing. Also, in quite a few places you still to the porta = > > portb explicitly. Is there a reason for not simply doing it all explicitly?
Good point about the asymmetry. I've fixed it. Interestingly, I think I had it the way you suggested the first time. I'm not sure why I changed my mind. As far as hiding it, I agree that in the particular situation it doesn't make much of a difference. However, I'm trying to make a bigger point that encapsulation is good. IMO pushing things like this into classes is what will make the gem5 config scripts tractable. From the "Learning gem5" text: "However, connecting lots of objects up to complex interconnects can make configuration files quickly grow and become unreadable." - Jason ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/2971/#review7009 ----------------------------------------------------------- On Aug. 18, 2015, 4:54 p.m., Jason Lowe-Power wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/2971/ > ----------------------------------------------------------- > > (Updated Aug. 18, 2015, 4:54 p.m.) > > > Review request for Default. > > > Repository: gem5 > > > Description > ------- > > Changeset 10923:8f90545cd9fe > --------------------------- > config: Add configs scripts used in Learning gem5 > > Added a new directory in configs (learning_gem5) to hold the scripts that are > used in the book. See http://lowepower.com/jason/learning_gem5/ for a working > copy. For now, only the scripts in Part 1: Getting started with gem5 > have been added. A separate patch adds tests for these scripts. > > > Diffs > ----- > > configs/common/SimpleOpts.py PRE-CREATION > configs/learning_gem5/README PRE-CREATION > configs/learning_gem5/part1/caches.py PRE-CREATION > configs/learning_gem5/part1/simple.py PRE-CREATION > configs/learning_gem5/part1/two_level.py PRE-CREATION > > Diff: http://reviews.gem5.org/r/2971/diff/ > > > Testing > ------- > > > Thanks, > > Jason Lowe-Power > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
