Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion src/deprecated/pad_functional.sv
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,42 @@ module pad_functional_pu (
bufif0 (PAD_wi, 1'b1, PEN);
rpmos (PAD, PAD_wi, 1'b0);

endmodule
endmodule

module pad_functional (
input logic OEN,
input logic I,
output logic O,
input logic PUEN,
input logic PEN,
inout wire PAD
);

/*
X Unknown
Z Hi-Z
H Pull High
L Pull Low
*/

/*
OEN I PAD PUEN PEN | PAD O
|
0 0 - 0/1 0/1 | 0 0
0 1 - 0/1 0/1 | 1 1
1 0/1 0 0/1 0/1 | - 0
1 0/1 1 0/1 0/1 | - 1
1 0/1 Z 0 0 | H H
1 0/1 Z 1 0 | L L
1 0/1 Z 0/1 1 | - X

*/

wire PAD_wi;

bufif0 (PAD, I, OEN);
buf (O, PAD);
bufif0 (PAD_wi, ~PUEN, PEN);
rpmos (PAD, PAD_wi, 1'b0);

endmodule
22 changes: 20 additions & 2 deletions src/fpga/pad_functional_xilinx.sv
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module pad_functional_pd

(* PULLDOWN = "YES" *)
IOBUF iobuf_i (
.T ( OEN ),
.T ( OEN ),
.I ( I ),
.O ( O ),
.IO( PAD )
Expand All @@ -39,7 +39,25 @@ module pad_functional_pu

(* PULLUP = "YES" *)
IOBUF iobuf_i (
.T ( OEN ),
.T ( OEN ),
.I ( I ),
.O ( O ),
.IO( PAD )
);

endmodule

module pad_functional
(
input logic OEN,
input logic I,
output logic O,
input logic PEN,
inout logic PAD
);

IOBUF iobuf_i (
.T ( OEN ),
.I ( I ),
.O ( O ),
.IO( PAD )
Expand Down