Commit graph

64 commits

Author SHA1 Message Date
Nathan Binkert abc76f20cb Major changes to how SimObjects are created and initialized. Almost all
creation and initialization now happens in python.  Parameter objects
are generated and initialized by python.  The .ini file is now solely for
debugging purposes and is not used in construction of the objects in any
way.

--HG--
extra : convert_revision : 7e722873e417cb3d696f2e34c35ff488b7bff4ed
2007-07-23 21:51:38 -07:00
Steve Reinhardt 7cd6c7ee05 Fix & tweak DPRINTFs for tracediff w/new cache code.
Note that we should *not* print pointer values in DPRINTFs as
these needlessly clutter tracediff output.

--HG--
extra : convert_revision : 25a448f1b3ac8d453a717a104ad6dc0112fb30bb
2007-07-14 11:48:30 -07:00
Vincentius Robby 4a7bc06553 Minor error.
--HG--
extra : convert_revision : 514032e21c8861f20fcbcae7204e132088cc7dbc
2007-06-20 15:04:36 -04:00
Vincentius Robby d540dde5b4 Removed "adding instead of dividing" trick.
Caused slowdown in performance instead of speeding up.

src/cpu/base.cc:
    Removed "adding instead of dividing" trick.
src/mem/bus.cc:
    Fixed spelling in comments.
    Removed "adding instead of dividing" trick.

--HG--
extra : convert_revision : 65a736f4f09a64e737dc7aeee53b117976330488
2007-06-20 14:54:17 -04:00
Nathan Binkert fc4ab050b4 Add a startup function that will fast forward to the right clock edge
using a divide in order to not loop forever after resuming from a checkpoint

--HG--
extra : convert_revision : 4bbc70b1be4e5c4ed99d4f88418ab620d5ce475a
2007-06-09 23:01:47 -07:00
Steve Reinhardt 41241799ae Change getDeviceAddressRanges to use bool for snoop arg.
--HG--
extra : convert_revision : 832e52ba80cbab2f5bb6d5b5977a499d41b4d638
2007-05-21 23:36:09 -07:00
Ali Saidi ff55888575 undo my previous bus change, it can make the bus deadlock.. so it still constantly reschedules itself
--HG--
extra : convert_revision : b5ef1aa0a6a2e32bd775d2dbcad9cd9505ad9b78
2007-05-09 22:23:01 -04:00
Ali Saidi 0dfc29a023 fix partial writes with a functional memory hack
figure out the block size from devices attached to the bus otherwise use a default block size when no devices that care are attached

configs/common/FSConfig.py:
src/mem/bridge.cc:
src/mem/bridge.hh:
src/python/m5/objects/Bridge.py:
    fix partial writes with a functional memory hack
src/mem/bus.cc:
src/mem/bus.hh:
src/python/m5/objects/Bus.py:
    figure out the block size from devices attached to the bus otherwise use a default block size when no devices that care are attached
src/mem/packet.cc:
    fix WriteInvalidateResp to not be a request that needs a response since it isn't
src/mem/port.hh:
    by default return 0 for deviceBlockSize instead of panicing. This makes finding the block size the bus should use easier

--HG--
extra : convert_revision : 3fcfe95f9f392ef76f324ee8bd1d7f6de95c1a64
2007-05-07 14:42:03 -04:00
Ali Saidi d0ea8ff088 The MemoryObject tha owns a port should delete it if it so chooses when deletePortRefs() is called on it with that port as a parameter.
In this way a MemoryObject can keep a functional port around and give it to anyone who wants to do functional accesses rather
than creating a new one each time.

src/mem/bus.cc:
src/mem/bus.hh:
src/mem/cache/cache_impl.hh:
    only keep around one func port we give to anyone who wants it. Otherwise we can run out of port ids reasonably quickly if
    a lot of functional accesses are happening (e.g. remote debugging, dprintk, etc)

--HG--
extra : convert_revision : 6a9e3e96f51cedaab6de1b36cf317203899a3716
2007-04-04 13:56:38 -04:00
Kevin Lim 047f77102b Merge ktlim@zizzer:/bk/newmem
into  zamp.eecs.umich.edu:/z/ktlim2/clean/tmp/clean2

src/cpu/base_dyn_inst.hh:
    Hand merge.  Line is no longer needed because it's handled in the ISA.

