blob: 0b23a5048299818d7940f3b12943a6f39c5c8be9 [file] [log] [blame]
Matt Venn08cd6eb2020-11-16 12:01:14 +01001`default_nettype none
Tim Edwardsb86fc842020-10-13 17:11:54 -04002/*
3 *-------------------------------------------------------------
4 *
5 * user_project_wrapper
6 *
7 * This wrapper enumerates all of the pins available to the
8 * user for the user project.
9 *
10 * An example user project is provided in this wrapper. The
11 * example should be removed and replaced with the actual
12 * user project.
13 *
14 *-------------------------------------------------------------
15 */
16
17module user_project_wrapper #(
Tim Edwardsb86fc842020-10-13 17:11:54 -040018 parameter BITS = 32
19)(
Ahmed Ghazydf4dd882020-11-25 18:38:42 +020020`ifdef USE_POWER_PINS
Tim Edwardsb86fc842020-10-13 17:11:54 -040021 inout vdda1, // User area 1 3.3V supply
22 inout vdda2, // User area 2 3.3V supply
23 inout vssa1, // User area 1 analog ground
24 inout vssa2, // User area 2 analog ground
25 inout vccd1, // User area 1 1.8V supply
26 inout vccd2, // User area 2 1.8v supply
27 inout vssd1, // User area 1 digital ground
28 inout vssd2, // User area 2 digital ground
Ahmed Ghazydf4dd882020-11-25 18:38:42 +020029`endif
Tim Edwardsb86fc842020-10-13 17:11:54 -040030
31 // Wishbone Slave ports (WB MI A)
32 input wb_clk_i,
33 input wb_rst_i,
34 input wbs_stb_i,
35 input wbs_cyc_i,
36 input wbs_we_i,
37 input [3:0] wbs_sel_i,
38 input [31:0] wbs_dat_i,
39 input [31:0] wbs_adr_i,
40 output wbs_ack_o,
41 output [31:0] wbs_dat_o,
42
43 // Logic Analyzer Signals
44 input [127:0] la_data_in,
45 output [127:0] la_data_out,
46 input [127:0] la_oen,
47
48 // IOs
Ahmed Ghazy22d29d62020-10-28 03:42:02 +020049 input [`MPRJ_IO_PADS-1:0] io_in,
50 output [`MPRJ_IO_PADS-1:0] io_out,
51 output [`MPRJ_IO_PADS-1:0] io_oeb,
Tim Edwardsb86fc842020-10-13 17:11:54 -040052
Tim Edwards581068f2020-11-19 12:45:25 -050053 // Analog (direct connection to GPIO pad---use with caution)
54 // Note that analog I/O is not available on the 7 lowest-numbered
55 // GPIO pads, and so the analog_io indexing is offset from the
56 // GPIO indexing by 7.
57 inout [`MPRJ_IO_PADS-8:0] analog_io,
58
Tim Edwardsb86fc842020-10-13 17:11:54 -040059 // Independent clock (on independent integer divider)
60 input user_clock2
61);
62
63 /*--------------------------------------*/
64 /* User project is instantiated here */
65 /*--------------------------------------*/
66
Ahmed Ghazy22d29d62020-10-28 03:42:02 +020067 user_proj_example mprj (
Ahmed Ghazydf4dd882020-11-25 18:38:42 +020068 `ifdef USE_POWER_PINS
Tim Edwardsb86fc842020-10-13 17:11:54 -040069 .vdda1(vdda1), // User area 1 3.3V power
70 .vdda2(vdda2), // User area 2 3.3V power
71 .vssa1(vssa1), // User area 1 analog ground
72 .vssa2(vssa2), // User area 2 analog ground
73 .vccd1(vccd1), // User area 1 1.8V power
74 .vccd2(vccd2), // User area 2 1.8V power
75 .vssd1(vssd1), // User area 1 digital ground
76 .vssd2(vssd2), // User area 2 digital ground
Ahmed Ghazydf4dd882020-11-25 18:38:42 +020077 `endif
Tim Edwardsb86fc842020-10-13 17:11:54 -040078
79 // MGMT core clock and reset
80
81 .wb_clk_i(wb_clk_i),
82 .wb_rst_i(wb_rst_i),
83
Ahmed Ghazy22d29d62020-10-28 03:42:02 +020084 // MGMT SoC Wishbone Slave
Tim Edwardsb86fc842020-10-13 17:11:54 -040085
86 .wbs_cyc_i(wbs_cyc_i),
87 .wbs_stb_i(wbs_stb_i),
88 .wbs_we_i(wbs_we_i),
89 .wbs_sel_i(wbs_sel_i),
90 .wbs_adr_i(wbs_adr_i),
91 .wbs_dat_i(wbs_dat_i),
92 .wbs_ack_o(wbs_ack_o),
93 .wbs_dat_o(wbs_dat_o),
94
95 // Logic Analyzer
96
97 .la_data_in(la_data_in),
98 .la_data_out(la_data_out),
99 .la_oen (la_oen),
100
101 // IO Pads
102
103 .io_in (io_in),
104 .io_out(io_out),
105 .io_oeb(io_oeb)
106 );
107
108endmodule // user_project_wrapper
Tim Edwards581068f2020-11-19 12:45:25 -0500109`default_nettype wire