Skip to content

Commit 1805e00

Browse files
committed
[CONFIG] new bitstream path convention (apache#25)
* updating hardware bitstream path convention * adding accum width
1 parent 069f8f7 commit 1805e00

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

vta/config/vta_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ def main():
9999
cfg["LOG_OUT_BUFF_SIZE"] = cfg["LOG_ACC_BUFF_SIZE"] - cfg["LOG_ACC_WIDTH"] + cfg["LOG_OUT_WIDTH"]
100100
# Generate bitstream config string.
101101
# Needs to match the BITSTREAM string in python/vta/environment.py
102-
cfg["BITSTREAM"] = "{}_{}_{}x{}x{}_a{}w{}o{}_{}_{}_{}_{}_{}MHz_{}ns_gii{}".format(
102+
cfg["BITSTREAM"] = "{}_{}x{}x{}_a{}w{}o{}s{}_{}_{}_{}_{}_{}MHz_{}ns_gii{}".format(
103103
cfg["TARGET"],
104-
cfg["HW_VER"].replace('.', '_'),
105104
(1 << cfg["LOG_BATCH"]),
106105
(1 << cfg["LOG_BLOCK_IN"]),
107106
(1 << cfg["LOG_BLOCK_OUT"]),
108107
(1 << cfg["LOG_INP_WIDTH"]),
109108
(1 << cfg["LOG_WGT_WIDTH"]),
110109
(1 << cfg["LOG_OUT_WIDTH"]),
110+
(1 << cfg["LOG_ACC_WIDTH"]),
111111
cfg["LOG_UOP_BUFF_SIZE"],
112112
cfg["LOG_INP_BUFF_SIZE"],
113113
cfg["LOG_WGT_BUFF_SIZE"],

vta/python/vta/environment.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def __init__(self, cfg):
152152
self._dev_ctx = None
153153
self._last_env = None
154154
# derive bitstream name
155-
self.BITSTREAM = "{}/{}/{}x{}x{}_a{}w{}o{}_{}_{}_{}_{}_{}_{}MHz_{}ns_gii{}".format(
155+
self.BITSTREAM = "{}/{}_{}x{}x{}_a{}w{}o{}s{}_{}_{}_{}_{}_{}_{}MHz_{}ns_gii{}".format(
156156
self.HW_VER.replace('.', '_'),
157157
self.TARGET,
158158
self.BATCH,
@@ -161,6 +161,7 @@ def __init__(self, cfg):
161161
self.INP_WIDTH,
162162
self.WGT_WIDTH,
163163
self.OUT_WIDTH,
164+
self.ACC_WIDTH,
164165
self.LOG_BUS_WIDTH,
165166
self.LOG_UOP_BUFF_SIZE,
166167
self.LOG_INP_BUFF_SIZE,

0 commit comments

Comments
 (0)