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

Subversion Repositories yifive

[/] [yifive/] [trunk/] [caravel_yifive/] [verilog/] [rtl/] [syntacore/] [scr1/] [src/] [includes/] [scr1_tdu.svh] - Blame information for rev 11

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 11 dinesha
/// Copyright by Syntacore LLC © 2016-2020. See LICENSE for details
2
/// @file       
3
/// @brief      Trigger Debug Module header
4
///
5
 
6
`ifndef SCR1_INCLUDE_TDU_DEFS
7
`define SCR1_INCLUDE_TDU_DEFS
8
 
9
//`include "scr1_arch_description.svh"
10
 
11
`ifdef SCR1_TDU_EN
12
//`include "scr1_csr.svh"
13
 
14
`include "scr1_arch_description.svh"
15
//`include "scr1_arch_types.svh"
16
`include "scr1_csr.svh"
17
 
18
parameter int unsigned  SCR1_TDU_MTRIG_NUM             = SCR1_TDU_TRIG_NUM;
19
`ifdef SCR1_TDU_ICOUNT_EN
20
parameter int unsigned  SCR1_TDU_ALLTRIG_NUM           = SCR1_TDU_MTRIG_NUM + 1'b1;
21
`else
22
parameter int unsigned  SCR1_TDU_ALLTRIG_NUM           = SCR1_TDU_MTRIG_NUM;
23
`endif
24
 
25
parameter int unsigned  SCR1_TDU_ADDR_W                = `SCR1_XLEN;
26
parameter int unsigned  SCR1_TDU_DATA_W                = `SCR1_XLEN;
27
 
28
// Register map
29
parameter                                     SCR1_CSR_ADDR_TDU_OFFS_W        = 3;
30
parameter bit [SCR1_CSR_ADDR_TDU_OFFS_W-1:0]  SCR1_CSR_ADDR_TDU_OFFS_TSELECT  = 'h0;
31
parameter bit [SCR1_CSR_ADDR_TDU_OFFS_W-1:0]  SCR1_CSR_ADDR_TDU_OFFS_TDATA1   = 'h1;
32
parameter bit [SCR1_CSR_ADDR_TDU_OFFS_W-1:0]  SCR1_CSR_ADDR_TDU_OFFS_TDATA2   = 'h2;
33
parameter bit [SCR1_CSR_ADDR_TDU_OFFS_W-1:0]  SCR1_CSR_ADDR_TDU_OFFS_TINFO    = 'h4;
34
 
35
 
36
parameter bit [SCR1_CSR_ADDR_WIDTH-1:0] SCR1_CSR_ADDR_TDU_TSELECT       = SCR1_CSR_ADDR_TDU_MBASE + SCR1_CSR_ADDR_TDU_OFFS_TSELECT;
37
parameter bit [SCR1_CSR_ADDR_WIDTH-1:0] SCR1_CSR_ADDR_TDU_TDATA1        = SCR1_CSR_ADDR_TDU_MBASE + SCR1_CSR_ADDR_TDU_OFFS_TDATA1;
38
parameter bit [SCR1_CSR_ADDR_WIDTH-1:0] SCR1_CSR_ADDR_TDU_TDATA2        = SCR1_CSR_ADDR_TDU_MBASE + SCR1_CSR_ADDR_TDU_OFFS_TDATA2;
39
parameter bit [SCR1_CSR_ADDR_WIDTH-1:0] SCR1_CSR_ADDR_TDU_TINFO         = SCR1_CSR_ADDR_TDU_MBASE + SCR1_CSR_ADDR_TDU_OFFS_TINFO;
40
 
