* Bug: In Hurricane, in StaticObservable::getObserver(), if the slot
pointer is NULL, do not try to access the owner. Returns NULL, so
the caller can be aware of the situation...
* Change: In Hurricane, in BreakpointWidget & ExceptionWidget some
cosmetic changes (fonts and window sizes).
* Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account
the constraints from the source AutoContact, as it holds the constraints
transmitted by the RoutingPads and sets up by propageConstraintsFromRp().
It is likely to be a bug affecting the original Katabatic as well.
* Change: In Anabatic, in RawGCellsUnder(), check that the segment is not
completly oustside the cell abutment box and truncate the coordinates
to the part that is inside. Use the "shrink" if we reach the east/north
border.
* Change: In Anabatic, in Configuration, no more decorator because we will
use a true derived relationship. Katana *derives* from *Anabatic* and do
not *decorate* it, so the Configuration can do the same. It also implies
that we directly create a Katana engine, not an Anabatic one.
* Change: In Anabatic, in Session, do not allow the opening of the Session
in a standalone fashion (with a static method). Instead it must be opened
using the relevant method of the Anabatic/Katana engine. This ensure we
are opening the right Session type.
* Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment
is not part of the collection by default, but will be included if the
Flags::WithSelf is set.
* Change: In Configuration, all the flags value are now defined in two steps.
Declared in the header and initialized in the module. This is to prevent
the fact that on some cases, in relation with the Python "extern C" part
modules, we need a true allocated variable. It was causing weird linking
problems.
A side effect is that they can no longer be used as entry is switches,
have to replace them by if/else.
* New: In Anabatic, new GCell::getNeighborAt() utility function.
* Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with
the grid type... Back annote all the edges capacity (north & east) with
the reserved local capacity.
* New: Complete portage of Kite over Anabatic. The new engine is christened
"Katana" for Kite-Analogic. When it's capabilities and performances
will be on a part with Kite, it is to completly replace it (and take
back the "Kite" name). Preliminary tests seems to show that, contrary
to intuition (because built on a more complex/slower grid), it is even
slightly faster than Kite 8-).
* Bug: In Hurricane, in NetlistWidget CTOR, the horizontal header was set
up assuing that there was (at least) three sections (column) in the
model, which was wrong. Now it is done in the setCell() method which
know the exact number of sections.
It was a bug in both Qt 4 & 5, but was showing only under Qt 5.
* Bug: In Hurricane, in Backtrace, under RHEL 6 when the package
<devtoolset-2-binutils-devel> is *not* installed, Backtrace uses the
wrong "bfd.h" from the system instead of the one from the devtoolset2,
causing itself to core.
The Backtrace, then try to create a second Backtrace from this
error, generating an infinite loop. To prevent this situation add a
counter so that only one Backtrace can be created at a any time.
And incidentally display a more meaningful error message along with
* New: In Bootstrap, add cmake detection for libbfd.
* New: In Hurricane, in Backtrace, add BFD support to read debuginfo from
the shared libraries (aka DSO) when compiled with "-g". This avoid the
tedious step of running gdb after generating a core dump. It is also
mandatory in ExceptioWidget to known from where an exception was thrown
as Qt::notify() block all C++ exceptions.
Currently works only under Linux (gcc or clang), may be extended in
the future.
The BFD reading is based on the small utility from:
Don Hatch (hatch@plunk.org)
http://www.plunk.org/~hatch/goodies/backtracefilt.C
And small trinket: adjust the size of the window for high DPI screens.
* New: In CRL Core & Unicorn add link toward libbfd, if needed.
* Bug: In Hurricane, in tstream (Commons.h), in the *template* overload of
operator<<(), do not use the operator<<() of ostream as it will be
looked up in "stage 1" (template definition) and so will miss all the
overloads added later and built over getString<>(). Instead, make use
of getString<>(), which, as another template will be looked up in
"stage 2" (template instanciation) and at that point will have all the
needed template specialisation of getString<>().
We also need to define new stream manipulators to be able to create
a matching template overload not dependant from the implementation.
To avoid name clashes, we prefix a 't'. For now, only 'tsetw()' is
refined.
As a side effect, we cannot directly print bit-fields into the stream,
we must go through an intermediate variable (happens once in AutoContact).
* Change: In Hurricane Commons.h, even when cdebug print nothing, it slow
down the program (three times for Kite!). Create a macro cdebug_log
which calls cdebug *only* if the debug level is active.
* Change: In Hurricane::Observer, simplification of the template so that
we can use it directly instead of creating a derived class with an
implementation of Observer::notify(). Now the implemenation is the
same for all and just calls a notify() method on the owner object.
Create a StaticObservable for fast access of the observers. This
is mainly a fixed size table (array<>) with oberservers at known
indexes. This way we can go from the obervable to the observer
owner in one indirect access (or so I hope).
* Change: In Hurricane::CellViewer, use the new observers.
* Change: In Hurricane::ControllerWidget, use the new observers.
* Change: In Hurricane::CellWidget, set the winidow initial size to a
more sensible 500px.
* Change: In CRL::LibraryManager, use the new observers.
* Change: In CRL::LibraryManager, use the new observers.
* Change: In CRL, in display.conf & technology.conf, modification for
the ST hcmos9gp capacitors.
* Change: In Hurricane, in CellWidget, enable the drawing of ExtensionGos
according to the the threshold paramaters (as layers do).
* Change: In CRL Core, provide DrawingStyle for Anabatic::GCell &
Anabatic::Edge. Use the exact name of the ExtensionGo.
In kite.conf, add settings for the size of an edge as the optimal
size may change between analog & digital designs.
* New: In Anabatic:
- Support for fast position query using a matrix.
- Computation of the Edge capacity, based on the routing gauge parameters.
- Graphic display of the edges capacity. Added configuration
parameters to size the bounding box of an Edge.
* Bug: In Anabatic:
- GCell::_moveEdges was both too complex (some cases never arise the
way we divide GCells) and bugged.
* Bug: In Unicorn, in cgt.py, do not import Anabatic as it is not present
yet in the devel branch.
* Change: In Hurricane, in Commons.h, in the vector slot template, start
index at 0 and not 1 (to closer to the internal representation).
* Change: In ExtensionGo, forgotten trace system calls to update.
* Change: In Hurricane, in Flags add operator overload for "int" type
and not only "unsigned int". Otherwise the compiler complaints about
ambiguous overload when using enum values which are considered as
"int".
Simpler code for the BaseFlags::contains() method.
Added implicit conversion from BaseFlags toward bool type.
* Change: In Hurricane, in Commons, complete replacement of the previous
two trace systems (trace & ltrace) by a stream-based one.
As it is a true object it is much less fragile than the one based
on defines (but maybe a little slower).
Define a reservation table for the trace levels for all the
Coriolis & Chams components.
* Change: All tools, use the new trace system.
* Change: In Hurricane, in PyHurricane.h, in all DirectSet*() macros,
suppress the third parameter giving the function name. It is now
build from stringification of other parameters.
The various macros calls are also modificated all througout
Isobar.
Added PyAny_AsInt() to convert a Python Int or Long into an int.
Maybe we should manage only long, because the type difference seems
ambiguous in Python itself.
* Change: In Hurricane, in PyHurricane.h, in DirectGetBoolAttribute()
deduce the function name to display in messages from the arguments.
Idem for DirectIsAFromCStringAttribute(), DirectGetIntAttribute(),
DirectGetUIntAttribute(), DirectGetDoubleAttribute() and
DirectGetStringAttribute().
* New: In Hurricane, in PyHurricane.h, new macro DirectGetNameAttribute()
to build accessors for method returning a Name.
* New: In Hurricane, in PyHurricane.h, new macro DirectSetIntAttribute()
to build modificators taking int arguments.
* Bug: In Hurricane, in PyHurricane.h, in macro DirectSetBoolAttribute(),
the check for a boolean PyObject was wrong, leading the macro to
systematically emit a Python exception.
* Bug: In Hurricane, in PyInstance method table, PyLibrary_create() was
registered as a NOARGS function, but it *do* have arguments, change
to VARARGS.
* Bug: In Hurricane, in PyHurricane.h, the macro GENERIC_METHOD_HEAD was
not checking at all that the underlying Hurricane object was not NULL.
This may have lead to core-dumps.
* In CRL Core, in BlifParser, when an input terminal of an instance is
either connected to power or ground, insert a zero_x0 or one_x0
Cell to avoid direct connection to the supply (the router is not
able to do it). The names and terminals of the intermediate cells
are hard-wired for now (to SxLib).
When merging Nets, always merge internal nets into external ones
as the other way around is not always legal.
* In Hurricane, in Cell::flattenedNets(), if the cell has already been
flattened, do not issue warnings about duplictated flattened nets.
* In Hurricane, in Net, allow Net::setName() to switch the main name
for an alias without complaining about an already used name.
* In Cumulus, in RSavePlugin.py, when "views" is supplied in keywords
(kw) arguments, override the default instead of merging with it.
This is to allow scripts to save exactly what views they want.
* Change: In Hurricane, in DataBase::CellDepths() the recursion stop
criterion must be Cell::isLeaf() and not Cell::isTerminal() as
the second one can be used to hide some levels of hierarchy,
and we want all of them in a blob.
* New: In Hurricane, in Cell, create a new Slaveds relation to keep
track of all the Cells with a slaved abutment box. This work is
incomplete as we do not manage the behavior in case of merge or
Cell destruction or slaving Cells with aready slaveds ones.
Modify Cell::setAbutmentBox() to work in both autonomous and
slaved mode.
* New: In Hurricane, in Net, add a new type of Net: BLOCKAGE this
avoid us to be dependant on the framework pattern recognition.
(change propagated to the Python support)
* New: In CRL Core, in the various drivers, recognize blockage nets
as such and set their type accordingly.
* Change: In CRL, in Toolbox::deleteEmptyNets(), preserve blockage
Nets. This was the cause of crashs in Kite::BuildPowerRails() as
we where trying to use a deleted blockage net...
* Bug: In Hurricane, in NetAlias, do not write NetAlias as a name
but as a type. They were not read back and moreover staying in
the JSON parser stack.
* In Hurricane: In Instance::slaveAbutmentBox() and Instance::uniquify()
use isUnique() instead of isUniquified(). This way we do not clone
masterCells that are unique in the design. This was the reason
sometimes "holes" were appearing in the visualiser, as the AB were
not merged. The uniqification policy may need some refinement.
* Change: In Hurricane, in JsonReader::HurricaneHandler, add RawNumber().
Don't know what kind of data it parses, so for now if it's called,
just issue a warning.
* Bug: In documentation, in UsersGuide, add dependencies on doc_HTML and
doc_LaTeX so they are rebuild if the source files changes.
Some modifications to work with our new installation of TeXLive 2014.
* Bug: In Hurricane, in HApplication, ExceptionWidget ans PyHurricane.h,
forgot to catch the Hurricane::Bug exception which was leading to
terminate() without explanations.
* Change: In Katabatic, In GCellTopology, now support one GCell with
five metal1 terminal of the same net. This unlikely configuration
did appear in the SNX for the first time...
* Bug: In Hurricane, in Cell_HyperNetRootNetOccurrences::Locator, must
also check that the current Net is not a DeepNet in the constructor.
Take the occasion to prune Net that are automatic.
* Change: In Hurricane, in DeepNet::_createRoutingPads(), check for
already created RoutingPads. That is, the DeepNet must not have
RoutingPad components or Segments components.
* Bug: In Hurricane, in Cell::flattenNets(), addition to the topHyperNets
vector was done *inside* the components loop, resulting in multiple
additions of the same top net. This was leading to the RoutingPads
created multiple times on the same connectors. Hence the conflict in
KiteEngine::protectRoutingPads().
* Change: In Hurricane, in Cell::flattenNets(), do not create RoutingPads
or build rings on already routed Nets. A Net is considered already
routed if it has at least one Segment. This way we avoid Rubbers to
be drawn over routed Nets.
* Change: In Hurricane, in DeepNet, do not build RoutingPads & rings on
already routed Nets (same condition as in Cell::flattenNets()).
* New: In Hurricane, in HyperNet, new collection of all component
occurrences of an HyperNet. May or may not (default) include
components from the leaf cells.
* Bug: In Hurricane, In Cell, the quad-tree cannot be mergeds because
when a geometrical search is performed, components, and even more
importantly, instances from lower hierarchical levels will be
reported. And there is no simple way to discriminate them.
* Change: In Hurricane, Cell & Instance, change the flag of
MergedQuadTree into SlavedAb.
* Bug: In Hurricane, In Instance::slaveAbutmentBox(), the AB of the
master model must be set before calling setPlacementStatus()
otherwise the Instance do not get inserted into the quad-tree
(empty AB).
* Bug: In Hurricane, in CellWidget, do *not* rescale iteratively the _initialSide
attribute under high DPI (do it once).
* Bug: In Hurricane, in CellPrinter, suppress the divide by 4 scaling of the
printer widget. Don't remember why I did so, and it generate too small
pictures.
* Bug: In Hurricane, in Cell::_preDestroy(), the classic mistake again:
do not iterate over a collection while deleting it's elements.
Now should be safe.
* Change: In CRL Core, set the default display style to "Alliance.Classic [black]"
(my favorite).
* Change: In bootstrap, in socInstaler.sh, use the current version of
rapidjson.
* Change: In Hurricane, in FileWriteGzStream, complie to the latest
rapidjson headers organization.
* New: In Hurricane, in Cell, emit a new signal CellDestroyed toward the
observers (i.e. the CellViewer(s)), from _preDestroy().
* Change: In Hurricane, in CellViewer, in CellObserver::notify(), manage
the CellDestroyed case. Do not forget to remove the deleted Cell
from the viewer's history.
* Test: post-receive hook on server should send mail [1].
* New: In VLSISAPD, in Parameter, callback have now a tag, which the
pointer to the caller. This allow for the callback removal when
the caller is destroyed.
* New: In VLSISAPD, in WidgetDescription, when associated to a parameter,
the destructor must remove the associated callback function on
the Parameter.
* New: In Hurricane, added JSON support for Configuration, separated
from vlsisapd, as the support is not available at this point.
JSON support for Configuration, Parameter & LayoutDescription.
* Change: In Hurricane, in JsonStack, the stack of JsonObjects has been
displaced here from HurricaneHandler. This way, all
JsonObject::toData() can access the JsonOjects in the context
of the parser.
* New: In Hurricane, in DBo::toJson() added support for Entity by
reference (ids).
* New: In Hurricane, added JSON support for all Layer sub-class types.
* New: In Hurricane, in Technology, export the Layers, but must be
sorted by increasing mask value.
* New: In Hurricane, in Entity, added support for Entity by reference (ids).
* New: In Hurricane, in DataBase, added technology full support.
* New: In Hurricane, In JsonNet, move the ring rebuild management from
JsonStack to JsonNet.
* New: In Hurricane, added JSON support for NetAlias, NetExternalcomponents
(not cleanly implemented as a Relation).
* New: In Hurricane, new method Cell::fromJson() to load a cell from
a JSON file.
* New: In Hurricane, In Graphics, make it an observable, for when JSON
fully reload the graphic state, it must be able to notify other
objects (namely the Controller).
* New: In Hurricane, in ControllerWidget, observe the Graphics to regenerate
the palette as needed. New method ControllerTab::graphicsUpdated().
* New: In Hurricane, in RawDrawingStyle added a destructor to release the
Qt pen/brush. Added JSON support for HSVr, DrawingStyle, DrawingGroup,
& DisplayStyle.
* New: In Hurricane, in GraphicsWidget, rewrite correctly the readGraphics()
to erase the previous widgets and re-create the new ones.
* New: In Hurricane, in PaletteWidget, correct re-creation of the layout/widgets
in case of Graphics change.
* New: In CRL Core, in System, register the parameters callbacks with
the address of the object, for later deletion.
* New: In CRL Core, in AllianceFramework, make it observable, to notify
library changes. For the AllianceFramework creation, now allow to
completly bypass the Python initialization system, when we expect
to restore it from a full blob. Added methods to sets the default
RoutingGauge & CellGauge.
* New: In CRL Core, added JSON suppport for CellGauge, RoutingLayerGauge
& RoutingGauge.
* New: In CRL Core, in LibraryManager, oberver AllianceFramework, to update
the list of libraries in case of change (for JSON full reload).
* New: In boostrap, in ccb.py, added support for the "support" project
which contains external dependencies. Currently contains only
RapidJSON. Those dependencies must be cloned here manually.
* New: In Hurricane, Initializer class for an ordered static initialization
across different compilation modules.
* Change: In Hurricane, at DataBase level, no longer save the Cells in
the libraries, but create and ordered list of Cell. Deepest cells
(leaf cells) first. To avoid dependency problems.
* New: In Hurricane, JSON support for Property.
* New; In CRL, added JSON support for AllianceFramework, Environement &
Catalog and their associated properties. Adjustment of the
AllianceLibrary creation policy.
* New: In Hurricane, added first support for DataBase native import/export
using JSON.
We choose RapidJSON, in SAX mode, to manage the JSON format low level
Read/Write. Thus, it's Git repository http://github.com/miloyip/rapidjson
must be added under ~/coriolis-2.x/src and manually build and installed
in the Coriolis installation tree (to be integrated in ccb later).
Two mode are being supported:
1. Cell mode: one Cell only is saved. In that mode, Entities
referred by Occurrences are "outside" the file. They are coded
through their "signature" (mostly, all the values of their
attributes). The ids saved in the file cannot be restored
identically as we cannot predict when and in which context the
Cell will be reloaded.
2. Design Blob mode: the whole design hierarchy, down and including
the standard cells is saved. This way the design is completly
self contained and Entities ared referred through their ids.
A design blob can only be loaded immediatly after starting cgt
as the DataBase *must* be empty. This way we restore the whole
design hierarchy with *exactly* the same ids.
Now, Hurricane object should provide a "toJson()" method for driving
JSON, and be associated with a JsonObject derived class for parsing.
* New: In Hurricane, ability to force the next id that will be used for a
DBo (used by Design Blob Mode).
* New: In Hurricane, in DataBase, added getCell() and getLibrary() functions
to allow the hierarchical access of a Cell/Library in native mode
(i.e. whithout the requirement of AllianceFramework).
* New: In Hurricane, In CellViewer, added menu entry for Save/Load of
JSON Design Blobs. Added at this level because we consider it as the
"native" format of Hurricane.
* New: In Unicorn, added support of import/export of JSON Cell.
* Bug: In Hurricane, in Instance, when cloning an Instance or uniquifying
it's master Cell, we forgot about the Occurrences (through shared pathes).
When an instance is cloned the Shared pathes still points toward the
original Instance. And when it's the master Cell that is uniquifyed
it's the Entities pointed to that remains in the original Cell.
This is a software design problem. It is difficult to define what
policy to adopt when uniquifying: basically that means that one
Occurence is either moved onto the clone or duplicated. Furthermore,
it is not trivial to known what Occurrence is pointing on the
uniquifyed/cloned item. Have to think about it a little more.
* Bug: In Etesian, in EtesianEngine, build the flattened nets and their
RoutingPads *after* uniquifying (through slaving bounding boxes).
This way we avoid the Occurrences problem described above.
* Bug: In Etesian, in EtesianEngine, invalidate the RoutingPad after
processing the placement so they are put into the right quadtree.
This problem is due to the fact that the RoutingPads do not belong
to the Instance that they refer. And when this instance is moved
around, she doesn't inform the RoutingPad that is has moved.
More software architecture design to review...
* New: In Hurricane, in NetlistWidget & NetlistModel, adds a column for
the RoutingPads count. Special display to mark global nets.
* Change: In Hurricane, in all MVC's models, some improvements on the
way the columns are sized and the titles displayeds.
* New: In Hurricane, added hierarchy browser in the controller.
The hierarchy is presented as a tree. New MVC, HierarchyInformations,
HierarchyModel and HierarchyBrowser.
When using a data model which is not directly connect inside the
model, we must use the internalPointer field of the QModelIndex.
But this field is also used by the QSortFilterproxymodel, this
prevent using it with a Tree model.
The filter is directly implemented and is specific to each
Instance entry.
* Change: In CellWidget & CellWidget::State, now store the Cell and
a Path, this way we can keep track of the hierarchy when browsing.
The Path is in the State and so propagated back to the Controller.
* Change: In HierarchyCommand, use the Path with setCell().
* New: In Hurricane, in Cell & Instance, add the ability to merge the
QuadTree when *second level* instances of a Cell are placed in
the same space as the top Cell. This is the case of a deeply
hierarchical design made of only standard cells that are to
be placed in a "flat" manner.
The design is uniquified then the intermediate instances models,
which should be unique at that point have their QuadTree merged
through a call to Instance::slaveAbutmentBox(). That method will
make the model of the instance use the QuadTree of the Cell to
which the instance belong. The instance model no longer posseses
a dedicated QuadTree. As a corollary the abutment box of both
Cell are kept identical and the Instance has it's transformation
set to (0,0,ID).
Remark: when we talk about "QuadTree", we mean in fact the
QuadTree for the instances *and* the SliceMap (Layer+QuadTree).
Consequence in Query: when going through the resulting
"flattened" QuadTree we will find objects with an incomplete
Path du to the fact that we didn't have to explore their
Instance/Cell level to reach them. The shunted part of the
Path is stored in the Go master Cell in the _shuntedPath
attribute. This also affect the displayed depth of hierarchy,
but not too badly.
* New: In Hurricane, in Cell, new methods:
- Cell::updatePlacedFlag() : set the placement flags.
- Cell::isUnique() : one or less instance.
- Cell::isUniquified() : is the result of an uniquification.
- Cell::isUniquifyMaster() : is the reference cell of the
uniquification.
* Change: In Hurricane, in Cell::Uniquify(), uniquify a Cell only
if it is unplaced. We do not need to duplicate placed Cells
(see datapathes).
* New: In Hurricane, in Cell, no longer create rings of RoutingPads when
flattening the nets. Put that functionnality into a separate method
::createRoutingPadRings().
This allow to perform the Net flattening in Etesian *without*
the rings, which slow it down. Then the rings are created by
Knik/Kite. This also solves the double ring creation when doing
P&R of a complete chip (rings where created twice: in the core
block for Etesian and at chip level for Kite).
* Change: In Etesian, slight beautification of the printed informations.
(psychorigid me)
* Bug: In Hurricane, In NetAlias::removeAlias(), perform the isMaster()
check on the *current* hook, not the *this* one... Was preventing the
removal of most aliases.
* New: In CRL Core, in DefExport, perform a virtual flatten before exporting
a design. Replace the hard-wired "sxlib" gauge by the current default
one. More secure management of flattened instance and net names (removal
of all potentially special characters). In net names, correct management
of vectorized names (do not systematically add "_net" at the end).
In DefImport, manage the BUSBITS property and revectorize accordingly
the net names. When loading nets, systematically remove the alias of
the temporary net "__prebuild__" (a bug in NetAlias was preventing it).
In LefExport, the right value of MANUFACTURINGGRID in pseudo symbolic
mode is 0.5 (expressed in lamba). That way all length are even multiples
of it. Note that there is still the order bug of the 5.7 drivers that
puts that entry *before* UNITS in the LEF file (bad bad Cadence).
* Bug: In Hurricane, in Instance::getClone(), the Instance::create()
was called with a wrong number of parameters, causing the the
wrong overload to be called. The position was thus not copied
generating an unplaced copy. This was causing error in the
AM2901/datapath bench, because fixed blocks where becoming
unfixed.
* Bug: In <bootstrap>, in coriolisEnv (again) an error in the
detection of the LD_LIBRARY_PATH.
* New: In Hurricane, dedicated class BaseFlags to wrap a set of flags.
Similar to the Mask class, only with a slightly different semantic.
Encapsulation of <unsigned int>.
Also provide support for the Inspector, to have a human-readable
display of the flags.
* Change: In Hurricane, in Cell, regroup all the flags under a Flags
sub-class of Cell. No more mixing between booleans and bit flags.
(first use of BaseClass).
* In Hurricane, CRL Core & Knik, many small corrections to suppress
annoying warning messages at compile time.
Most noticeably, Bison errors in VstParserGrammar generated by
rules and token with mismatched return value type. This was not
problematic because the badly defined return value where not used.
But still...
* New: In Hurricane, in Collection add simple STL iterator support.
So now the C++11 "for" instruction can be used instead of the
in-house "forEach".
Example:
forEach ( Component*, icomponent, net->getComponents() ) {
cout << (*icomponent) << endl;
}
Become:
for ( Component icomponent : net->getComponents() ) {
cout << icomponent << endl;
}
* New: In Hurricane, in Graphics, add a new static method ::isHighDpi()
which returns true if the DPI is greater than 192. A "normal" screen
is typically 96dpi, we sets the trigger at twice that value.
Then in all the widgets with size settings, we uses that method to
select the more appropriate size.