mirror of https://github.com/openXC7/prjxray.git
Merge branch 'master' into minitest_muxf8
This commit is contained in:
commit
21ba9cf34e
|
|
@ -7,6 +7,12 @@ bit-stream format of Xilinx 7-series FPGAs.
|
|||
|
||||
# Quickstart Guide
|
||||
|
||||
Install Vivado 2017.2 (2017.3 has a known compatibility issue, see
|
||||
https://github.com/SymbiFlow/prjxray/issues/14). Then source the settings
|
||||
script, ie
|
||||
|
||||
source /opt/Xilinx/Vivado/2017.2/settings64.sh
|
||||
|
||||
Pull submodules:
|
||||
|
||||
git submodule update --init --recursive
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
if [ $(vivado -h |grep Vivado |cut -d\ -f 2) != "v2017.2" ] ; then echo "FIXME: requires Vivado 2017.2. See https://github.com/SymbiFlow/prjxray/issues/14"; exit 1; fi
|
||||
|
||||
source ${XRAY_GENHEADER}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
if [ $(vivado -h |grep Vivado |cut -d\ -f 2) != "v2017.2" ] ; then echo "FIXME: requires Vivado 2017.2. See https://github.com/SymbiFlow/prjxray/issues/14"; exit 1; fi
|
||||
|
||||
source ${XRAY_GENHEADER}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
if [ $(vivado -h |grep Vivado |cut -d\ -f 2) != "v2017.2" ] ; then echo "FIXME: requires Vivado 2017.2. See https://github.com/SymbiFlow/prjxray/issues/14"; exit 1; fi
|
||||
|
||||
source ${XRAY_GENHEADER}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,173 +29,6 @@ module top(input clk, stb, di, output do);
|
|||
endmodule
|
||||
|
||||
module roi(input clk, input [255:0] din, output [255:0] dout);
|
||||
my_mux8 # (.LOC("SLICE_X22Y100"), .N(0))
|
||||
c0 (.clk(clk), .din(din[ 0 +: 8]), .dout(dout[0 +: 8]));
|
||||
endmodule
|
||||
|
||||
module my_mux8 (input clk, input [7:0] din, output [7:0] dout);
|
||||
parameter LOC="SLICE_X22Y100";
|
||||
parameter N=-1;
|
||||
parameter DEF_A=1;
|
||||
wire lutdo, lutco, lutbo, lutao;
|
||||
wire lut7bo, lut7ao;
|
||||
wire lut8o;
|
||||
|
||||
assign dout[0] = lut8o;
|
||||
|
||||
reg [3:0] ffds;
|
||||
wire lutdo5, lutco5, lutbo5, lutao5;
|
||||
//wire lutno5 [3:0] = {lutao5, lutbo5, lutco5, lutdo5};
|
||||
wire lutno5 [3:0] = {lutdo5, lutco5, lutbo5, lutao5};
|
||||
always @(*) begin
|
||||
/*
|
||||
ffds[3] = lutdo5;
|
||||
ffds[2] = lutco5;
|
||||
ffds[1] = lutbo5;
|
||||
ffds[0] = lutao5;
|
||||
*/
|
||||
/*
|
||||
ffds[3] = din[6];
|
||||
ffds[2] = din[6];
|
||||
ffds[1] = din[6];
|
||||
ffds[0] = din[6];
|
||||
*/
|
||||
|
||||
if (DEF_A) begin
|
||||
//Default poliarty A
|
||||
ffds[3] = lutdo5;
|
||||
ffds[2] = lutco5;
|
||||
ffds[1] = lutbo5;
|
||||
ffds[0] = lutao5;
|
||||
ffds[N] = din[6];
|
||||
end else begin
|
||||
//Default polarity B
|
||||
ffds[3] = din[6];
|
||||
ffds[2] = din[6];
|
||||
ffds[1] = din[6];
|
||||
ffds[0] = din[6];
|
||||
ffds[N] = lutno5[N];
|
||||
end
|
||||
end
|
||||
|
||||
(* LOC=LOC, BEL="F8MUX", KEEP, DONT_TOUCH *)
|
||||
MUXF8 mux8 (.O(my_mux8), .I0(lut7bo), .I1(lut7ao), .S(din[6]));
|
||||
(* LOC=LOC, BEL="F7BMUX", KEEP, DONT_TOUCH *)
|
||||
MUXF7 mux7b (.O(lut7bo), .I0(lutdo), .I1(lutco), .S(din[6]));
|
||||
(* LOC=LOC, BEL="F7AMUX", KEEP, DONT_TOUCH *)
|
||||
MUXF7 mux7a (.O(lut7ao), .I0(lutbo), .I1(lutao), .S(din[6]));
|
||||
|
||||
(* LOC=LOC, BEL="D6LUT", KEEP, DONT_TOUCH *)
|
||||
LUT6_2 #(
|
||||
.INIT(64'h8000_DEAD_0000_0001)
|
||||
) lutd (
|
||||
.I0(din[0]),
|
||||
.I1(din[1]),
|
||||
.I2(din[2]),
|
||||
.I3(din[3]),
|
||||
.I4(din[4]),
|
||||
.I5(din[5]),
|
||||
.O5(lutdo5),
|
||||
.O6(lutdo));
|
||||
(* LOC=LOC, BEL="D5FF" *)
|
||||
FDPE ffd (
|
||||
.C(clk),
|
||||
.Q(dout[1]),
|
||||
.CE(din[0]),
|
||||
.PRE(din[1]),
|
||||
.D(ffds[3]));
|
||||
|
||||
(* LOC=LOC, BEL="C6LUT", KEEP, DONT_TOUCH *)
|
||||
LUT6_2 #(
|
||||
.INIT(64'h8000_BEEF_0000_0001)
|
||||
) lutc (
|
||||
.I0(din[0]),
|
||||
.I1(din[1]),
|
||||
.I2(din[2]),
|
||||
.I3(din[3]),
|
||||
.I4(din[4]),
|
||||
.I5(din[5]),
|
||||
.O5(lutco5),
|
||||
.O6(lutco));
|
||||
(* LOC=LOC, BEL="C5FF" *)
|
||||
FDPE ffc (
|
||||
.C(clk),
|
||||
.Q(dout[2]),
|
||||
.CE(din[0]),
|
||||
.PRE(din[1]),
|
||||
.D(ffds[2]));
|
||||
|
||||
(* LOC=LOC, BEL="B6LUT", KEEP, DONT_TOUCH *)
|
||||
LUT6_2 #(
|
||||
.INIT(64'h8000_CAFE_0000_0001)
|
||||
) lutb (
|
||||
.I0(din[0]),
|
||||
.I1(din[1]),
|
||||
.I2(din[2]),
|
||||
.I3(din[3]),
|
||||
.I4(din[4]),
|
||||
.I5(din[5]),
|
||||
.O5(lutbo5),
|
||||
.O6(lutbo));
|
||||
(* LOC=LOC, BEL="B5FF" *)
|
||||
FDPE ffb (
|
||||
.C(clk),
|
||||
.Q(dout[3]),
|
||||
.CE(din[0]),
|
||||
.PRE(din[1]),
|
||||
.D(ffds[1]));
|
||||
|
||||
(* LOC=LOC, BEL="A6LUT", KEEP, DONT_TOUCH *)
|
||||
LUT6_2 #(
|
||||
.INIT(64'h8000_1CE0_0000_0001)
|
||||
) luta (
|
||||
.I0(din[0]),
|
||||
.I1(din[1]),
|
||||
.I2(din[2]),
|
||||
.I3(din[3]),
|
||||
.I4(din[4]),
|
||||
.I5(din[5]),
|
||||
.O5(lutao5),
|
||||
.O6(lutao));
|
||||
(* LOC=LOC, BEL="A5FF" *)
|
||||
FDPE ffa (
|
||||
.C(clk),
|
||||
.Q(dout[4]),
|
||||
.CE(din[0]),
|
||||
.PRE(din[1]),
|
||||
//D can only come from O5 or AX
|
||||
//AX is used by MUXF7:S
|
||||
.D(ffds[0]));
|
||||
endmodule
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
module roi_ld(input clk, input [255:0] din, output [255:0] dout);
|
||||
clb_N5FFMUX # (.LOC("SLICE_X22Y100"), .N(0))
|
||||
clb_N5FFMUX_0 (.clk(clk), .din(din[ 0 +: 8]), .dout(dout[0 +: 8]));
|
||||
clb_N5FFMUX # (.LOC("SLICE_X22Y101"), .N(1))
|
||||
|
|
|
|||
Loading…
Reference in New Issue