OpenCores
URL https://opencores.org/ocsvn/mpmc8/mpmc8/trunk

Subversion Repositories mpmc8

[/] [mpmc8/] [trunk/] [rtl/] [mpmc10/] [mpmc10_pkg.sv] - Blame information for rev 11

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 robfinch
// ============================================================================
2
//        __
3 11 robfinch
//   \\__/ o\    (C) 2022-2023  Robert Finch, Waterloo
4 5 robfinch
//    \  __ /    All rights reserved.
5
//     \/_//     robfinch@finitron.ca
6
//       ||
7
//
8
// BSD 3-Clause License
9
// Redistribution and use in source and binary forms, with or without
10
// modification, are permitted provided that the following conditions are met:
11
//
12
// 1. Redistributions of source code must retain the above copyright notice, this
13
//    list of conditions and the following disclaimer.
14
//
15
// 2. Redistributions in binary form must reproduce the above copyright notice,
16
//    this list of conditions and the following disclaimer in the documentation
17
//    and/or other materials provided with the distribution.
18
//
19
// 3. Neither the name of the copyright holder nor the names of its
20
//    contributors may be used to endorse or promote products derived from
21
//    this software without specific prior written permission.
22
//
23
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
27
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
29
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
//
34
// ============================================================================
35
//
36
package mpmc10_pkg;
37
 
38
parameter CACHE_ASSOC = 4;
39
 
40
parameter RMW = 0;
41
parameter NAR = 2;
42
parameter AMSB = 28;
43
parameter CMD_READ = 3'b001;
44
parameter CMD_WRITE = 3'b000;
45 9 robfinch
 
46 5 robfinch
// State machine states
47 11 robfinch
typedef enum logic [4:0] {
48
        IDLE = 5'd0,
49
        PRESET1 = 5'd1,
50
        PRESET2 = 5'd2,
51
        WRITE_DATA0 = 5'd3,
52
        WRITE_DATA1 = 5'd4,
53
        WRITE_DATA2 = 5'd5,
54
        WRITE_DATA3 = 5'd6,
55
        READ_DATA = 5'd7,
56
        READ_DATA0 = 5'd8,
57
        READ_DATA1 = 5'd9,
58
        READ_DATA2 = 5'd10,
59
        WAIT_NACK = 5'd11,
60
        WRITE_TRAMP = 5'd12,    // write trampoline
61
        WRITE_TRAMP1 = 5'd13,
62
        PRESET3 = 5'd14,
63
        ALU = 5'd15,
64
        ALU1 = 5'd16,
65
        ALU2 = 5'd17,
66
        ALU3 = 5'd18,
67
        ALU4 = 5'd19,
68
        CAS = 5'd20
69 9 robfinch
} mpmc10_state_t;
70 5 robfinch
 
71
typedef struct packed
72
{
73 9 robfinch
        logic [31:4] tag;
74 5 robfinch
        logic modified;
75
        logic [127:0] data;
76
} mpmc10_cache_line_t;
77
 
78
typedef struct packed
79
{
80
        mpmc10_cache_line_t [CACHE_ASSOC-1:0] lines;
81
} mpmc10_quad_cache_line_t;
82
 
83
endpackage

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.