MCPcopy Create free account
hub / github.com/Xilinx/Vitis_Libraries / write_file

Function write_file

dsp/scripts/instance_generator.py:65–78  ·  view source on GitHub ↗
(out_file_name, context)

Source from the content-addressed store, hash-verified

63 return d.get(param_name, {})
64
65def write_file(out_file_name, context):
66 with open(out_file_name, 'w') as f:
67 if isinstance(context, dict):
68 # XXX: existing art in DSP lib
69 if "graph" in context:
70 s = context["graph"]
71 # standard?
72 elif "source" in context:
73 s = context["source"]
74 elif isinstance(context, str):
75 s = context
76 if s:
77 f.write(s)
78 f.write('\n')
79
80# ------------------------------------------------------------------------------
81

Callers 2

gen_api_instanceMethod · 0.70
gen_tb_instanceFunction · 0.70

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected