Skip to content
Snippets Groups Projects
Commit 64bccda9 authored by auphelia's avatar auphelia
Browse files

[Test] Added unit test for code generation (at the moment it only calls the...

[Test] Added unit test for code generation (at the moment it only calls the function code_gen with the finn-hls-model in the data folder) and [Code Generation] Added function to extract the layer attributes
parent 1e5e5228
No related branches found
No related tags found
No related merge requests found
finn-hls-onnx-model:
0
inp memInStrm memInStrm"FIFO*
depth

memInStrm
weights0
thresh0out1"StreamingFCLayer_Batch*
MH*
MW*
PE *
SIMD@*!
resDataType"Recast<XnorMul>*
resType"ap_resource_lut()
*
out1inter0inter0"FIFO*
depth

inter0
weights1
thresh1out2"StreamingFCLayer_Batch*
MH*
MW*
PE@*
SIMD *!
resDataType"Recast<XnorMul>*
resType"ap_resource_lut()
*
out2inter1inter1"FIFO*
depth

inter1
weights2
thresh2out3"StreamingFCLayer_Batch*
MH*
MW*
PE *
SIMD@*!
resDataType"Recast<XnorMul>*
resType"ap_resource_lut()
*
out3inter2inter2"FIFO*
depth

inter2
weights3
thresh3out4"StreamingFCLayer_Batch*
MH@*
MW*
PE*
SIMD*!
resDataType"Recast<XnorMul>*
resType"ap_resource_lut()
-
out4outp
memOutStrm"FIFO*
depthfinn_hls_onnx_graphZ
inp



@b
outp



@j
memInStrm



@j
weights0

@

j%
thresh0





j
out1



 j
inter0



 j
weights1


@
j%
thresh1


@


j
out2



@j
inter1



@j
weights2

@

j%
thresh2





j
out3



 j
inter2



 j
weights3



j%
thresh3





j
out4



@B
\ No newline at end of file
from pkgutil import get_data
from finn.core.modelwrapper import ModelWrapper
import finn.backend.fpgadataflow.code_gen as cg
def test_code_generation():
# load the onnx model
raw_m = get_data("finn", "data/onnx/finn-hls-model/finn-hls-onnx-model.onnx")
model = ModelWrapper(raw_m)
cg.code_generation(model)
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