Missing default value for unused bits
When calling Verilog Generator out of HW Design using attached database, you can see that unconnected ports are assigned with the specified default value.
But there is no assignment for unused input bits if not all bits of a vector are connected within the design.
In the example, the bits of DIN_0[7:4] are still open.
[CORRECTIVE] Revised the rules when to use abstraction definition default instead of port default. (refs #342)
#1 Updated by Janne Virtanen over 1 year ago
- Status changed from New to In Progress
- Assignee set to Janne Virtanen
- Estimated time set to 30.00 h
This should be fixable, although it will take some time and testing. Essentially this requires parsing which bits will be left unconnected and then assign them with either default value if it exists, or z if it does not.
Current work around could be using tieoffs, but apparently tieoff editor does not support part selection.
#3 Updated by Richard Schindler over 1 year ago
- File DefaultValue_342_2.zip added
I think there is a general problem with default value assignment, not even when using part select operator.
When a port is mapped to a bus interface this issue is also visible.
In the attached example clk_en port of Sink module is not assigned to default value.
#4 Updated by Janne Virtanen over 1 year ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
Some bugs were found in closer inspection, but according to the standard, the default value for a port is used only if it is unconnected. This means that no bits from any default value is used if any bits of the port is connected.
Moreover, if an unconnected port in mapped in a bus interface have a default value defined in abstraction definition, it shall be used for the port.
As stated earlier, an obvious workaround could be a tie-off with part select, but I do not know if and how we will proceed with that. This seemed to work by injecting part selection to the XML file of a design, but the editor does not currently allow it.
#5 Updated by Richard Schindler over 1 year ago
I think the current implementation of unconnected ports is not correct.
The standard says: “The value shall be applied to this port when it is left unconnected, independent of being part of a busInterface. This value shall be over-ridden by the default value from the abstraction definition if the interface is connected”
Can you please keep this issue in mind and fix it on a longterm basis?
#7 Updated by Richard Schindler over 1 year ago
- File DefaultValue_342_3.zip added
Sorry for the inconvenience but I tried with K2 version 3.4.0 and I think, the implementation is not like described in the standard.
Please see the example in the attachment.
Maybe I'm wrong but my understanding is, that for the unconnected interface the default values of the port definition should be assigned.
#8 Updated by Esko Pekkarinen over 1 year ago
- Status changed from Closed to In Progress
DefaultValue_432_3: I agree the default values for data1 and en1 should come from the port definition and not from the abstraction definition, since interface DATA_1 is not connected in the design. We'll look to fix this soon.