Skip to content

Commit e99cfd4

Browse files
committed
2 parents 18622c6 + ce706d5 commit e99cfd4

File tree

358 files changed

+12670
-5558
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

358 files changed

+12670
-5558
lines changed
-34.9 KB
Loading

doc/src/quickstart/index.rst

Lines changed: 188 additions & 130 deletions
Large diffs are not rendered by default.

doc/src/quickstart/tseng_blk1.png

-21.6 KB
Loading

doc/src/quickstart/tseng_nets.png

2.86 KB
Loading

libs/EXTERNAL/libblifparse/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ add_library(libblifparse STATIC
4545
target_include_directories(libblifparse PUBLIC ${LIB_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
4646
set_target_properties(libblifparse PROPERTIES PREFIX "") #Avoid extra 'lib' prefix
4747

48+
# Set the read buffer size in the generated lexers. This reduces the number of
49+
# syscalls since the default is only 1kB.
50+
target_compile_definitions(libblifparse PRIVATE YY_READ_BUF_SIZE=1048576)
51+
4852
#Create the test executable
4953
add_executable(blifparse_test src/main.cpp)
5054
target_link_libraries(blifparse_test libblifparse)

libs/EXTERNAL/libezgl/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
22

33
# create the project
44
project(

libs/EXTERNAL/libezgl/examples/basic-application/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
22

33
project(
44
basic-application

libs/EXTERNAL/libtatum/libtatum/tatum/SetupAnalysis.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace tatum {
1616

1717
/** \file
1818
* The 'SetupAnalysis' class defines the operations needed by a GraphWalker class
19-
* to perform a setup (max/longest path) analysis. It satisifes and extends the GraphVisitor
19+
* to perform a setup (max/longest path) analysis. It satisfies and extends the GraphVisitor
2020
* concept class.
2121
*
2222
* Setup Analysis Principles

libs/EXTERNAL/libtatum/libtatum/tatum/TimingConstraints.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Time TimingConstraints::setup_constraint(const DomainId src_domain, const Domain
132132
return iter->second;
133133
}
134134

135-
//If no capture node specific constraint was found, fallback to the domain pair constriant
135+
//If no capture node specific constraint was found, fallback to the domain pair constraint
136136
iter = setup_constraints_.find(NodeDomainPair(src_domain, sink_domain, NodeId::INVALID()));
137137
if(iter != setup_constraints_.end()) {
138138
return iter->second;

libs/EXTERNAL/libtatum/libtatum/tatum/TimingConstraints.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class TimingConstraints {
4545
///\returns The source NodeId of the specified domain
4646
NodeId clock_domain_source_node(const DomainId id) const;
4747

48-
//\returns whether the specified domain id corresponds to a virtual lcock
48+
//\returns whether the specified domain id corresponds to a virtual clock
4949
bool is_virtual_clock(const DomainId id) const;
5050

5151
///\returns The domain of the specified node id if it is a clock source

libs/EXTERNAL/libtatum/libtatum/tatum/TimingGraph.cpp

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ NodeId TimingGraph::add_node(const NodeType type) {
200200

201201
EdgeId TimingGraph::add_edge(const EdgeType type, const NodeId src_node, const NodeId sink_node) {
202202
//We require that the source/sink node must already be in the graph,
203-
// so we can update them with thier edge references
203+
// so we can update them with their edge references
204204
TATUM_ASSERT(valid_node_id(src_node));
205205
TATUM_ASSERT(valid_node_id(sink_node));
206206

@@ -211,7 +211,7 @@ EdgeId TimingGraph::add_edge(const EdgeType type, const NodeId src_node, const N
211211
EdgeId edge_id = EdgeId(edge_ids_.size());
212212
edge_ids_.push_back(edge_id);
213213

214-
//Create the edgge
214+
//Create the edge
215215
edge_types_.push_back(type);
216216
edge_src_nodes_.push_back(src_node);
217217
edge_sink_nodes_.push_back(sink_node);
@@ -318,7 +318,7 @@ GraphIdMaps TimingGraph::compress() {
318318
levelize();
319319
validate();
320320

321-
return {node_id_map, edge_id_map};
321+
return {std::move(node_id_map), std::move(edge_id_map)};
322322
}
323323

324324
void TimingGraph::levelize() {
@@ -474,21 +474,20 @@ GraphIdMaps TimingGraph::optimize_layout() {
474474

475475
levelize();
476476

477-
return {node_id_map, edge_id_map};
477+
return {std::move(node_id_map), std::move(edge_id_map)};
478478
}
479479

480480
tatum::util::linear_map<EdgeId,EdgeId> TimingGraph::optimize_edge_layout() const {
481481
//Make all edges in a level be contiguous in memory
482482

483483
//Determine the edges driven by each level of the graph
484-
std::vector<std::vector<EdgeId>> edge_levels;
484+
std::vector<std::vector<EdgeId>> edge_levels(levels().size());
485485
for(LevelId level_id : levels()) {
486-
edge_levels.push_back(std::vector<EdgeId>());
487-
for(auto node_id : level_nodes(level_id)) {
486+
for(NodeId node_id : level_nodes(level_id)) {
488487

489488
//We walk the nodes according to the input-edge order.
490489
//This is the same order used by the arrival-time traversal (which is responsible
491-
//for most of the analyzer run-time), so matching it's order exactly results in
490+
//for most of the analyzer run-time), so matching its order exactly results in
492491
//better cache locality
493492
for(EdgeId edge_id : node_in_edges(node_id)) {
494493

@@ -498,7 +497,7 @@ tatum::util::linear_map<EdgeId,EdgeId> TimingGraph::optimize_edge_layout() const
498497
}
499498
}
500499

501-
//Maps from from original to new edge id, used to update node to edge refs
500+
//Maps from original to new edge id, used to update node to edge refs
502501
tatum::util::linear_map<EdgeId,EdgeId> orig_to_new_edge_id(edges().size());
503502

504503
//Determine the new order
@@ -874,7 +873,7 @@ std::vector<std::vector<NodeId>> identify_combinational_loops(const TimingGraph&
874873
}
875874

876875
std::vector<NodeId> find_transitively_connected_nodes(const TimingGraph& tg,
877-
const std::vector<NodeId> through_nodes,
876+
const std::vector<NodeId>& through_nodes,
878877
size_t max_depth) {
879878
std::vector<NodeId> nodes;
880879

@@ -890,7 +889,7 @@ std::vector<NodeId> find_transitively_connected_nodes(const TimingGraph& tg,
890889
}
891890

892891
std::vector<NodeId> find_transitive_fanin_nodes(const TimingGraph& tg,
893-
const std::vector<NodeId> sinks,
892+
const std::vector<NodeId>& sinks,
894893
size_t max_depth) {
895894
std::vector<NodeId> nodes;
896895

@@ -905,7 +904,7 @@ std::vector<NodeId> find_transitive_fanin_nodes(const TimingGraph& tg,
905904
}
906905

907906
std::vector<NodeId> find_transitive_fanout_nodes(const TimingGraph& tg,
908-
const std::vector<NodeId> sources,
907+
const std::vector<NodeId>& sources,
909908
size_t max_depth) {
910909
std::vector<NodeId> nodes;
911910

libs/EXTERNAL/libtatum/libtatum/tatum/TimingGraph.hpp

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
* store all edges as bi-directional edges.
1212
*
1313
* NOTE: We store only the static connectivity and node information in the 'TimingGraph' class.
14-
* Other dynamic information (edge delays, node arrival/required times) is stored seperately.
15-
* This means that most actions opearting on the timing graph (e.g. TimingAnalyzers) only
14+
* Other dynamic information (edge delays, node arrival/required times) is stored separately.
15+
* This means that most actions operating on the timing graph (e.g. TimingAnalyzers) only
1616
* require read-only access to the timing graph.
1717
*
1818
* Accessing Graph Data
@@ -28,9 +28,9 @@
2828
* rather than the more typical "Array of Structs (AoS)" data layout.
2929
*
3030
* By using a SoA layout we keep all data for a particular field (e.g. node types) in contiguous
31-
* memory. Using an AoS layout the various fields accross nodes would *not* be contiguous
31+
* memory. Using an AoS layout the various fields across nodes would *not* be contiguous
3232
* (although the different fields within each object (e.g. a TimingNode class) would be contiguous.
33-
* Since we typically perform operations on particular fields accross nodes the SoA layout performs
33+
* Since we typically perform operations on particular fields across nodes the SoA layout performs
3434
* better (and enables memory ordering optimizations). The edges are also stored in a SOA format.
3535
*
3636
* The SoA layout also motivates the ID based approach, which allows direct indexing into the required
@@ -48,11 +48,12 @@
4848
* and ensures that each cache line pulled into the cache will (likely) be accessed multiple times
4949
* before being evicted.
5050
*
51-
* Note that performing these optimizations is currently done explicity by calling the optimize_edge_layout()
52-
* and optimize_node_layout() member functions. In the future (particularily if incremental modification
51+
* Note that performing these optimizations is currently done explicitly by calling the optimize_edge_layout()
52+
* and optimize_node_layout() member functions. In the future (particularly if incremental modification
5353
* support is added), it may be a good idea apply these modifications automatically as needed.
5454
*
5555
*/
56+
#include <utility>
5657
#include <vector>
5758
#include <set>
5859
#include <limits>
@@ -149,7 +150,7 @@ class TimingGraph {
149150

150151
///\pre The graph must be levelized.
151152
///\returns A range containing the nodes which are primary inputs (i.e. SOURCE's with no fanin, corresponding to top level design inputs pins)
152-
///\warning Not all SOURCE nodes in the graph are primary inputs (e.g. FF Q pins are SOURCE's but have incomming edges from the clock network)
153+
///\warning Not all SOURCE nodes in the graph are primary inputs (e.g. FF Q pins are SOURCE's but have incoming edges from the clock network)
153154
///\see levelize()
154155
node_range primary_inputs() const {
155156
TATUM_ASSERT_MSG(is_levelized_, "Timing graph must be levelized");
@@ -282,7 +283,7 @@ class TimingGraph {
282283
//Node data
283284
tatum::util::linear_map<NodeId,NodeId> node_ids_; //The node IDs in the graph
284285
tatum::util::linear_map<NodeId,NodeType> node_types_; //Type of node
285-
tatum::util::linear_map<NodeId,std::vector<EdgeId>> node_in_edges_; //Incomiing edge IDs for node
286+
tatum::util::linear_map<NodeId,std::vector<EdgeId>> node_in_edges_; //Incoming edge IDs for node
286287
tatum::util::linear_map<NodeId,std::vector<EdgeId>> node_out_edges_; //Out going edge IDs for node
287288
tatum::util::linear_map<NodeId,LevelId> node_levels_; //Out going edge IDs for node
288289

@@ -293,12 +294,12 @@ class TimingGraph {
293294
tatum::util::linear_map<EdgeId,NodeId> edge_src_nodes_; //Source node for each edge
294295
tatum::util::linear_map<EdgeId,bool> edges_disabled_;
295296

296-
//Auxilary graph-level info, filled in by levelize()
297+
//Auxiliary graph-level info, filled in by levelize()
297298
tatum::util::linear_map<LevelId,LevelId> level_ids_; //The level IDs in the graph
298299
tatum::util::linear_map<LevelId,std::vector<NodeId>> level_nodes_; //Nodes in each level
299300
std::vector<NodeId> primary_inputs_; //Primary input nodes of the timing graph.
300301
std::vector<NodeId> logical_outputs_; //Logical output nodes of the timing graph.
301-
bool is_levelized_ = false; //Inidcates if the current levelization is valid
302+
bool is_levelized_ = false; //Indicates if the current levelization is valid
302303

303304
bool allow_dangling_combinational_nodes_ = false;
304305

@@ -310,26 +311,31 @@ std::vector<std::vector<NodeId>> identify_combinational_loops(const TimingGraph&
310311
//Returns the set of nodes transitively connected (either fanin or fanout) to nodes in through_nodes
311312
//up to max_depth (default infinite) hops away
312313
std::vector<NodeId> find_transitively_connected_nodes(const TimingGraph& tg,
313-
const std::vector<NodeId> through_nodes,
314+
const std::vector<NodeId>& through_nodes,
314315
size_t max_depth=std::numeric_limits<size_t>::max());
315316

316317
//Returns the set of nodes in the transitive fanin of nodes in sinks up to max_depth (default infinite) hops away
317318
std::vector<NodeId> find_transitive_fanin_nodes(const TimingGraph& tg,
318-
const std::vector<NodeId> sinks,
319+
const std::vector<NodeId>& sinks,
319320
size_t max_depth=std::numeric_limits<size_t>::max());
320321

321322
//Returns the set of nodes in the transitive fanout of nodes in sources up to max_depth (default infinite) hops away
322323
std::vector<NodeId> find_transitive_fanout_nodes(const TimingGraph& tg,
323-
const std::vector<NodeId> sources,
324+
const std::vector<NodeId>& sources,
324325
size_t max_depth=std::numeric_limits<size_t>::max());
325326

326327
EdgeType infer_edge_type(const TimingGraph& tg, EdgeId edge);
327328

328329
//Mappings from old to new IDs
329330
struct GraphIdMaps {
330-
GraphIdMaps(tatum::util::linear_map<NodeId,NodeId> node_map,
331-
tatum::util::linear_map<EdgeId,EdgeId> edge_map)
331+
GraphIdMaps(const tatum::util::linear_map<NodeId,NodeId>& node_map,
332+
const tatum::util::linear_map<EdgeId,EdgeId>& edge_map)
332333
: node_id_map(node_map), edge_id_map(edge_map) {}
334+
335+
GraphIdMaps(tatum::util::linear_map<NodeId,NodeId>&& node_map,
336+
tatum::util::linear_map<EdgeId,EdgeId>&& edge_map)
337+
: node_id_map(std::move(node_map)), edge_id_map(std::move(edge_map)) {}
338+
333339
tatum::util::linear_map<NodeId,NodeId> node_id_map;
334340
tatum::util::linear_map<EdgeId,EdgeId> edge_id_map;
335341
};

libs/EXTERNAL/libtatum/libtatum/tatum/analyzer_factory.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace tatum {
1818
* This file defines the AnalyzerFactory class used to construct timing analyzers.
1919
*
2020
* We assume that the user has already defined the timing graph, constraints and
21-
* thier own delay calculator:
21+
* their own delay calculator:
2222
*
2323
* TimingGraph timing_graph;
2424
* TimingConstraints timing_constraints;
@@ -33,7 +33,7 @@ namespace tatum {
3333
* timing_constraints,
3434
* delay_calculator);
3535
*
36-
* We can similarily generate analyzers for other types of analysis, for instance Hold:
36+
* We can similarly generate analyzers for other types of analysis, for instance Hold:
3737
*
3838
* auto hold_analyzer = AnalyzerFactory<SetupAnalysis>::make(timing_graph,
3939
* timing_constraints,
@@ -45,7 +45,7 @@ namespace tatum {
4545
* timing_constraints,
4646
* delay_calculator);
4747
*
48-
* The AnalzyerFactory returns a std::unique_ptr to the appropriate TimingAnalyzer sub-class:
48+
* The AnalyzerFactory returns a std::unique_ptr to the appropriate TimingAnalyzer sub-class:
4949
*
5050
* SetupAnalysis => SetupTimingAnalyzer
5151
* HoldAnalysis => HoldTimingAnalyzer

libs/EXTERNAL/libtatum/libtatum/tatum/delay_calc/FixedDelayCalculator.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace tatum {
99

1010
/**
11-
* An exmaple DelayCalculator implementation which takes
11+
* An example DelayCalculator implementation which takes
1212
* a vector of fixed pre-calculated edge delays
1313
*
1414
* \see DelayCalculator

libs/EXTERNAL/libtatum/libtatum/tatum/graph_visitors/CommonAnalysisOps.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace tatum { namespace detail {
99
*
1010
* The operations for CommonAnalysisVisitor to perform setup analysis.
1111
* The setup analysis operations define that maximum edge delays are used, and that the
12-
* maixmum arrival time (and minimum required times) are propagated through the timing graph.
12+
* maximum arrival time (and minimum required times) are propagated through the timing graph.
1313
*
1414
* \see HoldAnalysisOps
1515
* \see SetupAnalysisOps

libs/EXTERNAL/libtatum/libtatum/tatum/graph_visitors/CommonAnalysisVisitor.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ bool CommonAnalysisVisitor<AnalysisOps>::do_arrival_pre_traverse_node(const Timi
152152
bool node_constrained = false;
153153

154154
if(tc.node_is_constant_generator(node_id)) {
155-
//We progpagate the tags from constant generators to ensure any sinks driven
155+
//We propagate the tags from constant generators to ensure any sinks driven
156156
//only by constant generators are recorded as constrained.
157157
//
158-
//We use a special tag to initialize constant generators which gets overritten
158+
//We use a special tag to initialize constant generators which gets overwritten
159159
//by any non-constant tag at downstream nodes
160160

161161
TimingTag const_gen_tag = ops_.const_gen_tag();

libs/EXTERNAL/libtatum/libtatum/tatum/graph_visitors/GraphVisitor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class GraphVisitor {
2121
virtual void do_reset_node_arrival_tags_from_origin(const NodeId node_id, const NodeId origin) = 0;
2222
virtual void do_reset_node_required_tags_from_origin(const NodeId node_id, const NodeId origin) = 0;
2323

24-
//Returns true if the specified source/sink is unconstrainted
24+
//Returns true if the specified source/sink is unconstrained
2525
virtual bool do_arrival_pre_traverse_node(const TimingGraph& tg, const TimingConstraints& tc, const NodeId node_id) = 0;
2626
virtual bool do_required_pre_traverse_node(const TimingGraph& tg, const TimingConstraints& tc, const NodeId node_id) = 0;
2727

libs/EXTERNAL/libtatum/libtatum/tatum/graph_visitors/SetupAnalysisOps.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace tatum { namespace detail {
88
*
99
* The operations for CommonAnalysisVisitor to perform setup analysis.
1010
* The setup analysis operations define that maximum edge delays are used, and that the
11-
* maixmum arrival time (and minimum required times) are propagated through the timing graph.
11+
* maximum arrival time (and minimum required times) are propagated through the timing graph.
1212
*
1313
* \see HoldAnalysisOps
1414
* \see CommonAnalysisVisitor
@@ -121,7 +121,7 @@ class SetupAnalysisOps : public CommonAnalysisOps {
121121
Time calculate_slack(const Time required_time, const Time arrival_time) {
122122
//Setup requires the arrival to occur *before* the required time, so
123123
//slack is the amount of required time left after the arrival time; meaning
124-
//we we subtract the arrival time from the required time to get the setup slack
124+
//we subtract the arrival time from the required time to get the setup slack
125125
return required_time - arrival_time;
126126
}
127127

libs/EXTERNAL/libtatum/libtatum/tatum/graph_walkers/ParallelLevelizedWalker.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
namespace tatum {
1212

1313
/**
14-
* A parallel timing analyzer which traveres the timing graph in a levelized
14+
* A parallel timing analyzer which traverses the timing graph in a levelized
1515
* manner. However nodes within each level are processed in parallel using
1616
* Thread Building Blocks (TBB). If TBB is not available it operates serially and is
1717
* equivalent to the SerialWalker.

libs/libarchfpga/src/device_grid.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ class DeviceGrid {
3838
size_t width() const { return grid_.dim_size(1); }
3939
///@brief Return the height of the grid at the specified layer
4040
size_t height() const { return grid_.dim_size(2); }
41+
///@brief Return the grid dimensions in (# of layers, width, height) format
42+
std::tuple<size_t, size_t, size_t> dim_sizes() const {
43+
return {grid_.dim_size(0), grid_.dim_size(1), grid_.dim_size(2)};
44+
}
4145

4246
///@brief Return the size of the flattened grid on the given layer
4347
inline size_t grid_size() const {

libs/libpugiutil/src/pugixml_loc.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
#include <cstdio>
22
#include <algorithm>
3+
#include <vector>
34
#include "pugixml_util.hpp"
45
#include "pugixml_loc.hpp"
56

7+
// The size of the read buffer when reading from a file.
8+
#ifndef PUGI_UTIL_READ_BUF_SIZE
9+
#define PUGI_UTIL_READ_BUF_SIZE 1048576
10+
#endif // PUGI_UTIL_READ_BUF_SIZE
11+
612
namespace pugiutil {
713

814
//Return the line number from the given offset
@@ -30,10 +36,10 @@ void loc_data::build_loc_data() {
3036

3137
std::ptrdiff_t offset = 0;
3238

33-
char buffer[1024];
39+
std::vector<char> buffer(PUGI_UTIL_READ_BUF_SIZE);
3440
std::size_t size;
3541

36-
while ((size = fread(buffer, 1, sizeof(buffer), f)) > 0) {
42+
while ((size = fread(buffer.data(), 1, buffer.size() * sizeof(char), f)) > 0) {
3743
for (std::size_t i = 0; i < size; ++i) {
3844
if (buffer[i] == '\n') {
3945
offsets_.push_back(offset + i);

libs/librrgraph/src/base/rr_spatial_lookup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ std::vector<RRNodeId> RRSpatialLookup::find_nodes(int layer,
163163
nodes.reserve(num_nodes);
164164
for (const auto& node : rr_node_indices_[type][layer][node_x][node_y][side]) {
165165
if (RRNodeId(node)) {
166-
nodes.push_back(RRNodeId(node));
166+
nodes.emplace_back(node);
167167
}
168168
}
169169

0 commit comments

Comments
 (0)