Ahmed Ghazy | d4ec2f0 | 2021-04-05 18:32:10 +0200 | [diff] [blame] | 1 | // 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 | * |
| 21 | * user_project_wrapper |
| 22 | * |
| 23 | * This wrapper enumerates all of the pins available to the |
| 24 | * user for the user project. |
| 25 | * |
| 26 | * An example user project is provided in this wrapper. The |
| 27 | * example should be removed and replaced with the actual |
| 28 | * user project. |
| 29 | * |
| 30 | *------------------------------------------------------------- |
| 31 | */ |
| 32 | |
| 33 | module user_project_wrapper #( |
| 34 | parameter BITS = 32 |
| 35 | )( |
| 36 | `ifdef USE_POWER_PINS |
| 37 | inout vdda1, // User area 1 3.3V supply |
| 38 | inout vdda2, // User area 2 3.3V supply |
| 39 | inout vssa1, // User area 1 analog ground |
| 40 | inout vssa2, // User area 2 analog ground |
| 41 | inout vccd1, // User area 1 1.8V supply |
| 42 | inout vccd2, // User area 2 1.8v supply |
| 43 | inout vssd1, // User area 1 digital ground |
| 44 | inout vssd2, // User area 2 digital ground |
| 45 | `endif |
| 46 | |
| 47 | // Wishbone Slave ports (WB MI A) |
| 48 | input wb_clk_i, |
| 49 | input wb_rst_i, |
| 50 | input wbs_stb_i, |
| 51 | input wbs_cyc_i, |
| 52 | input wbs_we_i, |
| 53 | input [3:0] wbs_sel_i, |
| 54 | input [31:0] wbs_dat_i, |
| 55 | input [31:0] wbs_adr_i, |
| 56 | output wbs_ack_o, |
| 57 | output [31:0] wbs_dat_o, |
| 58 | |
| 59 | // Logic Analyzer Signals |
| 60 | input [127:0] la_data_in, |
| 61 | output [127:0] la_data_out, |
| 62 | input [127:0] la_oen, |
| 63 | |
| 64 | // IOs |
| 65 | input [`MPRJ_IO_PADS-1:0] io_in, |
| 66 | output [`MPRJ_IO_PADS-1:0] io_out, |
| 67 | output [`MPRJ_IO_PADS-1:0] io_oeb, |
| 68 | |
| 69 | // Analog (direct connection to GPIO pad---use with caution) |
| 70 | // Note that analog I/O is not available on the 7 lowest-numbered |
| 71 | // GPIO pads, and so the analog_io indexing is offset from the |
| 72 | // GPIO indexing by 7. |
Tim Edwards | f989c64 | 2021-04-15 20:48:24 -0400 | [diff] [blame] | 73 | inout [`MPRJ_IO_PADS-10:0] analog_io, |
Ahmed Ghazy | d4ec2f0 | 2021-04-05 18:32:10 +0200 | [diff] [blame] | 74 | |
| 75 | // Independent clock (on independent integer divider) |
| 76 | input user_clock2 |
| 77 | ); |
| 78 | |
| 79 | /*--------------------------------------*/ |
| 80 | /* User project is instantiated here */ |
| 81 | /*--------------------------------------*/ |
| 82 | |
| 83 | user_proj_example mprj ( |
| 84 | `ifdef USE_POWER_PINS |
| 85 | .vdda1(vdda1), // User area 1 3.3V power |
| 86 | .vdda2(vdda2), // User area 2 3.3V power |
| 87 | .vssa1(vssa1), // User area 1 analog ground |
| 88 | .vssa2(vssa2), // User area 2 analog ground |
| 89 | .vccd1(vccd1), // User area 1 1.8V power |
| 90 | .vccd2(vccd2), // User area 2 1.8V power |
| 91 | .vssd1(vssd1), // User area 1 digital ground |
| 92 | .vssd2(vssd2), // User area 2 digital ground |
| 93 | `endif |
| 94 | |
| 95 | .wb_clk_i(wb_clk_i), |
| 96 | .wb_rst_i(wb_rst_i), |
| 97 | |
| 98 | // MGMT SoC Wishbone Slave |
| 99 | |
| 100 | .wbs_cyc_i(wbs_cyc_i), |
| 101 | .wbs_stb_i(wbs_stb_i), |
| 102 | .wbs_we_i(wbs_we_i), |
| 103 | .wbs_sel_i(wbs_sel_i), |
| 104 | .wbs_adr_i(wbs_adr_i), |
| 105 | .wbs_dat_i(wbs_dat_i), |
| 106 | .wbs_ack_o(wbs_ack_o), |
| 107 | .wbs_dat_o(wbs_dat_o), |
| 108 | |
| 109 | // Logic Analyzer |
| 110 | |
| 111 | .la_data_in(la_data_in), |
| 112 | .la_data_out(la_data_out), |
| 113 | .la_oen (la_oen), |
| 114 | |
| 115 | // IO Pads |
| 116 | |
| 117 | .io_in (io_in), |
| 118 | .io_out(io_out), |
| 119 | .io_oeb(io_oeb) |
| 120 | ); |
| 121 | |
| 122 | endmodule // user_project_wrapper |
| 123 | `default_nettype wire |