Commit Graph

21 Commits

Author SHA1 Message Date
Sylvain Munaut 711e294bec scripts/liberty: Add option to output Makefile dependency list
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2022-01-05 23:33:52 +01:00
Sylvain Munaut 72d1fd69ce scripts/liberty: Add argument to get list of possible target liberty files
Instead of a "human" aimed list of available corners, this generates a
machine readable list of liberty files that can be generated for a
given library.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2022-01-05 23:33:52 +01:00
Sylvain Munaut 9a4821ec6c scripts/liberty: Accept target output file as argument
Instead of giving the library and corner to gnerate, you can provide
the target .lib file you want generated and this will pick the right
parameters to generate that file

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2022-01-05 23:33:52 +01:00
Sylvain Munaut ba5e4eb2d0 scripts/liberty: Send all 'messages' to stderr
Since this script will be used in Makefile to generate machine parseable
output, it's importatnt that all 'user' messages are sent to stderr to
be differentiated from the 'machine' output

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2022-01-05 23:33:52 +01:00
Rob Taylor 9d39c63f51 Add doctests for liberty_float edge case
Issue #280
2020-12-22 17:56:00 +00:00
Rob Taylor d99d853ef9 Faster version of liberty_float - gives a 25% to 50% speedup
This also fixes a bug in liberty_float for numbers with a magnitute
between 9 and 15.

Previously:
    >>> liberty_float(1e15)
    '1000000000000000'
    >>> liberty_float(1e10)
    '10000000000.'
    >>> liberty_float(1e9)
    '1000000000.0'
    >>> liberty_float(1e16)
    '1.000000e+16'

Now:
    >>> liberty_float(1e15)
    '1.000000e+15'
    >>> liberty_float(1e10)
    '1.000000e+10'
    >>> liberty_float(1e9)
    '1000000000.0'
    >>> liberty_float(1e16)
    '1.000000e+16'
2020-12-22 17:54:33 +00:00
Ethan Mahintorabi db23cfaa59 scripts/liberty: Adds output directory customization
Adds the output flags -o and --output_directory to control the output of the liberty files.
2020-10-14 10:58:49 -07:00
Tim 'mithro' Ansell d91e88682f scripts/liberty: Support fixed statetable output.
The statetable values where fixed in the `.lib.json` files.

Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
2020-07-20 16:42:34 -07:00
Tim 'mithro' Ansell d7a58ea703 scripts/liberty: Support new comma only syntax.
Syntax before;
```
comp_attribute blah,blah
```

Syntax after;
```
comp_attribute,blah,blah
```

Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
2020-07-20 16:42:34 -07:00
Tim 'mithro' Ansell e14136b064 scripts/liberty: Fail if doctests fail.
Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
2020-07-20 16:42:34 -07:00
Tim 'mithro' Ansell 3e9068dbf1 scripts/liberty: Small whitespace fix.
Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
2020-07-20 16:42:34 -07:00
Tim 'mithro' Ansell 296ef2066e scripts/liberty: Rework how attribute types are discovered.
* Add functions for producing different types of values into liberty
   output (plus doctests for them).
 * Respect the type given by a `define()` statement.

Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
2020-07-15 07:04:50 -07:00
Tim 'mithro' Ansell c9d0c8131f script/liberty: Slightly nicer debug output.
Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
2020-07-15 07:04:50 -07:00
Tim 'mithro' Ansell b70d1a51ad scripts/liberty: Make the `clk_width` attribute a string.
Fixes #69.

Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
2020-07-15 07:04:50 -07:00
Tim 'mithro' Ansell c9a704335e timing/liberty: Also check for ccsnoise on buses.
Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
2020-07-14 19:32:27 -07:00
Tim 'mithro' Ansell 463f2fd6aa scripts/liberty: Second attempt at filtering all ccsnoise data.
Fixes #77.

Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
2020-07-14 18:12:28 -07:00
Tim 'mithro' Ansell 15f6966a94 scripts/liberty: Adding a `--debug` option.
Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
2020-07-14 12:51:58 -07:00
Tim 'mithro' Ansell b626ca017d scripts/liberty: More aggressive ccsnoise filtering.
Fixes #77.

Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
2020-07-12 22:24:19 -07:00
Tim 'mithro' Ansell 73d129ef85 scripts/liberty: Fix indenting first value in list.
Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
2020-07-12 22:24:08 -07:00
Tim 'mithro' Ansell ee77597986 api: Change the way liberty attributes are sorted.
Fixes #37, #40.

The `LIBERTY_ATTRIBUTE_ORDER` template is used to control the ordering
of the liberty attribute output.

Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
2020-07-06 06:36:13 -07:00
Tim 'mithro' Ansell 74273c4f0b api: Adding liberty file generator.
Generates liberty timing files from the included json timing data.

Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
2020-07-06 06:36:13 -07:00