Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

how 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 FREQ_PARAM SYSTEM_INFO CLOCK_RATE {clock}

set_module_assignment embeddedsw.CMacro.FREQ [get_parameter_value FREQ_PARAM]

(these line may not be exactly, i can't remember clearly..)

But when i open sopc builder, it says "get_parameter_value can not run GLOBAL", so what is wrong with those tcl command?

11 Replies