Line 1448... |
Line 1448... |
begin
|
begin
|
mask = {32{sel}} & dat_i;
|
mask = {32{sel}} & dat_i;
|
end
|
end
|
endfunction
|
endfunction
|
|
|
|
wire [31:0] uart0_dat_o;
|
|
|
`ifdef UART0
|
`ifdef UART0
|
wire uart0_cs;
|
wire uart0_cs;
|
assign uart0_cs = wbs_adr_i[uart0_mem_map_hi:uart0_mem_map_lo] == uart0_base_adr[uart0_mem_map_hi:uart0_mem_map_lo];
|
assign uart0_cs = wbs_adr_i[uart0_mem_map_hi:uart0_mem_map_lo] == uart0_base_adr[uart0_mem_map_hi:uart0_mem_map_lo];
|
wire [7:0] uart0_temp;
|
wire [7:0] uart0_temp;
|
wire uart0_ack_o;
|
wire uart0_ack_o;
|
Line 1460... |
Line 1462... |
// Wishbone signals
|
// Wishbone signals
|
.wb_adr_i(wbs_adr_i[2:0]), .wb_dat_i(tobyte(wbs_sel_i,wbs_dat_i)), .wb_dat_o(uart0_temp), .wb_we_i(wbs_we_i), .wb_stb_i(wbs_stb_i), .wb_cyc_i(wbs_cyc_i & uart0_cs), .wb_ack_o(uart0_ack_o), .wb_sel_i(4'b0),
|
.wb_adr_i(wbs_adr_i[2:0]), .wb_dat_i(tobyte(wbs_sel_i,wbs_dat_i)), .wb_dat_o(uart0_temp), .wb_we_i(wbs_we_i), .wb_stb_i(wbs_stb_i), .wb_cyc_i(wbs_cyc_i & uart0_cs), .wb_ack_o(uart0_ack_o), .wb_sel_i(4'b0),
|
.int_o(uart0_irq), // interrupt request
|
.int_o(uart0_irq), // interrupt request
|
// UART signals
|
// UART signals
|
// serial input/output
|
// serial input/output
|
.stx_pad_o(uart0_tx_pad_i), .srx_pad_i(uart0_rx_pad_i),
|
.stx_pad_o(uart0_tx_pad_o), .srx_pad_i(uart0_rx_pad_i),
|
// modem signals
|
// modem signals
|
.rts_pad_o(), .cts_pad_i(1'b0), .dtr_pad_o(), .dsr_pad_i(1'b0), .ri_pad_i(1'b0), .dcd_pad_i(1'b0) );
|
.rts_pad_o(), .cts_pad_i(1'b0), .dtr_pad_o(), .dsr_pad_i(1'b0), .ri_pad_i(1'b0), .dcd_pad_i(1'b0) );
|
assign uart0_dat_o = mask( toword(uart0_temp), uart0_ack_o);
|
assign uart0_dat_o = mask( toword(uart0_temp), uart0_ack_o);
|
`else
|
`else
|
assign uart0_dat_o = 32'h0;
|
assign uart0_dat_o = 32'h0;
|