rlm@8: // The MIT License rlm@8: rlm@8: // Copyright (c) 2009 Massachusetts Institute of Technology rlm@8: rlm@8: // Permission is hereby granted, free of charge, to any person obtaining a copy rlm@8: // of this software and associated documentation files (the "Software"), to deal rlm@8: // in the Software without restriction, including without limitation the rights rlm@8: // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell rlm@8: // copies of the Software, and to permit persons to whom the Software is rlm@8: // furnished to do so, subject to the following conditions: rlm@8: rlm@8: // The above copyright notice and this permission notice shall be included in rlm@8: // all copies or substantial portions of the Software. rlm@8: rlm@8: // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR rlm@8: // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, rlm@8: // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE rlm@8: // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER rlm@8: // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, rlm@8: // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN rlm@8: // THE SOFTWARE. rlm@8: rlm@8: import Connectable::*; rlm@8: import GetPut::*; rlm@8: import ClientServer::*; rlm@8: rlm@8: //AWB includes rlm@8: `include "asim/provides/low_level_platform_interface.bsh" rlm@8: `include "asim/provides/soft_connections.bsh" rlm@8: `include "asim/provides/common_services.bsh" rlm@8: rlm@8: // Local includes rlm@8: `include "asim/provides/processor_library.bsh" rlm@8: `include "asim/provides/mem_arb.bsh" rlm@8: `include "asim/provides/instruction_cache.bsh" rlm@8: `include "asim/provides/data_cache.bsh" rlm@8: `include "asim/provides/processor.bsh" rlm@8: rlm@8: rlm@8: rlm@8: interface Core; rlm@8: rlm@8: // Interface from core to main memory rlm@8: interface Client#(MainMemReq,MainMemResp) mmem_client; rlm@8: rlm@8: endinterface rlm@8: rlm@8: module [CONNECTED_MODULE] mkCore( Core ); rlm@8: rlm@8: // Instantiate the modules rlm@8: rlm@8: Proc proc <- mkProc(); rlm@8: ICache#(InstReq,InstResp) icache <- mkInstCache(); rlm@8: DCache#(DataReq,DataResp) dcache <- mkDataCache(); rlm@8: MemArb marb <- mkMemArb(); rlm@8: rlm@8: // Internal connections rlm@8: rlm@8: mkConnection( proc.statsEn_get, icache.statsEn_put ); rlm@8: mkConnection( proc.statsEn_get, dcache.statsEn_put ); rlm@8: mkConnection( proc.imem_client, icache.proc_server ); rlm@8: mkConnection( proc.dmem_client, dcache.proc_server ); rlm@8: mkConnection( icache.mmem_client, marb.cache0_server ); rlm@8: mkConnection( dcache.mmem_client, marb.cache1_server ); rlm@8: rlm@8: // Methods rlm@8: rlm@8: interface mmem_client = marb.mmem_client; rlm@8: rlm@8: endmodule