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

Subversion Repositories yifive

[/] [yifive/] [trunk/] [caravel_yifive/] [verilog/] [rtl/] [user_project_wrapper.v] - Blame information for rev 21

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dinesha
// SPDX-FileCopyrightText: 2020 Efabless Corporation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
//      http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
// SPDX-License-Identifier: Apache-2.0
15
 
16
`default_nettype none
17
/*
18
 *-------------------------------------------------------------
19
 *
20
 * user_project_wrapper
21
 *
22
 * This wrapper enumerates all of the pins available to the
23
 * user for the user project.
24
 *
25
 * An example user project is provided in this wrapper.  The
26
 * example should be removed and replaced with the actual
27
 * user project.
28
 *
29
 *-------------------------------------------------------------
30
 */
31 21 dinesha
`default_nettype wire
32 2 dinesha
module user_project_wrapper #(
33
    parameter BITS = 32
34
) (
35
`ifdef USE_POWER_PINS
36
    inout vdda1,        // User area 1 3.3V supply
37
    inout vdda2,        // User area 2 3.3V supply
38
    inout vssa1,        // User area 1 analog ground
39
    inout vssa2,        // User area 2 analog ground
40
    inout vccd1,        // User area 1 1.8V supply
41
    inout vccd2,        // User area 2 1.8v supply
42
    inout vssd1,        // User area 1 digital ground
43
    inout vssd2,        // User area 2 digital ground
44
`endif
45
 
46
    // Wishbone Slave ports (WB MI A)
47
    input wb_clk_i,
48
    input wb_rst_i,
49
    input wbs_stb_i,
50
    input wbs_cyc_i,
51
    input wbs_we_i,
52
    input [3:0] wbs_sel_i,
53
    input [31:0] wbs_dat_i,
54
    input [31:0] wbs_adr_i,
55
    output wbs_ack_o,
56
    output [31:0] wbs_dat_o,
57
 
58
    // Logic Analyzer Signals
59
    input  [127:0] la_data_in,
60
    output [127:0] la_data_out,
61
    input  [127:0] la_oenb,
62
 
63
    // IOs
64
    input  [`MPRJ_IO_PADS-1:0] io_in,
65
    output [`MPRJ_IO_PADS-1:0] io_out,
66
    output [`MPRJ_IO_PADS-1:0] io_oeb,
67
 
68
    // Analog (direct connection to GPIO pad---use with caution)
69
    // Note that analog I/O is not available on the 7 lowest-numbered
70
    // GPIO pads, and so the analog_io indexing is offset from the
71
    // GPIO indexing by 7 (also upper 2 GPIOs do not have analog_io).
72
    inout [`MPRJ_IO_PADS-10:0] analog_io,
73
 
74
    // Independent clock (on independent integer divider)
75
    input   user_clock2,
76
 
77
    // User maskable interrupt signals
78
    output [2:0] user_irq
79
);
80
 
81 21 dinesha
 
82 2 dinesha
/*--------------------------------------*/
83
/* User project is instantiated  here   */
84
/*--------------------------------------*/
85
 
86 21 dinesha
digital_core u_core (
87 2 dinesha
    `ifdef USE_POWER_PINS
88
        .vdda1(vdda1),  // User area 1 3.3V power
89
        .vdda2(vdda2),  // User area 2 3.3V power
90
        .vssa1(vssa1),  // User area 1 analog ground
91
        .vssa2(vssa2),  // User area 2 analog ground
92
        .vccd1(vccd1),  // User area 1 1.8V power
93
        .vccd2(vccd2),  // User area 2 1.8V power
94
        .vssd1(vssd1),  // User area 1 digital ground
95
        .vssd2(vssd2),  // User area 2 digital ground
96
    `endif
97
 
98 21 dinesha
    .clk(wb_clk_i),
99
    .rst_n(!wb_rst_i),
100
    .rtc_clk(user_clock2),
101 2 dinesha
 
102
    // MGMT SoC Wishbone Slave
103
 
104 21 dinesha
    .wbd_ext_cyc_i(wbs_cyc_i),
105
    .wbd_ext_stb_i(wbs_stb_i),
106
    .wbd_ext_we_i(wbs_we_i),
107
    .wbd_ext_sel_i(wbs_sel_i),
108
    .wbd_ext_adr_i(wbs_adr_i),
109
    .wbd_ext_dat_i(wbs_dat_i),
110
    .wbd_ext_ack_o(wbs_ack_o),
111
    .wbd_ext_dat_o(wbs_dat_o),
112
    .wbd_ext_err_o(),
113 2 dinesha
 
114
    // Logic Analyzer
115
 
116
    .la_data_in(la_data_in),
117
    .la_data_out(la_data_out),
118
    .la_oenb (la_oenb),
119
 
120
    // IO Pads
121
 
122
    .io_in (io_in),
123
    .io_out(io_out),
124
    .io_oeb(io_oeb),
125
 
126
    // IRQ
127
    .irq(user_irq)
128
);
129
 
130
endmodule       // user_project_wrapper
131
 
132
`default_nettype wire

powered by: WebSVN 2.1.0

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