File: timing_dbs.py

package info (click to toggle)
prjtrellis 1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 83,000 kB
  • sloc: cpp: 20,813; python: 16,246; sh: 375; makefile: 262; asm: 80; ansic: 58
file content (22 lines) | stat: -rw-r--r-- 717 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import database
from os import path
import os

def cells_db_path(family, speedgrade):
    tmgroot = path.join(database.get_db_root(), family, "timing")
    if not path.exists(tmgroot):
        os.mkdir(tmgroot)
    sgroot = path.join(tmgroot, "speed_{}".format(speedgrade))
    if not path.exists(sgroot):
        os.mkdir(sgroot)
    return path.join(sgroot, "cells.json")


def interconnect_db_path(family, speedgrade):
    tmgroot = path.join(database.get_db_root(), family, "timing")
    if not path.exists(tmgroot):
        os.mkdir(tmgroot)
    sgroot = path.join(tmgroot, "speed_{}".format(speedgrade))
    if not path.exists(sgroot):
        os.mkdir(sgroot)
    return path.join(sgroot, "interconnect.json")