Mantis 1999 Summary: There is a problem with supply net resolution that shows up when the sources and sinks are in separate modules Description: Jim provided a note that he would provide more information. However, the problem comes down to the following: Supply Ports have modes which imply that the supply flows in only one direction. The physics of electricity indicate that absence a gate-keeper (such as a diode), there is no restriction on the flow of the electrical power. Take a simple example. We have a TOP domain with supply net TOP_vdd connected to the supply port vdd_port on power domain BOTTOM and connected to the supply port/pad on TOP of offchip_vdd.. Furthermore, vdd_port is declared as IN mode and is connected to a supply net internal (internal_vdd) to BOTTOM. What happens if the testbench says that offchip_vdd is currently shutdown and also calls the supply_on function with the target supply net internal_vdd and voltage 0.5v? What is the supply net state for TOP_vdd, vdd_port, offchip_vdd and internal_vdd? Analysis The problem is clearly caused by the mode attached to a supply port in that the mode has no connection to reality. The supply network state and evaluation of its state must reflect electrical reality and not just be a convenience for simulation tools. But, we also want to avoid full switch/analog resolution of the supply network. That means, we need to keep a notion of directionality. A proposed resolution (discarded): 1. Need bi-dir supply ports and new resolution function: a. All on -> on b. All off -> off c. Any other combo -> partially on 2. For uni-directional ports, need to describe the error condition. Additional Analysis After reviewing the current Accellera 1.0 specification, I believe this issue can be resolved with minor changes. Specifically, the mode of supply ports can be eliminated and the supply net resolution function semantics reviewed to ensure they are defined in terms of resolving multiple originating supply state/voltage values from supply pads and not the states/voltages propagated (conducted) by supply ports. The fundamental concept is that there are supply ports that originate a supply and there are supply ports that connect supplies. With acknowledgement to the genius (at least foresight) of Arturo Salz, the Accellera UPF specification already makes this distinction in 5.1. Arturo did it by defining a “supply pad:” A supply pad is a supply port that originates a supply state and voltage value. Whereas, a supply port that is not a supply pad propagates a supply state from one supply net to another. A supply pad can be a supply port on a top-level design instance, an HDL out mode port that is connected to a supply net, or the out port of a switch. When doing resolution, this is the key distinction. All other supply ports exist only to facilitate the connection of a supply net at one level of the design hierarchy to a supply net in another level. They do not original supply states or voltage values. Given the distinction between a supply pad and a supply port, what value comes from assigning a mode to a supply port? None that I can determine. The proposed resolution: 1. In order to use terminology with familiar meanings, the paragraph referenced above (5.1) should be re-written as follows: A supply pad is a supply port that originates a supply state and voltage value. A supply pad originates a supply state and voltage level – that is, it creates a supply driver. Supply drivers are also created for the out supply port of a switch and for out mode HDL ports that are identified as a supply port. These are the only supply ports that define supply drivers. 2. Eliminate –direction parameter to the create_supply_port command. 3. Add –hdl_out_port parameter to the create_supply_port command. This parameter has the required argument of the port name which is relative to the current scope. (-hdl_out_port port_name) This is how an HDL output port is defined in the P1801 world as a supply port that creates a supply driver – a supply state/voltage value originator. We need to make this association so that the add_port_state command can be used with this supply driver. This new parameter is optional. 4. Note that in B.1 and B.2, the functions that control the pad’s state and voltage value use the “pad_name” terminology for the parameter name. This parameter name should be changed to “supply_driver”. 5. Make the following edits to section 5.1.5: Supply nets are often connected to the output of a single switch. However, certain applications, such as onchip voltage scaling, may require the outputs of multiple switches or other supply drivers to be connected to the same supply net (either directly or via supply port connections). In these cases, a resolution mechanism is needed to determine the state and voltage of the supply net from the state and voltage values supplied by each of the individual switches. The create_supply_net command (see 6.11) provides an option that specifies the type of resolution to be used by the supply net. The following resolution methods shall be provided: — unresolved The supply net may only be connected to a single supply driver (this is the default). — one_hot Multiple supply drivers may be connected to the supply net. At most, one of the supply drivers may be ON at any particular time. — parallel Multiple supply drivers may be connected to the supply net. Any number of the supply drivers may be ON at a particular time, but they shall all supply the same voltage value. A supply net that specifies an unresolved resolution cannot be connected to more than one supply driver; an attempt to connect the supply net to multiple supply drivers shall result in an error. An one_hot resolution provides the functionality of a voltage multiplexer. If more than one of the supply drivers driving the supply net is ON at the same time, the on/off state of the supply net shall be de-asserted (OFF) and implementations may issue a warning or an error. If all the supply drivers driving the supply net are OFF, the state of the supply net shall be de-asserted (OFF). If only one of the supply drivers driving the supply net is ON, the on/off state, full/partial state, and voltage value of the corresponding output is assigned to the supply net. The parallel resolution allows more than one conducting path to the same supply voltage, as if the switches had been connected in parallel. If more than one of the supply drivers driving the supply net is ON at the same time and the supply drivers are driving different voltages, the on/off state of the supply net shall be de-asserted (OFF), and implementations may issue a warning or an error. If all the supply drivers driving the supply net are OFF, the state of the supply net shall be de-asserted (OFF). If one or more supply drivers driving the supply net are ON and all ON outputs are driving the same voltage, the on/off state of the supply net is asserted (ON), the voltage value of the supply driver(s) is assigned to the supply net, and the full/partial state of the supply net shall be assigned the OR-reduction of all the ON supply drivers. Hence, if any of the supply drivers is partially on, the supply net shall also be partially on; only when all ON supply drivers are fully on, shall the supply net be fully on. NOTE: That is the original specification for parallel resolution with only the distinction of supply driver being made explicit. I’m not convinced we need both parallel as specified in 1.0 and a new almost-same-as-parallel resolution. The difference between the two is simply this: Any mixture of OFF and ON/PARTIAL_ON states resolves to PARTIAL_ON. It is unclear to me that the original parallel resolution allows a mixture of OFF with non-OFF states. The specification of an “OR-reduction” is non-intuitive to me but more importantly is defined only in terms of the full/partial (on) state. My recommendation is that we modify the parallel resolution to fit the desired resolution as follows: The parallel resolution allows more than one conducting path to the same supply voltage, as if the switches had been connected in parallel. If all of the supply net drivers are ON and are driving the same voltage value, then the supply net state is ON and the voltage value is the value of all drivers. If all of the supply drivers driving the supply net are ON at the same time and the supply drivers are driving different voltages, the on/off state of the supply net shall be de-asserted (OFF), and implementations may issue a warning or an error. If all the supply drivers driving the supply net are OFF, the state of the supply net shall be deasserted (OFF). If one or more supply drivers driving the supply net are ON and all ON outputs are driving the same voltage, the on/off state of the supply net is asserted (ON), the voltage value of the ON supply driver(s) is assigned to the supply net, and the full/partial state of the supply net shall be assigned the ORreduction of all the ON supply pads PARTIAL_ON as there are one or more supply drivers that are OFF or PARTIAL_ON. Hence, if any of the supply pads is partially on, the supply net shall also be partially on; only when all ON supply pads are fully on, shall the supply net be fully on.