nicolas
New Member
Offline
Posts: 1
Dresden, Germany
|
Hello !
I have the following problem, I hope some can help me.
I've written an entity with a lot of parameters, so I decided to put them all in a type record in a package together with a constant declaration of this same type, where all default values are given:
package pck is type param_rec is record p1 : real; p2 : real; ... end record param_rec; constant default_params : param_rec := ( p1 => 1.0, p2 => 2.0, ...); end package pck;
So the bottom level entity is initialized with the default parameter values:
entity bottom_entity is generic( param : param_rec := default_params ); port( ... ); end entity bottom_entity;
In the upper level entity I would like to redeclare only a couple of parameters, not all of them:
E1 : entity bottom_entity ( my_struct ) generic map( param.p1 => 2.0 ) port map ( ... );
Here the compiler issues the error: "too few values for record aggregate". I thought one could reassign individual fields of a record without the need to reassign all of them, particularly because the other fields should have their default values. Does someone know a better solution or see an error above?
Thanks
Nicolas.
|