Objects/Documentation
place18.py
Share two multiplications · After routing (7,11) on HX8K-CT256 I get 2.968 ns and 16 cells for the direct expression, 3.465 ns and 20 cells for sharing, on each of five seeds.
Download ↓"""Paired routing of the registered (7x,11x) mod 16 core; same pins and seeds."""
import json
from pathlib import Path
import subprocess
import sys
import tempfile
from graphe18 import verilog
def measure(yosys,router):
pins=["J3","C16","B16","D14","D15","D16","E14","F15","G15","B5","B4","A2","A1"]
ports=["clk"]+[f"x[{i}]" for i in range(4)]+[f"y[{i}]" for i in range(8)]
rows=[]
with tempfile.TemporaryDirectory() as tmp:
directory=Path(tmp)
(directory/"pins.pcf").write_text("".join(f"set_io {port} {pin}\n" for port,pin in zip(ports,pins)))