mirror of https://github.com/openXC7/prjxray.git
Add XRAY_ROI_FRAMES and "bitread -F"
Signed-off-by: Clifford Wolf <clifford@clifford.at> Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
This commit is contained in:
parent
c860a78a86
commit
18bdd5a1f3
|
|
@ -1,5 +1,6 @@
|
|||
export XRAY_PART="xc7a50tfgg484-1"
|
||||
export XRAY_ROI="SLICE_X12Y100:SLICE_X27Y149"
|
||||
export XRAY_ROI_FRAMES="0x00020500:0x000208ff"
|
||||
export XRAY_PIN_00="E22"
|
||||
export XRAY_PIN_01="D22"
|
||||
export XRAY_PIN_02="E21"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
/design.tcl
|
||||
/design.xdc
|
||||
/design.bit
|
||||
/design_roi_partial.bit
|
||||
/design.bits
|
||||
/design.dcp
|
||||
/hd_visual/
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ add_cells_to_pblock [get_pblocks roi] [get_cells stuff]
|
|||
resize_pblock [get_pblocks roi] -add {$XRAY_ROI}
|
||||
|
||||
# requires partial reconfiguration license
|
||||
set_property HD.RECONFIGURABLE TRUE [get_cells stuff]
|
||||
#set_property HD.RECONFIGURABLE TRUE [get_cells stuff]
|
||||
|
||||
set_property CFGBVS VCCO [current_design]
|
||||
set_property CONFIG_VOLTAGE 3.3 [current_design]
|
||||
|
|
@ -69,11 +69,8 @@ EOT
|
|||
rm -rf design design.log
|
||||
vivado -nojournal -log design.log -mode batch -source design.tcl
|
||||
|
||||
if [ -f design_roi_partial.bit ]; then
|
||||
../tools/bitread -o design.bits -zy < design_roi_partial.bit
|
||||
else
|
||||
../tools/bitread -o design.bits -zy < design.bit
|
||||
fi
|
||||
#../tools/bitread -o design_roi.bits -zy < design_roi_partial.bit
|
||||
../tools/bitread -F $XRAY_ROI_FRAMES -o design.bits -zy < design.bit
|
||||
|
||||
python3 segdata.py
|
||||
../tools/segmatch < segdata.txt > database.txt
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
|
@ -16,6 +17,8 @@ bool chksum = false;
|
|||
char *outfile = nullptr;
|
||||
std::set<uint32_t> frames;
|
||||
|
||||
uint32_t frame_range_begin = 0, frame_range_end = 0;
|
||||
|
||||
std::vector<uint8_t> bitdata;
|
||||
int cursor;
|
||||
|
||||
|
|
@ -226,7 +229,7 @@ public:
|
|||
int main(int argc, char **argv)
|
||||
{
|
||||
int opt;
|
||||
while ((opt = getopt(argc, argv, "crmxyzCf:o:")) != -1)
|
||||
while ((opt = getopt(argc, argv, "crmxyzCf:F:o:")) != -1)
|
||||
switch (opt)
|
||||
{
|
||||
case 'c':
|
||||
|
|
@ -253,6 +256,10 @@ int main(int argc, char **argv)
|
|||
case 'f':
|
||||
frames.insert(strtol(optarg, nullptr, 0));
|
||||
break;
|
||||
case 'F':
|
||||
frame_range_begin = strtol(strtok(optarg, ":"), nullptr, 0);
|
||||
frame_range_end = strtol(strtok(nullptr, ":"), nullptr, 0)+1;
|
||||
break;
|
||||
case 'o':
|
||||
outfile = optarg;
|
||||
break;
|
||||
|
|
@ -289,6 +296,9 @@ help:
|
|||
fprintf(stderr, " -f <frame_address>\n");
|
||||
fprintf(stderr, " only dump the specified frame (might be used more than once)\n");
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, " -F <first_frame_address>:<last_frame_address>\n");
|
||||
fprintf(stderr, " only dump frame in the specified range\n");
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, " -o <outfile>\n");
|
||||
fprintf(stderr, " write machine-readable output file with config frames\n");
|
||||
fprintf(stderr, "\n");
|
||||
|
|
@ -511,6 +521,9 @@ help:
|
|||
if (!frames.empty() && !frames.count(fid.get_value()))
|
||||
continue;
|
||||
|
||||
if (frame_range_begin != frame_range_end && (fid.get_value() < frame_range_begin || frame_range_end <= fid.get_value()))
|
||||
continue;
|
||||
|
||||
if (outfile == nullptr)
|
||||
printf("Frame 0x%08x (Type=%d Top=%d Row=%d Column=%d Minor=%d%s):\n", fid.get_value(), fid.get_type(), fid.get_topflag(),
|
||||
fid.get_rowaddr(), fid.get_coladdr(), fid.get_minor(), configframes_autoincr.count(fid.get_value()) ? " AUTO_INCREMENT" : "");
|
||||
|
|
|
|||
Loading…
Reference in New Issue