From c79a043031b340bf5ff91624ebb8204e56208bfa Mon Sep 17 00:00:00 2001 From: Mattia Sinigaglia Date: Fri, 5 Nov 2021 10:45:11 +0100 Subject: [PATCH 1/5] add padfunctional module with PU/PD signal control --- src/deprecated/pad_functional.sv | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/deprecated/pad_functional.sv b/src/deprecated/pad_functional.sv index 720b332..5402869 100644 --- a/src/deprecated/pad_functional.sv +++ b/src/deprecated/pad_functional.sv @@ -79,4 +79,41 @@ module pad_functional_pu ( bufif0 (PAD_wi, 1'b1, PEN); rpmos (PAD, PAD_wi, 1'b0); +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 PEN | PAD O + | + 0 0 - 0/1 | 0 0 + 0 1 - 0/1 | 1 1 + 1 0/1 0 0/1 | - 0 + 1 0/1 1 0/1 | - 1 + 1 0/1 Z 0 | H H + 1 0/1 Z 1 | - X + +*/ + + wire PAD_wi; + + bufif0 (PAD, I, OEN); + buf (O, PAD); + bufif0 (PAD_wi, ~PUEN, PEN); + rpmos (PAD, PAD_wi, 1'b0); + endmodule \ No newline at end of file From d21dc2e967fa82b6d7eb103bd07d9cf1e4fad808 Mon Sep 17 00:00:00 2001 From: Luca Date: Tue, 9 Nov 2021 12:05:06 +0100 Subject: [PATCH 2/5] Map generic pad functional to IO buffer. --- src/fpga/pad_functional_xilinx.sv | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/fpga/pad_functional_xilinx.sv b/src/fpga/pad_functional_xilinx.sv index 665c113..e5b4a7d 100644 --- a/src/fpga/pad_functional_xilinx.sv +++ b/src/fpga/pad_functional_xilinx.sv @@ -20,7 +20,7 @@ module pad_functional_pd (* PULLDOWN = "YES" *) IOBUF iobuf_i ( - .T ( OEN ), + .T ( OEN ), .I ( I ), .O ( O ), .IO( PAD ) @@ -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_pd +( + 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 ) From 0002c7c958ff405ce5b0e28bdcdcb79c5bc386f7 Mon Sep 17 00:00:00 2001 From: mattsini1 Date: Wed, 24 Nov 2021 17:16:49 +0100 Subject: [PATCH 3/5] Update src/deprecated/pad_functional.sv Co-authored-by: Nils Wistoff --- src/deprecated/pad_functional.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/deprecated/pad_functional.sv b/src/deprecated/pad_functional.sv index 5402869..2c8b8ef 100644 --- a/src/deprecated/pad_functional.sv +++ b/src/deprecated/pad_functional.sv @@ -85,7 +85,7 @@ module pad_functional ( input logic OEN, input logic I, output logic O, - input logic PUEN, + input logic PUEN, input logic PEN, inout wire PAD ); From 411bd43eadc46ae97e45d890fc3f916771c5491a Mon Sep 17 00:00:00 2001 From: Mattia Sinigaglia Date: Wed, 24 Nov 2021 17:33:07 +0100 Subject: [PATCH 4/5] add truth table for pad_functional module with PUEN signal --- src/deprecated/pad_functional.sv | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/deprecated/pad_functional.sv b/src/deprecated/pad_functional.sv index 2c8b8ef..3765b87 100644 --- a/src/deprecated/pad_functional.sv +++ b/src/deprecated/pad_functional.sv @@ -98,14 +98,15 @@ module pad_functional ( */ /* - OEN I PAD PEN | PAD O - | - 0 0 - 0/1 | 0 0 - 0 1 - 0/1 | 1 1 - 1 0/1 0 0/1 | - 0 - 1 0/1 1 0/1 | - 1 - 1 0/1 Z 0 | H H - 1 0/1 Z 1 | - X + 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 */ @@ -116,4 +117,4 @@ module pad_functional ( bufif0 (PAD_wi, ~PUEN, PEN); rpmos (PAD, PAD_wi, 1'b0); -endmodule \ No newline at end of file +endmodule From 5912352c9a9461de64e93355436f8efe3b6bc310 Mon Sep 17 00:00:00 2001 From: Mattia Sinigaglia Date: Wed, 24 Nov 2021 17:33:57 +0100 Subject: [PATCH 5/5] minor fix on name for pad_functional module --- src/fpga/pad_functional_xilinx.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fpga/pad_functional_xilinx.sv b/src/fpga/pad_functional_xilinx.sv index e5b4a7d..59b7cd1 100644 --- a/src/fpga/pad_functional_xilinx.sv +++ b/src/fpga/pad_functional_xilinx.sv @@ -47,7 +47,7 @@ module pad_functional_pu endmodule -module pad_functional_pd +module pad_functional ( input logic OEN, input logic I,