google / google/xls

Short-circuit for side-effecting (IO) ops

Open
#589 1 comment 0 reactions 1 assignee Claimed by @spurserh View on GitHub
bug xlscc
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

To add:

TEST_F(TranslatorTest, IOShortCircuitAnd) {
const std::string content = R"(
#include "/xls_builtin.h"
#pragma hls_top
void my_package(__xls_channel& in,
__xls_channel& out) {
const int zero = 0;
int v = 100;
v = zero && in.read();
out.write(1 + v);
})";

IOTest(content,
/*inputs=*/{},
/*outputs=*/{IOOpTest("out", 101, true)});
}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.