-
Notifications
You must be signed in to change notification settings - Fork 220
Closed
Labels
blockerBlocking design workBlocking design workbugSomething isn't working or is incorrectSomething isn't working or is incorrectir
Description
While writing Zstd decoder process I've stumble upon issue with DSLX to IR conversion.
XLS reports redefinition of the name in the package.
E1123 21:08:02.395704 1085018 verifier.cc:1771] INTERNAL: XLS_RET_CHECK failure (xls/ir/verifier.cc:1771) !name_set->contains(function_base->name()) Function/proc/block with name __minimal_example__parse_magic_number__128 is not unique within package minimal_example
0x55b489cf06e0: xabsl::StatusBuilder::CreateStatusAndConditionallyLog()
0x55b489cb4611: xls::VerifyPackage()
0x55b489a28b3f: xls::dslx::(anonymous namespace)::ConvertCallGraph()
0x55b489a26392: xls::dslx::ConvertModuleIntoPackage()
0x55b489a2a730: xls::dslx::ConvertFilesToPackage()
0x55b4899df058: main
0x7f17bb5121ca: [unknown]
I've reduce it to the minimal example that still triggers this behavior.
pub struct Buffer<CAPACITY: u32> {
content: bits[CAPACITY],
}
pub fn parse_magic_number<CAPACITY: u32>(buffer: Buffer<CAPACITY>) -> Buffer<CAPACITY> {
buffer
}
struct ZstdDecoderState {
buffer: Buffer<u32:128>,
}
const ZERO_DECODER_STATE = zero!<ZstdDecoderState>();
pub fn handle_idle_state(state: ZstdDecoderState) -> ZstdDecoderState {
parse_magic_number<u32:128>(state.buffer);
state
}
pub proc ZstdDecoder {
input_r: chan<u32> in;
output_s: chan<u32> out;
init {(ZERO_DECODER_STATE)}
config (
input_r: chan<u32> in,
output_s: chan<u32> out,
) {(input_r, output_s)}
next (tok: token, state: ZstdDecoderState) {
let (tok, _) = recv(tok, input_r);
handle_idle_state(state);
let tok = send(tok, output_s, u32:0);
state
}
}
Metadata
Metadata
Assignees
Labels
blockerBlocking design workBlocking design workbugSomething isn't working or is incorrectSomething isn't working or is incorrectir