From b3e82269317da9fe8c2c9f547e3d074ee7cdfddf Mon Sep 17 00:00:00 2001 From: Dusty DeWeese Date: Thu, 12 Sep 2019 20:03:13 -0700 Subject: [PATCH] WIP techmap IBUF/OBUF primitives Commented portions don't work yet: Error 1: Type: Packing File: /build/source/vpr/src/pack/cluster.cpp Line: 2058 Message: Can not find any logic block that can implement molecule. Atom inbuf (INBUF_VPR) --- common/wire.eblif | 5 ++++ xc7/primitives/ilogice3/ilogice3.pb_type.xml | 9 +----- xc7/primitives/iob33m/iob33m.model.xml | 10 ++++--- xc7/primitives/iob33m/iob33m.pb_type.xml | 24 +++++++++------- xc7/primitives/ologice3/ologice3.pb_type.xml | 9 +----- xc7/techmap/cells_map.v | 30 ++++++++++++++++++++ xc7/techmap/cells_sim.v | 16 +++++++++++ xc7/tests/buttons/buttons_basys3.v | 10 ++++++- 8 files changed, 81 insertions(+), 32 deletions(-) diff --git a/common/wire.eblif b/common/wire.eblif index 996f1f9b5a..75ddef9a8c 100644 --- a/common/wire.eblif +++ b/common/wire.eblif @@ -1,6 +1,11 @@ .model top .inputs di .outputs do +# .subckt INBUF_VPR OUT=di_buf PAD=di INTERMDISABLE=$true IBUFDISABLE=$true DIFFI_IN=$true +# .cname inbuf +# .subckt OUTBUF_VPR IN=do_buf OUT=do TRI=$true +# .cname outbuf +# .names di_buf do_buf .names di do 1 1 .end diff --git a/xc7/primitives/ilogice3/ilogice3.pb_type.xml b/xc7/primitives/ilogice3/ilogice3.pb_type.xml index eec3188b86..0ac73f5dcf 100644 --- a/xc7/primitives/ilogice3/ilogice3.pb_type.xml +++ b/xc7/primitives/ilogice3/ilogice3.pb_type.xml @@ -30,15 +30,8 @@ - - - - bel - input - - - + diff --git a/xc7/primitives/iob33m/iob33m.model.xml b/xc7/primitives/iob33m/iob33m.model.xml index e80644571e..c62fb7b75c 100644 --- a/xc7/primitives/iob33m/iob33m.model.xml +++ b/xc7/primitives/iob33m/iob33m.model.xml @@ -1,22 +1,24 @@ - + diff --git a/xc7/primitives/iob33m/iob33m.pb_type.xml b/xc7/primitives/iob33m/iob33m.pb_type.xml index 5456b2ec98..5afdfa42e5 100644 --- a/xc7/primitives/iob33m/iob33m.pb_type.xml +++ b/xc7/primitives/iob33m/iob33m.pb_type.xml @@ -13,19 +13,22 @@ - + @@ -40,17 +43,16 @@ output - --> - + diff --git a/xc7/primitives/ologice3/ologice3.pb_type.xml b/xc7/primitives/ologice3/ologice3.pb_type.xml index 10fa285dfc..60c1d5e51e 100644 --- a/xc7/primitives/ologice3/ologice3.pb_type.xml +++ b/xc7/primitives/ologice3/ologice3.pb_type.xml @@ -32,15 +32,8 @@ - - - - bel - output - - - + diff --git a/xc7/techmap/cells_map.v b/xc7/techmap/cells_map.v index 4801218f52..ebb9706d12 100644 --- a/xc7/techmap/cells_map.v +++ b/xc7/techmap/cells_map.v @@ -1841,3 +1841,33 @@ module SRL16E ( endmodule +// ============================================================================ +// IO + +module IBUF ( + input I, + output O +); + + INBUF_VPR _TECHMAP_REPLACE_ ( + .PAD(I), + .INTERMDISABLE(1), + .IBUFDISABLE(1), + .DIFFI_IN(1), + .OUT(O) + ); + +endmodule + +module OBUF ( + input I, + output O +); + + OUTBUF_VPR _TECHMAP_REPLACE_ ( + .TRI(1), + .IN(I), + .OUT(O) + ); + +endmodule diff --git a/xc7/techmap/cells_sim.v b/xc7/techmap/cells_sim.v index 11308431f9..2087a68000 100644 --- a/xc7/techmap/cells_sim.v +++ b/xc7/techmap/cells_sim.v @@ -625,3 +625,19 @@ module SRLC16E ( endgenerate endmodule +// ============================================================================ +// IO + +module INBUF_VPR ( + input PAD, + output OUT +); + assign OUT = PAD; +endmodule + +module OUTBUF_VPR ( + input IN, + output OUT +); + assign OUT = IN; +endmodule diff --git a/xc7/tests/buttons/buttons_basys3.v b/xc7/tests/buttons/buttons_basys3.v index 34a06921d1..df09599fbc 100644 --- a/xc7/tests/buttons/buttons_basys3.v +++ b/xc7/tests/buttons/buttons_basys3.v @@ -2,5 +2,13 @@ module top( input in, output out ); - assign out = in; + + assign out = in; + /* + wire in_buf; + wire out_buf; + IBUF inbuf(.I(in), .O(in_buf)); + OBUF outbuf(.I(out_buf), .O(out)); + assign out_buf = in_buf; + */ endmodule