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
7e4e4b19fc
commit
ab7347877f
|
|
@ -49,25 +49,23 @@ module top(input wire [`N_DI-1:0] di);
|
|||
for idx, ((tile_name, site_name), isone) in enumerate(zip(
|
||||
sites, util.gen_fuzz_states(len(sites)))):
|
||||
params[tile_name] = (site_name, isone, "di[%u]" % idx)
|
||||
print('''
|
||||
print(
|
||||
'''
|
||||
(* KEEP, DONT_TOUCH *)
|
||||
IBUF #(
|
||||
) ibuf_{site_name} (
|
||||
.I(di[{idx}]),
|
||||
.O(di_buf[{idx}])
|
||||
);'''.format(
|
||||
site_name=site_name,
|
||||
idx=idx))
|
||||
);'''.format(site_name=site_name, idx=idx))
|
||||
|
||||
if isone:
|
||||
print('''
|
||||
print(
|
||||
'''
|
||||
(* KEEP, DONT_TOUCH *)
|
||||
PULLUP #(
|
||||
) pullup_{site_name} (
|
||||
.O(di[{idx}])
|
||||
);'''.format(
|
||||
site_name=site_name,
|
||||
idx=idx))
|
||||
);'''.format(site_name=site_name, idx=idx))
|
||||
|
||||
print("endmodule")
|
||||
write_params(params)
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ def write_params(params):
|
|||
|
||||
|
||||
def run():
|
||||
print(
|
||||
'''
|
||||
print('''
|
||||
module top();
|
||||
''')
|
||||
|
||||
|
|
@ -42,9 +41,9 @@ module top();
|
|||
(* KEEP, DONT_TOUCH, LOC = "{site_name}" *)
|
||||
PLLE2_ADV #( .STARTUP_WAIT({isone}) ) dut_{site_name} ();
|
||||
'''.format(
|
||||
site_name=site_name,
|
||||
isone=verilog.quote('TRUE' if isone else 'FALSE'),
|
||||
))
|
||||
site_name=site_name,
|
||||
isone=verilog.quote('TRUE' if isone else 'FALSE'),
|
||||
))
|
||||
|
||||
print("endmodule")
|
||||
write_params(params)
|
||||
|
|
|
|||
|
|
@ -238,19 +238,19 @@ def gen_fuzz_states(nvals):
|
|||
next_p2_states = 2**math.ceil(math.log(nvals, 2))
|
||||
n = next_p2_states
|
||||
|
||||
full_mask = 2**next_p2_states-1
|
||||
full_mask = 2**next_p2_states - 1
|
||||
|
||||
choices = []
|
||||
invert_choices = []
|
||||
|
||||
num_or = 1
|
||||
while n > 0:
|
||||
mask = 2**n-1
|
||||
mask = 2**n - 1
|
||||
|
||||
val = 0
|
||||
|
||||
for offset in range(0, num_or, 2):
|
||||
shift = offset*next_p2_states//num_or
|
||||
shift = offset * next_p2_states // num_or
|
||||
val |= mask << shift
|
||||
|
||||
choices.append(full_mask ^ val)
|
||||
|
|
|
|||
Loading…
Reference in New Issue