OpenCores
URL https://opencores.org/ocsvn/gpio/gpio/trunk

Subversion Repositories gpio

[/] [gpio/] [tags/] [asyst_3/] [rtl/] [verilog/] [gpio_top.v] - Diff between revs 19 and 20

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 19 Rev 20
Line 43... Line 43...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.4  2001/12/12 07:12:58  lampret
 
// Fixed bug when wb_inta_o is registered (GPIO_WB_REGISTERED_OUTPUTS)
 
//
// Revision 1.3  2001/11/15 02:24:37  lampret
// Revision 1.3  2001/11/15 02:24:37  lampret
// Added GPIO_REGISTERED_WB_OUTPUTS, GPIO_REGISTERED_IO_OUTPUTS and GPIO_NO_NEGEDGE_FLOPS.
// Added GPIO_REGISTERED_WB_OUTPUTS, GPIO_REGISTERED_IO_OUTPUTS and GPIO_NO_NEGEDGE_FLOPS.
//
//
// Revision 1.2  2001/10/31 02:26:51  lampret
// Revision 1.2  2001/10/31 02:26:51  lampret
// Fixed wb_err_o.
// Fixed wb_err_o.
Line 179... Line 182...
`endif
`endif
 
 
//
//
// Internal wires & regs
// Internal wires & regs
//
//
wire                    rgpio_in_sel;   // RGPIO_IN select
 
wire                    rgpio_out_sel;  // RGPIO_OUT select
wire                    rgpio_out_sel;  // RGPIO_OUT select
wire                    rgpio_oe_sel;   // RGPIO_OE select
wire                    rgpio_oe_sel;   // RGPIO_OE select
wire                    rgpio_inte_sel; // RGPIO_INTE select
wire                    rgpio_inte_sel; // RGPIO_INTE select
wire                    rgpio_ptrig_sel;// RGPIO_PTRIG select
wire                    rgpio_ptrig_sel;// RGPIO_PTRIG select
wire                    rgpio_aux_sel;  // RGPIO_AUX select
wire                    rgpio_aux_sel;  // RGPIO_AUX select
Line 279... Line 281...
`endif
`endif
 
 
//
//
// GPIO registers address decoder
// GPIO registers address decoder
//
//
assign rgpio_in_sel = wb_cyc_i & wb_stb_i & (wb_adr_i[`GPIO_OFS_BITS] == `GPIO_RGPIO_IN) & full_decoding;
 
assign rgpio_out_sel = wb_cyc_i & wb_stb_i & (wb_adr_i[`GPIO_OFS_BITS] == `GPIO_RGPIO_OUT) & full_decoding;
assign rgpio_out_sel = wb_cyc_i & wb_stb_i & (wb_adr_i[`GPIO_OFS_BITS] == `GPIO_RGPIO_OUT) & full_decoding;
assign rgpio_oe_sel = wb_cyc_i & wb_stb_i & (wb_adr_i[`GPIO_OFS_BITS] == `GPIO_RGPIO_OE) & full_decoding;
assign rgpio_oe_sel = wb_cyc_i & wb_stb_i & (wb_adr_i[`GPIO_OFS_BITS] == `GPIO_RGPIO_OE) & full_decoding;
assign rgpio_inte_sel = wb_cyc_i & wb_stb_i & (wb_adr_i[`GPIO_OFS_BITS] == `GPIO_RGPIO_INTE) & full_decoding;
assign rgpio_inte_sel = wb_cyc_i & wb_stb_i & (wb_adr_i[`GPIO_OFS_BITS] == `GPIO_RGPIO_INTE) & full_decoding;
assign rgpio_ptrig_sel = wb_cyc_i & wb_stb_i & (wb_adr_i[`GPIO_OFS_BITS] == `GPIO_RGPIO_PTRIG) & full_decoding;
assign rgpio_ptrig_sel = wb_cyc_i & wb_stb_i & (wb_adr_i[`GPIO_OFS_BITS] == `GPIO_RGPIO_PTRIG) & full_decoding;
assign rgpio_aux_sel = wb_cyc_i & wb_stb_i & (wb_adr_i[`GPIO_OFS_BITS] == `GPIO_RGPIO_AUX) & full_decoding;
assign rgpio_aux_sel = wb_cyc_i & wb_stb_i & (wb_adr_i[`GPIO_OFS_BITS] == `GPIO_RGPIO_AUX) & full_decoding;
Line 433... Line 434...
always @(wb_adr_i or rgpio_in or rgpio_out or rgpio_oe or rgpio_inte or
always @(wb_adr_i or rgpio_in or rgpio_out or rgpio_oe or rgpio_inte or
                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[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_out};
                        wb_dat[dw-1:0] = {{dw-gw{1'b0}}, rgpio_out};
                end
                end
                `GPIO_RGPIO_OE: begin
                `GPIO_RGPIO_OE: begin
                        wb_dat[dw-1:0] <= {{dw-gw{1'b0}}, ~rgpio_oe};
                        wb_dat[dw-1:0] = {{dw-gw{1'b0}}, ~rgpio_oe};
                end
                end
                `GPIO_RGPIO_INTE: begin
                `GPIO_RGPIO_INTE: begin
                        wb_dat[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_inte};
                        wb_dat[dw-1:0] = {{dw-gw{1'b0}}, rgpio_inte};
                end
                end
                `GPIO_RGPIO_PTRIG: begin
                `GPIO_RGPIO_PTRIG: begin
                        wb_dat[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_ptrig};
                        wb_dat[dw-1:0] = {{dw-gw{1'b0}}, rgpio_ptrig};
                end
                end
                `GPIO_RGPIO_AUX: begin
                `GPIO_RGPIO_AUX: begin
                        wb_dat[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_aux};
                        wb_dat[dw-1:0] = {{dw-gw{1'b0}}, rgpio_aux};
                end
                end
                `GPIO_RGPIO_CTRL: begin
                `GPIO_RGPIO_CTRL: begin
                        wb_dat[3:0] <= rgpio_ctrl;
                        wb_dat[3:0] = rgpio_ctrl;
                        wb_dat[dw-1:4] <= {dw-4{1'b0}};
                        wb_dat[dw-1:4] = {dw-4{1'b0}};
                end
                end
`endif
`endif
                default: begin
                default: begin
                        wb_dat[dw-1:0] <= {{dw-gw{1'b0}}, rgpio_in};
                        wb_dat[dw-1:0] = {{dw-gw{1'b0}}, rgpio_in};
                end
                end
        endcase
        endcase
 
 
//
//
// WB data output
// WB data output

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.