QoSMemSinkCtrl.py revision 13665
14394Ssaidi@eecs.umich.edu# Copyright (c) 2018 ARM Limited
24394Ssaidi@eecs.umich.edu# All rights reserved.
34394Ssaidi@eecs.umich.edu#
44394Ssaidi@eecs.umich.edu# The license below extends only to copyright in the software and shall
54394Ssaidi@eecs.umich.edu# not be construed as granting a license to any other intellectual
64394Ssaidi@eecs.umich.edu# property including but not limited to intellectual property relating
74394Ssaidi@eecs.umich.edu# to a hardware implementation of the functionality of the software
84394Ssaidi@eecs.umich.edu# licensed hereunder.  You may use the software subject to the license
94394Ssaidi@eecs.umich.edu# terms below provided that you ensure that this notice is replicated
104394Ssaidi@eecs.umich.edu# unmodified and in its entirety in all distributions of the software,
114394Ssaidi@eecs.umich.edu# modified or unmodified, in source code or in binary form.
124394Ssaidi@eecs.umich.edu#
134394Ssaidi@eecs.umich.edu# Redistribution and use in source and binary forms, with or without
144394Ssaidi@eecs.umich.edu# modification, are permitted provided that the following conditions are
154394Ssaidi@eecs.umich.edu# met: redistributions of source code must retain the above copyright
164394Ssaidi@eecs.umich.edu# notice, this list of conditions and the following disclaimer;
174394Ssaidi@eecs.umich.edu# redistributions in binary form must reproduce the above copyright
184394Ssaidi@eecs.umich.edu# notice, this list of conditions and the following disclaimer in the
194394Ssaidi@eecs.umich.edu# documentation and/or other materials provided with the distribution;
204394Ssaidi@eecs.umich.edu# neither the name of the copyright holders nor the names of its
214394Ssaidi@eecs.umich.edu# contributors may be used to endorse or promote products derived from
224394Ssaidi@eecs.umich.edu# this software without specific prior written permission.
234394Ssaidi@eecs.umich.edu#
244394Ssaidi@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
254394Ssaidi@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
264394Ssaidi@eecs.umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
274394Ssaidi@eecs.umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
284394Ssaidi@eecs.umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
294394Ssaidi@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
304394Ssaidi@eecs.umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
314394Ssaidi@eecs.umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
328229Snate@binkert.org# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
334394Ssaidi@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
344394Ssaidi@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
354394Ssaidi@eecs.umich.edu#
364394Ssaidi@eecs.umich.edu# Author: Matteo Andreozzi
374394Ssaidi@eecs.umich.edu
384394Ssaidi@eecs.umich.edufrom m5.params import *
394394Ssaidi@eecs.umich.edufrom m5.objects.QoSMemCtrl import *
404394Ssaidi@eecs.umich.edu
414394Ssaidi@eecs.umich.educlass QoSMemSinkCtrl(QoSMemCtrl):
424571Sgblack@eecs.umich.edu    type = 'QoSMemSinkCtrl'
434394Ssaidi@eecs.umich.edu    cxx_header = "mem/qos/mem_sink.hh"
444394Ssaidi@eecs.umich.edu    cxx_class = "QoS::MemSinkCtrl"
454394Ssaidi@eecs.umich.edu    port = SlavePort("Slave ports")
464394Ssaidi@eecs.umich.edu
474394Ssaidi@eecs.umich.edu    # the basic configuration of the controller architecture, note
484394Ssaidi@eecs.umich.edu    # that each entry corresponds to a burst for the specific DRAM
494394Ssaidi@eecs.umich.edu    # configuration (e.g. x32 with burst length 8 is 32 bytes) and not
5011321Ssteve.reinhardt@amd.com    # the cacheline size or request/packet size
514394Ssaidi@eecs.umich.edu    write_buffer_size = Param.Unsigned(64, "Number of write queue entries")
524394Ssaidi@eecs.umich.edu    read_buffer_size = Param.Unsigned(32, "Number of read queue entries")
534394Ssaidi@eecs.umich.edu
544394Ssaidi@eecs.umich.edu    # memory packet size
554394Ssaidi@eecs.umich.edu    memory_packet_size = Param.MemorySize("32B", "Memory packet size")
564394Ssaidi@eecs.umich.edu
57    # request latency - minimum timing between requests
58    request_latency = Param.Latency("20ns", "Memory latency between requests")
59
60    # response latency - time to issue a response once a request is serviced
61    response_latency = Param.Latency("20ns", "Memory response latency")
62
63
64