diff options
author | David Shah <dave@ds0.me> | 2021-01-28 16:10:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-28 16:10:22 +0000 |
commit | 15b2852b916c1299dfc1d91a217de3060701bfbe (patch) | |
tree | 8e7ffbce4b7d253f05d0bb58ea6430aae8e1b065 /docs/coding.md | |
parent | 0d9790421699a22fc6a5962b41910c3b7d089353 (diff) | |
parent | 94e8847d674388c3c8ac663fa4912bb8029b2951 (diff) | |
download | nextpnr-15b2852b916c1299dfc1d91a217de3060701bfbe.tar.gz nextpnr-15b2852b916c1299dfc1d91a217de3060701bfbe.tar.bz2 nextpnr-15b2852b916c1299dfc1d91a217de3060701bfbe.zip |
Merge pull request #556 from YosysHQ/dave/cleanup
General opportunistic cleanup
Diffstat (limited to 'docs/coding.md')
-rw-r--r-- | docs/coding.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/coding.md b/docs/coding.md index e801f239..b8025f8b 100644 --- a/docs/coding.md +++ b/docs/coding.md @@ -32,7 +32,7 @@ Additionally to this; architectures provide functions for checking the availabil To avoid the high cost of using strings as identifiers directly; almost all "string" identifiers in nextpnr (such as cell names and types) use an indexed string pool type named `IdString`. Unlike Yosys, which has a global garbage collected pool, nextpnr has a per-Context pool without any garbage collection. -`IdString`s can be created in two ways. Architectures can add `IdString`s with constant indicies - allowing `IdString` constants to be provided too - using `initialize_add` at startup. See how `constids.inc` is used in iCE40 for an example of this. The main way to create `IdString`s, however, is at runtime using the `id` member function of `BaseCtx` given the string to create from (if an `IdString` of that string already exists, the existing `IdString` will be returned). +`IdString`s can be created in two ways. Architectures can add `IdString`s with constant indices - allowing `IdString` constants to be provided too - using `initialize_add` at startup. See how `constids.inc` is used in iCE40 for an example of this. The main way to create `IdString`s, however, is at runtime using the `id` member function of `BaseCtx` given the string to create from (if an `IdString` of that string already exists, the existing `IdString` will be returned). Note that `IdString`s need a `Context` (or `BaseCtx`) pointer to convert them back to regular strings, due to the pool being per-context as described above. |