Fix iobuf and iobufif handling.

This commit is contained in:
steve 1999-11-02 01:43:55 +00:00
parent 89881adece
commit 7195d4e8f1
2 changed files with 33 additions and 12 deletions

18
xnf.txt
View File

@ -48,11 +48,22 @@ device. Also:
bufif1 bt (bar, value, en);
connects to pad bar so will automaticall be converted into an OBUFT
connects to pad bar so will automatically be converted into an OBUFT
device. Icarus Verilog understands OBUF, IBUF and OBUFT (with optionally
inverted enable) devices and will convert Verilog devices from the
source, or generate missing devices.
In addition, the Verilog programmer may explicitly declare a device as
an I/OBUF by attaching an attribute to the device, like so:
buf b1 (sig, foo);
$attribute(b1, "XNF-LCA", "OBUF:O,I");
This latter feature is not entirely recomended as it expects that the
programmer really knows how the pins of the XNF device are to be
connected. It also bypasses the efforts of the compiler, so is not
checked for correctness.
XNF SPECIAL DEVICES
There are certain special devices in XNF that Verilog does not
@ -73,7 +84,7 @@ buffer:
The above statements cause the buffer BUFG to be emitted in the XNF
output as a BUFG device with the first signal called "O" and the
second called "O". The rest of this example connects the input of the
second called "I". The rest of this example connects the input of the
BUFG to a signal from the input pin #1 and connects the output to the
internal wire "clk". Incidentally, this example will cause an IBUF to
be generated to connect the iclk signal to input pin #1.
@ -151,6 +162,9 @@ IBUF, NOT gates cannot be absorbed as in the OPAD case.
$Log: xnf.txt,v $
Revision 1.6 1999/11/02 01:43:55 steve
Fix iobuf and iobufif handling.
Revision 1.5 1999/10/09 17:52:27 steve
support XNF OBUFT devices.

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: xnfio.cc,v 1.3 1999/10/09 17:52:27 steve Exp $"
#ident "$Id: xnfio.cc,v 1.4 1999/11/02 01:43:55 steve Exp $"
#endif
# include "functor.h"
@ -68,9 +68,10 @@ static void make_obuf(Design*des, NetNet*net)
// Try to use an existing BUF as an OBUF. This moves the
// BUF into the IOB.
if ((tmp->type() == NetLogic::BUF) &&
(count_inputs(tmp->pin(0)) == 0) &&
(count_outputs(tmp->pin(0)) == 1)) {
if ((tmp->type() == NetLogic::BUF)
&& (count_inputs(tmp->pin(0)) == 0)
&& (count_outputs(tmp->pin(0)) == 1)
&& (idx->get_pin() == 0) ) {
tmp->attribute("XNF-LCA", "OBUF:O,I");
return;
}
@ -80,9 +81,10 @@ static void make_obuf(Design*des, NetNet*net)
// which looks just like an inverter. This uses the
// available resources of an IOB to optimize away an
// otherwise expensive inverter.
if ((tmp->type() == NetLogic::NOT) &&
(count_inputs(tmp->pin(0)) == 0) &&
(count_outputs(tmp->pin(0)) == 1)) {
if ((tmp->type() == NetLogic::NOT)
&& (count_inputs(tmp->pin(0)) == 0)
&& (count_outputs(tmp->pin(0)) == 1)
&& (idx->get_pin() == 0) ) {
tmp->attribute("XNF-LCA", "OBUF:O,~I");
return;
}
@ -93,14 +95,16 @@ static void make_obuf(Design*des, NetNet*net)
// way, but the T input is inverted.
if ((tmp->type() == NetLogic::BUFIF1)
&& (count_inputs(tmp->pin(0)) == 0)
&& (count_outputs(tmp->pin(0)) == 1)) {
&& (count_outputs(tmp->pin(0)) == 1)
&& (idx->get_pin() == 0) ) {
tmp->attribute("XNF-LCA", "OBUFT:O,I,T");
return;
}
if ((tmp->type() == NetLogic::BUFIF1)
if ((tmp->type() == NetLogic::BUFIF0)
&& (count_inputs(tmp->pin(0)) == 0)
&& (count_outputs(tmp->pin(0)) == 1)) {
&& (count_outputs(tmp->pin(0)) == 1)
&& (idx->get_pin() == 0) ) {
tmp->attribute("XNF-LCA", "OBUFT:O,I,~T");
return;
}
@ -213,6 +217,9 @@ void xnfio(Design*des)
/*
* $Log: xnfio.cc,v $
* Revision 1.4 1999/11/02 01:43:55 steve
* Fix iobuf and iobufif handling.
*
* Revision 1.3 1999/10/09 17:52:27 steve
* support XNF OBUFT devices.
*