defparam VS. //synthesis attribute

S

soxmax

Guest
On monday March 22, 2004

John_H wrote:

<<There's a disconnect between simulation and synthesis for INIT
values. Synthesis uses INIT attributes set with the "synthesis
attribute INIT_00" type comments.

Simulation uses defparams.
Getting the two to do the same thing requires intelligence not yet
designed into simulators or synthesizers. >>

I am trying to instantiate a DCM in a Spartan 3 FPGA. I am using
ModelSim as my simulation tool.

Question 1) Will the following provide me the same in synthesis AND
simulation: (the simulation seems to be working correctly. I don't yet
have hardware to test actual functionality)

// synthesis attribute CLK_FEEDBACK of DCM_INST is "1X"
// synthesis attribute CLKDV_DIVIDE of DCM_INST is "2.000000"
// synthesis attribute CLKFX_DIVIDE of DCM_INST is "25"
// synthesis attribute CLKFX_MULTIPLY of DCM_INST is "24"
// synthesis attribute CLKIN_DIVIDE_BY_2 of DCM_INST is "FALSE"
// synthesis attribute CLKIN_PERIOD of DCM_INST is "40.000000"
// synthesis attribute CLKOUT_PHASE_SHIFT of DCM_INST is "NONE"
// synthesis attribute DESKEW_ADJUST of DCM_INST is
"SYSTEM_SYNCHRONOUS"
// synthesis attribute DFS_FREQUENCY_MODE of DCM_INST is "LOW"
// synthesis attribute DLL_FREQUENCY_MODE of DCM_INST is "LOW"
// synthesis attribute DUTY_CYCLE_CORRECTION of DCM_INST is "TRUE"
// synthesis attribute FACTORY_JF of DCM_INST is "C080"
// synthesis attribute PHASE_SHIFT of DCM_INST is "0"
// synthesis attribute STARTUP_WAIT of DCM_INST is "FALSE"
// synopsys translate_off
defparam DCM_INST.CLK_FEEDBACK = "1X";
defparam DCM_INST.CLKDV_DIVIDE = 2.000000;
defparam DCM_INST.CLKFX_DIVIDE = 25;
defparam DCM_INST.CLKFX_MULTIPLY = 24;
defparam DCM_INST.CLKIN_DIVIDE_BY_2 = "FALSE";
defparam DCM_INST.CLKIN_PERIOD = 40.000000;
defparam DCM_INST.CLKOUT_PHASE_SHIFT = "NONE";
defparam DCM_INST.DESKEW_ADJUST = "SYSTEM_SYNCHRONOUS";
defparam DCM_INST.DFS_FREQUENCY_MODE = "LOW";
defparam DCM_INST.DLL_FREQUENCY_MODE = "LOW";
defparam DCM_INST.DUTY_CYCLE_CORRECTION = "TRUE";
defparam DCM_INST.FACTORY_JF = 16'hC080;
defparam DCM_INST.PHASE_SHIFT = 0;
defparam DCM_INST.STARTUP_WAIT = "FALSE";
// synopsys translate_on

Question 2: What happens if I don't use //synopsys translate_off & on?
(I have deleted them and it doesn't seem to make a difference.)
 
soxmax wrote:
On monday March 22, 2004

John_H wrote:

There's a disconnect between simulation and synthesis for INIT
values. Synthesis uses INIT attributes set with the "synthesis
attribute INIT_00" type comments.

Simulation uses defparams.
Getting the two to do the same thing requires intelligence not yet
designed into simulators or synthesizers.

I am trying to instantiate a DCM in a Spartan 3 FPGA. I am using
ModelSim as my simulation tool.

Question 1) Will the following provide me the same in synthesis AND
simulation: (the simulation seems to be working correctly. I don't yet
have hardware to test actual functionality)

// synthesis attribute CLK_FEEDBACK of DCM_INST is "1X"
// synthesis attribute CLKDV_DIVIDE of DCM_INST is "2.000000"
// synthesis attribute CLKFX_DIVIDE of DCM_INST is "25"
// synthesis attribute CLKFX_MULTIPLY of DCM_INST is "24"
// synthesis attribute CLKIN_DIVIDE_BY_2 of DCM_INST is "FALSE"
// synthesis attribute CLKIN_PERIOD of DCM_INST is "40.000000"
// synthesis attribute CLKOUT_PHASE_SHIFT of DCM_INST is "NONE"
// synthesis attribute DESKEW_ADJUST of DCM_INST is
"SYSTEM_SYNCHRONOUS"
// synthesis attribute DFS_FREQUENCY_MODE of DCM_INST is "LOW"
// synthesis attribute DLL_FREQUENCY_MODE of DCM_INST is "LOW"
// synthesis attribute DUTY_CYCLE_CORRECTION of DCM_INST is "TRUE"
// synthesis attribute FACTORY_JF of DCM_INST is "C080"
// synthesis attribute PHASE_SHIFT of DCM_INST is "0"
// synthesis attribute STARTUP_WAIT of DCM_INST is "FALSE"
// synopsys translate_off
defparam DCM_INST.CLK_FEEDBACK = "1X";
defparam DCM_INST.CLKDV_DIVIDE = 2.000000;
defparam DCM_INST.CLKFX_DIVIDE = 25;
defparam DCM_INST.CLKFX_MULTIPLY = 24;
defparam DCM_INST.CLKIN_DIVIDE_BY_2 = "FALSE";
defparam DCM_INST.CLKIN_PERIOD = 40.000000;
defparam DCM_INST.CLKOUT_PHASE_SHIFT = "NONE";
defparam DCM_INST.DESKEW_ADJUST = "SYSTEM_SYNCHRONOUS";
defparam DCM_INST.DFS_FREQUENCY_MODE = "LOW";
defparam DCM_INST.DLL_FREQUENCY_MODE = "LOW";
defparam DCM_INST.DUTY_CYCLE_CORRECTION = "TRUE";
defparam DCM_INST.FACTORY_JF = 16'hC080;
defparam DCM_INST.PHASE_SHIFT = 0;
defparam DCM_INST.STARTUP_WAIT = "FALSE";
// synopsys translate_on
Looks good to me. Basically for each defparam you have a // synthesis
attribute
that matches. By the way I also find this a royal pain. One thing
that I dislike
is the use of comment lines for synthesis attributes. It means you
can't use
parameters or `define to ensure that the two sets match when you make
changes.
That is you'll always need to make 2 changes to change one parameter.

Note that for any default parameter value you can leave out both the
defparam
and the //synthesis attribute. That is the simulation model and
synthesis
defaults are the same.

Question 2: What happens if I don't use //synopsys translate_off & on?
(I have deleted them and it doesn't seem to make a difference.)
In this case all that happens is that you will have extra parameters
redefined.
If for some reason the synthesis module doesn't contain the parameters
you're trying to redefine with defparam, you could get errors during
synthesis.
I imagine it depends on the synthesis tool, it could also just give a
warning.
 
Note that for any default parameter value you can leave out both the
defparam
and the //synthesis attribute. That is the simulation model and
synthesis
defaults are the same.
gabor,

First: Thank you for your help in answering my questions.

Second: How do I find out what the default parameters are? I have
looked through the device data sheet and it talks about the parameters
but doesn't mention which ones are the default. Are the defaults part
of the synthesis/simulation tools? The Xilinx paperwork is so messed up
and confusing it takes an engineer to figure it all out.

Third: Is there any synthesis software that recognizes "defparam" so I
don't need to enter all the constraints twice. You are right - it is
silly and annoying to have to type everything twice.

Thanks again,

Derek
 

Welcome to EDABoard.com

Sponsor

Back
Top