Forum Discussion
Altera_Forum
Honored Contributor
16 years agohow to export macro to system.h?
eg, I want to put # define MOD_0_FREQ 50000000u to system.h as many altera sopc ip do. And I try to add some line in the MOD_hw.tcl: add_parameter FREQ_PARAM 0 set_parameter_property FRE...
Altera_Forum
Honored Contributor
16 years agoThis is how I'm doing it:
In the main part of the .tcl file I have this: add_parameter CLOCK_SPEED INTEGER 1 set_parameter_property CLOCK_SPEED AFFECTS_GENERATION false set_parameter_property CLOCK_SPEED HDL_PARAMETER false set_parameter_property CLOCK_SPEED SYSTEM_INFO { CLOCK_RATE clock_reset } In my elaboration callback I'm using this: proc elaborate_me {} { set_module_assignment embeddedsw.CMacro.CLOCK_FREQUENCY_IN_HZ [get_parameter_value CLOCK_SPEED] }