Skip to content

Commit

Permalink
mpl2: remove parameters' struct from the HardMacro object
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Koucher <arthurckoucher@gmail.com>
  • Loading branch information
AcKoucher committed Mar 29, 2024
1 parent 9b84df7 commit e83fb9d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/mpl2/src/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1030,8 +1030,7 @@ odb::Point HardMacro::computeSnapOrigin(const odb::Rect& macro_box,
return snap_origin;
}

// Compute for each pin: layer offset, pitch and pin width
HardMacro::SnapParameters HardMacro::computeSnapParameters(
SnapParameters HardMacro::computeSnapParameters(
odb::dbBlock* block,
odb::dbTechLayer* layer,
odb::dbBox* box,
Expand Down
18 changes: 10 additions & 8 deletions src/mpl2/src/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ enum ClusterType
MixedCluster
};

// The parameters necessary to compute one coordinate of the new
// origin for aligning the macros' pins to the track-grid
struct SnapParameters
{
int offset = 0;
int pitch = 0;
int pin_width = 0;
int pin_to_origin = 0;
};

// Metrics class for logical modules and clusters
class Metrics
{
Expand Down Expand Up @@ -430,14 +440,6 @@ class HardMacro
void setYDBU(int y) { setY(dbuToMicron(y, dbu_)); }

private:
struct SnapParameters
{
int offset = 0;
int pitch = 0;
int pin_width = 0;
int pin_to_origin = 0;
};

SnapParameters computeSnapParameters(odb::dbBlock* block,
odb::dbTechLayer* layer,
odb::dbBox* box,
Expand Down

0 comments on commit e83fb9d

Please sign in to comment.