Download ram-boot-image/solution/solve.sh from fasterlabeling/terminal-tasks-showcase: direct link, hf CLI and curl.
- Browser
- Download file 1.42 kB
-
https://huggingface.co/datasets/fasterlabeling/terminal-tasks-showcase/resolve/main/ram-boot-image/solution/solve.sh
- Command line
-
hf download hf://datasets/fasterlabeling/terminal-tasks-showcase/ram-boot-image/solution/solve.sh
-
curl -L -o solve.sh https://huggingface.co/datasets/fasterlabeling/terminal-tasks-showcase/resolve/main/ram-boot-image/solution/solve.sh
1.42 kB
| # Reference solution: installs the estimator into /app/estimator. | |
| # estimate.py port of memory_libmap / memlib (library parser, port assignment, geometry, int-truncated cost, | |
| # selection, emulation flip-flops) plus the INIT emission (gen_swizzle with the widest hardware | |
| # width, the INIT row loop, clean_undef for no_undef libraries) and the cell-listing digest | |
| # premap.py the $mem_v2 the flow hands to memory_libmap: write/read ports per coding idiom, the $meminit | |
| # entries of each init program and of $readmemh (Yosys' readmem loop), wreduce's address trim, | |
| # opt_mem's constant-lane test over the raw entries, dead read ports, get_init_data | |
| # gen11.py a copy of /app/ramgen/gen11.py (hexfile() gives the text $readmemh reads) | |
| # memlibs.json the eight library files of /app/yosys/techlibs, verbatim | |
| set -e | |
| HERE=$(cd "$(dirname "$0")" && pwd) | |
| mkdir -p /app/estimator | |
| cp "$HERE/estimate.py" "$HERE/premap.py" "$HERE/memlibs.json" /app/estimator/ | |
| cp /app/ramgen/gen11.py /app/estimator/gen11.py | |
| python3 -c " | |
| import sys; sys.path.insert(0, '/app/estimator'); import estimate | |
| print(estimate.estimate({'flow': 'xc7', 'W': 16, 'D': 1024, 'decl': 'up', 'wstyle': 'none', 'rstyle': 'sync', 'dwidth': 'exact', 'awidth': 'exact', 'edge': 'pos', 'rd2': 'none', 'rslice': 'full', 'init': 'file', 'hexform': 'seq', 'hexargs': 'none'}))" | |