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

Subversion Repositories gpio

[/] [gpio/] [tags/] [rel_15/] [rtl/] [verilog/] [gpio_defines.v] - Diff between revs 56 and 62

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

Rev 56 Rev 62
Line 42... Line 42...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.8  2003/12/17 13:00:52  gorand
 
// added ECLK and NEC registers, all tests passed.
 
//
// Revision 1.7  2003/12/01 17:10:44  simons
// Revision 1.7  2003/12/01 17:10:44  simons
// ifndef directive is not supported by all tools.
// ifndef directive is not supported by all tools.
//
//
// Revision 1.6  2003/11/06 13:59:07  gorand
// Revision 1.6  2003/11/06 13:59:07  gorand
// added support for 8-bit access to registers.
// added support for 8-bit access to registers.
Line 136... Line 139...
// this macro. By default it is defined.
// this macro. By default it is defined.
//
//
`define GPIO_REGISTERED_IO_OUTPUTS
`define GPIO_REGISTERED_IO_OUTPUTS
 
 
//
//
 
// Implement aux feature. If this define is not defined also aux_i port and 
 
// RGPIO_AUX register will be removed
 
//
 
// Defined by default.
 
//
 
`define GPIO_AUX_IMPLEMENT
 
 
 
//
 
// If this is not defined clk_pad_i will be removed. Input lines will be lached on 
 
// positive edge of system clock
 
// if disabled defines GPIO_NO_NEGEDGE_FLOPS, GPIO_NO_CLKPAD_LOGIC will have no effect.
 
//
 
// Defined by default.
 
//
 
`define GPIO_CLKPAD
 
 
 
//
// Define to avoid using negative edge clock flip-flops for external clock
// Define to avoid using negative edge clock flip-flops for external clock
// (caused by NEC register. Instead an inverted external clock with
// (caused by NEC register. Instead an inverted external clock with
// positive edge clock flip-flops will be used.
// positive edge clock flip-flops will be used.
 
// This define don't have any effect if GPIO_CLKPAD is not defined and if GPIO_SYNC_IN_CLK is defined
//
//
// By default it is not defined.
// By default it is not defined.
//
//
//`define GPIO_NO_NEGEDGE_FLOPS
//`define GPIO_NO_NEGEDGE_FLOPS
 
 
//
//
// If GPIO_NO_NEGEDGE_FLOPS is defined, a mux needs to be placed on external clock
// If GPIO_NO_NEGEDGE_FLOPS is defined, a mux needs to be placed on external clock
// clk_pad_i to implement RGPIO_CTRL[NEC] functionality. If no mux is allowed on
// clk_pad_i to implement RGPIO_CTRL[NEC] functionality. If no mux is allowed on
// clock signal, enable the following define.
// clock signal, enable the following define.
 
// This define don't have any effect if GPIO_CLKPAD is not defined and if GPIO_SYNC_IN_CLK is defined
//
//
// By default it is not defined.
// By default it is not defined.
//
//
//`define GPIO_NO_CLKPAD_LOGIC
//`define GPIO_NO_CLKPAD_LOGIC
 
 
 
 
 
//
 
// synchronization defines
 
//
 
// Two synchronization flops to input lineis added.
 
// system clock synchronization.
 
//
 
`define GPIO_SYNC_IN_WB
 
 
 
//
 
// Add synchronization flops to external clock input line. Gpio will have just one clock domain, 
 
// everithing will be synchronized to wishbone clock. External clock muas be at least 2-3x slower 
 
// as systam clock.
 
//
 
`define GPIO_SYNC_CLK_WB
 
 
 
//
 
// Add synchronization to input pads. synchronization to external clock.
 
// Don't hawe any effect if GPIO_SYNC_CLK_WB is defined.
 
//
 
//`define GPIO_SYNC_IN_CLK
 
 
 
//
 
// Add synchronization flops between system clock and external clock.
 
// Only possible if external clock is enabled and clock synchroization is disabled.
 
//
 
//`define GPIO_SYNC_IN_CLK_WB
 
 
 
 
 
 
// 
// 
// Undefine if you don't need to read GPIO registers except for RGPIO_IN register.
// Undefine if you don't need to read GPIO registers except for RGPIO_IN register.
// When it is undefined all reads of GPIO registers return RGPIO_IN register. This
// When it is undefined all reads of GPIO registers return RGPIO_IN register. This
// is usually useful if you want really small area (for example when implemented in
// is usually useful if you want really small area (for example when implemented in
// FPGA).
// FPGA).
Line 196... Line 248...
// if the number of I/O lines is in range 9-16,  GPIO_WB_BYTES2 is defined,
// if the number of I/O lines is in range 9-16,  GPIO_WB_BYTES2 is defined,
// if the number of I/O lines is in range 17-24, GPIO_WB_BYTES3 is defined,
// if the number of I/O lines is in range 17-24, GPIO_WB_BYTES3 is defined,
// if the number of I/O lines is in range 25-32, GPIO_WB_BYTES4 is defined,
// if the number of I/O lines is in range 25-32, GPIO_WB_BYTES4 is defined,
 
 
`define GPIO_WB_BYTES4
`define GPIO_WB_BYTES4
 
//`define GPIO_WB_BYTES3
 
//`define GPIO_WB_BYTES2
 
