Line 43... |
Line 43... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.1 2001/09/18 18:49:07 lampret
|
|
// Changed top level ptc into gpio_top. Changed defines.v into gpio_defines.v.
|
|
//
|
// Revision 1.1 2001/08/21 21:39:28 lampret
|
// Revision 1.1 2001/08/21 21:39:28 lampret
|
// Changed directory structure, port names and drfines.
|
// Changed directory structure, port names and drfines.
|
//
|
//
|
// Revision 1.2 2001/07/14 20:39:26 lampret
|
// Revision 1.2 2001/07/14 20:39:26 lampret
|
// Better configurability.
|
// Better configurability.
|
Line 190... |
Line 193... |
// b) wb_sel_i evaluation is enabled and one of the wb_sel_i inputs is zero
|
// b) wb_sel_i evaluation is enabled and one of the wb_sel_i inputs is zero
|
//
|
//
|
assign wb_ack_o = wb_cyc_i & wb_stb_i & !wb_err_o;
|
assign wb_ack_o = wb_cyc_i & wb_stb_i & !wb_err_o;
|
`ifdef GPIO_FULL_DECODE
|
`ifdef GPIO_FULL_DECODE
|
`ifdef GPIO_STRICT_32BIT_ACCESS
|
`ifdef GPIO_STRICT_32BIT_ACCESS
|
assign wb_err_o = wb_cyc_i & wb_stb_i & !full_decoding | (wb_sel_i != 4'b1111);
|
assign wb_err_o = wb_cyc_i & wb_stb_i & (!full_decoding | (wb_sel_i != 4'b1111));
|
`else
|
`else
|
assign wb_err_o = wb_cyc_i & wb_stb_i & !full_decoding;
|
assign wb_err_o = wb_cyc_i & wb_stb_i & !full_decoding;
|
`endif
|
`endif
|
`else
|
`else
|
`ifdef GPIO_STRICT_32BIT_ACCESS
|
`ifdef GPIO_STRICT_32BIT_ACCESS
|
assign wb_err_o = (wb_sel_i != 4'b1111);
|
assign wb_err_o = wb_cyc_i & wb_stb_i & (wb_sel_i != 4'b1111);
|
`else
|
`else
|
assign wb_err_o = 1'b0;
|
assign wb_err_o = 1'b0;
|
`endif
|
`endif
|
`endif
|
`endif
|
|
|
Line 332... |
Line 335... |
rgpio_ptrig or rgpio_aux or rgpio_ctrl)
|
rgpio_ptrig or rgpio_aux or rgpio_ctrl)
|
case (wb_adr_i[`GPIO_OFS_BITS]) // synopsys full_case parallel_case
|
case (wb_adr_i[`GPIO_OFS_BITS]) // synopsys full_case parallel_case
|
`ifdef GPIO_READREGS
|
`ifdef GPIO_READREGS
|
`GPIO_RGPIO_OUT: begin
|
`GPIO_RGPIO_OUT: begin
|
wb_dat_o[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_out};
|
wb_dat_o[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_out};
|
// wb_dat_o[dw-1:gw] <= {dw-gw{1'b0}};
|
|
end
|
end
|
`GPIO_RGPIO_OE: begin
|
`GPIO_RGPIO_OE: begin
|
wb_dat_o[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_oe};
|
wb_dat_o[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_oe};
|
// wb_dat_o[dw-1:gw] <= {dw-gw{1'b0}};
|
|
end
|
end
|
`GPIO_RGPIO_INTE: begin
|
`GPIO_RGPIO_INTE: begin
|
wb_dat_o[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_inte};
|
wb_dat_o[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_inte};
|
// wb_dat_o[dw-1:gw] <= {dw-gw{1'b0}};
|
|
end
|
end
|
`GPIO_RGPIO_PTRIG: begin
|
`GPIO_RGPIO_PTRIG: begin
|
wb_dat_o[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_ptrig};
|
wb_dat_o[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_ptrig};
|
// wb_dat_o[dw-1:gw] <= {dw-gw{1'b0}};
|
|
end
|
end
|
`GPIO_RGPIO_AUX: begin
|
`GPIO_RGPIO_AUX: begin
|
wb_dat_o[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_aux};
|
wb_dat_o[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_aux};
|
// wb_dat_o[dw-1:gw] <= {dw-gw{1'b0}};
|
|
end
|
end
|
`GPIO_RGPIO_CTRL: begin
|
`GPIO_RGPIO_CTRL: begin
|
wb_dat_o[3:0] <= rgpio_ctrl;
|
wb_dat_o[3:0] <= rgpio_ctrl;
|
wb_dat_o[dw-1:4] <= {dw-4{1'b0}};
|
wb_dat_o[dw-1:4] <= {dw-4{1'b0}};
|
end
|
end
|
`endif
|
`endif
|
default: begin
|
default: begin
|
wb_dat_o[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_in};
|
wb_dat_o[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_in};
|
// wb_dat_o[dw-1:gw] <= {dw-gw{1'b0}};
|
|
end
|
end
|
endcase
|
endcase
|
|
|
//
|
//
|
// Generate interrupt request
|
// Generate interrupt request
|