2018-10-31 09:28:57 -05:00
|
|
|
module SLE (
|
|
|
|
output Q,
|
|
|
|
input ADn,
|
|
|
|
input ALn,
|
|
|
|
input CLK,
|
|
|
|
input D,
|
|
|
|
input LAT,
|
|
|
|
input SD,
|
|
|
|
input EN,
|
|
|
|
input SLn
|
|
|
|
);
|
|
|
|
reg q_latch, q_ff;
|
|
|
|
|
|
|
|
always @(posedge CLK, negedge ALn) begin
|
|
|
|
if (!ALn) begin
|
|
|
|
q_ff <= !ADn;
|
|
|
|
end else if (EN) begin
|
|
|
|
if (!SLn)
|
|
|
|
q_ff <= SD;
|
|
|
|
else
|
|
|
|
q_ff <= D;
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
always @* begin
|
|
|
|
if (!ALn) begin
|
|
|
|
q_latch <= !ADn;
|
|
|
|
end else if (CLK && EN) begin
|
|
|
|
if (!SLn)
|
|
|
|
q_ff <= SD;
|
|
|
|
else
|
|
|
|
q_ff <= D;
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
assign Q = LAT ? q_latch : q_ff;
|
|
|
|
endmodule
|
|
|
|
|
|
|
|
module CFG1 (
|
2018-10-31 09:36:53 -05:00
|
|
|
output Y,
|
2018-10-31 09:28:57 -05:00
|
|
|
input A
|
|
|
|
);
|
|
|
|
parameter [1:0] INIT = 2'h0;
|
2018-10-31 09:36:53 -05:00
|
|
|
assign Y = INIT >> A;
|
2018-10-31 09:28:57 -05:00
|
|
|
endmodule
|
|
|
|
|
|
|
|
module CFG2 (
|
2018-10-31 09:36:53 -05:00
|
|
|
output Y,
|
2018-10-31 09:28:57 -05:00
|
|
|
input A,
|
|
|
|
input B
|
|
|
|
);
|
|
|
|
parameter [3:0] INIT = 4'h0;
|
2018-10-31 09:36:53 -05:00
|
|
|
assign Y = INIT >> {B, A};
|
2018-10-31 09:28:57 -05:00
|
|
|
endmodule
|
|
|
|
|
|
|
|
module CFG3 (
|
2018-10-31 09:36:53 -05:00
|
|
|
output Y,
|
2018-10-31 09:28:57 -05:00
|
|
|
input A,
|
|
|
|
input B,
|
|
|
|
input C
|
|
|
|
);
|
|
|
|
parameter [7:0] INIT = 8'h0;
|
2018-10-31 09:36:53 -05:00
|
|
|
assign Y = INIT >> {C, B, A};
|
2018-10-31 09:28:57 -05:00
|
|
|
endmodule
|
|
|
|
|
|
|
|
module CFG4 (
|
2018-10-31 09:36:53 -05:00
|
|
|
output Y,
|
2018-10-31 09:28:57 -05:00
|
|
|
input A,
|
|
|
|
input B,
|
|
|
|
input C,
|
|
|
|
input D
|
|
|
|
);
|
|
|
|
parameter [15:0] INIT = 16'h0;
|
2018-10-31 09:36:53 -05:00
|
|
|
assign Y = INIT >> {D, C, B, A};
|
2018-10-31 09:28:57 -05:00
|
|
|
endmodule
|
2019-01-17 07:38:37 -06:00
|
|
|
|
|
|
|
module CLKBUF (
|
|
|
|
input PAD,
|
|
|
|
output Y
|
|
|
|
);
|
|
|
|
assign Y = PAD;
|
|
|
|
endmodule
|
|
|
|
|
|
|
|
module INBUF (
|
|
|
|
input PAD,
|
|
|
|
output Y
|
|
|
|
);
|
|
|
|
assign Y = PAD;
|
|
|
|
endmodule
|
|
|
|
|
|
|
|
module OUTBUF (
|
|
|
|
input D,
|
|
|
|
output PAD
|
|
|
|
);
|
|
|
|
assign PAD = D;
|
|
|
|
endmodule
|