Forum Discussion
Altera_Forum
Honored Contributor
15 years agoThere are a couple of good documents on all of this..
http://www.altera.com/literature/hb/qts/qts_qii54022.pdf http://www.altera.com/literature/hb/nios2/n2sw_nii52018.pdf We use the validation phase for the main clock frequency that feeds a SOPC module as it is usually derived and you don't really want them editable in the gui.. But I guess it's much the same depending on how you write the proc callback.... ******* The following is in the ___hw.tcl file for the component ** set_module_property VALIDATION_CALLBACK validate add_parameter clock_freq INTEGER set_parameter_property clock_freq SYSTEM_INFO {CLOCK_RATE "clock"} proc validate {} { set_module_assignment embeddedsw.CMacro.FREQ [get_parameter_value clock_freq] } **** This will add a C Macro to the system.h file like this# define "SOPC_MODULE_NAME"_FREQ 1000000 the "clock" above is the endpoint you defined somewhere else in you tcl file.