--HG--
extra : convert_revision : 0be4067aa38759a5631c6940f0167d48fde2b680
2007-03-23 13:20:19 -04:00
Kevin Lim 78de00091b 3 memory system fixes:
1. Update packet's flags properly when a snoop happens
2. Don't allow accesses to read a block's data if the block has outstanding MSHRs.  This avoids a RAW hazard in MP systems that the memory system was not detecting properly earlier (a write required a block to upgrade, and while the upgrade was outstanding, a read came along and read old data).
3. Update MSHR's request upon a response being handled.  If the MSHR has more targets than it can respond to in one cycle, then its request must be properly updated to the new head of the targets list.

src/mem/bus.cc:
    Update packet's flags properly upon snoop.
src/mem/cache/cache_impl.hh:
    Be sure to not allow accesses to a block with outstanding MSHRs.
src/mem/cache/miss/miss_queue.cc:
    Update MSHR's request upon a response being handled.

--HG--
extra : convert_revision : 76a9abc610ca3f1904f075ad21637148a41982d6
2007-03-23 13:09:37 -04:00
Ali Saidi 027dfa01e6 stop m5 from leaking like a sieve
don't create a new physPort/virtPort every time activateContext() is called
add the ability to tell a memory object to delete it's reference to a port and a method to have a port call deletePortRefs()
on the port owner as well as delete it's peer
still need to stop calling connectMemoPorts() every time activateContext() is called or we'll overflow the bus id and panic

src/cpu/thread_state.cc:
    if we hav ea (phys|virt)Port don't create a new on, have it delete it's peer and then reuse it
src/mem/bus.cc:
src/mem/bus.hh:
    add ability to delete a port by usig a hash_map instead of an array to store port ids
    add a function to do deleting
src/mem/cache/cache.hh:
src/mem/cache/cache_impl.hh:
src/mem/mem_object.cc:
src/mem/mem_object.hh:
    adda function to delete port references from a memory object
src/mem/port.cc:
src/mem/port.hh:
    add a removeConn function that tell the owener to delete any references to the port and then deletes its peer

--HG--
extra : convert_revision : 272f0c8f80e1cf1ab1750d8be5a6c9aa110b06a4
2007-03-08 18:57:15 -05:00
Steve Reinhardt 23d970e6b9 More DPRINTF cleanup.
--HG--
extra : convert_revision : db89cea42b46476d19333038522a6c144eafdab1
2007-02-06 23:53:48 -08:00
Steve Reinhardt 51e54f519d Minor DPRINTF fixes.
--HG--
extra : convert_revision : 41956c9a480163ecac7807982215027e8ff1a4a9
2007-02-06 21:53:05 -08:00
Ali Saidi 4943d58272 Use my range_map to speed up findPort() in the bus. The snoop code could still use some work.
--HG--
extra : convert_revision : ba0a68bd378d68e4ebd80a101b965d36c8be1db9
2006-12-15 01:49:41 -05:00
Ron Dreslinski 28fd4ab39f Do a functional access to levels above on a read as a temporary solution for L2's in FS
Fix a small writeback bug when missing in the L2 in atomic mode

src/mem/bus.cc:
    Fix a comment to make sense
src/mem/cache/cache_impl.hh:
    Do a functional access to levels above on a read as a temporary solution for L2's in FS
    Also fix a small writeback miss in L2 issue
src/mem/cache/coherence/simple_coherence.hh:
src/mem/cache/coherence/uni_coherence.cc:
src/mem/cache/coherence/uni_coherence.hh:
    Do a functional access to levels above on a read as a temporary solution for L2's in FS
tests/quick/00.hello/ref/alpha/linux/o3-timing/m5stats.txt:
tests/quick/00.hello/ref/alpha/linux/simple-timing/m5stats.txt:
tests/quick/01.hello-2T-smt/ref/alpha/linux/o3-timing/m5stats.txt:
    Update ref's for writeback changes

--HG--
extra : convert_revision : 937febd577b16b7fd97a5a68acaf53541828a251
2006-11-22 20:20:38 -05:00
Ron Dreslinski c32f3056f9 Fix bugs around uni-coherence invalidates being propogated properly.
src/mem/bus.cc:
    Make it so that invalidates being sent from the responder up don't call the responder
    but they should also not Panic.
src/mem/packet.hh:
    If we don't have data in the packet, don't call deleteData:
    Example: InvalidateRequests never have data.