41
// TDATA1
42
parameter int unsigned  SCR1_TDU_TDATA1_TYPE_HI        = `SCR1_XLEN-1;
43
parameter int unsigned  SCR1_TDU_TDATA1_TYPE_LO        = `SCR1_XLEN-4;
44
parameter int unsigned  SCR1_TDU_TDATA1_DMODE          = `SCR1_XLEN-5;
45
 
46
// TDATA1: constant bits values
47
parameter bit           SCR1_TDU_TDATA1_DMODE_VAL      = 1'b0;
48
 
49
// MCONTROL: bits number
50
parameter int unsigned  SCR1_TDU_MCONTROL_MASKMAX_HI   = `SCR1_XLEN-6;
51
parameter int unsigned  SCR1_TDU_MCONTROL_MASKMAX_LO   = `SCR1_XLEN-11;
52
parameter int unsigned  SCR1_TDU_MCONTROL_RESERVEDB_HI = `SCR1_XLEN-12;
53
parameter int unsigned  SCR1_TDU_MCONTROL_RESERVEDB_LO = 21;
54
parameter int unsigned  SCR1_TDU_MCONTROL_HIT          = 20;
55
parameter int unsigned  SCR1_TDU_MCONTROL_SELECT       = 19;
56
parameter int unsigned  SCR1_TDU_MCONTROL_TIMING       = 18;
57
parameter int unsigned  SCR1_TDU_MCONTROL_ACTION_HI    = 17;
58
parameter int unsigned  SCR1_TDU_MCONTROL_ACTION_LO    = 12;
59
parameter int unsigned  SCR1_TDU_MCONTROL_CHAIN        = 11;
60
parameter int unsigned  SCR1_TDU_MCONTROL_MATCH_HI     = 10;
61
parameter int unsigned  SCR1_TDU_MCONTROL_MATCH_LO     = 7;
62
parameter int unsigned  SCR1_TDU_MCONTROL_M            = 6;
63
parameter int unsigned  SCR1_TDU_MCONTROL_RESERVEDA    = 5;
64
parameter int unsigned  SCR1_TDU_MCONTROL_S            = 4;
65
parameter int unsigned  SCR1_TDU_MCONTROL_U            = 3;
66
parameter int unsigned  SCR1_TDU_MCONTROL_EXECUTE      = 2;
67
parameter int unsigned  SCR1_TDU_MCONTROL_STORE        = 1;
68
parameter int unsigned  SCR1_TDU_MCONTROL_LOAD         = 0;
69
 
70
// MCONTROL: constant bits values
71
parameter bit [SCR1_TDU_TDATA1_TYPE_HI-SCR1_TDU_TDATA1_TYPE_LO:0]
72
                        SCR1_TDU_MCONTROL_TYPE_VAL           = 2'd2;
73
 
74
parameter bit           SCR1_TDU_MCONTROL_SELECT_VAL         = 1'b0;
75
parameter bit           SCR1_TDU_MCONTROL_TIMING_VAL         = 1'b0;
76
 
77
parameter bit [SCR1_TDU_MCONTROL_MASKMAX_HI-SCR1_TDU_MCONTROL_MASKMAX_LO:0]
78
                        SCR1_TDU_MCONTROL_MASKMAX_VAL        = 1'b0;
79
 
80
parameter bit           SCR1_TDU_MCONTROL_RESERVEDA_VAL      = 1'b0;
81
 
82
// ICOUNT: bits number
83
parameter int unsigned  SCR1_TDU_ICOUNT_DMODE          = `SCR1_XLEN-5;
84
parameter int unsigned  SCR1_TDU_ICOUNT_RESERVEDB_HI   = `SCR1_XLEN-6;
85
parameter int unsigned  SCR1_TDU_ICOUNT_RESERVEDB_LO   = 25;
86
parameter int unsigned  SCR1_TDU_ICOUNT_HIT            = 24;
87
parameter int unsigned  SCR1_TDU_ICOUNT_COUNT_HI       = 23;
88
parameter int unsigned  SCR1_TDU_ICOUNT_COUNT_LO       = 10;
89
parameter int unsigned  SCR1_TDU_ICOUNT_M              = 9;
90
parameter int unsigned  SCR1_TDU_ICOUNT_RESERVEDA      = 8;
91
parameter int unsigned  SCR1_TDU_ICOUNT_S              = 7;
92
parameter int unsigned  SCR1_TDU_ICOUNT_U              = 6;
93
parameter int unsigned  SCR1_TDU_ICOUNT_ACTION_HI      = 5;
94
parameter int unsigned  SCR1_TDU_ICOUNT_ACTION_LO      = 0;
95
 
96
// ICOUNT: constant bits values
97
parameter bit [SCR1_TDU_TDATA1_TYPE_HI-SCR1_TDU_TDATA1_TYPE_LO:0]
98
                        SCR1_TDU_ICOUNT_TYPE_VAL             = 2'd3;
99
 
100
parameter bit [SCR1_TDU_ICOUNT_RESERVEDB_HI-SCR1_TDU_ICOUNT_RESERVEDB_LO:0]
101
                        SCR1_TDU_ICOUNT_RESERVEDB_VAL        = 1'b0;
102
 
103
parameter bit           SCR1_TDU_ICOUNT_RESERVEDA_VAL        = 1'b0;
104
 
105
// CPU pipeline monitors
106
typedef struct packed {
107
    logic                                           vd;
108
    logic                                           req;
109
    logic [`SCR1_XLEN-1:0]                          addr;
110
} type_scr1_brkm_instr_mon_s;
111
 
112
typedef struct packed {
113
    logic                                           vd;
114
    logic                                           load;
115
    logic                                           store;
116
    logic [`SCR1_XLEN-1:0]                          addr;
117
} type_scr1_brkm_lsu_mon_s;
118
 
119
`endif // SCR1_TDU_EN
120
 
121
`endif // SCR1_INCLUDE_TDU_DEFS

powered by: WebSVN 2.1.0

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