Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 13 additions & 22 deletions data/components.json
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I didn't realize the merge of #552
before this latencies of beta-backend units were fixed, and speculation tests are benchmarked with those old latencies

Original file line number Diff line number Diff line change
Expand Up @@ -445,14 +445,10 @@
"handshake.addf.flopoco": {
"latency": {
"64": {
"2.705000": 12.0,
"5.091333": 7.0,
"9.068000": 2.0
"2.705000": 12.0
},
"32": {
"2.798000": 36.0,
"2.922000": 10.0,
"3.649333": 6.0
"3.649333": 9.0
}
},
"delay": {
Expand Down Expand Up @@ -511,12 +507,11 @@
"handshake.addf.vivado": {
"latency": {
"64": {
"1.0" : 9.0,
"2.0" : 9.0,
"3.75" : 9.0,
"4.1" : 9.0,
"5.0" : 9.0
}
"2.705000": 12.0
},
"32": {
"3.649333": 9.0
}
},
"delay": {
"data": {
Expand Down Expand Up @@ -574,7 +569,6 @@
"handshake.subf.flopoco": {
"latency": {
"64": {
"1.0": 11.0,
"2.0": 9.0
}
},
Expand Down Expand Up @@ -634,7 +628,6 @@
"handshake.subf.vivado": {
"latency": {
"64": {
"1.0": 11.0,
"2.0": 9.0
}
},
Expand Down Expand Up @@ -694,14 +687,10 @@
"handshake.mulf.flopoco": {
"latency": {
"32": {
"2.034000": 26.0,
"2.783000": 4.0,
"2.875333": 2.0
"2.783000": 4.0
},
"64": {
"2.046000": 56.0,
"2.758000": 6.0,
"4.242333": 3.0
"4.242333": 4.0
}
},
"delay": {
Expand Down Expand Up @@ -759,9 +748,11 @@
},
"handshake.mulf.vivado": {
"latency": {
"32": {
"2.783000": 4.0
},
"64": {
"1.0" : 4.0,
"2.0" : 4.0
"4.242333": 4.0
}
},
"delay": {
Expand Down
3 changes: 3 additions & 0 deletions data/verilog/handshake/control_merge.v
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@

assign index = index_internal;

initial begin
$fatal("control_merge implementation with data signal has a bug. Use beta backend instead");
end
assign outs = ins[index_internal * DATA_TYPE +: DATA_TYPE];
endmodule
4 changes: 4 additions & 0 deletions data/vhdl/handshake/control_merge.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,9 @@ begin
);

index <= index_internal;

assert false
report "control_merge implementation with data signal has a bug. Use beta backend instead"
severity failure;
outs <= ins(to_integer(unsigned(index_internal)));
end architecture;
6 changes: 6 additions & 0 deletions experimental/include/experimental/Transforms/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,18 @@
#include "experimental/Transforms/LSQSizing/HandshakeSizeLSQs.h"
#include "experimental/Transforms/ResourceSharing/Crush.h"
#include "experimental/Transforms/Rigidification/HandshakeRigidification.h"
#include "experimental/Transforms/Speculation/HandshakeSpecPostBuffer.h"
#include "experimental/Transforms/Speculation/HandshakeSpeculation.h"
#include "mlir/Pass/Pass.h"

namespace dynamatic {
namespace experimental {

/// TableGen-generated header files assume all passes reside in the same
/// namespace. However, in Dynamatic, some passes are defined in separate child
/// namespaces, so we explicitly brings those into the current scope here.
using namespace speculation;

/// Generate the code for registering passes.
#define GEN_PASS_REGISTRATION
#include "experimental/Transforms/Passes.h.inc"
Expand Down
12 changes: 11 additions & 1 deletion experimental/include/experimental/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def HandshakeSpeculation : DynamaticPass<"handshake-speculation"> {
The pass needs to specify the position of the Speculation Units by
means of an input JSON file.
}];
let constructor = "dynamatic::experimental::speculation::createHandshakeSpeculation()";
let options = [
Option<"jsonPath", "json-path", "std::string", "",
"Path to JSON-formatted file containing the positions for speculative "
Expand All @@ -53,6 +52,17 @@ def HandshakeSpeculation : DynamaticPass<"handshake-speculation"> {
"specified in the JSON-formatted file.">];
}

def HandshakeSpecPostBuffer : DynamaticPass<"handshake-spec-post-buffer"> {
let summary = "Post-buffering speculation pass";
let description = [{
Speculation integration requires some steps to be performed after the
buffer placement pass:
- Finalize speculative units
}];
let options = [
];
}

def HandshakePlaceBuffersCustom : DynamaticPass<"handshake-placebuffers-custom"> {
let summary = "Place buffers on specific channels";
let description = [{ Placing a single buffer on a specific output channel of
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#ifndef DYNAMATIC_TRANSFORMS_HANDSHAKE_SPEC_POST_BUFFER_H
#define DYNAMATIC_TRANSFORMS_HANDSHAKE_SPEC_POST_BUFFER_H

#include "dynamatic/Support/DynamaticPass.h"

namespace dynamatic {
namespace experimental {
namespace speculation {

#define GEN_PASS_DECL_HANDSHAKESPECPOSTBUFFER
#include "experimental/Transforms/Passes.h.inc"

} // namespace speculation
} // namespace experimental
} // namespace dynamatic

#endif // DYNAMATIC_TRANSFORMS_HANDSHAKE_SPEC_POST_BUFFER_H
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ namespace dynamatic {
namespace experimental {
namespace speculation {

std::unique_ptr<dynamatic::DynamaticPass>
createHandshakeSpeculation(const std::string &jsonPath = "",
bool automatic = true);

#define GEN_PASS_DECL_HANDSHAKESPECULATION
#define GEN_PASS_DEF_HANDSHAKESPECULATION
#include "experimental/Transforms/Passes.h.inc"

} // namespace speculation
Expand Down
3 changes: 3 additions & 0 deletions experimental/lib/Transforms/Speculation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
include_directories(${DYNAMATIC_SOURCE_DIR}/experimental/include/experimental/Transforms/Speculation)

add_dynamatic_library(DynamaticSpeculation
SpeculationPlacement.cpp
HandshakeSpeculation.cpp
HandshakeSpecPostBuffer.cpp
PlacementFinder.cpp

DEPENDS
Expand Down
Loading