--HG--
extra : convert_revision : 18766bc9f3bb4d852ac651d094254d347abd1634
2006-11-14 17:15:05 -05:00
Ron Dreslinski 8155e61a60 Update atomic and functional paths for snoops as well
--HG--
extra : convert_revision : 566d73438efb87ca683e4dee23454d880db3dfc7
2006-11-14 01:38:42 -05:00
Ron Dreslinski 4135dd48ed Update bus bridges now that snoop ranges are passed properly
src/mem/bridge.cc:
    Update brdiges, now that snoop addresses are properly forwarded.
    Bus bridge should only handle snoops on the second phase (SNOOP_COMMIT)
src/mem/bus.cc:
src/mem/bus.hh:
    Make sure if a busBridge has access to both things that snoop and things that respond it only takes the request once

--HG--
extra : convert_revision : 26cc9ee4429be45d4476fa435e0e9a54843c2509
2006-11-14 01:12:52 -05:00
Ron Dreslinski 9b6fd56dd5 Fix some errors related to snooping and functional access in the bus
src/mem/bus.cc:
    Only call snoop once per port, need to fix it so snoop ranges that overlap aren't added to list
    Functional accesses that call snoop and it goes to a higher bus may change the src, reset it after each snoop.

--HG--
extra : convert_revision : 7276059c798a85cb9d138ccc5531298ecd055c13
2006-11-13 21:33:01 -05:00
Ron Dreslinski 6c5c51338d Fix problems with snoop ranges not working properly on functional accesses
src/mem/bus.cc:
    Actually return the snoop list when asked for it.
    Don't get stuck in infinite functional loops

--HG--
extra : convert_revision : 8e6dafbd10b30d48d28b6b5d4b464e8e8f6a3ddc
2006-11-13 19:56:34 -05:00
Kevin Lim 21f43bfc4b Be sure to populate the packet's finishTime field in the atomic timing case.
--HG--
extra : convert_revision : ef34818eb2dea5b3a8e754bf56745a7cd2497bf0
2006-11-09 11:37:26 -05:00
Kevin Lim 0b0d5a282a Draining fixes.
src/cpu/o3/cpu.cc:
    Handle draining properly when CPU isn't actually being used.
src/cpu/simple/atomic.cc:
    Be sure to set status properly when draining.
src/mem/bus.cc:
    Fix for draining.

--HG--
extra : convert_revision : d9796e6693e974f022159029fc9743c49a970c8f
2006-11-09 11:33:44 -05:00
Kevin Lim 8ba73da056 Fix up bus draining and add draining to the caches.
src/mem/bus.cc:
    Fix up draining to work properly.
src/mem/bus.hh:
    Initialize drainEvent to NULL.
src/mem/cache/base_cache.cc:
src/mem/cache/base_cache.hh:
    Add draining to the caches.

--HG--
extra : convert_revision : 3082220a75d50876f10909f9f99bec535889f818
2006-11-07 14:25:54 -05:00
Kevin Lim e71ccde663 Merge ktlim@zizzer:/bk/newmem
into  zamp.eecs.umich.edu:/z/ktlim2/clean/newmem-busfix

--HG--
extra : convert_revision : a9a41e2c292bd95aa148e1cf4d9a77c0622a462b
2006-11-02 15:20:47 -05:00
Kevin Lim 45363ea658 Have bus use the BadAddress device to handle bad addresses. The O3 CPU should be able to boot into Linux with caches on after this change.
src/mem/bus.cc:
src/mem/bus.hh:
    Bus now will be setup with a default responder, unless the user overrides it.  This default responder should return BadAddress if no matching port is found.
src/python/m5/objects/Bus.py:
    Bus now has a default responder for FS mode if the user doesn't override it.  It returns BadAddress if no matching port is found.
src/python/m5/objects/Tsunami.py:
    Add bad address device.  Also record when the user has specified their own default responder.

