Skip to content

Commit 8a4c8d7

Browse files
authored
Merge pull request #1151 from Pinata-Consulting/mock-array-big-constraint-sdc-readme
mock-array-big: README.md on Element/constraint.sdc
2 parents 8cdd51f + ab4c1ea commit 8a4c8d7

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

flow/designs/asap7/mock-array-big/README.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,87 @@ Now build the design as usual:
3333
```
3434
make
3535
```
36+
37+
Element/constraint.sdc
38+
----------------------
39+
40+
A relatively simple constraint.sdc is adequate for the Element as
41+
timing is exported when the Element macro is made and checked at the
42+
mock-array-big level.
43+
44+
Note that a failure on timing at the Element level is
45+
not a problem, as long as timing is met at the mock-array-big level.
46+
47+
The purpose of the constraint.sdc file at the Element level is to
48+
be able to iterate on the Element during development and work on,
49+
for instance, maximum operating frequency changes in the Verilog,
50+
but also to give the tools some guidance on how to optimize the
51+
macro.
52+
53+
Optimizing Element/constraint.sdc
54+
---------------------------------
55+
56+
Before considering the various strategies to articulate an Element/constraint.sdc
57+
file below, note that no tests have been run to verify that these
58+
different constraint.sdc changes below have any effects on the quality
59+
of results at the mock-array-big level. If there are no substantial
60+
differences in quality of results and timing is met, then the differences
61+
between the strategies below are inconsequential.
62+
63+
A single macro is made for all the elements in the array, though strictly
64+
speaking each macro is unique in that the timing constraints of each element
65+
in the array is different.
66+
67+
To illustrate, consider the `assign io_lsbOuts_0 = io_lsbIns_1;` statement in Element.v.
68+
Here a signal is routed from left to right, through the Element without the signal
69+
being registered.
70+
71+
Clearly, the maximum input delay for `io_lsbIns_1` is
72+
smaller for the leftmost than for the rightmost Element.
73+
74+
Taking a step back, it is also worth considering what level of detail is
75+
appropriate for the Element's constraint.sdc file.
76+
77+
In the beginning of a project, during exploration, the .sdc file does not
78+
need to be particularly detailed. In fact, details can be counterproductive,
79+
as they tend to be inaccurate and cause the tools to spend time solving potential non-issues.
80+
81+
Consider minimum input delay, which relates to hold times. If the main concern
82+
of architectural exploration is to ensure that the design can operate on a
83+
sufficiently high frequency, then specifying minimum input delays during
84+
exploration is premature. Minimum input delay is a constraint that belongs at
85+
the end the development cycle when the design is well established and won't change
86+
and the concern is to lock down the macro for its specific operating frequency.
87+
88+
Choosing a strategy for Element/constraint.sdc combinational paths
89+
------------------------------------------------------------------
90+
91+
It isn't possible to articulate a single .sdc file that exactly captures the
92+
constraints of an Element as each element is used in unique circumstances.
93+
Instead, a choice has to made and each choice has its pros and cons.
94+
95+
It is relatively easy to set up a maximum input/output delay for paths
96+
that start or end in a register, so this case is not discussed here.
97+
98+
It is the combinational(unregistered) in -> out
99+
paths that are tricky to create constraints for.
100+
101+
- Strategy used as of writing: mark non-registered/combinational paths through
102+
the Element as false paths. This will not steer the tools to optimize the
103+
through element path, such as discussed above and there's no timing information
104+
available at the Element level for these combinational paths.
105+
However, at the `MockArray` level when the Elements are used, timing will
106+
be checked, because the .lib file generated for the Element contains timing
107+
information, even for false paths.
108+
- Use `set_max_delay` for combinational paths. This will make the tool try
109+
to optimize the combinational path and there will be timing information available.
110+
However, path segmentation could occur with OpenSTA. Refer [here](https://docs.xilinx.com/r/2020.2-English/ug906-vivado-design-analysis/TIMING-13-Timing-Paths-Ignored-Due-to-Path-Segmentation).
111+
- Overconstrain: set up a maximum input/output path for the element and ignore
112+
timing violations at the Element level for combinational paths.
113+
The timing violations for the combinational paths are not real violations,
114+
because the maximum input and output paths can not occur at the same time
115+
in the array. The leftmost Element has the shortest maximum input path and
116+
and the rightmost the longest maximum input path for
117+
`assign io_lsbOuts_0 = io_lsbIns_1;`. The OpenROAD tool could put too much
118+
emphasis on optimising the combinational path in this case, which could
119+
lead to less than optimal results and/or inflated run times.

0 commit comments

Comments
 (0)