//`define GPIO_WB_BYTES1
 
 
`endif
`endif
 
 
//
//
// WISHBONE address bits used for full decoding of GPIO registers.
// WISHBONE address bits used for full decoding of GPIO registers.
//
//
Line 229... Line 285...
`define GPIO_RGPIO_IN             4'h0  // Address 0x00
`define GPIO_RGPIO_IN             4'h0  // Address 0x00
`define GPIO_RGPIO_OUT          4'h1    // Address 0x04
`define GPIO_RGPIO_OUT          4'h1    // Address 0x04
`define GPIO_RGPIO_OE             4'h2  // Address 0x08
`define GPIO_RGPIO_OE             4'h2  // Address 0x08
`define GPIO_RGPIO_INTE         4'h3    // Address 0x0c
`define GPIO_RGPIO_INTE         4'h3    // Address 0x0c
`define GPIO_RGPIO_PTRIG        4'h4    // Address 0x10
`define GPIO_RGPIO_PTRIG        4'h4    // Address 0x10
 
 
 
`ifdef GPIO_AUX_IMPLEMENT
`define GPIO_RGPIO_AUX          4'h5    // Address 0x14
`define GPIO_RGPIO_AUX          4'h5    // Address 0x14
 
`endif // GPIO_AUX_IMPLEMENT
 
 
`define GPIO_RGPIO_CTRL         4'h6    // Address 0x18
`define GPIO_RGPIO_CTRL         4'h6    // Address 0x18
`define GPIO_RGPIO_INTS         4'h7    // Address 0x1c
`define GPIO_RGPIO_INTS         4'h7    // Address 0x1c
 
 
 
`ifdef GPIO_CLKPAD
`define GPIO_RGPIO_ECLK   4'h8  // Address 0x20
`define GPIO_RGPIO_ECLK   4'h8  // Address 0x20
`define GPIO_RGPIO_NEC    4'h9  // Address 0x24
`define GPIO_RGPIO_NEC    4'h9  // Address 0x24
 
`endif //  GPIO_CLKPAD
 
 
//
//
// Default values for unimplemented GPIO registers
// Default values for unimplemented GPIO registers
//
//
`define GPIO_DEF_RGPIO_IN       `GPIO_IOS'h0
`define GPIO_DEF_RGPIO_IN       `GPIO_IOS'h0
Line 258... Line 321...
// bit 0 to bit 1 in the following order: INTE, INT
// bit 0 to bit 1 in the following order: INTE, INT
//
//
`define GPIO_RGPIO_CTRL_INTE            0
`define GPIO_RGPIO_CTRL_INTE            0
`define GPIO_RGPIO_CTRL_INTS            1
`define GPIO_RGPIO_CTRL_INTS            1
 
 
`ifdef GPIO_LINES32
 
`define GPIO_LINES31
 
`endif
 
`ifdef GPIO_LINES31
 
`define GPIO_LINES30
 
`endif
 
`ifdef GPIO_LINES30
 
`define GPIO_LINES29
 
`endif
 
`ifdef GPIO_LINES29
 
`define GPIO_LINES28
 
`endif
 
`ifdef GPIO_LINES28
 
`define GPIO_LINES27
 
`endif
 
`ifdef GPIO_LINES27
 
`define GPIO_LINES26
 
`endif
 
`ifdef GPIO_LINES26
 
`define GPIO_LINES25
 
`endif
 
`ifdef GPIO_LINES25
 
`define GPIO_LINES24
 
`endif
 
`ifdef GPIO_LINES24
 
`define GPIO_LINES23
 
`endif
 
`ifdef GPIO_LINES23
 
`define GPIO_LINES22
 
`endif
 
`ifdef GPIO_LINES22
 
`define GPIO_LINES21
 
`endif
 
`ifdef GPIO_LINES21
 
`define GPIO_LINES20
 
`endif
 
`ifdef GPIO_LINES20
 
`define GPIO_LINES19
 
`endif
 
`ifdef GPIO_LINES19
 
`define GPIO_LINES18
 
`endif
 
`ifdef GPIO_LINES18
 
`define GPIO_LINES17
 
`endif
 
`ifdef GPIO_LINES17
 
`define GPIO_LINES16
 
`endif
 
`ifdef GPIO_LINES16
 
`define GPIO_LINES15
 
`endif
 
`ifdef GPIO_LINES15
 
`define GPIO_LINES14
 
`endif
 
`ifdef GPIO_LINES14
 
`define GPIO_LINES13
 
`endif
 
`ifdef GPIO_LINES13
 
`define GPIO_LINES12
 
`endif
 
`ifdef GPIO_LINES12
 
`define GPIO_LINES11
 
`endif
 
`ifdef GPIO_LINES11
 
`define GPIO_LINES10
 
`endif
 
`ifdef GPIO_LINES10
 
`define GPIO_LINES9
 
`endif
 
`ifdef GPIO_LINES9
 
`define GPIO_LINES8
 
`endif
 
`ifdef GPIO_LINES8
 
`define GPIO_LINES7
 
`endif
 
`ifdef GPIO_LINES7
 
`define GPIO_LINES6
 
`endif
 
`ifdef GPIO_LINES6
 
`define GPIO_LINES5
 
`endif
 
`ifdef GPIO_LINES5
 
`define GPIO_LINES4
 
`endif
 
`ifdef GPIO_LINES4
 
`define GPIO_LINES3
 
`endif
 
`ifdef GPIO_LINES3
 
`define GPIO_LINES2
 
`endif
 
`ifdef GPIO_LINES2
 
`define GPIO_LINES1
 
`endif
 
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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