--HG--
extra : convert_revision : 59070477ae313ee711b2d59baa2369c9a91c5b85
2006-11-02 15:20:37 -05:00
Gabe Black 8dbab9f701 Added code to handle draining.
--HG--
extra : convert_revision : 3861f553bde5865cd21a8a58a4c410896726f0a3
2006-11-01 19:00:49 -05:00
Nathan Binkert a4c6f0d69e Use PacketPtr everywhere
--HG--
extra : convert_revision : d9eb83ab77ffd2d725961f295b1733137e187711
2006-10-20 00:10:12 -07:00
Nathan Binkert b937d54510 Fix compile of m5.fast
--HG--
extra : convert_revision : a8a37c318e55e48e697e4aaba339328f000b3f60
2006-10-19 23:34:59 -07:00
Ali Saidi 0615d92d33 small bus updates for functional accesses
--HG--
extra : convert_revision : c7a6b199c74ed4b4ffab14bbffb51e72d75b7742
2006-10-12 15:02:25 -04:00
Ron Dreslinski 388d484269 Make default ID unique (not broadcast)
Fix a segfault associated with DefaultId

src/mem/bus.cc:
    Handle a segfault in the bus when DefaultPort was being used
src/mem/bus.hh:
    Make the Default ID more unique (it overlapped with Broadcast ID)

--HG--
extra : convert_revision : 9182805c5cf4d9fe004e6c5be8547a8f41ed7bfe
2006-10-11 20:54:06 -04:00
Ron Dreslinski 3c7e0ec752 Fix bus in FS mode.
src/mem/bus.cc:
    Add debugging statement
src/mem/bus.hh:
    Fix implementation of bus for subsequent recvTimings while handling a retry request.
src/mem/tport.cc:
    Rework timing port to retry properly

--HG--
extra : convert_revision : fbfb5e8b4a625e49c6cd764da1df46a4f336b1b2
2006-10-11 19:25:48 -04:00
Ron Dreslinski 567afbf6ce More cache fixes. Atomic coherence now works as well.
src/cpu/memtest/memtest.cc:
src/cpu/memtest/memtest.hh:
    Make Memtester able to test atomic as well
src/mem/bus.cc:
src/mem/bus.hh:
    Handle atomic snoops properly for cache->cache transfers
src/mem/cache/cache_impl.hh:
    Debug output.
    Clean up memleak in atomic mode.
    Set hitLatency.
    Still need to send back reasonable number for atomic return value.
src/mem/packet.cc:
    Add command strings for new commands
src/python/m5/objects/MemTest.py:
    Add param to test atomic memory.

--HG--
extra : convert_revision : 43f880e29215776167c16ea90793ebf8122c785b
2006-10-11 18:28:33 -04:00
Gabe Black 7767f5af73 Don't call recvRetry if the bus is busy anyway. This takes care of a corner case as well when dealing with grants that aren't used.
--HG--
extra : convert_revision : 38f7ef1b41477fb2a2438387ef3a81cccd3e7a8a
2006-10-11 00:54:47 -04:00
Gabe Black a139e4394d Make the bus work if the other sides recvRetry doesn't call sendTiming for some reason.
--HG--
extra : convert_revision : e722ddb0354a5c021dc7c44a3e2f0a64e962442b
2006-10-11 00:26:21 -04:00
Ron Dreslinski ca694ca7b1 Merge zizzer:/n/wexford/x/gblack/m5/newmem_bus
into  zazzer.eecs.umich.edu:/z/rdreslin/m5bk/newmemcleanest

src/mem/bus.cc:
    SCCS merged

--HG--
extra : convert_revision : 18608114350c466a56ab499ae523b01fcb2f6ef2
2006-10-10 23:37:14 -04:00
Gabe Black 8353b1e21f Make the bus is occupied for none broadcast packets as well.
--HG--
extra : convert_revision : aef3c625172e92be8f29c4c57077fefee43046bb
2006-10-10 23:28:33 -04:00
Ron Dreslinski 477a3b0b61 Merge zizzer:/n/wexford/x/gblack/m5/newmem_bus
into  zazzer.eecs.umich.edu:/z/rdreslin/m5bk/newmemcleanest

src/mem/bus.cc:
    SCCS merged

--HG--
extra : convert_revision : eaae105025635c37af06cf72bb061ce82def9dc9
2006-10-10 22:52:52 -04:00
Ron Dreslinski 1de8eae43a Debugging info
src/base/traceflags.py:
    Add new flags for cacheport
src/mem/bus.cc:
    Add debugging info
src/mem/cache/base_cache.cc:
    Add debuggin info

