Skip to content

Commit

Permalink
Merge pull request #1 from hpretl/main
Browse files Browse the repository at this point in the history
Fix a few listing warnings
  • Loading branch information
FRoith authored Oct 30, 2024
2 parents 468002b + da2b2de commit 5e9f31e
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/uart_rx.v
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ module uart_rx #(
reg [ 2:0] next_state;
reg [ 31:0] cycle_cnt;
reg [ 3:0] bit_cnt;
reg rx_reg;

// FSM: next state latch
always @(posedge clk or negedge rst_n) begin
Expand Down Expand Up @@ -92,4 +91,4 @@ module uart_rx #(
end

endmodule
`endif
`endif
2 changes: 1 addition & 1 deletion src/uart_tx.v
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ module uart_tx #(
end

endmodule
`endif
`endif
13 changes: 11 additions & 2 deletions src/wb_gpio.v
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,17 @@ module wb_gpio(
output wire [3:0] gpio_o
);

/* verilator lint_off UNUSEDSIGNAL */
wire [31:2] dummy1;
assign dummy1 = adr_i[31:2];
wire [31:1] dummy2;
assign dummy2 = dat_i[31:1];
wire [3:0] dummy3;
assign dummy3 = sel_i;
/* verilator lint_on UNUSEDSIGNAL */

reg [3:0] data_o;
reg [3:0] data_i;
wire [3:0] data_i;

assign gpio_o = data_o;
assign data_i = gpio_i;
Expand All @@ -40,4 +49,4 @@ module wb_gpio(
end

endmodule
`endif
`endif
11 changes: 10 additions & 1 deletion src/wb_imem.v
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ module wb_imem(
output wire spi_data_o
);

/* verilator lint_off UNUSEDSIGNAL */
wire [31:24] dummy1;
assign dummy1 = adr_i[31:24];
wire [31:0] dummy2;
assign dummy2 = dat_i[31:0];
wire [3:0] dummy3;
assign dummy3 = sel_i;
/* verilator lint_on UNUSEDSIGNAL */

localparam S_IDLE = 2'd0;
localparam S_SENDING = 2'd1;
localparam S_RECEIVING = 2'd2;
Expand Down Expand Up @@ -74,4 +83,4 @@ module wb_imem(
assign spi_data_o = (state == S_SENDING) ? cmd[31] : 1'b0;

endmodule
`endif
`endif
9 changes: 8 additions & 1 deletion src/wb_spi.v
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ module wb_spi(
output wire spi_data_o
);

/* verilator lint_off UNUSEDSIGNAL */
wire [31:7] dummy1;
assign dummy1 = adr_i[31:7];
wire [3:0] dummy2;
assign dummy2 = adr_i[3:0];
/* verilator lint_on UNUSEDSIGNAL */

localparam S_IDLE = 0;
localparam S_SENDING = 1;

Expand Down Expand Up @@ -95,4 +102,4 @@ module wb_spi(
assign spi_data_o = (state == S_SENDING) ? cmd[31] : 1'b0;

endmodule
`endif
`endif
12 changes: 9 additions & 3 deletions src/wb_uart.v
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ module wb_uart(
input wire rx
);


/* verilator lint_off UNUSEDSIGNAL */
wire [15:0] dummy1;
assign dummy1 = adr_i;
wire [31:8] dummy2;
assign dummy2 = dat_i[31:8];
wire [3:0] dummy3;
assign dummy3 = sel_i;
/* verilator lint_on UNUSEDSIGNAL */

wire [7:0] dat_tmp;
assign dat_o = {24'b0, dat_tmp};
Expand All @@ -27,7 +34,6 @@ module wb_uart(
wire rx_start = stb_i & cyc_i & ~we_i & sel_i[0];
wire tx_ready;
wire rx_ready;
reg working;

localparam S_IDLE = 0;
localparam S_WORKING_TX = 1;
Expand Down Expand Up @@ -77,4 +83,4 @@ module wb_uart(
.rx_pin(rx));

endmodule
`endif
`endif

0 comments on commit 5e9f31e

Please sign in to comment.