Skip to content
Snippets Groups Projects
Commit ae2f76c3 authored by Thomas B. Preußer's avatar Thomas B. Preußer
Browse files

Maintain static OOB count internally requiring explicit acknowledging reset.

parent 2afe6ece
No related branches found
No related tags found
No related merge requests found
......@@ -259,8 +259,20 @@ class Lookup(HLSCustomOp):
]
elif mem_mode == "external":
self.code_gen_dict["$DOCOMPUTE$"] = [
"""StreamingLookup_ext<EmbeddingSize>(in0, out, mem, size, oob_count);
oob_irq = oob_count != 0;"""
"""
static unsigned oob_count_li;
static unsigned oob_count_int;
#pragma HLS reset variable=oob_count_li
#pragma HLS reset variable=oob_count_int
if(oob_count != oob_count_li) {
oob_count_int -= oob_count_li;
oob_count_li = oob_count;
}
StreamingLookup_ext<EmbeddingSize>(in0, out, mem, size, oob_count_int);
oob_count = oob_count_int;
oob_irq = (oob_count_int != 0);
"""
]
def blackboxfunction(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment