Altera_Forum
Honored Contributor
15 years agoparameter
i wonder why i get 0 of phi1_const when i declare like this:
parameter half_cycle = 5; phi_w = 27; parameter fo1 =8000; parameter phi1_const = (fo1 * (2**phi_w))* (1/(2*half_cycle)); thanksi wonder why i get 0 of phi1_const when i declare like this:
parameter half_cycle = 5; phi_w = 27; parameter fo1 =8000; parameter phi1_const = (fo1 * (2**phi_w))* (1/(2*half_cycle)); thanksHi,
Is it a c prog ? in Nios II ? What kind of type is "parameter" ? Is it integer ? If half_cycle is integer --> (1/ (2*half_cucle)) will give 0 instead of 0.1It is verilog.