mirror of https://github.com/openXC7/prjxray.git
Run make format.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
parent
00d9e1f314
commit
1011a90769
|
|
@ -28,8 +28,7 @@ def write_params(params):
|
|||
|
||||
|
||||
def run():
|
||||
print(
|
||||
'''
|
||||
print('''
|
||||
module top();
|
||||
''')
|
||||
|
||||
|
|
@ -37,7 +36,7 @@ module top();
|
|||
|
||||
sites = list(gen_sites())
|
||||
for (tile_name, sites), isone in zip(sites,
|
||||
util.gen_fuzz_states(len(sites))):
|
||||
util.gen_fuzz_states(len(sites))):
|
||||
site_name = sites[0]
|
||||
params[tile_name] = (site_name, isone)
|
||||
|
||||
|
|
@ -48,9 +47,9 @@ module top();
|
|||
.INIT_OUT({isone})
|
||||
) buf_{site} ();
|
||||
'''.format(
|
||||
site=site_name,
|
||||
isone=isone,
|
||||
))
|
||||
site=site_name,
|
||||
isone=isone,
|
||||
))
|
||||
|
||||
print("endmodule")
|
||||
write_params(params)
|
||||
|
|
|
|||
|
|
@ -16,16 +16,19 @@ def main():
|
|||
for row in params:
|
||||
base_name = 'BUFHCE_X{}Y{}'.format(row['x'], row['y'])
|
||||
|
||||
|
||||
segmk.add_site_tag(row['site'], '{}.IN_USE'.format(base_name), row['IN_USE'])
|
||||
segmk.add_site_tag(
|
||||
row['site'], '{}.IN_USE'.format(base_name), row['IN_USE'])
|
||||
if not row['IN_USE']:
|
||||
continue
|
||||
|
||||
segmk.add_site_tag(row['site'], '{}.INIT_OUT'.format(base_name), row['INIT_OUT'])
|
||||
segmk.add_site_tag(
|
||||
row['site'], '{}.INIT_OUT'.format(base_name), row['INIT_OUT'])
|
||||
|
||||
# SYNC is a zero pattern
|
||||
for opt in ['ASYNC']:
|
||||
segmk.add_site_tag(row['site'], '{}.CE_TYPE.'.format(base_name) + opt, verilog.unquote(row['CE_TYPE']) == opt)
|
||||
segmk.add_site_tag(
|
||||
row['site'], '{}.CE_TYPE.'.format(base_name) + opt,
|
||||
verilog.unquote(row['CE_TYPE']) == opt)
|
||||
|
||||
segmk.compile()
|
||||
segmk.write()
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ from prjxray.db import Database
|
|||
|
||||
XY_RE = re.compile('^BUFHCE_X([0-9]+)Y([0-9]+)$')
|
||||
|
||||
|
||||
def gen_sites():
|
||||
db = Database(util.get_db_root())
|
||||
grid = db.grid()
|
||||
|
|
@ -54,9 +55,11 @@ module top();
|
|||
|
||||
if params['IN_USE']:
|
||||
params['INIT_OUT'] = random.randint(0, 1)
|
||||
params['CE_TYPE'] = verilog.quote(random.choice(('SYNC', 'ASYNC')))
|
||||
params['CE_TYPE'] = verilog.quote(
|
||||
random.choice(('SYNC', 'ASYNC')))
|
||||
|
||||
print('''
|
||||
print(
|
||||
'''
|
||||
(* KEEP, DONT_TOUCH, LOC = "{site}" *)
|
||||
BUFHCE #(
|
||||
.INIT_OUT({INIT_OUT}),
|
||||
|
|
|
|||
Loading…
Reference in New Issue