1 |
3 |
kfleming |
//----------------------------------------------------------------------//
|
2 |
|
|
// The MIT License
|
3 |
|
|
//
|
4 |
|
|
// Copyright (c) 2008 Alfred Man Cheuk Ng, mcn02@mit.edu
|
5 |
|
|
//
|
6 |
|
|
// Permission is hereby granted, free of charge, to any person
|
7 |
|
|
// obtaining a copy of this software and associated documentation
|
8 |
|
|
// files (the "Software"), to deal in the Software without
|
9 |
|
|
// restriction, including without limitation the rights to use,
|
10 |
|
|
// copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11 |
|
|
// copies of the Software, and to permit persons to whom the
|
12 |
|
|
// Software is furnished to do so, subject to the following conditions:
|
13 |
|
|
//
|
14 |
|
|
// The above copyright notice and this permission notice shall be
|
15 |
|
|
// included in all copies or substantial portions of the Software.
|
16 |
|
|
//
|
17 |
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
18 |
|
|
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
19 |
|
|
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
20 |
|
|
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
21 |
|
|
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
22 |
|
|
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
23 |
|
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
24 |
|
|
// OTHER DEALINGS IN THE SOFTWARE.
|
25 |
|
|
//----------------------------------------------------------------------//
|
26 |
|
|
|
27 |
|
|
// import standard librarys
|
28 |
|
|
import Connectable::*;
|
29 |
|
|
import GetPut::*;
|
30 |
|
|
import FIFO::*;
|
31 |
|
|
import StmtFSM::*;
|
32 |
|
|
import Vector::*;
|
33 |
|
|
|
34 |
|
|
// import self-made library
|
35 |
|
|
import BRAMVLevelFIFO::*;
|
36 |
|
|
import EHRReg::*;
|
37 |
|
|
import VLevelFIFO::*;
|
38 |
|
|
import Sort::*;
|
39 |
|
|
|
40 |
|
|
typedef 4 FIFO_SZ;
|
41 |
|
|
typedef TLog#(TAdd#(FIFO_SZ,1)) TOK_SZ;
|
42 |
|
|
|
43 |
|
|
(* synthesize *)
|
44 |
|
|
module mkBRAMLevel3MergerInstance (SortLevel#(8,4,Bit#(TOK_SZ),Bit#(TOK_SZ),Maybe#(Bit#(128))));
|
45 |
|
|
Bit#(FIFO_SZ) dntCare = ?;
|
46 |
|
|
let res <- mkBRAMOneLevelMerger(dntCare, notValid, fromMaybe(?), mkZeroCycleScheduler, mkDecrOneBRAMVLevelFIFO);
|
47 |
|
|
return res;
|
48 |
|
|
endmodule
|