21 #ifndef OPHIDIAN_TIMING_DRIVEN_PLACEMENT_TIMING_DRIVEN_PLACEMENT_H
22 #define OPHIDIAN_TIMING_DRIVEN_PLACEMENT_TIMING_DRIVEN_PLACEMENT_H
26 #include "../timing/generic_sta.h"
27 #include "../timing/ceff.h"
28 #include "../placement/placement.h"
29 #include "floorplan.h"
30 #include "../timing/endpoints.h"
31 #include "flute_rc_tree_estimation.h"
33 #include "../timing/static_timing_analysis.h"
36 namespace timingdriven_placement {
38 template <
class IteratorType>
40 const IteratorType m_begin;
41 const IteratorType m_end;
43 const IteratorType begin()
const {
47 const IteratorType end()
const {
53 using Cell = entity_system::entity;
54 using Pin = entity_system::entity;
55 using StandardCellPin = entity_system::entity;
56 using StandardCell = entity_system::entity;
57 using Net = entity_system::entity;
58 using Point = geometry::point<double>;
59 using Geometry = geometry::multi_polygon< geometry::polygon<Point> >;
60 using CapacitanceType = boost::units::quantity< boost::units::si::capacitance > ;
61 using NetIterator = entity_system::entities_storage::const_iterator;
62 using CellIterator = entity_system::entities_storage::const_iterator;
63 using PinIterator = entity_system::entities_storage::const_iterator;
67 std::vector<Cell> cells;
68 std::vector<Geometry> geometries;
69 cells_geometries(std::size_t size) : cells(size), geometries(size) {cells.resize(0); geometries.resize(0);}
86 std::set<Net> m_dirty_nets;
89 const std::string m_dot_lib_late;
90 const std::string m_dot_lib_early;
92 std::unique_ptr<timing::library_timing_arcs> m_tarcs;
93 std::unique_ptr<timing::library> m_lib_late;
94 std::unique_ptr<timing::library> m_lib_early;
95 std::unique_ptr<timing::static_timing_analysis> m_sta;
98 void make_cell_nets_dirty(Cell cell);
99 void update_dirty_rc_trees();
101 timingdriven_placement(
const std::string & dot_verilog_file,
const std::string & dot_def_file,
const std::string & dot_lef_file,
const std::string m_dot_lib_late,
const std::string m_dot_lib_early,
double clock_in_ps);
122 std::size_t cell_lookup(Cell c)
const {
126 const std::vector<Pin> & cell_pins(Cell c)
const {
162 entity_system::entity_index net_lookup(Net net)
const {
191 std::size_t pin_lookup(Pin pin)
const {
195 Cell pin_owner(Pin pin)
const {
212 void place_cell(Cell cell, Point destination);
228 Point pin_position(Pin pin)
const {
240 timing::TimeType late_wns()
const {
241 return m_sta->late_wns();
243 timing::TimeType early_wns()
const{
244 return m_sta->early_wns();
246 timing::TimeType late_tns()
const {
247 return m_sta->late_tns();
249 timing::TimeType early_tns()
const{
250 return m_sta->early_tns();
252 timing::TimeType early_rise_slack(Pin p)
const {
253 return m_sta->early_rise_slack(p);
255 timing::TimeType early_fall_slack(Pin p)
const {
256 return m_sta->early_fall_slack(p);
258 timing::TimeType late_rise_slack(Pin p)
const {
259 return m_sta->late_rise_slack(p);
261 timing::TimeType late_fall_slack(Pin p)
const {
262 return m_sta->late_fall_slack(p);
264 timing::TimeType early_rise_arrival(Pin p)
const {
265 return m_sta->early_rise_arrival(p);
267 timing::TimeType early_fall_arrival(Pin p)
const {
268 return m_sta->early_fall_arrival(p);
270 timing::TimeType late_rise_arrival(Pin p)
const {
271 return m_sta->late_rise_arrival(p);
273 timing::TimeType late_fall_arrival(Pin p)
const {
274 return m_sta->late_fall_arrival(p);
276 timing::TimeType early_rise_slew(Pin p)
const {
277 return m_sta->early_rise_slew(p);
279 timing::TimeType early_fall_slew(Pin p)
const {
280 return m_sta->early_fall_slew(p);
282 timing::TimeType late_rise_slew(Pin p)
const {
283 return m_sta->late_rise_slew(p);
285 timing::TimeType late_fall_slew(Pin p)
const {
286 return m_sta->late_fall_slew(p);
288 const timing::endpoints & timing_endpoints()
const {
289 return m_sta->timing_endpoints();
296 #endif // OPHIDIAN_TIMING_DRIVEN_PLACEMENT_TIMING_DRIVEN_PLACEMENT_H
const entity_system::entity_system & net_system() const
Net system getter.
Definition: netlist.h:359
const entity_system::entity_system & pin_system() const
Pin system getter.
Definition: netlist.h:284
Definition: timingdriven_placement.h:39
bounds< NetIterator > nets() const
Gets the nets.
Definition: timingdriven_placement.h:172
geometry::multi_polygon< geometry::polygon< geometry::point< double > > > cell_geometry(entity_system::entity cell) const
Cell geometry getter.
Definition: placement.h:54
Net net_find(std::string name) const
Finds a Net by its name.
Definition: timingdriven_placement.h:144
Definition: timingdriven_placement.h:74
Net pin_net(Pin pin) const
Gets the net of a pin.
Definition: timingdriven_placement.h:187
const std::vector< entity_system::entity > & cell_pins(entity_system::entity cell) const
Cell pins getter.
Definition: netlist.h:162
Point cell_position(Cell cell) const
Gets the cell's position.
Definition: timingdriven_placement.h:216
entity_system::entity pin_owner(entity_system::entity pin) const
Pin owner getter.
Definition: netlist.h:249
Definition: timingdriven_placement.h:66
Definition: design_constraints.h:63
bounds< PinIterator > pins() const
Gets the pins.
Definition: timingdriven_placement.h:203
std::string cell_name(entity_system::entity cell) const
Cell name getter.
Definition: netlist.h:153
geometry::point< double > pin_position(entity_system::entity pin) const
Pin position getter.
Definition: placement.h:101
entity_system::entity pin_net(entity_system::entity pin) const
Pin net getter.
Definition: netlist.h:258
void place_cell(Cell cell, Point destination)
Places a cell in a position.
Definition: timingdriven_placement.cpp:181
void update_timing()
Updates the timing information.
Definition: timingdriven_placement.cpp:190
Geometry cell_geometry(Cell cell) const
Gets the cell's geometry.
Definition: timingdriven_placement.h:224
entities_storage::const_iterator begin() const
Begin iterator.
Definition: entity_system.h:97
Netlist class.
Definition: netlist.h:41
Placement class.
Definition: placement.h:35
Property class.
Definition: property.h:33
entities_storage::const_iterator end() const
End iterator.
Definition: entity_system.h:104
std::string net_name(Net n) const
Gets the name of a net.
Definition: timingdriven_placement.h:151
const entity_system::entity_system & cell_system() const
Cell system getter.
Definition: netlist.h:195
std::string pin_name(entity_system::entity pin) const
Pin name getter.
Definition: netlist.h:230
Placement library class.
Definition: library.h:42
std::string net_name(entity_system::entity net) const
Net name getter.
Definition: netlist.h:332
Definition: flute_rc_tree_estimation.h:37
std::string cell_name(Cell c) const
Gets the name of a cell.
Definition: timingdriven_placement.h:118
const std::vector< Pin > & net_pins(Net net) const
Gets the pin of a net.
Definition: timingdriven_placement.h:158
entity_system::entity net_by_name(std::string name) const
Finds net.
Definition: netlist.h:368
std::string pin_name(Pin pin) const
Gets the name of a pin.
Definition: timingdriven_placement.h:180
const std::vector< entity_system::entity > & net_pins(entity_system::entity net) const
Net pins getter.
Definition: netlist.h:341
void cell_position(entity_system::entity cell, geometry::point< double > position)
Places a cell.
Definition: placement.cpp:33
bounds< CellIterator > cells() const
Gets the cells.
Definition: timingdriven_placement.h:134
entity_system::entity cell_find(std::string name) const
Finds cell.
Definition: netlist.cpp:62
Cell cell_find(std::string name) const
Finds a Cell by its name.
Definition: timingdriven_placement.h:111
Floorplan class.
Definition: floorplan.h:37
Standard cell class.
Definition: standard_cells.h:37
entity_index lookup(entity e) const
Gets the index of an entity.
Definition: entity_system.h:149