Closed jeffdi closed 2 years ago
IMO That is wrong direction to take vs standard header-file usage. See the comment (Authoritive source ...). If user wants to use such macros in their .v, they should include that single-source header file from caravel. Else you proliferate & must maintain more redundant places that have to accurately define the same macros.
@sto6 : This is the user_defines.v file. It cannot be used in both places. So whichever one is used is the authoritative source. Within the base verilog code, the configurations are all referred to by numerical value. So the definitions are only for helping the user. So in that sense, there is no such thing as an authoritative source.
Call it what you want (i.e. not user_defines.v). IMO caravel should host 'a verilog macros file' with the defines of just GPIO_MODE_USERSTD (no USER_CONFIGGPIO), guarded with an ifndef (against being included redundantly). Everything (including user_project's) that needs just those GPIO_MODE_USERSTD* macros includes it.
fixes issue #35