F
fpgabuilder
Guest
Why does the following macro always get 1 in my simulation?
`define ADC_FS 125 //MHz
`define ADC_TSER (1000/(7*`ADC_FS)) //ns
Later in one module I have -
parameter TSER = `ADC_TSER;
In the simulator I always see TSER = 1. I am using Modelsim DE. I
have also tried an entire range of simulator timescale and precision.
i.e. going from 1ps/1ps to 1ns/100ps. Additionally, it also causes
the simulator to exceed its iteration limit at following line of code
-
always #(TSER/2) clk = ~clk;
I again see this at all timscale settings. But I cannot understand
why it should do this at 1ns/1ps setting.
I appreciate your help.
Thanks.
Sanjay
`define ADC_FS 125 //MHz
`define ADC_TSER (1000/(7*`ADC_FS)) //ns
Later in one module I have -
parameter TSER = `ADC_TSER;
In the simulator I always see TSER = 1. I am using Modelsim DE. I
have also tried an entire range of simulator timescale and precision.
i.e. going from 1ps/1ps to 1ns/100ps. Additionally, it also causes
the simulator to exceed its iteration limit at following line of code
-
always #(TSER/2) clk = ~clk;
I again see this at all timscale settings. But I cannot understand
why it should do this at 1ns/1ps setting.
I appreciate your help.
Thanks.
Sanjay