Skip to content
Snippets Groups Projects
Commit 5253b653 authored by auphelia's avatar auphelia
Browse files

[HLSCustomOp] Added function and two abstract methods to estimate resources of hls custom op

parent ff8f3e0a
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,6 @@ import subprocess
from finn.custom_op import CustomOp
from finn.core.utils import CppBuilder, IPGenBuilder
import finn.custom_op.fpgadataflow.templates
from pyverilator import PyVerilator
class HLSCustomOp(CustomOp):
......@@ -35,6 +34,20 @@ class HLSCustomOp(CustomOp):
"sim_mode": ("s", False, ""),
}
def node_res_estimation(self):
resources = []
resources.append("BRAMs: " + str(self.bram_estimation()))
resources.append("LUTs: " + str(self.lut_estimation()))
return resources
@abstractmethod
def bram_estimation(self):
pass
@abstractmethod
def lut_estimation(self):
pass
def code_generation_ipgen(self, model, fpgapart, clk):
node = self.onnx_node
......
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