SAIFIINDUSTRIES's picture
Add batch 5 (Luthiraa_TALOS-V2, dawsonjon_fpu, The-OpenROAD-Project_OpenROAD-flow-scripts, antonblanchard_microwatt, alexforencich_verilog-i2c)
784ee2c verified
Raw History Blame Contribute Delete
470 Bytes
#!/usr/bin/env python3
class Exporter:
"""Base class for all exporters. Contains common code"""
def __init__(self, memory):
"""Initializer"""
self._memory = memory
def get_memory(self):
"""Returns the memory for this exporter"""
return self._memory
def export_file(self, file_name):
"""Exports the contents to the specified file"""
with open(file_name, "w") as out_fh:
self.export(out_fh)