URL
https://opencores.org/ocsvn/versatile_counter/versatile_counter/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 7 |
Rev 12 |
// module name
|
// module name
|
`define CNT_MODULE_NAME vcnt
|
`define CNT_MODULE_NAME vcnt
|
|
|
// counter type = [BINARY, GRAY, LFSR]
|
// counter type = [BINARY, GRAY, LFSR]
|
//`define CNT_TYPE_BINARY
|
//`define CNT_TYPE_BINARY
|
`define CNT_TYPE_GRAY
|
`define CNT_TYPE_GRAY
|
//`define CNT_TYPE_LFSR
|
//`define CNT_TYPE_LFSR
|
|
|
// q as output
|
// q as output
|
`define CNT_Q
|
`define CNT_Q
|
// for gray type counter optional binary output
|
// for gray type counter optional binary output
|
`define CNT_Q_BIN
|
`define CNT_Q_BIN
|
|
|
// up/down, forward/rewind
|
// up/down, forward/rewind
|
`define CNT_REW
|
`define CNT_REW
|
|
|
// number of CNT bins
|
// number of CNT bins
|
`define CNT_LENGTH 4
|
`define CNT_LENGTH 4
|
|
|
|
// async reset value
|
|
`define CNT_RESET_VALUE `CNT_LENGTH'h0
|
|
|
// clear
|
// clear
|
`define CNT_CLEAR
|
`define CNT_CLEAR
|
|
|
// set
|
// set
|
`define CNT_SET
|
`define CNT_SET
|
`define CNT_SET_VALUE `CNT_LENGTH'h9
|
`define CNT_SET_VALUE `CNT_LENGTH'h9
|
|
|
// wrap around creates shorter cycle than maximum length
|
// wrap around creates shorter cycle than maximum length
|
//`define CNT_WRAP
|
//`define CNT_WRAP
|
`define CNT_WRAP_VALUE `CNT_LENGTH'h9
|
`define CNT_WRAP_VALUE `CNT_LENGTH'h9
|
|
|
// clock enable
|
// clock enable
|
`define CNT_CE
|
`define CNT_CE
|
|
|
// q_next as an output
|
// q_next as an output
|
//`define CNT_QNEXT
|
//`define CNT_QNEXT
|
|
|
// q=0 as an output
|
// q=0 as an output
|
//`define CNT_Z
|
//`define CNT_Z
|
|
|
// q_next=0 as a registered output
|
// q_next=0 as a registered output
|
//`define CNT_ZQ
|
//`define CNT_ZQ
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.