blob: 5f45b14f89f646117c0fd73ba13bf8c412b31dda [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
Steve Kelly887ec0b2020-12-17 21:31:53 -050067 rapcores rapcores0 (
Tim Edwardsb86fc842020-10-13 17:11:54 -040068
Steve Kelly80eb4a72020-12-20 15:08:23 -050069
Tonokip201dd342020-12-15 01:49:03 -060070 `ifdef USE_POWER_PINS
Steve Kelly80eb4a72020-12-20 15:08:23 -050071 //.vdda1(vdda1), // User area 1 3.3V power
72 //.vdda2(vdda2), // User area 2 3.3V power
73 //.vssa1(vssa1), // User area 1 analog ground
74 //.vssa2(vssa2), // User area 2 analog ground
Tonokip201dd342020-12-15 01:49:03 -060075 .vccd1(vccd1), // User area 1 1.8V power
Steve Kelly80eb4a72020-12-20 15:08:23 -050076 //.vccd2(vccd2), // User area 2 1.8V power
Tonokip201dd342020-12-15 01:49:03 -060077 .vssd1(vssd1), // User area 1 digital ground
Steve Kelly80eb4a72020-12-20 15:08:23 -050078 //.vssd2(vssd2), // User area 2 digital ground
Tonokip201dd342020-12-15 01:49:03 -060079 `endif
Tonokip201dd342020-12-15 01:49:03 -060080 // MGMT core clock and reset
81
82 .wb_clk_i(wb_clk_i),
83 .wb_rst_i(wb_rst_i),
84
85 // MGMT SoC Wishbone Slave
86
87 .wbs_cyc_i(wbs_cyc_i),
88 .wbs_stb_i(wbs_stb_i),
89 .wbs_we_i(wbs_we_i),
90 .wbs_sel_i(wbs_sel_i),
Steve Kelly6eba86c2020-12-17 23:11:05 -050091 //.wbs_adr_i(wbs_adr_i),
92 //.wbs_dat_i(wbs_dat_i),
Tonokip201dd342020-12-15 01:49:03 -060093 .wbs_ack_o(wbs_ack_o),
Steve Kelly6eba86c2020-12-17 23:11:05 -050094 //.wbs_dat_o(wbs_dat_o),
Tonokip201dd342020-12-15 01:49:03 -060095
96 // Logic Analyzer
97
98 .la_data_in(la_data_in),
99 .la_data_out(la_data_out),
100 .la_oen (la_oen),
101
102 // IO Pads
103
104 .io_in (io_in),
105 .io_out(io_out),
106 .io_oeb(io_oeb)
Tim Edwardsb86fc842020-10-13 17:11:54 -0400107 );
108
109endmodule // user_project_wrapper
Tim Edwards581068f2020-11-19 12:45:25 -0500110`default_nettype wire