Make 018 more robust by selectively disabling inputs and outputs.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
Keith Rothman 2020-09-25 12:59:13 -07:00
parent f1eabc62b7
commit 5ad24eb6cd
1 changed files with 9 additions and 3 deletions

View File

@ -126,9 +126,15 @@ for clbi, loc in zip(range(CLBN), slices):
print(' %s' % module)
print(' #(.LOC("%s")%s)' % (loc, params))
print(
' clb_%d (.clk(clk), .din(din[ %d +: 8]), .dout(dout[ %d +: 8]));'
% (clbi, 8 * clbi, 8 * clbi))
sel = random.random()
if sel > .15:
print(
' clb_%d (.clk(clk), .din(din[ %d +: 8]), .dout(dout[ %d +: 8]));'
% (clbi, 8 * clbi, 8 * clbi))
else:
print(
" clb_%d (.clk(clk), .din({8{1'b1}}), .dout());" %
(clbi, ))
f.write('%s,%s%s\n' % (module, loc, cparams))
f.close()