Skip to content

Commit f0282bc

Browse files
committed
verif: Add framework for benchmarking sweep across different hw configs
1 parent afa2bfc commit f0282bc

11 files changed

Lines changed: 1225 additions & 21 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ target/verif/vsim/compile.tcl
99
target/verif/vsim/modelsim.ini
1010
target/verif/vsim/transcript
1111
target/verif/vsim/vsim.wlf
12+
target/verif/results

target/verif/config/generated/json_to_mk.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
Templates are automatically discovered based on the config type argument.
77
"""
88

9-
import json
109
import argparse
10+
import json
1111
import sys
1212
from pathlib import Path
1313
from string import Template
@@ -83,9 +83,9 @@ def parse_args(argv=None):
8383
help="Configuration type to generate.",
8484
)
8585
parser.add_argument(
86-
"config_dir",
86+
"config_json",
8787
type=Path,
88-
help="Directory containing source-of-truth JSON files.",
88+
help="Path to selected source-of-truth JSON file.",
8989
)
9090
parser.add_argument(
9191
"generated_dir",
@@ -98,11 +98,10 @@ def parse_args(argv=None):
9898
def main():
9999
args = parse_args()
100100
config_type = args.config_type
101-
config_dir = args.config_dir.resolve()
101+
json_file = args.config_json.resolve()
102+
config_dir = json_file.parent
102103
generated_dir = args.generated_dir.resolve()
103104

104-
# Construct file paths based on config_type argument
105-
json_file = config_dir / f"{config_type}.json"
106105
template_file = generated_dir / f"{config_type}.mk.tpl"
107106

108107
# Load JSON config
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"description": "Hardware configuration parameters for HCI interconnect",
3+
"parameters": {
4+
"N_HWPE": 2,
5+
"HWPE_WIDTH_FACT": 8,
6+
"N_CORE": 8,
7+
"N_DMA": 0,
8+
"N_EXT": 1,
9+
"DATA_WIDTH": 32,
10+
"TOT_MEM_SIZE": 256,
11+
"N_BANKS": 64,
12+
"INTERCO_TYPE": "HCI",
13+
"TS_BIT": 21,
14+
"EXPFIFO": 0,
15+
"SEL_LIC": 0
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"description": "Hardware configuration parameters for HCI interconnect",
3+
"parameters": {
4+
"N_HWPE": 2,
5+
"HWPE_WIDTH_FACT": 8,
6+
"N_CORE": 8,
7+
"N_DMA": 0,
8+
"N_EXT": 1,
9+
"DATA_WIDTH": 32,
10+
"TOT_MEM_SIZE": 256,
11+
"N_BANKS": 64,
12+
"INTERCO_TYPE": "LOG",
13+
"TS_BIT": 21,
14+
"EXPFIFO": 0,
15+
"SEL_LIC": 0
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"description": "Hardware configuration parameters for HCI interconnect",
3+
"parameters": {
4+
"N_HWPE": 2,
5+
"HWPE_WIDTH_FACT": 8,
6+
"N_CORE": 8,
7+
"N_DMA": 0,
8+
"N_EXT": 1,
9+
"DATA_WIDTH": 32,
10+
"TOT_MEM_SIZE": 256,
11+
"N_BANKS": 64,
12+
"INTERCO_TYPE": "MUX",
13+
"TS_BIT": 21,
14+
"EXPFIFO": 0,
15+
"SEL_LIC": 0
16+
}
17+
}

0 commit comments

Comments
 (0)