diff options
| author | mergify[bot] | 2022-09-20 18:54:01 +0000 |
|---|---|---|
| committer | GitHub | 2022-09-20 18:54:01 +0000 |
| commit | fc3fedaa9c16d7861b452388a70ec2f6e2a3dc30 (patch) | |
| tree | 1db3ec6bee83229e28f78b33b1bd5ef4f88ea3a2 /docs/src/cookbooks/cookbook.md | |
| parent | 90e4ac38d49a9bae2bda1990c5de911c51c8c72a (diff) | |
Cleanup Cookbook and printing docs (#2727) (#2742)
* Cleanup Cookbook and printing docs
* Format specifiers are actually concise now
Co-authored-by: Megan Wachs <megan@sifive.com>
(cherry picked from commit df2a71833ffc8ee8a053a1e8ea41c482e46be132)
Co-authored-by: Aditya Naik <91489422+adkian-sifive@users.noreply.github.com>
Diffstat (limited to 'docs/src/cookbooks/cookbook.md')
| -rw-r--r-- | docs/src/cookbooks/cookbook.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/src/cookbooks/cookbook.md b/docs/src/cookbooks/cookbook.md index ab8e76d3..14bf9706 100644 --- a/docs/src/cookbooks/cookbook.md +++ b/docs/src/cookbooks/cookbook.md @@ -55,7 +55,7 @@ class Foo extends RawModule { bundle.foo := 0xc.U bundle.bar := 0x3.U val uint = bundle.asUInt - printf(p"$uint") // 195 + printf(cf"$uint") // 195 // Test assert(uint === 0xc3.U) @@ -78,7 +78,7 @@ class Foo extends RawModule { val uint = 0xb4.U val bundle = uint.asTypeOf(new MyBundle) - printf(p"$bundle") // Bundle(foo -> 11, bar -> 4) + printf(cf"$bundle") // Bundle(foo -> 11, bar -> 4) // Test assert(bundle.foo === 0xb.U) @@ -126,7 +126,7 @@ class Foo extends RawModule { val uint = 0xc.U val vec = VecInit(uint.asBools) - printf(p"$vec") // Vec(0, 0, 1, 1) + printf(cf"$vec") // Vec(0, 0, 1, 1) // Test assert(vec(0) === false.B) @@ -147,7 +147,7 @@ class Foo extends RawModule { val vec = VecInit(true.B, false.B, true.B, true.B) val uint = vec.asUInt - printf(p"$uint") // 13 + printf(cf"$uint") // 13 // Test // (remember leftmost Bool in Vec is low order bit) |
