mirror of https://github.com/openXC7/prjxray.git
ffprim: output list of FF bits
Signed-off-by: John McMaster <JohnDMcMaster@gmail.com> Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
This commit is contained in:
parent
2ce1b522e2
commit
59c490c3d0
|
|
@ -3,13 +3,13 @@ SPECIMENS := $(addprefix specimen_,$(shell seq -f '%03.0f' $(N)))
|
||||||
SPECIMENS_OK := $(addsuffix /OK,$(SPECIMENS))
|
SPECIMENS_OK := $(addsuffix /OK,$(SPECIMENS))
|
||||||
|
|
||||||
database: $(SPECIMENS_OK)
|
database: $(SPECIMENS_OK)
|
||||||
../../tools/segmatch -o seg_clblx.segbits $(addsuffix /segdata_clbl[lm]_[lr].txt,$(SPECIMENS))
|
${XRAY_SEGMATCH} -o seg_clblx.segbits $(addsuffix /segdata_clbl[lm]_[lr].txt,$(SPECIMENS))
|
||||||
|
|
||||||
pushdb:
|
pushdb:
|
||||||
bash ../../utils/mergedb.sh clbll_l seg_clblx.segbits
|
${XRAY_MERGEDB} clbll_l seg_clblx.segbits
|
||||||
bash ../../utils/mergedb.sh clbll_r seg_clblx.segbits
|
${XRAY_MERGEDB} clbll_r seg_clblx.segbits
|
||||||
bash ../../utils/mergedb.sh clblm_l seg_clblx.segbits
|
${XRAY_MERGEDB} clblm_l seg_clblx.segbits
|
||||||
bash ../../utils/mergedb.sh clblm_r seg_clblx.segbits
|
${XRAY_MERGEDB} clblm_r seg_clblx.segbits
|
||||||
|
|
||||||
$(SPECIMENS_OK):
|
$(SPECIMENS_OK):
|
||||||
bash generate.sh $(subst /OK,,$@)
|
bash generate.sh $(subst /OK,,$@)
|
||||||
|
|
|
||||||
|
|
@ -66,11 +66,11 @@ with open("design.txt", "r") as f:
|
||||||
|
|
||||||
which = ff_name[0]
|
which = ff_name[0]
|
||||||
# Reduced test for now
|
# Reduced test for now
|
||||||
if ff_name != 'AFF':
|
#if ff_name != 'AFF':
|
||||||
continue
|
# continue
|
||||||
|
|
||||||
segmk.addtag(site, "FF_USED", used)
|
#segmk.addtag(site, "FF_USED", used)
|
||||||
if 1:
|
if 0:
|
||||||
# If unused mark all primitives as not present
|
# If unused mark all primitives as not present
|
||||||
# Otherwise mark the primitive we are using
|
# Otherwise mark the primitive we are using
|
||||||
for ffprim in ffprims:
|
for ffprim in ffprims:
|
||||||
|
|
@ -78,39 +78,19 @@ with open("design.txt", "r") as f:
|
||||||
segmk.addtag(site, "FF_%s" % ffprim, 0)
|
segmk.addtag(site, "FF_%s" % ffprim, 0)
|
||||||
elif ref_name == ffprim:
|
elif ref_name == ffprim:
|
||||||
segmk.addtag(site, "FF_%s" % ffprim, 1)
|
segmk.addtag(site, "FF_%s" % ffprim, 1)
|
||||||
|
|
||||||
'''
|
|
||||||
Experiment diffing against one of the lower bit set candidates
|
|
||||||
can probably isolate a few bits this way
|
|
||||||
really though I want to diff against USED but not sure how to do that
|
|
||||||
|
|
||||||
CLB.SLICE_X0.FF_USED <7 candidates>
|
# Theory:
|
||||||
CLB.SLICE_X0.FF_FDSE <8 candidates>
|
# FDPE represents none of the FF specific bits used
|
||||||
CLB.SLICE_X0.FF_FDPE <8 candidates>
|
# FDRE has none of the bits used
|
||||||
CLB.SLICE_X0.FF_FDRE <9 candidates>
|
|
||||||
CLB.SLICE_X0.FF_FDCE <10 candidates>
|
|
||||||
'''
|
|
||||||
'''
|
|
||||||
if 1:
|
if 1:
|
||||||
# If unused mark all primitives as not present
|
# If unused mark all primitives as not present
|
||||||
# Otherwise mark the primitive we are using
|
# Otherwise mark the primitive we are using
|
||||||
|
# Should yield 3 bits
|
||||||
if used:
|
if used:
|
||||||
base = 'FDSE'
|
if ref_name == 'FDPE':
|
||||||
if ref_name == base:
|
segmk.addtag(site, "%s.PRIM" % ff_name, 0)
|
||||||
for ffprim in ffprims:
|
if ref_name == 'FDRE':
|
||||||
segmk.addtag(site, "FF_DIFF_%s_%s" % (base, fprim, 0)
|
segmk.addtag(site, "%s.PRIM" % ff_name, 1)
|
||||||
if 0:
|
|
||||||
for ffprim in ffprims:
|
|
||||||
segmk.addtag(site, "FF_%s" % ffprim, 0)
|
|
||||||
elif
|
|
||||||
segmk.addtag(site, "FF_%s" % ffprim, 1)
|
|
||||||
'''
|
|
||||||
|
|
||||||
# Compare '_1' negative edge clock to positive edge
|
|
||||||
if used:
|
|
||||||
#inv_clk = ref_name.endswith("_1")
|
|
||||||
inv_clk = cinv
|
|
||||||
segmk.addtag(site, "%s.FF_INV_CLK" % ff_name, inv_clk)
|
|
||||||
|
|
||||||
segmk.compile()
|
segmk.compile()
|
||||||
segmk.write()
|
segmk.write()
|
||||||
|
|
|
||||||
|
|
@ -97,8 +97,8 @@ for i in range(CLBN):
|
||||||
# clb_FD clb_FD (.clk(clk), .din(din[ 0 +: 4]), .dout(dout[ 0]));
|
# clb_FD clb_FD (.clk(clk), .din(din[ 0 +: 4]), .dout(dout[ 0]));
|
||||||
# clb_FD_1 clb_FD_1 (.clk(clk), .din(din[ 4 +: 4]), .dout(dout[ 1]));
|
# clb_FD_1 clb_FD_1 (.clk(clk), .din(din[ 4 +: 4]), .dout(dout[ 1]));
|
||||||
loc = next(slices)
|
loc = next(slices)
|
||||||
#bel = random.choice(ff_bels)
|
bel = random.choice(ff_bels)
|
||||||
bel = "AFF"
|
#bel = "AFF"
|
||||||
print(' clb_%s' % ffprim)
|
print(' clb_%s' % ffprim)
|
||||||
print(' #(.LOC("%s"), .BEL("%s"))' % (loc, bel))
|
print(' #(.LOC("%s"), .BEL("%s"))' % (loc, bel))
|
||||||
print(' clb_%d (.clk(clk), .din(din[ %d +: 4]), .dout(dout[ %d]));' % (i, 4 * i, 1 * i))
|
print(' clb_%d (.clk(clk), .din(din[ %d +: 4]), .dout(dout[ %d]));' % (i, 4 * i, 1 * i))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue