mirror of https://github.com/openXC7/prjxray.git
clbram fuzzer: misc improvements
Signed-off-by: John McMaster <JohnDMcMaster@gmail.com> Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
This commit is contained in:
parent
671b9da2eb
commit
29743571b5
|
|
@ -1,8 +1,11 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
wip = 0
|
# FIXME: getting two bits
|
||||||
|
# 00_40 31_46
|
||||||
|
# Can we find instance where they are not aliased?
|
||||||
|
WA7USED = 0
|
||||||
|
|
||||||
import sys, re
|
import sys, re, os
|
||||||
|
|
||||||
sys.path.append("../../../utils/")
|
sys.path.append("../../../utils/")
|
||||||
from segmaker import segmaker
|
from segmaker import segmaker
|
||||||
|
|
@ -53,9 +56,7 @@ for l in f:
|
||||||
WA7USED, WA8USED
|
WA7USED, WA8USED
|
||||||
'''
|
'''
|
||||||
which = 'D'
|
which = 'D'
|
||||||
if wip:
|
WA7USED and segmk.addtag(loc, "WA7USED", 1)
|
||||||
print(loc, 1)
|
|
||||||
segmk.addtag(loc, "WA7USED", 1)
|
|
||||||
segmk.addtag(loc, "WA8USED", module == 'my_RAM256X1S')
|
segmk.addtag(loc, "WA8USED", module == 'my_RAM256X1S')
|
||||||
else:
|
else:
|
||||||
'''
|
'''
|
||||||
|
|
@ -72,19 +73,21 @@ for l in f:
|
||||||
31_47: RAM mode
|
31_47: RAM mode
|
||||||
'''
|
'''
|
||||||
for which, bel in zip('ABCD', bels):
|
for which, bel in zip('ABCD', bels):
|
||||||
print(which, bel)
|
|
||||||
segmk.addtag(loc, "%sLUT.SMALL" % which, bel in ('SRL16E', 'RAM32X1S'))
|
segmk.addtag(loc, "%sLUT.SMALL" % which, bel in ('SRL16E', 'RAM32X1S'))
|
||||||
segmk.addtag(loc, "%sLUT.SRL" % which, bel in ('SRL16E', 'SRLC32E'))
|
segmk.addtag(loc, "%sLUT.SRL" % which, bel in ('SRL16E', 'SRLC32E'))
|
||||||
# Only valid in D
|
# Only valid in D
|
||||||
if which == 'D':
|
if which == 'D':
|
||||||
segmk.addtag(loc, "%sLUT.RAM" % which, bel in ('RAM32X1S', 'RAM64X1S'))
|
segmk.addtag(loc, "%sLUT.RAM" % which, bel in ('RAM32X1S', 'RAM64X1S'))
|
||||||
if wip:
|
WA7USED and segmk.addtag(loc, "WA7USED", 0)
|
||||||
segmk.addtag(loc, "WA7USED", 0)
|
|
||||||
#segmk.addtag(loc, "WA7USED", 1)
|
|
||||||
print(loc, 0)
|
|
||||||
segmk.addtag(loc, "WA8USED", 0)
|
segmk.addtag(loc, "WA8USED", 0)
|
||||||
segmk.addtag(loc, "WEMUX.CE", bels != ['LUT6', 'LUT6', 'LUT6', 'LUT6'])
|
segmk.addtag(loc, "WEMUX.CE", bels != ['LUT6', 'LUT6', 'LUT6', 'LUT6'])
|
||||||
|
|
||||||
segmk.compile()
|
def bitfilter(frame_idx, bit_idx):
|
||||||
|
# Hack to remove aliased PIP bits
|
||||||
|
# We should either mix up routing more or exclude previous DB entries
|
||||||
|
assert os.getenv("XRAY_DATABASE") == "artix7"
|
||||||
|
return (frame_idx, bit_idx) not in [(0, 27), (1, 25), (1, 26), (1, 29)]
|
||||||
|
|
||||||
|
segmk.compile(bitfilter=bitfilter)
|
||||||
segmk.write()
|
segmk.write()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ endmodule
|
||||||
|
|
||||||
|
|
||||||
//Activate W*MUX
|
//Activate W*MUX
|
||||||
module roi(input clk, input [255:0] din, output [255:0] dout);
|
module roi_sdffd(input clk, input [255:0] din, output [255:0] dout);
|
||||||
/*
|
/*
|
||||||
seg SEG_CLBLM_L_X10Y100
|
seg SEG_CLBLM_L_X10Y100
|
||||||
bit 00_40
|
bit 00_40
|
||||||
|
|
@ -86,8 +86,10 @@ module roi(input clk, input [255:0] din, output [255:0] dout);
|
||||||
bit 31_16
|
bit 31_16
|
||||||
bit 31_47
|
bit 31_47
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
my_RAM64X1S_2 #(.LOC("SLICE_X12Y104"))
|
my_RAM64X1S_2 #(.LOC("SLICE_X12Y104"))
|
||||||
c4(.clk(clk), .din(din[ 32 +: 8]), .dout(dout[ 32 +: 8]));
|
c4(.clk(clk), .din(din[ 32 +: 8]), .dout(dout[ 32 +: 8]));
|
||||||
|
*/
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
//It created a LUT instead of aggregating using WA7MUX
|
//It created a LUT instead of aggregating using WA7MUX
|
||||||
|
|
@ -520,47 +522,114 @@ module roi_asdsdaf(input clk, input [255:0] din, output [255:0] dout);
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
//One of each
|
//One of each
|
||||||
module roi_asdfsadf(input clk, input [255:0] din, output [255:0] dout);
|
module roi(input clk, input [255:0] din, output [255:0] dout);
|
||||||
//4LUT
|
//4LUT
|
||||||
|
/*
|
||||||
|
seg SEG_CLBLM_L_X10Y100
|
||||||
|
bit 31_16
|
||||||
|
bit 31_17
|
||||||
|
bit 31_46
|
||||||
|
*/
|
||||||
my_RAM64X1D2 #(.LOC("SLICE_X12Y100"))
|
my_RAM64X1D2 #(.LOC("SLICE_X12Y100"))
|
||||||
c0(.clk(clk), .din(din[ 0 +: 8]), .dout(dout[ 0 +: 8]));
|
c0(.clk(clk), .din(din[ 0 +: 8]), .dout(dout[ 0 +: 8]));
|
||||||
//1LUT
|
//1LUT
|
||||||
|
/*
|
||||||
|
seg SEG_CLBLM_L_X10Y101
|
||||||
|
bit 00_00
|
||||||
|
*/
|
||||||
my_SRLC32E #(.LOC("SLICE_X12Y101"))
|
my_SRLC32E #(.LOC("SLICE_X12Y101"))
|
||||||
c1(.clk(clk), .din(din[ 8 +: 8]), .dout(dout[ 8 +: 8]));
|
c1(.clk(clk), .din(din[ 8 +: 8]), .dout(dout[ 8 +: 8]));
|
||||||
//1LUT
|
//1LUT
|
||||||
|
/*
|
||||||
|
No unknown bits
|
||||||
|
*/
|
||||||
my_SRL16E #(.LOC("SLICE_X12Y102"))
|
my_SRL16E #(.LOC("SLICE_X12Y102"))
|
||||||
c2(.clk(clk), .din(din[ 16 +: 8]), .dout(dout[ 16 +: 8]));
|
c2(.clk(clk), .din(din[ 16 +: 8]), .dout(dout[ 16 +: 8]));
|
||||||
//4LUT
|
//4LUT
|
||||||
|
/*
|
||||||
|
seg SEG_CLBLM_L_X10Y103
|
||||||
|
bit 00_00
|
||||||
|
bit 00_20
|
||||||
|
bit 01_43
|
||||||
|
bit 31_16
|
||||||
|
bit 31_17
|
||||||
|
bit 31_46
|
||||||
|
*/
|
||||||
my_RAM64M #(.LOC("SLICE_X12Y103"))
|
my_RAM64M #(.LOC("SLICE_X12Y103"))
|
||||||
c3(.clk(clk), .din(din[ 24 +: 8]), .dout(dout[ 24 +: 8]));
|
c3(.clk(clk), .din(din[ 24 +: 8]), .dout(dout[ 24 +: 8]));
|
||||||
//1LUT
|
//1LUT
|
||||||
|
/*
|
||||||
|
No unknown bits
|
||||||
|
*/
|
||||||
my_RAM64X1S #(.LOC("SLICE_X12Y104"))
|
my_RAM64X1S #(.LOC("SLICE_X12Y104"))
|
||||||
c4(.clk(clk), .din(din[ 32 +: 8]), .dout(dout[ 32 +: 8]));
|
c4(.clk(clk), .din(din[ 32 +: 8]), .dout(dout[ 32 +: 8]));
|
||||||
//1LUT
|
//1LUT
|
||||||
|
/*
|
||||||
|
No unknown bits
|
||||||
|
*/
|
||||||
my_RAM64X1S_1 #(.LOC("SLICE_X12Y105"))
|
my_RAM64X1S_1 #(.LOC("SLICE_X12Y105"))
|
||||||
c5(.clk(clk), .din(din[ 40 +: 8]), .dout(dout[ 40 +: 8]));
|
c5(.clk(clk), .din(din[ 40 +: 8]), .dout(dout[ 40 +: 8]));
|
||||||
//2LUT
|
//2LUT
|
||||||
|
/*
|
||||||
|
seg SEG_CLBLM_L_X10Y106
|
||||||
|
bit 01_43
|
||||||
|
bit 31_46
|
||||||
|
*/
|
||||||
my_RAM64X2S #(.LOC("SLICE_X12Y106"))
|
my_RAM64X2S #(.LOC("SLICE_X12Y106"))
|
||||||
c6(.clk(clk), .din(din[ 48 +: 8]), .dout(dout[ 48 +: 8]));
|
c6(.clk(clk), .din(din[ 48 +: 8]), .dout(dout[ 48 +: 8]));
|
||||||
//2LUT
|
//2LUT
|
||||||
|
/*
|
||||||
|
seg SEG_CLBLM_L_X10Y107
|
||||||
|
bit 31_46
|
||||||
|
*/
|
||||||
my_RAM64X1D #(.LOC("SLICE_X12Y107"))
|
my_RAM64X1D #(.LOC("SLICE_X12Y107"))
|
||||||
c7(.clk(clk), .din(din[ 56 +: 8]), .dout(dout[ 56 +: 8]));
|
c7(.clk(clk), .din(din[ 56 +: 8]), .dout(dout[ 56 +: 8]));
|
||||||
//4LUT
|
//4LUT
|
||||||
|
/*
|
||||||
|
seg SEG_CLBLM_L_X10Y108
|
||||||
|
bit 00_40
|
||||||
|
bit 31_16
|
||||||
|
bit 31_17
|
||||||
|
bit 31_46
|
||||||
|
*/
|
||||||
my_RAM128X1D #(.LOC("SLICE_X12Y108"))
|
my_RAM128X1D #(.LOC("SLICE_X12Y108"))
|
||||||
c8(.clk(clk), .din(din[ 64 +: 8]), .dout(dout[ 64 +: 8]));
|
c8(.clk(clk), .din(din[ 64 +: 8]), .dout(dout[ 64 +: 8]));
|
||||||
//4LUT
|
//4LUT
|
||||||
|
/*
|
||||||
|
seg SEG_CLBLM_L_X10Y109
|
||||||
|
bit 00_00
|
||||||
|
bit 00_20
|
||||||
|
bit 01_43
|
||||||
|
bit 31_16
|
||||||
|
bit 31_17
|
||||||
|
bit 31_46
|
||||||
|
*/
|
||||||
my_RAM32M #(.LOC("SLICE_X12Y109"))
|
my_RAM32M #(.LOC("SLICE_X12Y109"))
|
||||||
c9(.clk(clk), .din(din[ 72 +: 8]), .dout(dout[ 72 +: 8]));
|
c9(.clk(clk), .din(din[ 72 +: 8]), .dout(dout[ 72 +: 8]));
|
||||||
//2LUT
|
//2LUT
|
||||||
|
/*
|
||||||
|
seg SEG_CLBLM_L_X10Y110
|
||||||
|
bit 31_46
|
||||||
|
*/
|
||||||
my_RAM32X1D #(.LOC("SLICE_X12Y110"))
|
my_RAM32X1D #(.LOC("SLICE_X12Y110"))
|
||||||
c10(.clk(clk), .din(din[ 80 +: 8]), .dout(dout[ 80 +: 8]));
|
c10(.clk(clk), .din(din[ 80 +: 8]), .dout(dout[ 80 +: 8]));
|
||||||
//1LUT
|
//1LUT
|
||||||
|
/*
|
||||||
|
No bits
|
||||||
|
*/
|
||||||
my_RAM32X1S #(.LOC("SLICE_X12Y111"))
|
my_RAM32X1S #(.LOC("SLICE_X12Y111"))
|
||||||
c11(.clk(clk), .din(din[ 88 +: 8]), .dout(dout[ 88 +: 8]));
|
c11(.clk(clk), .din(din[ 88 +: 8]), .dout(dout[ 88 +: 8]));
|
||||||
//1LUT
|
//1LUT
|
||||||
|
/*
|
||||||
|
No bits
|
||||||
|
*/
|
||||||
my_RAM32X1S_1 #(.LOC("SLICE_X12Y112"))
|
my_RAM32X1S_1 #(.LOC("SLICE_X12Y112"))
|
||||||
c12(.clk(clk), .din(din[ 96 +: 8]), .dout(dout[ 96 +: 8]));
|
c12(.clk(clk), .din(din[ 96 +: 8]), .dout(dout[ 96 +: 8]));
|
||||||
//2LUT
|
//2LUT
|
||||||
|
/*
|
||||||
|
seg SEG_CLBLM_L_X10Y113
|
||||||
|
bit 31_46
|
||||||
|
*/
|
||||||
my_RAM32X2S #(.LOC("SLICE_X12Y113"))
|
my_RAM32X2S #(.LOC("SLICE_X12Y113"))
|
||||||
c13(.clk(clk), .din(din[ 104 +: 8]), .dout(dout[ 104 +: 8]));
|
c13(.clk(clk), .din(din[ 104 +: 8]), .dout(dout[ 104 +: 8]));
|
||||||
endmodule
|
endmodule
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue