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
2 changes: 2 additions & 0 deletions tools/dynamatic/scripts/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ else

echo_info "Set to use \"$MILP_SOLVER\" to solve buffer placement MILP!"

mkdir -p "$COMP_DIR/buffer-placement"

# Smart buffer placement
echo_info "Running smart buffer placement with CP = $TARGET_CP and algorithm = '$BUFFER_ALGORITHM'"
cd "$COMP_DIR"
Expand Down
38 changes: 38 additions & 0 deletions tools/integration/TEST_SUITE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class SharingUnitTestFixture : public BaseFixture {};
class SpecFixture : public BaseFixture {};

class RigidificationFixture : public BaseFixture {};
class FtdWithSimpleBuffersFixture : public BaseFixture {};

TEST_P(BasicFixture, basic) {
IntegrationTestData config{
Expand Down Expand Up @@ -85,6 +86,25 @@ TEST_P(CBCSolverFixture, basic) {
logPerformance(config.simTime);
}

TEST_P(FtdWithSimpleBuffersFixture, basic) {
IntegrationTestData config{
// clang-format off
.name = GetParam(),
.benchmarkPath = fs::path(DYNAMATIC_ROOT) / "integration-test",
.testVerilog = false,
.useSharing = false,
.disableLsq = true,
.milpSolver = "cbc",
.bufferAlgorithm = "on-merges",
.useFtd = true,
.simTime = -1
// clang-format on
};
EXPECT_EQ(runIntegrationTest(config), 0);
RecordProperty("cycles", std::to_string(config.simTime));
logPerformance(config.simTime);
}

#if 0
TEST_P(FPL22Fixture, basic) {
IntegrationTestData config{
Expand Down Expand Up @@ -305,6 +325,24 @@ INSTANTIATE_TEST_SUITE_P(
),
[](const auto &info) { return info.param; });

// Smoke test: Using the fast token delivery algorithm to compile the circuit.
INSTANTIATE_TEST_SUITE_P(
Tiny, FtdWithSimpleBuffersFixture,
testing::Values(
// "matvec" // matvec does not work currently
"fir",
"if_loop_add",
"if_loop_mul",
"iir",
"matvec",
"kernel_2mm",
"kernel_3mm",
"kmp",
"gcd",
"bicg"
),
[](const auto &info) { return info.param; });

#if 0
// Smoke test: Using the FPL22 placement algorithm to optimize some simple benchmarks
INSTANTIATE_TEST_SUITE_P(
Expand Down
2 changes: 2 additions & 0 deletions tools/integration/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ int runIntegrationTest(IntegrationTestData &config) {
<< " --buffer-algorithm " << config.bufferAlgorithm
<< (config.useSharing ? " --sharing" : "")
<< (config.useRigidification ? " --rigidification" : "")
<< (config.useFtd ? " --fast-token-delivery" : "")
<< (config.disableLsq ? " --disable-lsq" : "")
<< " --milp-solver " << config.milpSolver << std::endl;
// clang-format on

Expand Down
2 changes: 2 additions & 0 deletions tools/integration/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ struct IntegrationTestData {
bool useSharing = false;
// Use model checking to remove redundant logic.
bool useRigidification = false;
bool disableLsq = false;
std::string milpSolver = "gurobi";
std::string bufferAlgorithm = "fpga20";
bool useFtd = false;

// Results
int simTime;
Expand Down
Loading