Add batch 5 (Luthiraa_TALOS-V2, dawsonjon_fpu, The-OpenROAD-Project_OpenROAD-flow-scripts, antonblanchard_microwatt, alexforencich_verilog-i2c)
784ee2c verified Download The-OpenROAD-Project_OpenROAD-flow-scripts/tools/FakeRAM2.0/utils/exporter.py from SAIFIINDUSTRIES/verilog_data-1: direct link, hf CLI and curl.
- Browser
- Download file 470 Bytes
-
https://huggingface.co/datasets/SAIFIINDUSTRIES/verilog_data-1/resolve/main/The-OpenROAD-Project_OpenROAD-flow-scripts/tools/FakeRAM2.0/utils/exporter.py
- Command line
-
hf download hf://datasets/SAIFIINDUSTRIES/verilog_data-1/The-OpenROAD-Project_OpenROAD-flow-scripts/tools/FakeRAM2.0/utils/exporter.py
-
curl -L -o exporter.py https://huggingface.co/datasets/SAIFIINDUSTRIES/verilog_data-1/resolve/main/The-OpenROAD-Project_OpenROAD-flow-scripts/tools/FakeRAM2.0/utils/exporter.py
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) | |