mirror of https://github.com/openXC7/prjxray.git
005-tilegrid: allow auto-alignment of frame
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
This commit is contained in:
parent
a7b2d9752e
commit
bed5106efc
|
|
@ -56,7 +56,13 @@ def load_db(fn):
|
|||
|
||||
tparts = tagstr.split('.')
|
||||
tile = tparts[0]
|
||||
|
||||
for part in tparts[1:]:
|
||||
# Auto align the frame address to the next lowest multiple of 0x80.
|
||||
if part == 'AUTO_FRAME':
|
||||
frame -= (frame % 0x80)
|
||||
continue
|
||||
|
||||
k, v = part.split(':')
|
||||
if k == "DFRAME":
|
||||
frame -= int(v, 16)
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ def run(
|
|||
fnout,
|
||||
oneval,
|
||||
dframe,
|
||||
auto_frame,
|
||||
dword,
|
||||
dbit,
|
||||
multi=False,
|
||||
|
|
@ -30,6 +31,8 @@ def run(
|
|||
metastr += ".DFRAME:%02x" % dframe
|
||||
if multi:
|
||||
metastr += ".MULTI"
|
||||
if auto_frame:
|
||||
metastr += ".AUTO_FRAME"
|
||||
|
||||
tags = dict()
|
||||
f = open(design_fn, 'r')
|
||||
|
|
@ -66,6 +69,10 @@ def main():
|
|||
required=False,
|
||||
default="",
|
||||
help="Reference frame delta (base 16)")
|
||||
parser.add_argument(
|
||||
"--auto-frame",
|
||||
action='store_true',
|
||||
help="Auto align frame address to next lowest multiple of 0x80")
|
||||
parser.add_argument(
|
||||
"--dword",
|
||||
type=str,
|
||||
|
|
@ -85,6 +92,7 @@ def main():
|
|||
args.fnout,
|
||||
args.oneval,
|
||||
None if args.dframe == "" else int(args.dframe, 16),
|
||||
args.auto_frame,
|
||||
int(args.dword, 10),
|
||||
None if args.dbit == "" else int(args.dbit, 10),
|
||||
multi=args.multi,
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@
|
|||
#
|
||||
# SPDX-License-Identifier: ISC
|
||||
N ?= 8
|
||||
GENERATE_ARGS?="--oneval 0 --design params.csv --dframe 1d --dword 45 --dbit 3"
|
||||
GENERATE_ARGS?="--oneval 0 --design params.csv --dword 45 --dbit 3 --auto-frame"
|
||||
include ../fuzzaddr/common.mk
|
||||
|
|
|
|||
Loading…
Reference in New Issue