Commit 2b2a4d9
MoritzScherer
[Moore] Add support for $random system task (llvm#8982)
This PR adds support for `$random` system calls and maps them to a new
Moore builtin-op `RandomBIOp`.
Implementation is very much along the lines of [the $urandom
implementation](llvm#8968). I chose to
not map $random and $urandom to the same builtin as they are
semantically different, $urandom being pseudo-random, $random being
true-random.1 parent 2296be7 commit 2b2a4d9
File tree
3 files changed
+40
-7
lines changed- include/circt/Dialect/Moore
- lib/Conversion/ImportVerilog
- test/Conversion/ImportVerilog
3 files changed
+40
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1763 | 1763 | | |
1764 | 1764 | | |
1765 | 1765 | | |
1766 | | - | |
| 1766 | + | |
1767 | 1767 | | |
1768 | 1768 | | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
1769 | 1788 | | |
1770 | 1789 | | |
1771 | 1790 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1594 | 1594 | | |
1595 | 1595 | | |
1596 | 1596 | | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
1597 | 1601 | | |
1598 | 1602 | | |
1599 | 1603 | | |
| |||
1700 | 1704 | | |
1701 | 1705 | | |
1702 | 1706 | | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
1703 | 1711 | | |
1704 | 1712 | | |
1705 | 1713 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
276 | 282 | | |
277 | 283 | | |
278 | 284 | | |
| |||
0 commit comments