Bresticker, Shalom wrote: > OK. > [...] > So can we say that coercion may only occur if both sides of the port are > nets? Yes. > > The examples I wrote were > > module top ; > wire in1, out1 ; > m m(in1, out1); > assign out1 = 1'b1; > endmodule > > module m (in1, out1) ; > input in1 ; > output out1; // out1 is driven outside the module and thus used > as an input > assign in1 = 1'b0 ; // in1 is driven within the module and thus used as > an output > endmodule > > We can use these as examples (merely examples) of an input net port used > as an output or vice-versa. Beyond that, we won't define what is meant > by "used as an output(input)". But I think we can say it another way, > that the port sink is assigned or written from an additional source, > other than through the port connection. > > I understand that port coercion will always occur if the port is > collapsed. If the port is not collapsed, port coercion may or may not > occur. Can we say that? Port coercion is not applicable when net collapsing occurs since the directions aren't "coerced" -- they become immaterial. My understanding is that the port coercion description exists in the LRM as a concession to implementations which may choose to not collapse nets. The port coercion gives a mechanism to approximate the effect of collapsing. Because of that, trying to describe things precisely is very difficult since there are two fundamentally different approaches at work. Realistically we probably don't need to worry too much since customers are quite effective at making sure that the *reality* of a port-coercing approach is pretty close to that of collapsing. Back to you specific question -- I am just a bit uncomfortable with your wording since someone might read that as meaning that port directions are *respected* with collapsing. That really isn't true, but neither is the "coercing" model. The reality is that when ports are collapsed they collapse to a single "wire" and directions become irrelevant. So I'd probably be a bit more comfortable in saying that if collapsing occurs, port coercion becomes irrelevant as port directions are ignored throughout the collapsed net. BTW, while I do know of implementations that do port coercion and others that do collapsing, I don't know of any that don't do either. There are good reasons for that -- the real behavior becomes pretty strange and not acceptable to customers. So I wouldn't belabor the "if neither occurs" case since I really don't think you could ever get a useful implementation if you didn't do either. Gord -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Dec 13 06:40:06 2007
This archive was generated by hypermail 2.1.8 : Thu Dec 13 2007 - 06:41:05 PST