--HG--
extra : convert_revision : a6c4b452466a8e0b50a86e886833cb6e29edc748
2006-10-10 22:50:36 -04:00
Gabe Black 59dd317cb5 Put in an accounting mechanism and an assert to make sure something doesn't try to send another packet while it's still waiting for the bus.
--HG--
extra : convert_revision : 4a2b83111e49f71ca27e05c98b55bc3bac8d9f53
2006-10-10 22:10:08 -04:00
Gabe Black 549412b333 Changed the bus to use a bool to keep track of retries rather than a pointer
src/mem/tport.cc:
    minor formatting tweak

--HG--
extra : convert_revision : 7391d142815c5876fcc0f991bd053e6a1781c101
2006-10-10 17:24:03 -04:00
Gabe Black ab44417282 Fixes to the bus, and added fields to the packet.
src/mem/bus.cc:
    Put back the check to see if the bus is busy. Also, populate the fields in the packet to indicate when the first word and the entire packet will be delivered.
src/mem/bus.hh:
    Remove the occupyBus function.
src/mem/packet.hh:
    Added fields to the packet to indicate when the first chunk of a packet arrives, and when the entire packet arrives.

--HG--
extra : convert_revision : cfc7670a33913d48a04d02c6d2448290a51f2d3c
2006-10-09 23:24:21 -04:00
Gabe Black a23c6a7193 Merge zizzer.eecs.umich.edu:/bk/newmem
into  zeep.eecs.umich.edu:/home/gblack/m5/newmem_bus

--HG--
extra : convert_revision : 8267487b935eaf11665841ace3a5c664751b53b0
2006-10-09 18:19:35 -04:00
Gabe Black 187dcb18bf Potentially functional partially timed bandwidth limitted bus model.
src/mem/bus.cc:
    Fixes to the previous hand merging, and put the snooping back into recvTiming and out of it's own function.
src/mem/bus.hh:
    Put snooping back into recvTiming and not in it's own function.

--HG--
extra : convert_revision : fd031b7e6051a5be07ed6926454fde73b1739dc6
2006-10-09 18:12:45 -04:00
Ron Dreslinski 5cb1840b31 Fixes for functional path.
If the cpu needs to update any state when it gets a functional write (LSQ??)
then that code needs to be written.

src/cpu/o3/fetch_impl.hh:
src/cpu/o3/lsq_impl.hh:
src/cpu/ozone/front_end_impl.hh:
src/cpu/ozone/lw_lsq_impl.hh:
src/cpu/simple/atomic.cc:
src/cpu/simple/timing.cc:
    CPU's can recieve functional accesses, they need to determine if they need to do anything with them.
src/mem/bus.cc:
src/mem/bus.hh:
    Make the fuctional path do the correct tye of snoop

--HG--
extra : convert_revision : 70d09f954b907a8aa9b8137579cd2b06e02ae2ff
2006-10-08 20:30:42 -04:00
Gabe Black 2df9053bb0 Merge zizzer.eecs.umich.edu:/bk/newmem
into  zeep.eecs.umich.edu:/home/gblack/m5/newmem_bus

src/mem/bus.cc:
    Hand merged. Needs to be fixed

--HG--
extra : convert_revision : df03219ccfd18431cc726a063bd29d30554944a1
2006-10-08 19:14:09 -04:00
Ron Dreslinski 1345183a89 Move away from using the statusChange function on snoops. Clean up snooping code in general.
--HG--
extra : convert_revision : 5a57bfd7742a212047fc32e8cae0dc602fdc915c
2006-10-08 18:48:03 -04:00
Gabe Black a82f017591 bus changes
src/mem/bus.cc:
src/mem/bus.hh:
    minor fix and some formatting changes
src/python/m5/objects/Bus.py:
    changed bits to bytes

--HG--
extra : convert_revision : dcd22205604b7a2727eaf2094084c4858f3589c5
2006-10-08 18:44:49 -04:00
Gabe Black 63023ba4c2 Merge zizzer.eecs.umich.edu:/bk/newmem
into  zeep.eecs.umich.edu:/home/gblack/m5/newmem_bus

--HG--
extra : convert_revision : 1749397443ccb320d32f8dd23c71ed0431d30cb7
2006-10-08 14:09:13 -04:00
Gabe Black 00481d1f19 A possible implementation of a multiplexed bus.
--HG--
extra : convert_revision : 3c560eda12ffd8ca539c91024baf2770b963ede8
2006-10-08 14:08:58 -04:00