File: synth_axis_ctrl_crossbar_2d_mesh.py

package info (click to toggle)
uhd 3.13.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 207,120 kB
  • sloc: cpp: 167,245; ansic: 86,841; vhdl: 53,420; python: 40,839; xml: 13,167; tcl: 5,688; makefile: 2,167; sh: 1,719; pascal: 230; csh: 94; asm: 20; perl: 11
file content (37 lines) | stat: -rwxr-xr-x 1,476 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /usr/bin/python3
#!/usr/bin/python3
#
# Copyright 2018 Ettus Research, a National Instruments Company
#
# SPDX-License-Identifier: LGPL-3.0-or-later
#

import argparse
import synth_run

modname = 'axis_ctrl_crossbar_2d_mesh'

# Parse command line options
def get_options():
    parser = argparse.ArgumentParser(description='Generate synthesis results for ' + modname)
    parser.add_argument('--top', type=str, default='TORUS', help='Topologies (CSV)')
    parser.add_argument('--dimw', type=str, default='4', help='Router dimension width (CSV)')
    parser.add_argument('--dataw', type=str, default='32', help='Router datapath width (CSV)')
    parser.add_argument('--mtu', type=str, default='5', help='MTU (CSV)')
    parser.add_argument('--ralloc', type=str, default='WORMHOLE', help='Router allocation method (CSV)')
    return parser.parse_args()

def main():
    args = get_options()
    keys = ['top', 'dimw', 'dataw', 'mtu', 'ralloc']
    for top in args.top.strip().split(','):
        for dimw in args.dimw.strip().split(','):
            for dataw in args.dataw.strip().split(','):
                for mtu in args.mtu.strip().split(','):
                    for ralloc in args.ralloc.strip().split(','):
                        # Collect parameters
                        transform = {'dimw':dimw, 'dataw':dataw, 'mtu':mtu, 'top':top, 'ralloc':ralloc}
                        synth_run.synth_run(modname, keys, transform)

if __name__ == '__main__':
    main()