Skip to content

Commit 44e8616

Browse files
fix: add analog_io and user_clock2 ports to match Caravel golden wrapper
1 parent 04768f7 commit 44e8616

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

verilog/rtl/user_project_wrapper.v

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
// SPDX-FileCopyrightText: 2026 Mummana Jagadeesh
2+
// SPDX-License-Identifier: Apache-2.0
13
`default_nettype none
24
`ifndef MPRJ_IO_PADS
35
`define MPRJ_IO_PADS 38
46
`endif
7+
`ifndef MPRJ_IO_PADS_1
8+
`define MPRJ_IO_PADS_1 19
9+
`endif
10+
`ifndef MPRJ_IO_PADS_2
11+
`define MPRJ_IO_PADS_2 19
12+
`endif
513

614
module user_project_wrapper #(
715
parameter BITS = 32
@@ -26,6 +34,8 @@ module user_project_wrapper #(
2634
input wire [`MPRJ_IO_PADS-1:0] io_in,
2735
output wire [`MPRJ_IO_PADS-1:0] io_out,
2836
output wire [`MPRJ_IO_PADS-1:0] io_oeb,
37+
inout wire [`MPRJ_IO_PADS_1-1:0] analog_io,
38+
input wire user_clock2,
2939
output wire [2:0] user_irq
3040
);
3141

@@ -46,10 +56,8 @@ module user_project_wrapper #(
4656

4757
assign bit_in = use_lfsr ? lfsr_bit : io_in[8];
4858

49-
// --- GPIO assignments (flat, no generate) ---
50-
// io_out: only [9] is driven, rest tied 0
59+
// GPIO assignments
5160
assign io_out = {{(`MPRJ_IO_PADS-10){1'b0}}, pwm_out, {9{1'b0}}};
52-
// io_oeb: [9]=0 (output), rest=1 (input/hi-Z)
5361
assign io_oeb = {{(`MPRJ_IO_PADS-10){1'b1}}, 1'b0, {9{1'b1}}};
5462

5563
assign la_data_out = 128'b0;

0 commit comments

Comments
 (0)