mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8df584ca1d | ||
|
|
13327fa9c0 | ||
|
|
4080284e53 | ||
|
|
e6114b6bbb | ||
|
|
c76c31ae6c | ||
|
|
2025b81614 | ||
|
|
aa94219531 | ||
|
|
2e394c3c04 | ||
|
|
4775399716 | ||
|
|
a0798eb838 | ||
|
|
c35dde7c9c | ||
|
|
2318adabd3 | ||
|
|
7a2b20cff3 | ||
|
|
b50e8bb9c1 | ||
|
|
6a07595a44 | ||
|
|
397e64903c | ||
|
|
a0f0edd594 | ||
|
|
9eba7bcd91 | ||
|
|
1b93033690 | ||
|
|
921ad64d22 | ||
|
|
3f4fe73191 | ||
|
|
5dc05e1fa8 | ||
|
|
a2fcd37c08 | ||
|
|
742c0b134c | ||
|
|
f6b966ed16 | ||
|
|
1d7f5ed33e | ||
|
|
4201450a8a | ||
|
|
ef5ca74e94 | ||
|
|
a6f608c616 | ||
|
|
c0a0f0dab9 | ||
|
|
e6877e83fd | ||
|
|
361ab194ff | ||
|
|
32dafdcc61 | ||
|
|
fa99e7b697 | ||
|
|
a64b083b2a | ||
|
|
605915f307 | ||
|
|
2c156d6655 | ||
|
|
ffa87540cc | ||
|
|
f990dd747e | ||
|
|
3ceac0b37e | ||
|
|
5244766b7b | ||
|
|
47d1a50aa4 | ||
|
|
5cee225022 | ||
|
|
a098e4894f | ||
|
|
be08862109 | ||
|
|
c2c00888d6 | ||
|
|
24e43f4ddd | ||
|
|
04a7b31b84 | ||
|
|
41937ecbe4 | ||
|
|
b90865a08a | ||
|
|
12ff481689 | ||
|
|
d10e841b56 | ||
|
|
bd38775ad2 | ||
|
|
6f43ad8607 | ||
|
|
fe5d6b213c | ||
|
|
7e5c5d677f | ||
|
|
5115be6e6b | ||
|
|
41c4f948fe | ||
|
|
f1ee434dca | ||
|
|
a9ef4b3ff1 | ||
|
|
35dcf70f48 | ||
|
|
394d9cf168 | ||
|
|
66b3790444 | ||
|
|
ef3fdbdcba | ||
|
|
47a4f7fb9b | ||
|
|
25f72e4305 | ||
|
|
7e67f73844 | ||
|
|
2f9e1fa454 | ||
|
|
9bb3e9dd45 | ||
|
|
bcc661c116 | ||
|
|
8da8ca4203 | ||
|
|
a1cd7d1f3a | ||
|
|
dc00bf2484 | ||
|
|
27558c9349 | ||
|
|
5634795140 | ||
|
|
aff501f5c4 | ||
|
|
2995748d46 | ||
|
|
0901c91b45 | ||
|
|
86ad6f832a | ||
|
|
b7bc6c3c65 | ||
|
|
f097e8a34e | ||
|
|
cfd22a95e2 | ||
|
|
5bb98187fc | ||
|
|
af1be26b96 | ||
|
|
afc4bed0f8 | ||
|
|
f9f16b438f | ||
|
|
5d768a4a20 | ||
|
|
37318ab2bd | ||
|
|
3b0db630c1 | ||
|
|
075d624b29 | ||
|
|
d467fda7c6 | ||
|
|
0f355c717e | ||
|
|
db2099a4dc | ||
|
|
e6a3d61d25 | ||
|
|
ec38fb723d | ||
|
|
a3f913c5b1 | ||
|
|
0f46f6eb40 | ||
|
|
29ae520e69 | ||
|
|
bd87dfc579 | ||
|
|
d0a5da2445 | ||
|
|
7e55c62cac | ||
|
|
1baa832efc | ||
|
|
9a23711ff9 | ||
|
|
ae480c5f76 | ||
|
|
8130fed777 | ||
|
|
0e3dffa5d1 | ||
|
|
ba9d6df20c | ||
|
|
4b02e32314 | ||
|
|
7946e9d197 | ||
|
|
35a794687b | ||
|
|
587f363e03 | ||
|
|
0e03ab2a57 | ||
|
|
040484cc3f | ||
|
|
5278f42025 | ||
|
|
c2cba8bfc6 | ||
|
|
ba3794a495 | ||
|
|
8c252952db | ||
|
|
18dd44e970 | ||
|
|
e2c05ae15e | ||
|
|
df7726c40d | ||
|
|
cfada791e6 | ||
|
|
2f4b178957 | ||
|
|
f2c2daa017 | ||
|
|
1fc86fd2f1 | ||
|
|
22cd9bcadc | ||
|
|
4426aff3d3 | ||
|
|
7957701db8 | ||
|
|
4dedfbfe08 | ||
|
|
3fc70b61d0 | ||
|
|
9a1dba357e | ||
|
|
60fe2c873c | ||
|
|
e25c66de07 | ||
|
|
b9b6eb61d9 | ||
|
|
35615c268b | ||
|
|
287d8aef9e | ||
|
|
1583c79a8a | ||
|
|
f2e05bc0b7 | ||
|
|
2c5ff3f63f | ||
|
|
f4654a451b | ||
|
|
8293a8d035 | ||
|
|
9155e2529b | ||
|
|
e65f052abf | ||
|
|
7cfe9b5356 | ||
|
|
d2ce5e62e7 | ||
|
|
9e37a09765 | ||
|
|
a3f388dd14 | ||
|
|
c267a67f68 | ||
|
|
201416a0c7 | ||
|
|
840c8f5782 | ||
|
|
6ab8d56993 | ||
|
|
07056b11f5 | ||
|
|
6a83112380 | ||
|
|
28c78d3f9a | ||
|
|
9346b98cb6 | ||
|
|
ea9cc0e4c1 | ||
|
|
9632c614be | ||
|
|
087ca15138 | ||
|
|
24117bc599 | ||
|
|
3ab21332c9 | ||
|
|
44102de362 | ||
|
|
91a59bbcc5 | ||
|
|
7c09985695 | ||
|
|
602e82a3b7 | ||
|
|
259365d408 | ||
|
|
4cc4ff3e07 | ||
|
|
0e8ec49cf6 | ||
|
|
dabfb7291b | ||
|
|
86004fb582 | ||
|
|
6bba9f6c40 | ||
|
|
7e3cab8e5d | ||
|
|
98d0eac149 | ||
|
|
0b8c369740 | ||
|
|
0703159dbc | ||
|
|
a4e901135b | ||
|
|
7edf6d4749 | ||
|
|
00988aed70 | ||
|
|
edb84f3776 | ||
|
|
5ef235b5ef | ||
|
|
e61012e30d | ||
|
|
84173048d2 | ||
|
|
eb6ce0799c | ||
|
|
382d90e03e | ||
|
|
19d5adcbdf | ||
|
|
03e5c3b2ff | ||
|
|
59bc4cf66b | ||
|
|
6454a8802e | ||
|
|
048c97f0ae | ||
|
|
f32095dd17 | ||
|
|
0dce8feead | ||
|
|
43975bcbdd | ||
|
|
a1056c6ae9 | ||
|
|
5c0ad5bd1f | ||
|
|
67094f6a88 | ||
|
|
7db8bc84aa | ||
|
|
158f51fb54 | ||
|
|
0dc9f779f8 | ||
|
|
c5f8656aa0 | ||
|
|
eb40c24b78 | ||
|
|
34f63396cb | ||
|
|
8e35c81399 | ||
|
|
0062a422a4 | ||
|
|
19bbeb24a6 | ||
|
|
6e05361318 | ||
|
|
fbb195e054 | ||
|
|
c87a3e92fc | ||
|
|
c7ff73a083 | ||
|
|
f4086496cb | ||
|
|
aaafa6e8df | ||
|
|
107776f324 | ||
|
|
c493982511 | ||
|
|
234b15a3e6 | ||
|
|
78d27842cf | ||
|
|
c3cd379fd5 | ||
|
|
8ad8d4f807 | ||
|
|
ec3c9832de | ||
|
|
3b7ddce207 | ||
|
|
71dcf30c1f | ||
|
|
0f96bd0f4d | ||
|
|
2fabf50801 | ||
|
|
eafad9742a | ||
|
|
0b0e103fde | ||
|
|
9d74984163 | ||
|
|
5adecb9fa3 | ||
|
|
f7e12e9219 | ||
|
|
47b52800bf | ||
|
|
100c831474 | ||
|
|
cb5f038060 | ||
|
|
a35d4a4b4b | ||
|
|
96ece751fa | ||
|
|
4404978765 | ||
|
|
0853aa7515 | ||
|
|
574c69c092 | ||
|
|
e2f5854088 | ||
|
|
fe1a9e9ea7 | ||
|
|
94d0513bc7 | ||
|
|
2c01aff2b3 | ||
|
|
5d5798b4af | ||
|
|
8eed4e32ba | ||
|
|
ea75163567 | ||
|
|
1d9c5c2c6b | ||
|
|
c299b71677 | ||
|
|
0eaa9ed144 | ||
|
|
faaa2db844 | ||
|
|
d3ca79368c | ||
|
|
d066504bb9 | ||
|
|
611ffbe04e | ||
|
|
184f8f7920 | ||
|
|
89f0e1def0 | ||
|
|
d49697a85f | ||
|
|
c801237ce8 | ||
|
|
1d69c18e33 | ||
|
|
e089817951 | ||
|
|
d4aa00dbeb | ||
|
|
e6cdaf112c | ||
|
|
8750cdac73 | ||
|
|
2b8c9a1cff | ||
|
|
cd8af21915 | ||
|
|
782fe1daf2 | ||
|
|
5847b105a5 | ||
|
|
330b2589ed | ||
|
|
76ec35a8f6 | ||
|
|
00ac706f67 | ||
|
|
2e502aead8 | ||
|
|
e27613ed45 | ||
|
|
847de990de | ||
|
|
10935ee031 | ||
|
|
922223a9c3 | ||
|
|
08330f5fe2 | ||
|
|
884b48578d | ||
|
|
85119cb32e | ||
|
|
d81da042cd | ||
|
|
1e08c912d7 | ||
|
|
da1bca5c9b | ||
|
|
da7dd1fa16 | ||
|
|
cc910fa4c4 | ||
|
|
a4c5d2e29c | ||
|
|
2a0b331ee3 | ||
|
|
af2771e901 | ||
|
|
287fdb7312 | ||
|
|
50b89ac9b5 | ||
|
|
28dd90e92d | ||
|
|
1f04cd868c | ||
|
|
04e39168c4 | ||
|
|
ffbb3229a8 | ||
|
|
5642de432b | ||
|
|
766514bdcf | ||
|
|
b652009235 | ||
|
|
9513edfdd6 | ||
|
|
f9adc3461d | ||
|
|
1a1862352a | ||
|
|
cddbb5e095 | ||
|
|
151b17ac82 | ||
|
|
fafe3737a2 | ||
|
|
60c532908e | ||
|
|
6ec5c85bea | ||
|
|
1efec71437 | ||
|
|
f8ea1d3490 | ||
|
|
e00a919269 | ||
|
|
d236e4c054 | ||
|
|
388fc863f4 | ||
|
|
bfb20397d9 | ||
|
|
7225c902ee | ||
|
|
0ead54b17e | ||
|
|
68b227065e | ||
|
|
bd4743f420 | ||
|
|
dd76a5b8ba | ||
|
|
e21dd04159 | ||
|
|
92b490f2f7 | ||
|
|
e732f656a9 | ||
|
|
9f6719d28d | ||
|
|
c1ecddf26a | ||
|
|
d864057a60 | ||
|
|
65c5071246 | ||
|
|
cc28b07dc1 | ||
|
|
bf2422b55b | ||
|
|
d33da1ebb6 | ||
|
|
21ef11099e | ||
|
|
f9c5db907a | ||
|
|
5ac345e09c | ||
|
|
43373010dc | ||
|
|
cb3c2706a8 | ||
|
|
d65ba037a8 | ||
|
|
e00403351c | ||
|
|
6f055f84ce | ||
|
|
cc77233902 | ||
|
|
ec91158130 | ||
|
|
c471323601 | ||
|
|
8daae7336d | ||
|
|
cf275b6e58 | ||
|
|
14e3448ba6 | ||
|
|
61de46cea2 | ||
|
|
24e665f38f | ||
|
|
8f13bc0477 | ||
|
|
f73dde6dd9 | ||
|
|
ffd7ec1007 | ||
|
|
9bd30baba4 | ||
|
|
61c64e4a3b | ||
|
|
4ef6f00423 | ||
|
|
5c412e5e81 | ||
|
|
af2327aaf4 | ||
|
|
96ed725278 | ||
|
|
3d5d2db64b | ||
|
|
94525cae5d | ||
|
|
982c7fb058 | ||
|
|
794247450f | ||
|
|
0c712d7c60 | ||
|
|
cefcf836fd | ||
|
|
eb53bca6fd | ||
|
|
958d096e7f | ||
|
|
9dfc050fb5 | ||
|
|
b99b3d7b9c | ||
|
|
16fdd0e93c | ||
|
|
01157d414b | ||
|
|
eae1e5bdf2 | ||
|
|
71941cc673 | ||
|
|
fac4ed49af | ||
|
|
8785086bc8 | ||
|
|
6e8bd3da19 | ||
|
|
078275034d | ||
|
|
31e73f1645 | ||
|
|
2ac7cf51a9 | ||
|
|
4f1d8a1b15 | ||
|
|
a7f4ff7b06 | ||
|
|
3027f67b6f | ||
|
|
802ba0c2bf | ||
|
|
41b05cb1f8 | ||
|
|
3306ed146b | ||
|
|
fb4951d2df | ||
|
|
9dc0cf5a7c | ||
|
|
e63d486422 | ||
|
|
1a91ab02cf | ||
|
|
7b4ad29260 | ||
|
|
e33b24fad2 | ||
|
|
49c51af841 | ||
|
|
222a3655ba | ||
|
|
c8c53f9a18 | ||
|
|
838b8a2bec | ||
|
|
1a8f9f0483 | ||
|
|
2631af977a | ||
|
|
165622a9e9 | ||
|
|
f979e459e8 | ||
|
|
9d6f127a4e | ||
|
|
bfe39ce5bc | ||
|
|
832f41f0fe | ||
|
|
97707bdc72 | ||
|
|
888169571b | ||
|
|
d7fbea62f9 | ||
|
|
728f56e581 | ||
|
|
1268a28e7b | ||
|
|
717667034b | ||
|
|
5229ce8660 | ||
|
|
9f5d22b21f | ||
|
|
0280de11da | ||
|
|
b4d064d166 | ||
|
|
6dd52e1927 | ||
|
|
29dacd3441 | ||
|
|
540e042221 | ||
|
|
f09c30df35 | ||
|
|
a03d327e96 | ||
|
|
defe282fe8 | ||
|
|
ce0a05691b | ||
|
|
62dbbbba85 | ||
|
|
2c74765246 | ||
|
|
cb5c56dac4 | ||
|
|
0b23787d6c | ||
|
|
aaa49273cf | ||
|
|
e9c48cd1ce | ||
|
|
435e1149d5 | ||
|
|
4d518873d0 | ||
|
|
caca1fcef0 | ||
|
|
8efc9d6219 | ||
|
|
e21c4fbbb5 | ||
|
|
b902e4bcf5 | ||
|
|
c5f3192588 | ||
|
|
e04f51ebd2 | ||
|
|
283810cbf7 | ||
|
|
0640ddba80 | ||
|
|
0865bee500 | ||
|
|
202a53f4f6 | ||
|
|
09518ee207 | ||
|
|
5cd8bd0356 | ||
|
|
5247e40659 | ||
|
|
603f4c615a | ||
|
|
5c72b45975 | ||
|
|
83f4db956b | ||
|
|
bdae48f6ae | ||
|
|
7e854a9e63 | ||
|
|
98786e609a | ||
|
|
5a5c38e478 | ||
|
|
3b049ab9ee | ||
|
|
21b42c4463 | ||
|
|
ca0a679413 | ||
|
|
a7e6efb4c0 | ||
|
|
8c7c6c594a | ||
|
|
7ef3b808ea | ||
|
|
3b623dc12e | ||
|
|
89cd5417ef | ||
|
|
b3350a4f3b | ||
|
|
1761622e14 | ||
|
|
ebee20c47d | ||
|
|
500312c050 | ||
|
|
4ad1dde723 | ||
|
|
62880c125e | ||
|
|
21dbdbf69d | ||
|
|
269476df6e | ||
|
|
87224db145 | ||
|
|
aa6fbd35db | ||
|
|
c9e021924f | ||
|
|
63f5f5c328 | ||
|
|
28ee2ebb30 | ||
|
|
fd12ab3413 | ||
|
|
d972b7465a | ||
|
|
734e7a9526 | ||
|
|
90bc1daa9d | ||
|
|
4e00539308 | ||
|
|
f719d66129 | ||
|
|
800af37975 | ||
|
|
df187c4406 | ||
|
|
6f250b3f8d | ||
|
|
be0392a2b2 | ||
|
|
b794c7c8d4 | ||
|
|
e74c8372ea | ||
|
|
40ca0527db | ||
|
|
a647747260 | ||
|
|
9e664a3921 | ||
|
|
ad6379b762 | ||
|
|
e0e0fb08a5 | ||
|
|
006b45526b | ||
|
|
3dc430085d | ||
|
|
9697a5ce6d | ||
|
|
53b8a5b027 | ||
|
|
ed380f08fe | ||
|
|
9af8e76e87 | ||
|
|
af54a26b43 | ||
|
|
a4db488b02 | ||
|
|
580a843474 | ||
|
|
b237eec801 | ||
|
|
e0e8503151 | ||
|
|
19ca140165 | ||
|
|
bfc438c455 | ||
|
|
d3b085ab8a | ||
|
|
d1eda66668 | ||
|
|
50dfdcb6cc | ||
|
|
7f85d7f453 | ||
|
|
f970485e19 | ||
|
|
e5e7e844c4 | ||
|
|
4e866fd710 | ||
|
|
2a498cb670 | ||
|
|
bbcb9315f3 | ||
|
|
08be65a7dd | ||
|
|
e24f84f713 | ||
|
|
c1ac2a79db | ||
|
|
0391f113b0 | ||
|
|
d26fccaa44 | ||
|
|
46e56ca6fc | ||
|
|
92f30dd28f | ||
|
|
b85a482db0 | ||
|
|
c15489b711 | ||
|
|
7f871467bf | ||
|
|
3a039df351 | ||
|
|
542ffcca60 | ||
|
|
ed6687359b | ||
|
|
57c82b9c34 | ||
|
|
0e2f0381d0 | ||
|
|
1432bb8889 | ||
|
|
3c8b8b65d0 | ||
|
|
64dbd4abcc | ||
|
|
bee58510e7 | ||
|
|
b10c6293d9 | ||
|
|
4ab0690428 | ||
|
|
841254e9e8 | ||
|
|
d7f4dbfd13 | ||
|
|
2dbf587118 | ||
|
|
4d1eea35e1 | ||
|
|
f39d6e6108 | ||
|
|
ad530c4b08 | ||
|
|
b60ad953c4 | ||
|
|
a44907b700 | ||
|
|
c856380fac | ||
|
|
ef458be855 | ||
|
|
9187b4d552 | ||
|
|
2b3bf5f51d | ||
|
|
a8d70c6edf | ||
|
|
dca555b6d7 | ||
|
|
b11ec23891 | ||
|
|
39a9a00299 | ||
|
|
3f7d13b2cf | ||
|
|
218af5500b | ||
|
|
12c524ac06 | ||
|
|
5e4668c146 | ||
|
|
4b5e602392 | ||
|
|
a2b6aca288 | ||
|
|
b455f9b591 | ||
|
|
06c3c87f4e | ||
|
|
121193e49b | ||
|
|
d7b8ede53f | ||
|
|
e348c9c344 | ||
|
|
f7ad54b324 | ||
|
|
ff0bf0a5e3 | ||
|
|
155cd9a8d0 | ||
|
|
663a9a3add | ||
|
|
be813e96dd | ||
|
|
907047d823 | ||
|
|
62d403c060 | ||
|
|
419e775dfb | ||
|
|
1f61351e8f | ||
|
|
39fd625f0c | ||
|
|
8b7a841f09 | ||
|
|
a4656b823d | ||
|
|
1308be28fe | ||
|
|
990ee994db | ||
|
|
9a6b24fca4 | ||
|
|
f53ca6ceee | ||
|
|
04aa6ebb42 | ||
|
|
4866cfa09f | ||
|
|
56927fb955 | ||
|
|
f1396fbced | ||
|
|
57d8bb5d1f | ||
|
|
d3aab31bcf | ||
|
|
5349b51e71 | ||
|
|
1923d23cff | ||
|
|
c6b0918db5 | ||
|
|
6c69210037 | ||
|
|
7f945bf89e | ||
|
|
220a3faf7c | ||
|
|
a9f95f2f08 | ||
|
|
f8f5f8f84b | ||
|
|
f57d1255e9 | ||
|
|
1fd9f3ce92 | ||
|
|
90e20cba3d | ||
|
|
dd11d5a598 | ||
|
|
83ff8e13ba | ||
|
|
77e5bb9ec9 | ||
|
|
5ffa05fba0 | ||
|
|
0743d84bcc | ||
|
|
b45cf5960a | ||
|
|
056c3ee331 | ||
|
|
c6ffd22c45 | ||
|
|
a1167b3d55 | ||
|
|
e60f52ee0c | ||
|
|
72acb2edfd | ||
|
|
6bc48fcdb3 | ||
|
|
f67534069c | ||
|
|
4d671dc5d7 | ||
|
|
f851671c41 | ||
|
|
d186dcdc32 | ||
|
|
46f8003c4e | ||
|
|
3549fd1aa0 | ||
|
|
819625de61 | ||
|
|
aa28a8d1e1 | ||
|
|
0d1f036f17 | ||
|
|
b4a9ff4ffe | ||
|
|
f41e36b99f | ||
|
|
85454f6083 | ||
|
|
141de7b94a | ||
|
|
905c0c4f6d | ||
|
|
a364704e3a | ||
|
|
107f64e53b | ||
|
|
a966e6aa13 | ||
|
|
feea221f39 | ||
|
|
a12caa4799 | ||
|
|
63993436c9 | ||
|
|
7d3c58d21c | ||
|
|
319ab84f90 | ||
|
|
4e091a1cf1 | ||
|
|
e3acd528d8 | ||
|
|
43a03b1660 | ||
|
|
4070db9990 | ||
|
|
5f0eb007b1 | ||
|
|
bd7f6d3c19 | ||
|
|
929d2ad83a | ||
|
|
7a4049b683 | ||
|
|
e2b9cadb1d | ||
|
|
1ceda731e5 | ||
|
|
fcebac6b16 | ||
|
|
1158842b7e | ||
|
|
2a09114dc7 | ||
|
|
d95e4dc150 | ||
|
|
17f29b41c2 | ||
|
|
98c7089f5b | ||
|
|
a49334f3e4 | ||
|
|
5161cea8cd | ||
|
|
8bf2240d40 | ||
|
|
1e4ede08b6 | ||
|
|
041dad92cf | ||
|
|
4cda2c0a4e | ||
|
|
e63ed0a931 | ||
|
|
a6f26b85b3 | ||
|
|
67f26508ba | ||
|
|
33b838f139 | ||
|
|
f58b323736 | ||
|
|
37c79532fe | ||
|
|
4bf2d0d755 | ||
|
|
b3e70efa30 | ||
|
|
68ce45f203 | ||
|
|
5bdc9abd2f | ||
|
|
c03cb9d9c2 | ||
|
|
34e3892367 | ||
|
|
9953851287 | ||
|
|
c73259d2f0 | ||
|
|
8ac8c64885 | ||
|
|
7ac610a3cb | ||
|
|
2aa260a03b | ||
|
|
4eb030717a |
+4
-4
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
exclude_paths:
|
exclude_paths:
|
||||||
- ".github/**"
|
- ".github/**" #
|
||||||
- "ci/build_verilator.sh"
|
- "ci/build_verilator.sh" #
|
||||||
- "include/vltstd/**"
|
- "include/vltstd/**" #
|
||||||
- "nodist/fastcov.py"
|
- "nodist/fastcov.py" #
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
# DESCRIPTION: codecov.io config
|
||||||
|
#
|
||||||
|
# Copyright 2020-2026 by Wilson Snyder. This program is free software; you
|
||||||
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
####################
|
||||||
|
# Validate:
|
||||||
|
# curl --data-binary @.codecov.yml https://codecov.io/validate
|
||||||
|
#
|
||||||
|
coverage:
|
||||||
|
precision: 2
|
||||||
|
range: 75...100
|
||||||
|
round: down
|
||||||
|
status:
|
||||||
|
project: false
|
||||||
|
patch: false
|
||||||
|
comment: false
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Use this to report that something isn't working as expected, and it isn't "Unsupported." (Note our contributor agreement at https://github.com/verilator/verilator/blob/master/docs/CONTRIBUTING.rst)
|
|
||||||
title: ''
|
|
||||||
labels: new
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Thanks for taking the time to report this.
|
|
||||||
|
|
||||||
Can you attach an example that shows the issue? (Must be openly licensed, completely self-contained and self-checking so can directly run what you provide. Ideally use test_regress format, see https://veripool.org/guide/latest/contributing.html?highlight=test_regress#reporting-bugs
|
|
||||||
|
|
||||||
What 'verilator' command line do we use to run your example?
|
|
||||||
|
|
||||||
What 'verilator --version' are you using? Did you try it with the git master version?
|
|
||||||
|
|
||||||
What OS and distribution are you using?
|
|
||||||
|
|
||||||
May we assist you in trying to fix this in Verilator yourself?
|
|
||||||
|
|
||||||
(Please avoid attaching screenshots that show text - you can convert images to text using e.g. https://ocr.space)
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
---
|
|
||||||
name: Feature Request
|
|
||||||
about: Use this to request something should be supported, or a new feature added. (Note our contributor agreement at https://github.com/verilator/verilator/blob/master/docs/CONTRIBUTING.rst)
|
|
||||||
title: ''
|
|
||||||
labels: new
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Thanks for taking the time to report this.
|
|
||||||
|
|
||||||
What would you like added/supported?
|
|
||||||
|
|
||||||
What 'verilator --version' are you using? Did you try it with the git master version?
|
|
||||||
|
|
||||||
Can you attach an example that runs on other simulators? (Must be openly licensed, completely self-contained and self-checking so can directly run what you provide. Ideally use test_regress format, see https://veripool.org/guide/latest/contributing.html?highlight=test_regress#reporting-bugs
|
|
||||||
|
|
||||||
May we assist you in trying to fix this in Verilator yourself?
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
name: Bug or feature
|
||||||
|
about: Use this to report that something isn't working as expected, or is a desired feature. (Note our contributor agreement at https://github.com/verilator/verilator/blob/master/docs/CONTRIBUTING.rst)
|
||||||
|
title: ''
|
||||||
|
labels: new
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Thanks for taking the time to report this.
|
||||||
|
|
||||||
|
Can you please attach an example that shows the issue or missing feature? (Must be openly licensed, completely self-contained so can directly run what you provide. Ideally use test_regress format, see https://veripool.org/guide/latest/contributing.html?highlight=test_regress#reporting-bugs)
|
||||||
|
|
||||||
|
What output from that test indicates it is wrong, and what is the correct or expected output? (Or, please make test self-checking if possible.)
|
||||||
|
|
||||||
|
What 'verilator' command line do we use to run your example?
|
||||||
|
|
||||||
|
What 'verilator --version' are you using? Did you try it with the git master version? Did you try it with other simulators?
|
||||||
|
|
||||||
|
What OS and distribution are you using?
|
||||||
|
|
||||||
|
May we assist you in trying to fix this in Verilator yourself?
|
||||||
|
|
||||||
|
(Please avoid attaching screenshots that show text - you can convert images to text using e.g. https://ocr.space)
|
||||||
@@ -9,4 +9,4 @@ assignees: ''
|
|||||||
|
|
||||||
How may we help - what is your question?
|
How may we help - what is your question?
|
||||||
|
|
||||||
(If reporting a bug or requesting a feature please use one of the other issue templates.)
|
(If reporting a bug or requesting a feature please hit BACK on your browser and use a different issue templates.)
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
# See https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
@@ -3,10 +3,12 @@
|
|||||||
# This name is key to badges in README.rst, so we use the name build
|
# This name is key to badges in README.rst, so we use the name build
|
||||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
name: build
|
name: build-test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**' # Avoid duplicates: only run the PR, not the push
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
@@ -17,72 +19,158 @@ permissions:
|
|||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
|
||||||
working-directory: repo
|
working-directory: repo
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
|
# At most 1 job per branch. Auto cancel on pull requests and on all forks
|
||||||
cancel-in-progress: true
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'verilator/verilator' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build-2404-gcc:
|
build-2404-gcc:
|
||||||
name: Build
|
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
|
||||||
uses: ./.github/workflows/reusable-build.yml
|
uses: ./.github/workflows/reusable-build.yml
|
||||||
with:
|
with:
|
||||||
|
sha: ${{ github.sha }}
|
||||||
os: ${{ matrix.os }}
|
os: ${{ matrix.os }}
|
||||||
|
os-name: linux
|
||||||
cc: ${{ matrix.cc }}
|
cc: ${{ matrix.cc }}
|
||||||
|
dev-asan: ${{ matrix.asan }}
|
||||||
|
dev-gcov: 0
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- {os: ubuntu-24.04, cc: gcc}
|
- {os: ubuntu-24.04, cc: gcc, asan: 0}
|
||||||
|
|
||||||
build-2404-clang:
|
build-2404-clang:
|
||||||
name: Build
|
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
|
||||||
uses: ./.github/workflows/reusable-build.yml
|
uses: ./.github/workflows/reusable-build.yml
|
||||||
with:
|
with:
|
||||||
|
sha: ${{ github.sha }}
|
||||||
os: ${{ matrix.os }}
|
os: ${{ matrix.os }}
|
||||||
|
os-name: linux
|
||||||
cc: ${{ matrix.cc }}
|
cc: ${{ matrix.cc }}
|
||||||
|
dev-asan: ${{ matrix.asan }}
|
||||||
|
dev-gcov: 0
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- {os: ubuntu-24.04, cc: clang}
|
- {os: ubuntu-24.04, cc: clang, asan: 1}
|
||||||
|
|
||||||
build-2204-gcc:
|
build-2204-gcc:
|
||||||
name: Build
|
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
|
||||||
uses: ./.github/workflows/reusable-build.yml
|
uses: ./.github/workflows/reusable-build.yml
|
||||||
with:
|
with:
|
||||||
|
sha: ${{ github.sha }}
|
||||||
os: ${{ matrix.os }}
|
os: ${{ matrix.os }}
|
||||||
|
os-name: linux
|
||||||
cc: ${{ matrix.cc }}
|
cc: ${{ matrix.cc }}
|
||||||
|
dev-asan: ${{ matrix.asan }}
|
||||||
|
dev-gcov: 0
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- {os: ubuntu-22.04, cc: gcc}
|
- {os: ubuntu-22.04, cc: gcc, asan: 0}
|
||||||
|
|
||||||
build-2204-clang:
|
build-2204-clang:
|
||||||
name: Build
|
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
|
||||||
uses: ./.github/workflows/reusable-build.yml
|
uses: ./.github/workflows/reusable-build.yml
|
||||||
with:
|
with:
|
||||||
|
sha: ${{ github.sha }}
|
||||||
os: ${{ matrix.os }}
|
os: ${{ matrix.os }}
|
||||||
|
os-name: linux
|
||||||
cc: ${{ matrix.cc }}
|
cc: ${{ matrix.cc }}
|
||||||
|
dev-asan: ${{ matrix.asan }}
|
||||||
|
dev-gcov: 0
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- {os: ubuntu-22.04, cc: clang}
|
- {os: ubuntu-22.04, cc: clang, asan: 0}
|
||||||
|
|
||||||
|
build-osx-gcc:
|
||||||
|
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
|
||||||
|
uses: ./.github/workflows/reusable-build.yml
|
||||||
|
with:
|
||||||
|
sha: ${{ github.sha }}
|
||||||
|
os: ${{ matrix.os }}
|
||||||
|
os-name: osx
|
||||||
|
cc: ${{ matrix.cc }}
|
||||||
|
dev-asan: ${{ matrix.asan }}
|
||||||
|
dev-gcov: 0
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- {os: macos-15, cc: gcc, asan: 0}
|
||||||
|
|
||||||
|
build-osx-clang:
|
||||||
|
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
|
||||||
|
uses: ./.github/workflows/reusable-build.yml
|
||||||
|
with:
|
||||||
|
sha: ${{ github.sha }}
|
||||||
|
os: ${{ matrix.os }}
|
||||||
|
os-name: osx
|
||||||
|
cc: ${{ matrix.cc }}
|
||||||
|
dev-asan: ${{ matrix.asan }}
|
||||||
|
dev-gcov: 0
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- {os: macos-15, cc: clang, asan: 0}
|
||||||
|
|
||||||
|
build-windows:
|
||||||
|
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- {os: windows-2025, cc: msvc}
|
||||||
|
env:
|
||||||
|
CI_OS_NAME: win
|
||||||
|
CCACHE_COMPRESS: 1
|
||||||
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||||
|
CCACHE_LIMIT_MULTIPLE: 0.95
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
path: repo
|
||||||
|
- name: Cache $CCACHE_DIR
|
||||||
|
uses: actions/cache@v5
|
||||||
|
with:
|
||||||
|
path: ${{ env.CCACHE_DIR }}
|
||||||
|
key: msbuild-msvc-cmake
|
||||||
|
- name: compile
|
||||||
|
env:
|
||||||
|
WIN_FLEX_BISON: ${{ github.workspace }}/.ccache
|
||||||
|
run: ./ci/ci-win-compile.ps1
|
||||||
|
- name: test build
|
||||||
|
run: ./ci/ci-win-test.ps1
|
||||||
|
- name: Zip up repository
|
||||||
|
run: Compress-Archive -LiteralPath install -DestinationPath verilator.zip
|
||||||
|
- name: Upload zip archive
|
||||||
|
uses: actions/upload-artifact@v6
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/repo/verilator.zip
|
||||||
|
name: verilator-win.zip
|
||||||
|
|
||||||
test-2404-gcc:
|
test-2404-gcc:
|
||||||
name: Test | ${{ matrix.os }} | ${{ matrix.cc }}
|
name: Test | ${{ matrix.os }} | ${{ matrix.cc }} | ${{ matrix.reloc && 'reloc | ' || '' }} ${{ matrix.suite }}
|
||||||
needs: build-2404-gcc
|
needs: build-2404-gcc
|
||||||
uses: ./.github/workflows/reusable-test.yml
|
uses: ./.github/workflows/reusable-test.yml
|
||||||
with:
|
with:
|
||||||
|
archive: ${{ needs.build-2404-gcc.outputs.archive }}
|
||||||
os: ${{ matrix.os }}
|
os: ${{ matrix.os }}
|
||||||
cc: ${{ matrix.cc }}
|
cc: ${{ matrix.cc }}
|
||||||
reloc: ${{ matrix.reloc }}
|
reloc: ${{ matrix.reloc }}
|
||||||
suite: ${{ matrix.suite }}
|
suite: ${{ matrix.suite }}
|
||||||
|
dev-gcov: 0
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -97,14 +185,16 @@ jobs:
|
|||||||
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: vltmt-2}
|
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: vltmt-2}
|
||||||
|
|
||||||
test-2404-clang:
|
test-2404-clang:
|
||||||
name: Test | ${{ matrix.os }} | ${{ matrix.cc }}
|
name: Test | ${{ matrix.os }} | ${{ matrix.cc }} | ${{ matrix.reloc && 'reloc | ' || '' }} ${{ matrix.suite }}
|
||||||
needs: build-2404-clang
|
needs: build-2404-clang
|
||||||
uses: ./.github/workflows/reusable-test.yml
|
uses: ./.github/workflows/reusable-test.yml
|
||||||
with:
|
with:
|
||||||
|
archive: ${{ needs.build-2404-clang.outputs.archive }}
|
||||||
os: ${{ matrix.os }}
|
os: ${{ matrix.os }}
|
||||||
cc: ${{ matrix.cc }}
|
cc: ${{ matrix.cc }}
|
||||||
reloc: ${{ matrix.reloc }}
|
reloc: ${{ matrix.reloc }}
|
||||||
suite: ${{ matrix.suite }}
|
suite: ${{ matrix.suite }}
|
||||||
|
dev-gcov: 0
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -119,14 +209,16 @@ jobs:
|
|||||||
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: vltmt-2}
|
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: vltmt-2}
|
||||||
|
|
||||||
test-2204-gcc:
|
test-2204-gcc:
|
||||||
name: Test | ${{ matrix.os }} | ${{ matrix.cc }}
|
name: Test | ${{ matrix.os }} | ${{ matrix.cc }} | ${{ matrix.reloc && 'reloc | ' || '' }} ${{ matrix.suite }}
|
||||||
needs: build-2204-gcc
|
needs: build-2204-gcc
|
||||||
uses: ./.github/workflows/reusable-test.yml
|
uses: ./.github/workflows/reusable-test.yml
|
||||||
with:
|
with:
|
||||||
|
archive: ${{ needs.build-2204-gcc.outputs.archive }}
|
||||||
os: ${{ matrix.os }}
|
os: ${{ matrix.os }}
|
||||||
cc: ${{ matrix.cc }}
|
cc: ${{ matrix.cc }}
|
||||||
reloc: ${{ matrix.reloc }}
|
reloc: ${{ matrix.reloc }}
|
||||||
suite: ${{ matrix.suite }}
|
suite: ${{ matrix.suite }}
|
||||||
|
dev-gcov: 0
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -141,14 +233,16 @@ jobs:
|
|||||||
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: vltmt-2}
|
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: vltmt-2}
|
||||||
|
|
||||||
test-2204-clang:
|
test-2204-clang:
|
||||||
name: Test | ${{ matrix.os }} | ${{ matrix.cc }}
|
name: Test | ${{ matrix.os }} | ${{ matrix.cc }} | ${{ matrix.reloc && 'reloc | ' || '' }} ${{ matrix.suite }}
|
||||||
needs: build-2204-clang
|
needs: build-2204-clang
|
||||||
uses: ./.github/workflows/reusable-test.yml
|
uses: ./.github/workflows/reusable-test.yml
|
||||||
with:
|
with:
|
||||||
|
archive: ${{ needs.build-2204-clang.outputs.archive }}
|
||||||
os: ${{ matrix.os }}
|
os: ${{ matrix.os }}
|
||||||
cc: ${{ matrix.cc }}
|
cc: ${{ matrix.cc }}
|
||||||
reloc: ${{ matrix.reloc }}
|
reloc: ${{ matrix.reloc }}
|
||||||
suite: ${{ matrix.suite }}
|
suite: ${{ matrix.suite }}
|
||||||
|
dev-gcov: 0
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -163,34 +257,30 @@ jobs:
|
|||||||
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: vltmt-2}
|
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: vltmt-2}
|
||||||
|
|
||||||
lint-py:
|
lint-py:
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
name: Lint Python
|
name: Lint Python
|
||||||
env:
|
uses: ./.github/workflows/reusable-lint-py.yml
|
||||||
CI_OS_NAME: linux
|
|
||||||
CI_COMMIT: ${{ github.sha }}
|
passed:
|
||||||
CI_BUILD_STAGE_NAME: build
|
name: Test suite passed
|
||||||
CI_RUNS_ON: ubuntu-22.04
|
if: always()
|
||||||
CCACHE_COMPRESS: 1
|
needs:
|
||||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
- build-2404-gcc
|
||||||
CCACHE_LIMIT_MULTIPLE: 0.95
|
- build-2404-clang
|
||||||
strategy:
|
- build-2204-gcc
|
||||||
fail-fast: false
|
- build-2204-clang
|
||||||
|
- build-osx-gcc
|
||||||
|
- build-osx-clang
|
||||||
|
- build-windows
|
||||||
|
- test-2404-gcc
|
||||||
|
- test-2404-clang
|
||||||
|
- test-2204-gcc
|
||||||
|
- test-2204-clang
|
||||||
|
- lint-py
|
||||||
|
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Decide whether the needed jobs succeeded or failed
|
||||||
uses: actions/checkout@v4
|
uses: re-actors/alls-green@release/v1
|
||||||
with:
|
with:
|
||||||
path: repo
|
jobs: ${{ toJSON(needs) }}
|
||||||
|
|
||||||
- name: Install packages for build
|
|
||||||
run: ./ci/ci-install.bash
|
|
||||||
|
|
||||||
# We use specific version numbers, otherwise a Python package
|
|
||||||
# update may add a warning and break our build
|
|
||||||
- name: Install packages for lint
|
|
||||||
run: sudo pip3 install pylint==3.0.2 ruff==0.1.3 clang sphinx sphinx_rtd_theme sphinxcontrib-spelling breathe ruff
|
|
||||||
|
|
||||||
- name: Configure
|
|
||||||
run: autoconf && ./configure --enable-longtests --enable-ccwarn
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: make -k lint-py
|
|
||||||
@@ -5,6 +5,8 @@
|
|||||||
name: Contributor Agreement
|
name: Contributor Agreement
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**' # Avoid duplicates: only run the PR, not the push
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
permissions:
|
permissions:
|
||||||
@@ -14,5 +16,5 @@ jobs:
|
|||||||
name: "'docs/CONTRIBUTORS' was signed"
|
name: "'docs/CONTRIBUTORS' was signed"
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- run: test_regress/t/t_dist_contributors.py
|
- run: test_regress/t/t_dist_contributors.py
|
||||||
|
|||||||
+182
-66
@@ -2,96 +2,212 @@
|
|||||||
# DESCRIPTION: Github actions config
|
# DESCRIPTION: Github actions config
|
||||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
name: coverage
|
name: Code coverage
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * 0' # weekly
|
- cron: '0 0 * * 0' # weekly
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize, reopened, labeled, unlabeled]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
env:
|
|
||||||
CI_OS_NAME: linux
|
|
||||||
CI_COMMIT: ${{ github.sha }}
|
|
||||||
COVERAGE: 1
|
|
||||||
VERILATOR_ARCHIVE: verilator-coverage-${{ github.sha }}.tar.gz
|
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: repo
|
|
||||||
|
concurrency:
|
||||||
|
# At most 1 job per branch. Auto cancel all but scheduled jobs
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{ github.event_name != 'schedule' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
Build:
|
build:
|
||||||
|
name: Build
|
||||||
# Only run scheduled jobs if explicitly enabled for that repo (e.g.: not on forks)
|
# Only run scheduled jobs if explicitly enabled for that repo (e.g.: not on forks)
|
||||||
if: ${{ github.event_name != 'schedule' || vars.ENABLE_SCHEDULED_JOBS == 'true' }}
|
# Only run pull request jobs if labelled as needing an coverage run
|
||||||
runs-on: ubuntu-24.04
|
# Always run workflow dispatch jobs
|
||||||
env:
|
if: |
|
||||||
CI_BUILD_STAGE_NAME: build
|
(github.event_name == 'schedule'
|
||||||
CI_RUNS_ON: ubuntu-24.04
|
&& vars.ENABLE_SCHEDULED_JOBS == 'true') ||
|
||||||
steps:
|
(github.event_name == 'pull_request'
|
||||||
|
&& contains(github.event.pull_request.labels.*.name, 'pr: dev-coverage')) ||
|
||||||
|
(github.event_name == 'workflow_dispatch')
|
||||||
|
uses: ./.github/workflows/reusable-build.yml
|
||||||
|
with:
|
||||||
|
# For pull requests, build the head of the pull request branch, not the
|
||||||
|
# merge commit, otherwise patch coverage would include the changes
|
||||||
|
# between the root of the pull request and the target branch
|
||||||
|
sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||||
|
os: ubuntu-24.04
|
||||||
|
os-name: linux
|
||||||
|
cc: gcc
|
||||||
|
dev-asan: 0
|
||||||
|
dev-gcov: 1
|
||||||
|
|
||||||
- name: Checkout
|
test:
|
||||||
uses: actions/checkout@v4
|
name: Test | ${{ matrix.test }}${{ matrix.num }}
|
||||||
with:
|
needs: build
|
||||||
path: repo
|
uses: ./.github/workflows/reusable-test.yml
|
||||||
|
with:
|
||||||
- name: Install packages for build
|
archive: ${{ needs.build.outputs.archive }}
|
||||||
run: ./ci/ci-install.bash
|
os: ubuntu-24.04
|
||||||
|
cc: gcc
|
||||||
- name: Build
|
reloc: 0
|
||||||
run: ./ci/ci-script.bash
|
suite: ${{ matrix.test }}${{ matrix.num }}
|
||||||
|
dev-gcov: 1
|
||||||
- name: Tar up repository
|
|
||||||
working-directory: ${{ github.workspace }}
|
|
||||||
run: tar --posix -c -z -f ${{ env.VERILATOR_ARCHIVE }} repo
|
|
||||||
|
|
||||||
- name: Upload tar archive
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}/${{ env.VERILATOR_ARCHIVE }}
|
|
||||||
name: ${{ env.VERILATOR_ARCHIVE }}
|
|
||||||
|
|
||||||
Test:
|
|
||||||
needs: Build
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
test: [vlt-, vltmt-]
|
test: [coverage-vlt-, coverage-vltmt-]
|
||||||
num: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
num: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||||
include:
|
include:
|
||||||
- {test: dist, num: ''}
|
- {test: coverage-dist, num: ''}
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
name: test-${{ matrix.test }}${{ matrix.num }}
|
|
||||||
env:
|
|
||||||
CI_BUILD_STAGE_NAME: test
|
|
||||||
CI_RUNS_ON: ubuntu-24.04
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Download tar archive
|
publish-codecov:
|
||||||
uses: actions/download-artifact@v4
|
name: Publish results to codecov.io
|
||||||
|
needs: test
|
||||||
|
if: ${{ contains(needs.*.result, 'success') && !cancelled() }}
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Download code coverage data
|
||||||
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: ${{ env.VERILATOR_ARCHIVE }}
|
pattern: code-coverage-*
|
||||||
|
path: obj_coverage
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: List files
|
||||||
|
id: list-files
|
||||||
|
run: |
|
||||||
|
ls -lsha obj_coverage
|
||||||
|
find obj_coverage -type f | paste -sd, | sed "s/^/files=/" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Upload to codecov.io
|
||||||
|
uses: codecov/codecov-action@v5
|
||||||
|
with:
|
||||||
|
disable_file_fixes: true
|
||||||
|
disable_search: true
|
||||||
|
fail_ci_if_error: true
|
||||||
|
files: ${{ steps.list-files.outputs.files }}
|
||||||
|
plugins: noop
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
verbose: true
|
||||||
|
|
||||||
|
prepare-report:
|
||||||
|
name: Prepare HTML report
|
||||||
|
needs: [build, test]
|
||||||
|
if: ${{ contains(needs.*.result, 'success') && !cancelled() }}
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
|
||||||
|
sudo dpkg-reconfigure man-db
|
||||||
|
sudo apt install lcov
|
||||||
|
|
||||||
|
- name: Download repository archive
|
||||||
|
uses: actions/download-artifact@v7
|
||||||
|
with:
|
||||||
|
name: ${{ needs.build.outputs.archive }}
|
||||||
path: ${{ github.workspace }}
|
path: ${{ github.workspace }}
|
||||||
|
|
||||||
- name: Unpack tar archive
|
- name: Unpack repository archive
|
||||||
working-directory: ${{ github.workspace }}
|
|
||||||
run: tar -x -z -f ${{ env.VERILATOR_ARCHIVE }}
|
|
||||||
|
|
||||||
- name: Install test dependencies
|
|
||||||
run: ./ci/ci-install.bash
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
env:
|
|
||||||
TESTS: coverage-${{ matrix.test }}${{ matrix.num }}
|
|
||||||
run: ./ci/ci-script.bash
|
|
||||||
|
|
||||||
- name: Upload coverage data to Codecov
|
|
||||||
env:
|
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
run: |
|
run: |
|
||||||
find . -name '*.gcno' -exec rm {} \;
|
tar -x -z -f ${{ needs.build.outputs.archive }}
|
||||||
./ci/codecov -v upload-process -Z --sha ${{ github.sha }} -f nodist/obj_dir/coverage/app_total.info
|
ls -lsha
|
||||||
|
|
||||||
|
- name: Download code coverage data
|
||||||
|
uses: actions/download-artifact@v7
|
||||||
|
with:
|
||||||
|
pattern: code-coverage-*
|
||||||
|
path: repo/obj_coverage
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Create report
|
||||||
|
working-directory: repo
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
run: |
|
||||||
|
ls -lsha obj_coverage
|
||||||
|
# Combine reports from test jobs
|
||||||
|
nodist/fastcov.py -C obj_coverage/verilator-*.info --lcov -o obj_coverage/verilator.info
|
||||||
|
# For a PR, report patch coverage against the merge-base between the head of the PR and the target branch
|
||||||
|
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||||
|
COVERAGE_BASE=$(git rev-parse --short $(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}))
|
||||||
|
make coverage-report COVERAGE_BASE=${COVERAGE_BASE} |& tee ${{ github.workspace }}/make-coverage-report.log
|
||||||
|
else
|
||||||
|
make coverage-report
|
||||||
|
fi
|
||||||
|
# Remove data files
|
||||||
|
rm -f obj_coverage/verilator*.info
|
||||||
|
# Some extra work for PRs only
|
||||||
|
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||||
|
# Save PR number in report
|
||||||
|
echo ${{ github.event.number }} > obj_coverage/pr-number.txt
|
||||||
|
# Generate notification comment content
|
||||||
|
mkdir -p notification
|
||||||
|
echo ${{ github.event.number }} > notification/pr-number.txt
|
||||||
|
NUM=$(gh run view ${{ github.run_id }} --json number --jq ".number")
|
||||||
|
URL=$(gh run view ${{ github.run_id }} --json url --jq ".url")
|
||||||
|
echo "Patch coverage from PR workflow [#$NUM]($URL) (code coverage of lines changed relative to ${COVERAGE_BASE}):" > notification/body.txt
|
||||||
|
if [[ ! -f obj_coverage/empty-patch ]]; then
|
||||||
|
echo "<pre>" >> notification/body.txt
|
||||||
|
grep -E "(lines|branches)\.*:" ${{ github.workspace }}/make-coverage-report.log | sed "s/\.*:/:/" >> notification/body.txt || true
|
||||||
|
echo "</pre>" >> notification/body.txt
|
||||||
|
echo "Report: [${{ github.run_id }}](https://${{ github.repository_owner }}.github.io/verilator/coverage-reports/${{ github.run_id }}/index.html)" >> notification/body.txt
|
||||||
|
else
|
||||||
|
echo "Patch contains no code changes" >> notification/body.txt
|
||||||
|
fi
|
||||||
|
cat notification/body.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload report
|
||||||
|
uses: actions/upload-artifact@v6
|
||||||
|
with:
|
||||||
|
path: repo/obj_coverage
|
||||||
|
name: coverage-report
|
||||||
|
|
||||||
|
- name: Upload notification
|
||||||
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
uses: actions/upload-artifact@v6
|
||||||
|
with:
|
||||||
|
path: repo/notification
|
||||||
|
name: coverage-pr-notification
|
||||||
|
|
||||||
|
# Create GitHub issue for failed scheduled jobs
|
||||||
|
# This should always be the last job (we want an issue if anything breaks)
|
||||||
|
create-issue:
|
||||||
|
name: Create issue on failure
|
||||||
|
needs: [publish-codecov, prepare-report]
|
||||||
|
if: ${{ github.event_name == 'schedule' && github.repository == 'verilator/verilator' && github.run_attempt == 1 && failure() && !cancelled() }}
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
# Creating issues requires elevated privilege
|
||||||
|
- name: Generate access token
|
||||||
|
id: generate-token
|
||||||
|
uses: actions/[email protected]
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.VERILATOR_CI_ID }}
|
||||||
|
private-key: ${{ secrets.VERILATOR_CI_KEY }}
|
||||||
|
owner: verilator
|
||||||
|
repositories: verilator
|
||||||
|
permission-issues: write
|
||||||
|
- name: Create issue
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||||
|
run: |-
|
||||||
|
echo "This issue was created automatically by the GitHub Actions CI due to the failure of a scheduled Code coverage run." >> body.txt
|
||||||
|
echo "" >> body.txt
|
||||||
|
echo "Workflow status: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> body.txt
|
||||||
|
gh issue --repo ${{ github.repository }} create \
|
||||||
|
--title "Code coverage run #${{ github.run_number }} Failed" \
|
||||||
|
--body-file body.txt \
|
||||||
|
--label new \
|
||||||
|
--assignee gezalore,wsnyder
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Extract context variables
|
- name: Extract context variables
|
||||||
run: |
|
run: |
|
||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: docker_meta
|
id: docker_meta
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
${{ vars.DOCKER_HUB_NAMESPACE }}/${{ env.image_name }}
|
${{ vars.DOCKER_HUB_NAMESPACE }}/${{ env.image_name }}
|
||||||
@@ -64,21 +64,21 @@ jobs:
|
|||||||
type=raw,value=latest,enable=${{ inputs.add_latest_tag == true }}
|
type=raw,value=latest,enable=${{ inputs.add_latest_tag == true }}
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
with:
|
||||||
buildkitd-flags: --debug
|
buildkitd-flags: --debug
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_HUB_USER }}
|
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||||
|
|
||||||
- name: Build and Push to Docker
|
- name: Build and Push to Docker
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v6
|
||||||
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
|
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
|
||||||
with:
|
with:
|
||||||
context: ${{ env.build_context }}
|
context: ${{ env.build_context }}
|
||||||
|
|||||||
@@ -5,10 +5,12 @@
|
|||||||
name: format
|
name: format
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
pull_request_target:
|
branches-ignore:
|
||||||
workflow_dispatch:
|
- 'dependabot/**' # Avoid duplicates: only run the PR, not the push
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
format:
|
format:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
@@ -19,26 +21,26 @@ jobs:
|
|||||||
CI_COMMIT: ${{ github.sha }}
|
CI_COMMIT: ${{ github.sha }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Install packages for build
|
- name: Install packages for build
|
||||||
env:
|
env:
|
||||||
CI_BUILD_STAGE_NAME: build
|
CI_BUILD_STAGE_NAME: build
|
||||||
run: |
|
run: |
|
||||||
bash ci/ci-install.bash &&
|
sudo apt install clang-format-18
|
||||||
sudo apt-get install clang-format-18 yapf3 &&
|
git config --global user.email "[email protected]"
|
||||||
sudo pip3 install gersemi mbake &&
|
|
||||||
git config --global user.email "[email protected]" &&
|
|
||||||
git config --global user.name "github action"
|
git config --global user.name "github action"
|
||||||
- name: Format code
|
- name: Format code
|
||||||
run: |
|
run: |
|
||||||
autoconf &&
|
autoconf
|
||||||
./configure &&
|
./configure
|
||||||
make -j 2 format CLANGFORMAT=clang-format-18 &&
|
make venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
make -j 2 format CLANGFORMAT=clang-format-18
|
||||||
git status
|
git status
|
||||||
- name: Push
|
- name: Push
|
||||||
run: |
|
run: |-
|
||||||
if [ -n "$(git status --porcelain)" ]; then
|
if [ -n "$(git status --porcelain)" ]; then
|
||||||
git commit . -m "Apply 'make format'" &&
|
git commit . -m "Apply 'make format'" &&
|
||||||
git push origin
|
git push origin
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
---
|
|
||||||
# DESCRIPTION: Github actions config
|
|
||||||
# This name is key to badges in README.rst, so we use the name build
|
|
||||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
|
||||||
#
|
|
||||||
name: msbuild
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: 0 0 * * 0 # weekly
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
env:
|
|
||||||
CI_OS_NAME: win
|
|
||||||
CI_COMMIT: ${{ github.sha }}
|
|
||||||
CCACHE_COMPRESS: 1
|
|
||||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
|
||||||
CCACHE_LIMIT_MULTIPLE: 0.95
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: repo
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
jobs:
|
|
||||||
windows:
|
|
||||||
name: run on windows
|
|
||||||
runs-on: windows-2025
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
path: repo
|
|
||||||
- name: Cache $CCACHE_DIR
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ${{ env.CCACHE_DIR }}
|
|
||||||
key: msbuild-msvc-cmake
|
|
||||||
- name: compile
|
|
||||||
env:
|
|
||||||
WIN_FLEX_BISON: ${{ github.workspace }}/.ccache
|
|
||||||
run: ./ci/ci-win-compile.ps1
|
|
||||||
- name: test build
|
|
||||||
run: ./ci/ci-win-test.ps1
|
|
||||||
- name: Zip up repository
|
|
||||||
run: Compress-Archive -LiteralPath install -DestinationPath verilator.zip
|
|
||||||
- name: Upload zip archive
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}/repo/verilator.zip
|
|
||||||
name: verilator-win.zip
|
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
---
|
||||||
|
# DESCRIPTION: Github actions config
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
name: Pages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
paths: ["ci/**", ".github/workflows"]
|
||||||
|
workflow_dispatch:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["Code coverage"]
|
||||||
|
types: [completed]
|
||||||
|
|
||||||
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
# Allow only one concurrent deployment, skipping runs queued between the run
|
||||||
|
# in-progress and latest queued. However, do NOT cancel in-progress runs as we
|
||||||
|
# want to allow these deployments to complete.
|
||||||
|
concurrency:
|
||||||
|
group: "pages"
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build content
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
outputs:
|
||||||
|
coverage-pr-run-ids: ${{ steps.build.outputs.coverage-pr-run-ids }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
- name: Build pages
|
||||||
|
id: build
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
run: |
|
||||||
|
bash -x ./ci/ci-pages.bash
|
||||||
|
ls -lsha
|
||||||
|
tree -L 3 pages
|
||||||
|
- name: Upload pages artifact
|
||||||
|
uses: actions/upload-pages-artifact@v4
|
||||||
|
with:
|
||||||
|
path: pages
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
name: Deploy
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
steps:
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
uses: actions/deploy-pages@v4
|
||||||
|
|
||||||
|
notify:
|
||||||
|
name: Notify
|
||||||
|
needs: [build, deploy]
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
if: ${{ github.repository == 'verilator/verilator' }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
# Use the Verilator CI app to post the comment
|
||||||
|
- name: Generate access token
|
||||||
|
id: generate-token
|
||||||
|
uses: actions/[email protected]
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.VERILATOR_CI_ID }}
|
||||||
|
private-key: ${{ secrets.VERILATOR_CI_KEY }}
|
||||||
|
permission-actions: write
|
||||||
|
permission-pull-requests: write
|
||||||
|
- name: Comment on PR
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||||
|
COVERAGE_PR_RUN_IDS: ${{ needs.build.outputs.coverage-pr-run-ids }}
|
||||||
|
run: bash -x ./ci/ci-pages-notify.bash
|
||||||
@@ -7,16 +7,32 @@ name: reusable-build
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
sha:
|
||||||
|
description: "Commit SHA to build"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
os: # e.g. ubuntu-24.04
|
os: # e.g. ubuntu-24.04
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
cc: # gcc or clang
|
cc: # 'clang' or 'gcc'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
os-name: # 'linux' or 'osx'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
dev-asan:
|
||||||
|
required: true
|
||||||
|
type: number
|
||||||
|
dev-gcov:
|
||||||
|
required: true
|
||||||
|
type: number
|
||||||
|
outputs:
|
||||||
|
archive:
|
||||||
|
description: "Name of the built repository archive artifact"
|
||||||
|
value: ${{ jobs.build.outputs.archive }}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CI_OS_NAME: linux
|
CI_OS_NAME: ${{ inputs.os-name }}
|
||||||
CI_COMMIT: ${{ github.sha }}
|
|
||||||
CCACHE_COMPRESS: 1
|
CCACHE_COMPRESS: 1
|
||||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||||
CCACHE_LIMIT_MULTIPLE: 0.95
|
CCACHE_LIMIT_MULTIPLE: 0.95
|
||||||
@@ -31,30 +47,33 @@ defaults:
|
|||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
name: Build
|
||||||
runs-on: ${{ inputs.os }}
|
runs-on: ${{ inputs.os }}
|
||||||
name: Sub-build | ${{ inputs.os }} | ${{ inputs.cc }}
|
outputs:
|
||||||
|
archive: ${{ steps.create-archive.outputs.archive }}
|
||||||
env:
|
env:
|
||||||
CI_BUILD_STAGE_NAME: build
|
CI_BUILD_STAGE_NAME: build
|
||||||
|
CI_DEV_ASAN: ${{ inputs.dev-asan }}
|
||||||
|
CI_DEV_GCOV: ${{ inputs.dev-gcov }}
|
||||||
CI_RUNS_ON: ${{ inputs.os }}
|
CI_RUNS_ON: ${{ inputs.os }}
|
||||||
CC: ${{ inputs.cc }}
|
|
||||||
CXX: ${{ inputs.cc == 'clang' && 'clang++' || 'g++' }}
|
CXX: ${{ inputs.cc == 'clang' && 'clang++' || 'g++' }}
|
||||||
CACHE_BASE_KEY: build-${{ inputs.os }}-${{ inputs.cc }}
|
CACHE_BASE_KEY: build-${{ inputs.os }}-${{ inputs.cc }}
|
||||||
CCACHE_MAXSIZE: 1000M # Per build matrix entry (* 5 = 5000M in total)
|
CCACHE_MAXSIZE: 1000M # Per build matrix entry (* 5 = 5000M in total)
|
||||||
VERILATOR_ARCHIVE: verilator-${{ github.sha }}-${{ inputs.os }}-${{ inputs.cc }}.tar.gz
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
path: repo
|
path: repo
|
||||||
|
ref: ${{ inputs.sha }}
|
||||||
|
fetch-depth: ${{ inputs.dev-gcov && '0' || '1' }} # Coverage flow needs full history
|
||||||
|
|
||||||
- name: Cache $CCACHE_DIR
|
- name: Cache $CCACHE_DIR
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
env:
|
env:
|
||||||
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache
|
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache
|
||||||
with:
|
with:
|
||||||
path: ${{ env.CCACHE_DIR }}
|
path: ${{ env.CCACHE_DIR }}
|
||||||
key: ${{ env.CACHE_KEY }}-${{ github.sha }}
|
key: ${{ env.CACHE_KEY }}-${{ inputs.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ env.CACHE_KEY }}-
|
${{ env.CACHE_KEY }}-
|
||||||
|
|
||||||
@@ -64,12 +83,17 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: ./ci/ci-script.bash
|
run: ./ci/ci-script.bash
|
||||||
|
|
||||||
- name: Tar up repository
|
- name: Create repository archive
|
||||||
|
id: create-archive
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: tar --posix -c -z -f ${{ env.VERILATOR_ARCHIVE }} repo
|
run: |
|
||||||
|
# Name of the archive must be unique based on the build parameters
|
||||||
|
ARCHIVE=verilator-${{ inputs.sha }}-${{ inputs.os }}-${{ inputs.cc }}-${{ inputs.dev-asan }}-${{ inputs.dev-gcov }}.tar.gz
|
||||||
|
tar --posix -c -z -f $ARCHIVE repo
|
||||||
|
echo "archive=$ARCHIVE" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Upload tar archive
|
- name: Upload repository archive
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/${{ env.VERILATOR_ARCHIVE }}
|
path: ${{ github.workspace }}/${{ steps.create-archive.outputs.archive }}
|
||||||
name: ${{ env.VERILATOR_ARCHIVE }}
|
name: ${{ steps.create-archive.outputs.archive }}
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
---
|
||||||
|
# DESCRIPTION: Github actions config
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
name: reusable-lint-py
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
env:
|
||||||
|
CI_OS_NAME: linux
|
||||||
|
CI_BUILD_STAGE_NAME: build
|
||||||
|
CI_RUNS_ON: ubuntu-22.04
|
||||||
|
CCACHE_COMPRESS: 1
|
||||||
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||||
|
CCACHE_LIMIT_MULTIPLE: 0.95
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
working-directory: repo
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
lint-py:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
name: Sub-lint | Python
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
path: repo
|
||||||
|
|
||||||
|
- name: Install packages for build
|
||||||
|
run: ./ci/ci-install.bash
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
|
run: |
|
||||||
|
autoconf
|
||||||
|
./configure --enable-longtests --enable-ccwarn
|
||||||
|
|
||||||
|
- name: Install python dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt install python3-clang
|
||||||
|
make venv
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: |-
|
||||||
|
source .venv/bin/activate
|
||||||
|
make -k lint-py
|
||||||
@@ -31,18 +31,21 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
echo "path-exclude /usr/share/doc/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
|
||||||
|
echo "path-exclude /usr/share/man/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
|
||||||
|
echo "path-exclude /usr/share/info/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install ccache mold help2man libfl-dev libgoogle-perftools-dev libsystemc-dev
|
sudo apt install ccache mold help2man libfl-dev libgoogle-perftools-dev libsystemc-dev
|
||||||
|
|
||||||
- name: Use saved ccache
|
- name: Use saved ccache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: ccache
|
path: ccache
|
||||||
key: rtlmeter-build-ccache-${{ inputs.runs-on }}-${{ inputs.cc }}-${{ github.run_id }}-${{ github.run_attempt }}
|
key: rtlmeter-build-ccache-${{ inputs.runs-on }}-${{ inputs.cc }}-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
restore-keys: rtlmeter-build-ccache-${{ inputs.runs-on }}-${{ inputs.cc }}
|
restore-keys: rtlmeter-build-ccache-${{ inputs.runs-on }}-${{ inputs.cc }}
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
path: repo
|
path: repo
|
||||||
fetch-depth: 0 # Required for 'git describe' used for 'verilator --version'
|
fetch-depth: 0 # Required for 'git describe' used for 'verilator --version'
|
||||||
@@ -65,7 +68,7 @@ jobs:
|
|||||||
run: tar --posix -c -z -f verilator-rtlmeter.tar.gz install
|
run: tar --posix -c -z -f verilator-rtlmeter.tar.gz install
|
||||||
|
|
||||||
- name: Upload Verilator installation archive
|
- name: Upload Verilator installation archive
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
path: verilator-rtlmeter.tar.gz
|
path: verilator-rtlmeter.tar.gz
|
||||||
name: verilator-rtlmeter-${{ inputs.runs-on }}-${{ inputs.cc }}
|
name: verilator-rtlmeter-${{ inputs.runs-on }}-${{ inputs.cc }}
|
||||||
|
|||||||
@@ -55,11 +55,14 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
echo "path-exclude /usr/share/doc/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
|
||||||
|
echo "path-exclude /usr/share/man/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
|
||||||
|
echo "path-exclude /usr/share/info/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install ccache mold libfl-dev libgoogle-perftools-dev libsystemc-dev
|
sudo apt install ccache mold libfl-dev libgoogle-perftools-dev libsystemc-dev
|
||||||
|
|
||||||
- name: Download Verilator installation archive
|
- name: Download Verilator installation archive
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: verilator-rtlmeter-${{ inputs.runs-on }}-${{ inputs.cc }}
|
name: verilator-rtlmeter-${{ inputs.runs-on }}-${{ inputs.cc }}
|
||||||
|
|
||||||
@@ -70,14 +73,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Use saved ccache
|
- name: Use saved ccache
|
||||||
if: ${{ env.CCACHE_DISABLE == 0 }}
|
if: ${{ env.CCACHE_DISABLE == 0 }}
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: ${{ env.CCACHE_DIR }}
|
path: ${{ env.CCACHE_DIR }}
|
||||||
key: rtlmeter-run-ccache-${{ inputs.runs-on }}-${{ inputs.cc }}-${{ inputs.cases }}-${{ inputs.compileArgs }}-${{ github.run_id }}-${{ github.run_attempt }}
|
key: rtlmeter-run-ccache-${{ inputs.runs-on }}-${{ inputs.cc }}-${{ inputs.cases }}-${{ inputs.compileArgs }}-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
restore-keys: rtlmeter-run-ccache-${{ inputs.runs-on }}-${{ inputs.cc }}-${{ inputs.cases }}-${{ inputs.compileArgs }}
|
restore-keys: rtlmeter-run-ccache-${{ inputs.runs-on }}-${{ inputs.cc }}-${{ inputs.cases }}-${{ inputs.compileArgs }}
|
||||||
|
|
||||||
- name: Checkout RTLMeter
|
- name: Checkout RTLMeter
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
repository: "verilator/rtlmeter"
|
repository: "verilator/rtlmeter"
|
||||||
path: rtlmeter
|
path: rtlmeter
|
||||||
@@ -89,15 +92,13 @@ jobs:
|
|||||||
- name: Compile cases
|
- name: Compile cases
|
||||||
working-directory: rtlmeter
|
working-directory: rtlmeter
|
||||||
run: |
|
run: |
|
||||||
./rtlmeter run --verbose --cases='${{ inputs.cases }}' --compileArgs='${{ inputs.compileArgs }}' --executeArgs='${{ inputs.executeArgs }}' --nExecute=0
|
./rtlmeter run --timeout 60 --verbose --cases='${{inputs.cases}}' --compileArgs='${{inputs.compileArgs}}' --executeArgs='${{inputs.executeArgs}}' --nExecute=0
|
||||||
# My YAML highlighter sucks, so I put this comment here wiht a phony closing quote mark to make it work: '
|
|
||||||
|
|
||||||
- name: Execute cases
|
- name: Execute cases
|
||||||
working-directory: rtlmeter
|
working-directory: rtlmeter
|
||||||
continue-on-error: true # Do not fail on error, so we can at leat save the successful results
|
continue-on-error: true # Do not fail on error, so we can at least save the successful results
|
||||||
run: |
|
run: |
|
||||||
./rtlmeter run --verbose --cases='${{ inputs.cases }}' --compileArgs='${{ inputs.compileArgs }}' --executeArgs='${{ inputs.executeArgs }}'
|
./rtlmeter run --timeout 60 --verbose --cases='${{inputs.cases}}' --compileArgs='${{inputs.compileArgs}}' --executeArgs='${{inputs.executeArgs}}'
|
||||||
# My YAML highlighter sucks, so I put this comment here wiht a phony closing quote mark to make it work: '
|
|
||||||
|
|
||||||
- name: Collate results
|
- name: Collate results
|
||||||
id: results
|
id: results
|
||||||
@@ -114,15 +115,14 @@ jobs:
|
|||||||
./rtlmeter report --steps '*' --metrics '*' ../results-${{ steps.results.outputs.hash }}.json
|
./rtlmeter report --steps '*' --metrics '*' ../results-${{ steps.results.outputs.hash }}.json
|
||||||
|
|
||||||
- name: Upload results
|
- name: Upload results
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
path: results-${{ steps.results.outputs.hash }}.json
|
path: results-${{ steps.results.outputs.hash }}.json
|
||||||
name: rtlmeter-results-${{ inputs.tag }}-${{ steps.results.outputs.hash }}
|
name: rtlmeter-${{ inputs.tag }}-results-${{ steps.results.outputs.hash }}
|
||||||
overwrite: true
|
overwrite: true
|
||||||
retention-days: 2
|
retention-days: 2
|
||||||
|
|
||||||
- name: Report status
|
- name: Report status
|
||||||
working-directory: rtlmeter
|
working-directory: rtlmeter
|
||||||
run: | # This will fail the job if any of the runs failed
|
run: |- # This will fail the job if any of the runs failed
|
||||||
./rtlmeter run --verbose --cases='${{ inputs.cases }}' --compileArgs='${{ inputs.compileArgs }}' --executeArgs='${{ inputs.executeArgs }}'
|
./rtlmeter run --verbose --cases='${{inputs.cases}}' --compileArgs='${{inputs.compileArgs}}' --executeArgs='${{inputs.executeArgs}}'
|
||||||
# My YAML highlighter sucks, so I put this comment here wiht a phony closing quote mark to make it work: '
|
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ name: reusable-test
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
archive:
|
||||||
|
description: "Name of the repository archive artifact from reusable-build"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
os: # e.g. ubuntu-24.04
|
os: # e.g. ubuntu-24.04
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
@@ -19,10 +23,12 @@ on:
|
|||||||
suite: # e.g. dist-vlt-0
|
suite: # e.g. dist-vlt-0
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
dev-gcov:
|
||||||
|
required: true
|
||||||
|
type: number
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CI_OS_NAME: linux
|
CI_OS_NAME: linux
|
||||||
CI_COMMIT: ${{ github.sha }}
|
|
||||||
CCACHE_COMPRESS: 1
|
CCACHE_COMPRESS: 1
|
||||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||||
CCACHE_LIMIT_MULTIPLE: 0.95
|
CCACHE_LIMIT_MULTIPLE: 0.95
|
||||||
@@ -38,30 +44,30 @@ jobs:
|
|||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ${{ inputs.os }}
|
runs-on: ${{ inputs.os }}
|
||||||
name: Sub-test | ${{ inputs.os }} | ${{ inputs.cc }} | ${{inputs.reloc && 'reloc | ' || '' }} ${{ inputs.suite }}
|
name: Test
|
||||||
env:
|
env:
|
||||||
CI_BUILD_STAGE_NAME: test
|
CI_BUILD_STAGE_NAME: test
|
||||||
CI_RUNS_ON: ${{ inputs.os }}
|
CI_RUNS_ON: ${{ inputs.os }}
|
||||||
CI_RELOC: ${{inputs.reloc }}
|
CI_RELOC: ${{inputs.reloc }}
|
||||||
CC: ${{ inputs.cc }}
|
|
||||||
CXX: ${{ inputs.cc == 'clang' && 'clang++' || 'g++' }}
|
CXX: ${{ inputs.cc == 'clang' && 'clang++' || 'g++' }}
|
||||||
CACHE_BASE_KEY: test-${{ inputs.os }}-${{ inputs.cc }}-${{inputs.reloc }}-${{ inputs.suite }}
|
CACHE_BASE_KEY: test-${{ inputs.os }}-${{ inputs.cc }}-${{inputs.reloc }}-${{ inputs.suite }}
|
||||||
CCACHE_MAXSIZE: 100M # Per build per suite (* 5 * 5 = 2500M in total)
|
CCACHE_MAXSIZE: 100M # Per build per suite (* 5 * 5 = 2500M in total)
|
||||||
VERILATOR_ARCHIVE: verilator-${{ github.sha }}-${{ inputs.os }}-${{ inputs.cc }}.tar.gz
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Download tar archive
|
- name: Download repository archive
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: ${{ env.VERILATOR_ARCHIVE }}
|
name: ${{ inputs.archive }}
|
||||||
path: ${{ github.workspace }}
|
path: ${{ github.workspace }}
|
||||||
|
|
||||||
- name: Unpack tar archive
|
- name: Unpack repository archive
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: tar -x -z -f ${{ env.VERILATOR_ARCHIVE }}
|
run: |
|
||||||
|
tar -x -z -f ${{ inputs.archive }}
|
||||||
|
ls -lsha
|
||||||
|
|
||||||
- name: Cache $CCACHE_DIR
|
- name: Cache $CCACHE_DIR
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
env:
|
env:
|
||||||
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache2
|
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache2
|
||||||
with:
|
with:
|
||||||
@@ -71,9 +77,33 @@ jobs:
|
|||||||
${{ env.CACHE_KEY }}-
|
${{ env.CACHE_KEY }}-
|
||||||
|
|
||||||
- name: Install test dependencies
|
- name: Install test dependencies
|
||||||
run: ./ci/ci-install.bash
|
run: |
|
||||||
|
./ci/ci-install.bash
|
||||||
|
make venv
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
|
id: run-test
|
||||||
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
TESTS: ${{ inputs.suite }}
|
TESTS: ${{ inputs.suite }}
|
||||||
run: ./ci/ci-script.bash
|
run: |
|
||||||
|
source .venv/bin/activate
|
||||||
|
./ci/ci-script.bash
|
||||||
|
|
||||||
|
- name: Combine code coverage data
|
||||||
|
if: ${{ inputs.dev-gcov }}
|
||||||
|
run: |
|
||||||
|
make coverage-combine
|
||||||
|
mv obj_coverage/verilator.info obj_coverage/verilator-${{ inputs.suite }}.info
|
||||||
|
ls -lsha obj_coverage
|
||||||
|
|
||||||
|
- name: Upload code coverage data
|
||||||
|
if: ${{ inputs.dev-gcov }}
|
||||||
|
uses: actions/upload-artifact@v6
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/repo/obj_coverage/verilator-${{ inputs.suite }}.info
|
||||||
|
name: code-coverage-${{ inputs.suite }}
|
||||||
|
|
||||||
|
- name: Fail job if a test failed
|
||||||
|
if: ${{ steps.run-test.outcome == 'failure' && !cancelled() }}
|
||||||
|
run: exit 1
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
---
|
||||||
|
# DESCRIPTION: Github actions config
|
||||||
|
# This name is key to badges in README.rst, so we use the name build
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
name: RTLMeter PR results
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: [RTLMeter]
|
||||||
|
types: [completed]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
name: Publish
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
pull-requests: write
|
||||||
|
steps:
|
||||||
|
- name: Download report
|
||||||
|
uses: actions/download-artifact@v7
|
||||||
|
with:
|
||||||
|
name: rtlmeter-pr-results
|
||||||
|
run-id: ${{ github.event.workflow_run.id }}
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Download PR number
|
||||||
|
uses: actions/download-artifact@v7
|
||||||
|
with:
|
||||||
|
name: pr-number
|
||||||
|
run-id: ${{ github.event.workflow_run.id }}
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# Use the Verilator CI app to post the comment
|
||||||
|
- name: Generate access token
|
||||||
|
id: generate-token
|
||||||
|
uses: actions/[email protected]
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.VERILATOR_CI_ID }}
|
||||||
|
private-key: ${{ secrets.VERILATOR_CI_KEY }}
|
||||||
|
permission-pull-requests: write
|
||||||
|
- name: Comment on PR
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||||
|
run: |-
|
||||||
|
ls -la
|
||||||
|
cat report.txt
|
||||||
|
gh pr --repo ${{ github.repository }} comment $(cat pr-number.txt) --body-file report.txt
|
||||||
+165
-69
@@ -10,12 +10,7 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: '0 2 * * *' # Daily, starting at 02:00 UTC
|
- cron: '0 2 * * *' # Daily, starting at 02:00 UTC
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types: [opened, synchronize, reopened, labeled, unlabeled]
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- labeled
|
|
||||||
- unlabeled
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -25,7 +20,8 @@ defaults:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.ref }}
|
# At most 1 job per branch. Auto cancel all but scheduled jobs
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: ${{ github.event_name != 'schedule' }}
|
cancel-in-progress: ${{ github.event_name != 'schedule' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -78,6 +74,10 @@ jobs:
|
|||||||
max-parallel: ${{ github.event == 'schedule' && 2 || 7 }}
|
max-parallel: ${{ github.event == 'schedule' && 2 || 7 }}
|
||||||
matrix:
|
matrix:
|
||||||
cases:
|
cases:
|
||||||
|
- "BlackParrot:1x1:*"
|
||||||
|
- "BlackParrot:2x2:*"
|
||||||
|
- "BlackParrot:4x4:*"
|
||||||
|
- "Caliptra:default:*"
|
||||||
- "NVDLA:*"
|
- "NVDLA:*"
|
||||||
- "OpenPiton:1x1:*"
|
- "OpenPiton:1x1:*"
|
||||||
- "OpenPiton:2x2:*"
|
- "OpenPiton:2x2:*"
|
||||||
@@ -120,6 +120,10 @@ jobs:
|
|||||||
max-parallel: ${{ github.event == 'schedule' && 2 || 7 }}
|
max-parallel: ${{ github.event == 'schedule' && 2 || 7 }}
|
||||||
matrix:
|
matrix:
|
||||||
cases:
|
cases:
|
||||||
|
- "BlackParrot:1x1:*"
|
||||||
|
- "BlackParrot:2x2:*"
|
||||||
|
- "BlackParrot:4x4:*"
|
||||||
|
- "Caliptra:default:*"
|
||||||
- "NVDLA:*"
|
- "NVDLA:*"
|
||||||
- "OpenPiton:1x1:*"
|
- "OpenPiton:1x1:*"
|
||||||
- "OpenPiton:2x2:*"
|
- "OpenPiton:2x2:*"
|
||||||
@@ -145,9 +149,37 @@ jobs:
|
|||||||
- "XuanTie-C906:*"
|
- "XuanTie-C906:*"
|
||||||
- "XuanTie-C910:*"
|
- "XuanTie-C910:*"
|
||||||
|
|
||||||
|
run-gcc-hier:
|
||||||
|
name: Run GCC hier | ${{ matrix.cases }}
|
||||||
|
needs: build-gcc
|
||||||
|
uses: ./.github/workflows/reusable-rtlmeter-run.yml
|
||||||
|
with:
|
||||||
|
tag: gcc-hier
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
cc: gcc
|
||||||
|
cases: ${{ matrix.cases }}
|
||||||
|
run-name: "gcc --hierarchical"
|
||||||
|
compileArgs: "--hierarchical"
|
||||||
|
executeArgs: ""
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
max-parallel: ${{ github.event == 'schedule' && 2 || 7 }}
|
||||||
|
matrix:
|
||||||
|
cases:
|
||||||
|
- "BlackParrot:1x1:* !-hier"
|
||||||
|
- "BlackParrot:2x2:* !-hier"
|
||||||
|
- "BlackParrot:4x4:* !-hier"
|
||||||
|
- "NVDLA:* !-hier"
|
||||||
|
- "OpenPiton:1x1:* !-hier"
|
||||||
|
- "OpenPiton:2x2:* !-hier"
|
||||||
|
- "OpenPiton:4x4:* !-hier"
|
||||||
|
- "OpenPiton:8x8:* !-hier"
|
||||||
|
- "OpenPiton:16x16:dhry !-hier"
|
||||||
|
- "XuanTie-C910:* !-hier"
|
||||||
|
|
||||||
combine-results:
|
combine-results:
|
||||||
name: Combine results
|
name: Combine results
|
||||||
needs: [run-gcc, run-clang]
|
needs: [run-gcc, run-clang, run-gcc-hier]
|
||||||
# Run if any of the dependencies have run, even if failed.
|
# Run if any of the dependencies have run, even if failed.
|
||||||
# That is: do not run if all skipped, or the workflow was cancelled.
|
# That is: do not run if all skipped, or the workflow was cancelled.
|
||||||
if: ${{ (contains(needs.*.result, 'success') || contains(needs.*.result, 'failure')) && !cancelled() }}
|
if: ${{ (contains(needs.*.result, 'success') || contains(needs.*.result, 'failure')) && !cancelled() }}
|
||||||
@@ -155,12 +187,10 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
tag:
|
tag: [gcc, clang, gcc-hier]
|
||||||
- gcc
|
|
||||||
- clang
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout RTLMeter
|
- name: Checkout RTLMeter
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
repository: "verilator/rtlmeter"
|
repository: "verilator/rtlmeter"
|
||||||
path: rtlmeter
|
path: rtlmeter
|
||||||
@@ -168,9 +198,9 @@ jobs:
|
|||||||
working-directory: rtlmeter
|
working-directory: rtlmeter
|
||||||
run: make venv
|
run: make venv
|
||||||
- name: Download all results
|
- name: Download all results
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
pattern: rtlmeter-results-${{ matrix.tag }}-*
|
pattern: rtlmeter-${{ matrix.tag }}-results-*
|
||||||
path: all-results-${{ matrix.tag }}
|
path: all-results-${{ matrix.tag }}
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
- name: Combine results
|
- name: Combine results
|
||||||
@@ -178,7 +208,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
./rtlmeter collate ../all-results-${{ matrix.tag }}/*.json > ../all-results-${{ matrix.tag }}.json
|
./rtlmeter collate ../all-results-${{ matrix.tag }}/*.json > ../all-results-${{ matrix.tag }}.json
|
||||||
- name: Upload combined results
|
- name: Upload combined results
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
path: all-results-${{ matrix.tag }}.json
|
path: all-results-${{ matrix.tag }}.json
|
||||||
name: all-results-${{ matrix.tag }}
|
name: all-results-${{ matrix.tag }}
|
||||||
@@ -197,20 +227,20 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Download combined results
|
- name: Download combined results
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
pattern: all-results-*
|
pattern: all-results-*
|
||||||
path: results
|
path: results
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
- name: Upload published results
|
- name: Upload published results
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
path: results/*.json
|
path: results/*.json
|
||||||
name: published-results
|
name: published-results
|
||||||
# Pushing to verilator/verilator-rtlmeter-results requires elevated permissions
|
# Pushing to verilator/verilator-rtlmeter-results requires elevated permissions
|
||||||
- name: Generate access token
|
- name: Generate access token
|
||||||
id: generate-token
|
id: generate-token
|
||||||
uses: actions/create-github-app-token@v2.0.6
|
uses: actions/create-github-app-token@v2.2.1
|
||||||
with:
|
with:
|
||||||
app-id: ${{ vars.VERILATOR_CI_ID }}
|
app-id: ${{ vars.VERILATOR_CI_ID }}
|
||||||
private-key: ${{ secrets.VERILATOR_CI_KEY }}
|
private-key: ${{ secrets.VERILATOR_CI_KEY }}
|
||||||
@@ -218,7 +248,7 @@ jobs:
|
|||||||
repositories: verilator-rtlmeter-results
|
repositories: verilator-rtlmeter-results
|
||||||
permission-contents: write
|
permission-contents: write
|
||||||
- name: Checkout verilator-rtlmeter-results
|
- name: Checkout verilator-rtlmeter-results
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
repository: "verilator/verilator-rtlmeter-results"
|
repository: "verilator/verilator-rtlmeter-results"
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
@@ -242,55 +272,121 @@ jobs:
|
|||||||
git commit -m "Verilator CI: Results of 'RTLMeter' workflow run #${{ github.run_number }}"
|
git commit -m "Verilator CI: Results of 'RTLMeter' workflow run #${{ github.run_number }}"
|
||||||
git push origin
|
git push origin
|
||||||
|
|
||||||
#publish-pr-results:
|
prepare-pr-results:
|
||||||
# name: Publish results to Pull Request
|
name: Prepare Pull Request results
|
||||||
# needs: combine-results
|
needs: combine-results
|
||||||
# if: ${{ github.event_name == 'pull_request' && github.repository == 'verilator/verilator' && github.run_attempt == 1 && contains(needs.*.result, 'success') && !cancelled() }}
|
if: ${{ github.event_name == 'pull_request' && github.repository == 'verilator/verilator' && contains(needs.*.result, 'success') && !cancelled() }}
|
||||||
# runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
# steps:
|
permissions:
|
||||||
# - name: Checkout RTLMeter
|
actions: read
|
||||||
# uses: actions/checkout@v4
|
steps:
|
||||||
# with:
|
- name: Checkout RTLMeter
|
||||||
# repository: "verilator/rtlmeter"
|
uses: actions/checkout@v6
|
||||||
# path: rtlmeter
|
with:
|
||||||
# - name: Setup RTLMeter venv
|
repository: "verilator/rtlmeter"
|
||||||
# working-directory: rtlmeter
|
path: rtlmeter
|
||||||
# run: make venv
|
- name: Setup RTLMeter venv
|
||||||
# - name: Download combined results
|
working-directory: rtlmeter
|
||||||
# uses: actions/download-artifact@v4
|
run: make venv
|
||||||
# with:
|
- name: Download combined results
|
||||||
# pattern: all-results-*
|
uses: actions/download-artifact@v7
|
||||||
# path: all-results
|
with:
|
||||||
# merge-multiple: true
|
pattern: all-results-*
|
||||||
# - name: Get scheduled run info
|
path: all-results
|
||||||
# id: scheduled-info
|
merge-multiple: true
|
||||||
# run:
|
- name: Get scheduled run info
|
||||||
# IDLATEST=$(gh run list --workflow RTLMeter --event schedule --status success --limit 1 --json databaseId --jq ".[0].databaseId")
|
id: scheduled-info
|
||||||
# echo "id=$IDLATEST" >> $GITHUB_OUTPUT
|
env:
|
||||||
# URL=$(gh run view $IDLATEST --json url --jq ".url")
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# echo "url=$URL" >> $GITHUB_OUTPUT
|
run: |
|
||||||
# NUM=$(gh run view $IDLATEST --json number --jq ".number")
|
ID=$(gh run --repo ${{ github.repository }} list --workflow RTLMeter --event schedule --status success --limit 1 --json databaseId --jq ".[0].databaseId")
|
||||||
# echo "num=$NUM" >> $GITHUB_OUTPUT
|
echo "id=$ID" >> $GITHUB_OUTPUT
|
||||||
# # Fetching artifacts from different workflow requires elevated privilege
|
URL=$(gh run --repo ${{ github.repository }} view $ID --json url --jq ".url")
|
||||||
# - name: Generate access token
|
echo "url=$URL" >> $GITHUB_OUTPUT
|
||||||
# id: generate-token
|
NUM=$(gh run --repo ${{ github.repository }} view $ID --json number --jq ".number")
|
||||||
# uses: actions/[email protected]
|
echo "num=$NUM" >> $GITHUB_OUTPUT
|
||||||
# with:
|
DATE=$(gh run --repo ${{ github.repository }} view $ID --json createdAt --jq ".createdAt")
|
||||||
# app-id: ${{ vars.VERILATOR_CI_ID }}
|
echo "date=$DATE" >> $GITHUB_OUTPUT
|
||||||
# private-key: ${{ secrets.VERILATOR_CI_KEY }}
|
- name: Download scheduled run results
|
||||||
# owner: verilator
|
uses: actions/download-artifact@v7
|
||||||
# repositories: verilator
|
with:
|
||||||
# permission-actions: read
|
name: published-results
|
||||||
# - name: Download scheduled run results
|
path: nightly-results
|
||||||
# uses: actions/download-artifact@v4
|
run-id: ${{ steps.scheduled-info.outputs.id }}
|
||||||
# with:
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# name: published-results
|
- name: Compare results
|
||||||
# path: nightly-results
|
working-directory: rtlmeter
|
||||||
# run-id: ${{ steps.schedueld-info.outputs.id }}
|
run: |
|
||||||
# github-token: ${{ steps.generate-token.outputs.token }}
|
for tag in gcc clang gcc-hier; do
|
||||||
# # TODO: diff and present
|
ADATA=../nightly-results/all-results-${tag}.json
|
||||||
|
BDATA=../all-results/all-results-${tag}.json
|
||||||
|
touch ../verilate-${tag}.txt
|
||||||
|
touch ../execute-${tag}.txt
|
||||||
|
touch ../cppbuild-${tag}.txt
|
||||||
|
if [[ ! -e $ADATA ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
./rtlmeter compare --cases '* !Example:* !*:hello' --steps "verilate" --metrics "elapsed memory" $ADATA $BDATA > ../verilate-${tag}.txt
|
||||||
|
cat ../verilate-${tag}.txt
|
||||||
|
./rtlmeter compare --cases '* !Example:* !*:hello' --steps "execute" --metrics "speed memory elapsed" $ADATA $BDATA > ../execute-${tag}.txt
|
||||||
|
cat ../execute-${tag}.txt
|
||||||
|
./rtlmeter compare --cases '* !Example:* !*:hello' --steps "cppbuild" --metrics "elapsed memory cpu codeSize" $ADATA $BDATA > ../cppbuild-${tag}.txt
|
||||||
|
cat ../cppbuild-${tag}.txt
|
||||||
|
done
|
||||||
|
- name: Create report
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
NUM=$(gh run --repo ${{ github.repository }} view ${{ github.run_id }} --json number --jq ".number")
|
||||||
|
URL=$(gh run --repo ${{ github.repository }} view ${{ github.run_id }} --json url --jq ".url")
|
||||||
|
echo -n "Performance metrics for PR workflow [#$NUM]($URL) (B) compared to scheduled run" > report.txt
|
||||||
|
echo -n " [#${{ steps.scheduled-info.outputs.num }}](${{ steps.scheduled-info.outputs.url }}) (A)" >> report.txt
|
||||||
|
echo " from ${{ steps.scheduled-info.outputs.date }}" >> report.txt
|
||||||
|
for tag in gcc clang gcc-hier; do
|
||||||
|
echo "" >> report.txt
|
||||||
|
if [[ $tag == "gcc" ]]; then
|
||||||
|
echo "<details open>" >> report.txt
|
||||||
|
else
|
||||||
|
echo "<details>" >> report.txt
|
||||||
|
fi
|
||||||
|
echo -n "<summary><strong><em>" >> report.txt
|
||||||
|
jq -rj ".[0].runName" all-results/all-results-${tag}.json >> report.txt
|
||||||
|
echo "</em></strong></summary>" >> report.txt
|
||||||
|
awk -v RS= -v tag=${tag} '{print > sprintf("frag-%02d-verilate-%s.txt",NR,tag)}' verilate-${tag}.txt
|
||||||
|
awk -v RS= -v tag=${tag} '{print > sprintf("frag-%02d-execute-%s.txt" ,NR,tag)}' execute-${tag}.txt
|
||||||
|
awk -v RS= -v tag=${tag} '{print > sprintf("frag-$02d-cppbuild-%s.txt",NR,tag)}' cppbuild-${tag}.txt
|
||||||
|
for f in $(ls -1 frag-*-verilate-${tag}.txt | sort) $(ls -1 frag-*-execute-${tag}.txt | sort) $(ls -1 frag-*-cppbuild-${tag}.txt | sort); do
|
||||||
|
if [[ $f == frag-01-verilate-${tag}.txt || $f == frag-01-execute-${tag}.txt ]]; then
|
||||||
|
echo "<details open>" >> report.txt
|
||||||
|
else
|
||||||
|
echo "<details>" >> report.txt
|
||||||
|
fi
|
||||||
|
echo -n "<summary>" >> report.txt
|
||||||
|
head -n 1 $f | tr -d '\n' >> report.txt
|
||||||
|
echo "</summary>" >> report.txt
|
||||||
|
echo '<pre>' >> report.txt
|
||||||
|
tail -n +2 $f >> report.txt
|
||||||
|
echo '</pre>' >> report.txt
|
||||||
|
echo "</details>" >> report.txt
|
||||||
|
done
|
||||||
|
echo "</details>" >> report.txt
|
||||||
|
done
|
||||||
|
cat report.txt
|
||||||
|
- name: Upload report
|
||||||
|
uses: actions/upload-artifact@v6
|
||||||
|
with:
|
||||||
|
path: report.txt
|
||||||
|
name: rtlmeter-pr-results
|
||||||
|
- name: Save PR number
|
||||||
|
run: echo ${{ github.event.number }} > pr-number.txt
|
||||||
|
- name: Upload PR number
|
||||||
|
uses: actions/upload-artifact@v6
|
||||||
|
with:
|
||||||
|
path: pr-number.txt
|
||||||
|
name: pr-number
|
||||||
|
|
||||||
# Create GitHub issue for failed schedueld jobs
|
# Create GitHub issue for failed scheduled jobs
|
||||||
# This should always be the last job (we want an issue if anything breaks)
|
# This should always be the last job (we want an issue if anything breaks)
|
||||||
create-issue:
|
create-issue:
|
||||||
name: Create issue on failure
|
name: Create issue on failure
|
||||||
@@ -301,7 +397,7 @@ jobs:
|
|||||||
# Creating issues requires elevated privilege
|
# Creating issues requires elevated privilege
|
||||||
- name: Generate access token
|
- name: Generate access token
|
||||||
id: generate-token
|
id: generate-token
|
||||||
uses: actions/create-github-app-token@v2.0.6
|
uses: actions/create-github-app-token@v2.2.1
|
||||||
with:
|
with:
|
||||||
app-id: ${{ vars.VERILATOR_CI_ID }}
|
app-id: ${{ vars.VERILATOR_CI_ID }}
|
||||||
private-key: ${{ secrets.VERILATOR_CI_KEY }}
|
private-key: ${{ secrets.VERILATOR_CI_KEY }}
|
||||||
@@ -311,7 +407,7 @@ jobs:
|
|||||||
- name: Create issue
|
- name: Create issue
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
|
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||||
run: |
|
run: |-
|
||||||
echo "This issue was created automatically by the GitHub Actions CI due to the failure of a scheduled RTLMeter run." >> body.txt
|
echo "This issue was created automatically by the GitHub Actions CI due to the failure of a scheduled RTLMeter run." >> body.txt
|
||||||
echo "" >> body.txt
|
echo "" >> body.txt
|
||||||
echo "Workflow status: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> body.txt
|
echo "Workflow status: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> body.txt
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
*.pdf
|
*.pdf
|
||||||
/Makefile
|
/Makefile
|
||||||
/.ccache
|
/.ccache
|
||||||
|
/.venv/
|
||||||
/artifact/
|
/artifact/
|
||||||
README
|
README
|
||||||
TAGS
|
TAGS
|
||||||
@@ -44,6 +45,7 @@ verilator_coverage_bin*
|
|||||||
/.vscode/
|
/.vscode/
|
||||||
/.idea/
|
/.idea/
|
||||||
/cmake-build-*/
|
/cmake-build-*/
|
||||||
|
/obj_coverage/
|
||||||
/test_regress/snapshot/
|
/test_regress/snapshot/
|
||||||
xmverilog.*
|
xmverilog.*
|
||||||
xrun.history
|
xrun.history
|
||||||
|
|||||||
+5
-4
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
# See https://citation-file-format.github.io/
|
# See https://citation-file-format.github.io/
|
||||||
cff-version: 1.2.0
|
cff-version: 1.2.0
|
||||||
title: Verilator
|
title: Verilator
|
||||||
@@ -14,14 +15,14 @@ authors:
|
|||||||
family-names: Wasson
|
family-names: Wasson
|
||||||
- given-names: Duane
|
- given-names: Duane
|
||||||
family-names: Galbi
|
family-names: Galbi
|
||||||
|
- given-names: Geza
|
||||||
|
family-names: Lore
|
||||||
- name: 'et al'
|
- name: 'et al'
|
||||||
repository-code: 'https://github.com/verilator/verilator'
|
repository-code: 'https://github.com/verilator/verilator'
|
||||||
url: 'https://verilator.org'
|
url: 'https://verilator.org'
|
||||||
abstract: >-
|
abstract: >-
|
||||||
The Verilator package converts Verilog and SystemVerilog hardware
|
The Verilator package converts Verilog and SystemVerilog hardware
|
||||||
description language (HDL) designs into a fast C++ or SystemC model
|
description language (HDL) designs into a fast C++ or SystemC model
|
||||||
that, after compiling, can be executed. Verilator is not a
|
that, after compiling, can be executed. Verilator is not only a
|
||||||
traditional simulator but a compiler.
|
traditional simulator but a compiler.
|
||||||
license:
|
license: [LGPL-3.0-only, Artistic-2.0]
|
||||||
- LGPL-3.0-only
|
|
||||||
- Artistic-2.0
|
|
||||||
|
|||||||
+8
-3
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
#
|
#
|
||||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
# Copyright 2003-2026 by Wilson Snyder. This program is free software; you
|
||||||
# can redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
@@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.15)
|
|||||||
cmake_policy(SET CMP0091 NEW) # Use MSVC_RUNTIME_LIBRARY to select the runtime
|
cmake_policy(SET CMP0091 NEW) # Use MSVC_RUNTIME_LIBRARY to select the runtime
|
||||||
project(
|
project(
|
||||||
Verilator
|
Verilator
|
||||||
VERSION 5.040
|
VERSION 5.044
|
||||||
HOMEPAGE_URL https://verilator.org
|
HOMEPAGE_URL https://verilator.org
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
@@ -49,8 +49,13 @@ if(WIN32)
|
|||||||
if(DEFINED ENV{WIN_FLEX_BISON})
|
if(DEFINED ENV{WIN_FLEX_BISON})
|
||||||
set(WIN_FLEX_BISON "$ENV{WIN_FLEX_BISON}")
|
set(WIN_FLEX_BISON "$ENV{WIN_FLEX_BISON}")
|
||||||
endif()
|
endif()
|
||||||
if(EXISTS ${WIN_FLEX_BISON})
|
if(IS_DIRECTORY ${WIN_FLEX_BISON})
|
||||||
list(APPEND CMAKE_PREFIX_PATH ${WIN_FLEX_BISON})
|
list(APPEND CMAKE_PREFIX_PATH ${WIN_FLEX_BISON})
|
||||||
|
else()
|
||||||
|
message(
|
||||||
|
FATAL_ERROR
|
||||||
|
"The path specified by WIN_FLEX_BISON environment variable is not an existing folder: ${WIN_FLEX_BISON}"
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
if(NOT WIN_FLEX_BISON)
|
if(NOT WIN_FLEX_BISON)
|
||||||
message(
|
message(
|
||||||
|
|||||||
@@ -8,6 +8,256 @@ The changes in each Verilator version are described below. The
|
|||||||
contributors that suggested or implemented a given issue are shown in []. Thanks!
|
contributors that suggested or implemented a given issue are shown in []. Thanks!
|
||||||
|
|
||||||
|
|
||||||
|
Verilator 5.044 2026-01-01
|
||||||
|
==========================
|
||||||
|
|
||||||
|
**Important:**
|
||||||
|
|
||||||
|
* This is the last release supporting the deprecated `--xml-only` and
|
||||||
|
`--make cmake` options.
|
||||||
|
* Change `--lint-only` and `--json-only` to imply `--timing` (#6790).
|
||||||
|
|
||||||
|
**Other:**
|
||||||
|
|
||||||
|
* Add `--unroll-limit` option (#6654) (#6668). [Geza Lore, Fractile Ltd.]
|
||||||
|
* Add `-fno-inline-funcs-eager` option to disable excessive inlining (#6682). [Geza Lore, Fractile Ltd.]
|
||||||
|
* Add `-param`/`-port` options to `public_flat*` control directives (#6685). [Geza Lore, Fractile Ltd.]
|
||||||
|
* Add `--top` specifying `config` name (#6710). [Dan Ruelas-Petrisko]
|
||||||
|
* Add `sc_biguint` pragma (#6712). [Jakub Wasilewski, Antmicro Ltd.]
|
||||||
|
* Add `make venv` target (#6775). [Geza Lore]
|
||||||
|
* Add SUPERNFIRST error on super.new on non-first statement (#6784). [Artur Bieniek]
|
||||||
|
* Add fargs for reusability of `--dump-inputs` output (#6812). [Geza Lore]
|
||||||
|
* Add `--quiet-build` to suppress make/compiler informationals.
|
||||||
|
* Support `std::randomize(){...}` (#4706) (#6573). [Yilou Wang]
|
||||||
|
* Support force assignments to unpacked array elements (partial #4735) (#6787). [Ryszard Rozak, Antmicro Ltd.]
|
||||||
|
* Support `config' (#5891) (#6714) (#6717) (#6745) (#6764). [Dan Ruelas-Petrisko]
|
||||||
|
* Support unpacked struct in localparam (#6053 partial) (#6708). [Jonathan Drolet]
|
||||||
|
* Support `randsequence` (#6131).
|
||||||
|
* Support array reference arguments into 'std::randomize()' (#6384) (#6719). [Yilou Wang]
|
||||||
|
* Support basic global constraints (#6551) (#6552). [Yilou Wang]
|
||||||
|
* Support SystemC time resolution with step 10/100 (#6633) (#6715). [Aliaksei Chapyzhenka]
|
||||||
|
* Support `this.randomize()` with constraints (#6634). [Artur Bieniek, Antmicro Ltd.]
|
||||||
|
* Support multi-expression sequences (#6639). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||||
|
* Support `#1step` delay as statement (#6671). [Pawel Kojma, Antmicro Ltd.]
|
||||||
|
* Support clocking output delay `1step` (#6681). [Ondrej Ille]
|
||||||
|
* Support parsing of dotted `bins_expression` (#6683). [Pawel Kojma, Antmicro Ltd.]
|
||||||
|
* Support constant expression cycle delays in sequences (#6691). [Ryszard Rozak, Antmicro Ltd.]
|
||||||
|
* Support general global constraints (#6709) (#6711). [Yilou Wang]
|
||||||
|
* Support complex std::randomize patterns (#6736) (#6737). [Yilou Wang]
|
||||||
|
* Support `rand_mode` in global constraint gathering (#6740) (#6752). [Yilou Wang]
|
||||||
|
* Support reduction or in constraints (#6840). [Pawel Kojma, Antmicro Ltd.]
|
||||||
|
* Support vpiSigned (#6868) (#6870). [Kaleb Barrett]
|
||||||
|
* Optimize away calls to empty functions (#6626). [Geza Lore]
|
||||||
|
* Optimize redundant headers in Syms implementation files. [Geza Lore, Fractile Ltd.]
|
||||||
|
* Optimize constructor/destructor VerilatedModules (#6660). [Geza Lore, Fractile Ltd.]
|
||||||
|
* Optimize repeated function call during symbol table initialization (#6665). [Geza Lore, Fractile Ltd.]
|
||||||
|
* Optimize functions reading external parameters as pure (#6684). [Geza Lore, Fractile Ltd.]
|
||||||
|
* Optimize `$past` delayed variable reuse (#6689). [Geza Lore, Fractile Ltd.]
|
||||||
|
* Optimize combinational loops through sign extension (#6724). [Geza Lore]
|
||||||
|
* Optimize trace initialization code size (#6749). [Geza Lore]
|
||||||
|
* Optimize combinational cycles in DFG (#6744) (#6746) (#6744). [Geza Lore]
|
||||||
|
* Optimize inlining small C functions and add `-inline-cfuncs` (#6815). [Jose Drowne]
|
||||||
|
* Fix generate function(s) inside of generate blocks (#1011) (#6789). [em2machine]
|
||||||
|
* Fix typedef derived from type defined inside interface (#3441) (#6776). [em2machine]
|
||||||
|
* Fix warning lint directive ordering and consistency (#4185) (#5368) (#5610) (#6876).
|
||||||
|
* Fix extern function that returns parameterized class (#4924).
|
||||||
|
* Fix type deduction for variable parameterized classes (#6281) (#6813). [em2machine]
|
||||||
|
* Fix randomize called within func/task (#6144) (#6753). [Yilou Wang]
|
||||||
|
* Fix pre/post_randomize on extended classes (#6467). [Alex Solomatnikov]
|
||||||
|
* Fix expression short circuiting (#6483). [Todd Strader]
|
||||||
|
* Fix resized lvalues with warning suppressed (#6497) (#6816). [Alex Solomatnikov]
|
||||||
|
* Fix unsupported `if` virtual interface warning (#6558) (#6861). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||||
|
* Fix expression coverage of system calls (#6592). [Todd Strader]
|
||||||
|
* Fix `--timing` with `--x-initial-edge` (#6603) (#6631). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||||
|
* Fix merging of impure assignments in gate optimization (#6629) (#6630). [Geza Lore]
|
||||||
|
* Fix determining Verilator revision when within git submodules without tags.
|
||||||
|
* Fix initial random values for verilator-created variables (#6611). [Todd Strader]
|
||||||
|
* Fix parsing of `with` clause inside covergroups (#6618). [Pawel Kojma, Antmicro Ltd.]
|
||||||
|
* Fix slice memory overflow on large output arrays (#6636) (#6638). [Jens Yuechao Liu]
|
||||||
|
* Fix localparam type assignment from interface type parameters (#6637) (#6732). [em2machine]
|
||||||
|
* Fix memory usage statistics on MacOS (#6644). [Geza Lore, Fractile Ltd.]
|
||||||
|
* Fix command line statistics with --stats (#6645) (#6646). [Geza Lore, Fractile Ltd.]
|
||||||
|
* Fix slow compilation of generated sampled value code (#6652). [Geza Lore, Fractile Ltd.]
|
||||||
|
* Fix non-deterministic output when splitting Syms file. [Geza Lore, Fractile Ltd.]
|
||||||
|
* Fix crash on DFG driver lookup (#6649). [Geza Lore]
|
||||||
|
* Fix ccache-report with PCH files. [Geza Lore, Fractile Ltd.]
|
||||||
|
* Fix parameterized class function (#6659) (#6802). [em2machine]
|
||||||
|
* Fix local interface parameter hierarchical access (#6661) (#6666). [Paul Swirhun]
|
||||||
|
* Fix splitting of Syms constructor/destructor bodies (#6662). [Geza Lore, Fractile Ltd.]
|
||||||
|
* Fix long C++ compilation due to VerilatedScope constructors (#6664). [Geza Lore, Fractile Ltd.]
|
||||||
|
* Fix large array initialization (#6669). [Artur Bieniek, Antmicro Ltd.]
|
||||||
|
* Fix `--expand-limit` not respected for expressions (#6670). [Geza Lore, Fractile Ltd.]
|
||||||
|
* Fix `free` name collision (#6675). [Todd Strader]
|
||||||
|
* Fix bounds checking in non-inlined function (#6677). [Geza Lore, Fractile Ltd.]
|
||||||
|
* Fix stream operator widening (#6693) (#6697). [Jean-Nicolas Strauss]
|
||||||
|
* Fix multitop cross references (#6699).
|
||||||
|
* Fix DFG independent bits analysis performance (#6713) (#6743). [Geza Lore]
|
||||||
|
* Fix deleting linked node error in V3Randomize (#6718). [Igor Zaworski, Antmicro Ltd.]
|
||||||
|
* Fix runtime worker thread stack sizes on MacOS (#6721). [Geza Lore]
|
||||||
|
* Fix X handling in UDPs (#6722) (#6723). [Michael Bikovitsky]
|
||||||
|
* Fix `--prof-exec` using `--lib-create`. [Geza Lore]
|
||||||
|
* Fix fork scheduling semantics (#6730). [Artur Bieniek, Antmicro Ltd.]
|
||||||
|
* Fix JSON output case statements (#6733).
|
||||||
|
* Fix internal fault when cross-class calling with DPI (#6735) (#6742). [Matthew Ballance]
|
||||||
|
* Fix write variable placement for global constraints (#6740) (#6750) (#6797). [Yilou Wang]
|
||||||
|
* Fix JSON dump missing output ports (#6751) (#6831). [Oleh Maksymenko]
|
||||||
|
* Fix resolution of specialized typedefs (#6754) (#6808) (#6834). [em2machine]
|
||||||
|
* Fix UNSUPPORTED on force / release with complex selects (#6755). [Ryszard Rozak, Antmicro Ltd.]
|
||||||
|
* Fix select assignment expansion (#6757). [Geza Lore]
|
||||||
|
* Fix `--lib-create` with multi-bit clocks (#6759). [Geza Lore]
|
||||||
|
* Fix DFG reusing volatile variables. [Geza Lore]
|
||||||
|
* Fix DFG assertion on out-of-bounds selects. [Geza Lore]
|
||||||
|
* Fix process reference giving no return statement error (#6767) (#6823). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||||
|
* Fix class param static not found again error (#6768).
|
||||||
|
* Fix crash when super.new() called without a base class (#6772). [Matthew Ballance]
|
||||||
|
* Fix class-in-class extends with parameters (#6773).
|
||||||
|
* Fix enum item references in class extends with parameters.
|
||||||
|
* Fix reordering of function body inlined on RHS of <= NBA (#6780). [Geza Lore]
|
||||||
|
* Fix clang `-Wno-vla-cxx-extension` warning for UVM DPI tests (#6782)
|
||||||
|
* Fix `disable iff` in simple properties (#6783). [Ryszard Rozak, Antmicro Ltd.]
|
||||||
|
* Fix input sampling of clocking block signals (#6788). [Pawel Kojma, Antmicro Ltd.]
|
||||||
|
* Fix O(n*2) analysis in const-bit-op-tree (#6791). [Geza Lore]
|
||||||
|
* Fix member select of variable without randmode (#6800) (#6833). [Yilou Wang]
|
||||||
|
* Fix duplicate name error with interface initial blocks (#6804) (#6805). [Thomas Dybdahl Ahle]
|
||||||
|
* Fix nested struct within parameter port list (#6818) (#6824). [Luca Colagrande]
|
||||||
|
* Fix setting thread count in VerilatedContext (#6826 partial) (#6841). [Yangyu Chen]
|
||||||
|
* Fix firing array selects of events (#6829). [Amal Araweelo Almis]
|
||||||
|
* Fix false IMPLICITSTATIC on localparam (#6835). [Geza Lore]
|
||||||
|
* Fix randcase under fork (#6843). [Amal Araweelo Almis]
|
||||||
|
* Fix JSON missing `signed` indication (#6845).
|
||||||
|
* Fix class reference throwing cannot detect changes error (#6851).
|
||||||
|
* Fix `randc` on extended class (#6852).
|
||||||
|
* Fix typedef `::` class reference error (#6862).
|
||||||
|
* Fix missing include on FreeBSD (#6864).
|
||||||
|
* Fix `--Wwarn-lint` to be inverse of `--Wno-lint`.
|
||||||
|
|
||||||
|
|
||||||
|
Verilator 5.042 2025-11-02
|
||||||
|
==========================
|
||||||
|
|
||||||
|
**Other:**
|
||||||
|
|
||||||
|
* Add HIERPARAM error on hierarchical parameter values (#1626) (#6456) (#6484) (#6587) (#6609) (#6621) (#6623). [Todd Strader] [Luca Rufer] [Paul Swirhun]
|
||||||
|
* Add error on zero/negative unpacked dimensions (#1642). [Stefan Wallentowitz]
|
||||||
|
* Add verilator_gantt profiling of DPI imports (#3084). [Geza Lore]
|
||||||
|
* Add ASSIGNEQEXPR when use `=` inside expressions (#5567). [Ethan Sifferman]
|
||||||
|
* Add error on non-packed struct randc (#5999). [Seth Pellegrino]
|
||||||
|
* Add configure `--enable-dev-asan` to compile verilator_bin with the address sanitizer (#6404). [Geza Lore]
|
||||||
|
* Add $(LDFLAGS) and $(LIBS) to when building shared libraries (#6425) (#6426). [Ahmed El-Mahmoudy]
|
||||||
|
* Add IMPLICITSTATIC also on procedure variables.
|
||||||
|
* Add FUNCTIMCTL error on function invoking task or time-controlling statements (#6385).
|
||||||
|
* Add error on `virtual new` (#6486). [Alex Solomatnikov]
|
||||||
|
* Add error on ranges with tristate values (#6534). [Alex Solomatnikov]
|
||||||
|
* Add NORETURN warning on functions without return values (#6534). [Alex Solomatnikov]
|
||||||
|
* Add `--aslr` and `--no-aslr` options.
|
||||||
|
* Add `$cpure` (#6580). [Igor Zaworski, Antmicro Ltd.]
|
||||||
|
* Add `--preproc-defines`.
|
||||||
|
* Deprecate sensitivity list on public_flat_rw attributes (#6443). [Geza Lore]
|
||||||
|
* Deprecate clocker attribute and --clk option (#6463). [Geza Lore]
|
||||||
|
* Deprecate '--make cmake' option (#6540). [Geza Lore]
|
||||||
|
* Change default `--expand-limit` to 256 (#3419).
|
||||||
|
* Change developer coverage flow and add configure `--enable-dev-gcov` (#6526). [Geza Lore]
|
||||||
|
* Change `verilator_difftree` to return exit code 1 on mismatch, 2 on error.
|
||||||
|
* Change default thread pool sizes to respect processor affinity (#6604). [Geza Lore]
|
||||||
|
* Change `--preproc-comments` to be new name of `--pp-comments` option.
|
||||||
|
* Support modports referencing clocking blocks (#4555) (#6436). [Ryszard Rozak, Antmicro Ltd.]
|
||||||
|
* Support class package reference on pattern keys (#5653). [Todd Strader]
|
||||||
|
* Support digits in `$sscanf` field width formats (#6083). [Iztok Jeras]
|
||||||
|
* Support assert under assert (#6146). [Alex Solomatnikov]
|
||||||
|
* Support pure functions in sensitivity lists (#6393). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||||
|
* Support simple alias statements (#6339) (#6501). [Ryszard Rozak, Antmicro Ltd.]
|
||||||
|
* Support simple cycle delay sequence expressions inside properties (#6508). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||||
|
* Support impure expressions in `inside` (#6562). [Igor Zaworski, Antmicro Ltd.]
|
||||||
|
* Support `case` impure expressions (#6563). [Igor Zaworski, Antmicro Ltd.]
|
||||||
|
* Support dotted access to ports of a direct hier_block instance. (#6595). [Geza Lore]
|
||||||
|
* Improve `lint_off` to allow multiple messages and comments (#2755).
|
||||||
|
* Improve automatic selection of logic for DFG synthesis (#6370). [Geza Lore]
|
||||||
|
* Improve `covergroup with function sample` handling (#6387). [Jakub Wasilewski]
|
||||||
|
* Improve DFG type system (#6390). [Geza Lore]
|
||||||
|
* Improve DFG variable removal and temporary insertion (#6401). [Geza Lore]
|
||||||
|
* Improve memory usage of statistics (#6513). [Geza Lore]
|
||||||
|
* Improve conditional merging to preserve branch prediction. [Geza Lore]
|
||||||
|
* Optimize duplicate 'if' and '?:' conditions (#3807) (#6495)
|
||||||
|
* Optimize dead functions in more cases (#6380) (#6430). [Artur Bieniek, Antmicro Ltd.]
|
||||||
|
* Optimize constant folding in wide expression expansion (#6381). [Geza Lore]
|
||||||
|
* Fix `--trace-max-width` and increase to 4096. (#2385).
|
||||||
|
* Fix missing BLKSEQ when connecting module port to array (#2973).
|
||||||
|
* Fix LATCH warning with CASEINCOMPLETE (#3301).
|
||||||
|
* Fix unused parameterized class causing internal error (#4013). [Alberto Del Rio]
|
||||||
|
* Fix false CONSTVAR error on initializers (#4992).
|
||||||
|
* Fix hierarchical references with parameterized modules and interfaces (#5649) (#6566). [Ryszard Rozak, Antmicro Ltd.]
|
||||||
|
* Fix interface exposure with `--public-depth` or `--trace-depth` (#5758).
|
||||||
|
* Fix cell scoping performance (#6059). [Jerry Tianchen]
|
||||||
|
* Fix hierarchical `--prof-pgo` (#6213). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||||
|
* Fix while loop hang on timing-delayed assignment (#6343) (#6354). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||||
|
* Fix driver analysis of partially assigned variables (#6364) (#6378). [Geza Lore]
|
||||||
|
* Fix V3Hash MacOS ambiguity (#6350). [Lan Zongwei]
|
||||||
|
* Fix cmake APPLE variable (#6351). [Lan Zongwei]
|
||||||
|
* Fix randomize local after parameters applied (#6371). [Alex Solomatnikov]
|
||||||
|
* Fix package imports not found after parameters applied (#6373). [Alex Solomatnikov]
|
||||||
|
* Fix deep shift pattern performance (#6379) (#6420). [Geza Lore]
|
||||||
|
* Fix COVERAGEIGN-ignored `get_inst_coverage` and other covergroup methods (#6383). [Alex Solomatnikov]
|
||||||
|
* Fix error when modport variable is unresolved (#6386). [Ryszard Rozak, Antmicro Ltd.]
|
||||||
|
* Fix resolving parameters (#6388) (#6418) (#6421) (#6438) (#6429). [Artur Bieniek, Antmicro Ltd.]
|
||||||
|
* Fix wire array with initial assignment (#6391). [Alex Solomatnikov]
|
||||||
|
* Fix import of class with default params (#6396) (#6410) (#6413). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||||
|
* Fix use after free in elaboration (#6403). [Geza Lore]
|
||||||
|
* Fix address sanitizer issues (#6406). [Geza Lore]
|
||||||
|
* Fix timing control under fork under function (#6407). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||||
|
* Fix memory leaks and reduce requirements (#6411) (#6417) (#6419) (#6437) (#6439) (#6517). [Geza Lore]
|
||||||
|
* Fix parameter implicit type from string (#6414). [Alex Solomatnikov]
|
||||||
|
* Fix parsing for sequence expressions (#6427). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||||
|
* Fix parameterized class super functions (#6431) (#6438). [Artur Bieniek, Antmicro Ltd.]
|
||||||
|
* Fix external function declarations with class typedef references (#6433).
|
||||||
|
* Fix internal error on out-of-bounds real array access.
|
||||||
|
* Fix pre/post increments in assertions (#6434).
|
||||||
|
* Fix elaboration displays with `%m` and some `%p` (#6445) (#6451). [Alex Solomatnikov]
|
||||||
|
* Fix cast in gdbinit.py (#6447). [Artur Bieniek, Antmicro Ltd.]
|
||||||
|
* Fix false unique assertions on `else ;` (#6450). [Don Owen]
|
||||||
|
* Fix loss of clock attribute in DFG variable removal (#6453). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||||
|
* Fix data types of method calls without parenthesis (#6457). [Artur Bieniek, Antmicro Ltd.]
|
||||||
|
* Fix segfault on unsupported PLI calls (#6458). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||||
|
* Fix false assertion failure on failed DFG driver tracing (#6459). [Geza Lore]
|
||||||
|
* Fix side effects when using select (#6460). [Igor Zaworski, Antmicro Ltd.]
|
||||||
|
* Fix timeprecision backward assignment (#6469). [Artur Bieniek, Antmicro Ltd.]
|
||||||
|
* Fix splitting hierarchically referenced variables (#6475). [Ryszard Rozak, Antmicro Ltd.]
|
||||||
|
* Fix Windows compilation of Verilator with spaces in the path (#6477). [Fabian Keßler-Schulz]
|
||||||
|
* Fix PROTOTYPEMIS error on implicit logic (#6482). [Alex Solomatnikov]
|
||||||
|
* Fix configure misdetecting C++14 (#6488) (#6515). [Thomas O'Keeffe]
|
||||||
|
* Fix false BLKSEQ on non-edged sensitivity list (#6492). [Oron Port]
|
||||||
|
* Fix .vlt public_flat* and others to support long identifier names (#6516). [Szymon Gizler, Antmicro Ltd.]
|
||||||
|
* Fix always_ff on constants (#6519). [Todd Strader]
|
||||||
|
* Fix fault on operations on uninitialized strings (#6520). [Artur Bieniek, Antmicro Ltd.]
|
||||||
|
* Fix find_index methods of associative arrays (#6525). [Ryszard Rozak, Antmicro Ltd.]
|
||||||
|
* Fix parsing of `eventually[]` and property expression memory leaks (#6530). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||||
|
* Fix memory leak for unsupported `$past` (#6535). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||||
|
* Fix inconsistent force assignment (#6541). [Artur Bieniek, Antmicro Ltd.]
|
||||||
|
* Fix DFG circular driver tracing with partial assignments. [Geza Lore]
|
||||||
|
* Fix passing typedef value as parameter (#6543) (#6547). [Igor Zaworski, Antmicro Ltd.]
|
||||||
|
* Fix indent error on quoted strings (#6544).
|
||||||
|
* Fix incorrect nested interface-class error (#6549). [Matthew Ballance]
|
||||||
|
* Fix std::process::get_randstate to not affect random stability (#6550) (#6565). [Aleksander Kiryk]
|
||||||
|
* Fix exit code signal number reporting (#6554). [Artur Bieniek, Antmicro Ltd.]
|
||||||
|
* Fix `$finish` inside fork blocks (#6555). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||||
|
* Fix single element unpacked array DPI parameters. [Geza Lore]
|
||||||
|
* Fix DFG synthesis non-determinism (#6557) (#6568). [Todd Strader]
|
||||||
|
* Fix side effects for improved function/task/process purity (#6559). [Igor Zaworski, Antmicro Ltd.]
|
||||||
|
* Fix excessive logic replication in DFG circular driver tracing (#6561) (#6594). [Geza Lore]
|
||||||
|
* Fix hierarchical with parameterized instances under hier block (#6572). [Geza Lore]
|
||||||
|
* Fix segfault on type casts (#6574). [David Moberg]
|
||||||
|
* Fix references to interfaces containing generate blocks (#6579). [Ryszard Rozak, Antmicro Ltd.]
|
||||||
|
* Fix missing net type mappings in FST traces (#6582) (#6583). [Matt Stroud]
|
||||||
|
* Fix function call expression coverage (#6589). [Todd Strader]
|
||||||
|
* Fix V3Life eliminating assignments across timing controls (#6593) (#6596). [Geza Lore]
|
||||||
|
* Fix incorrectly resuming process waiting on multiple events (#6597). [Geza Lore]
|
||||||
|
* Fix `--hierarchical` with `--binary` (#6602). [Geza Lore]
|
||||||
|
* Fix mis-ignoring virtual interface member triggers (#5116 reopened) (#6613). [Geza Lore]
|
||||||
|
* Fix ENUMVALUE warning when overriding parameter using `-G/-pvalue` options. [Geza Lore]
|
||||||
|
* Fix `-G` and `-pvalue` with `--hierarchical`. [Geza Lore]
|
||||||
|
* Fix waiving messages with empty contents (#6610). [Yoshitomo KANEDA]
|
||||||
|
* Fix constant-arrayed instance parameters (#6614). [Alex Solomatnikov]
|
||||||
|
|
||||||
|
|
||||||
Verilator 5.040 2025-08-30
|
Verilator 5.040 2025-08-30
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
@@ -320,6 +570,7 @@ Verilator 5.034 2025-02-24
|
|||||||
* Optimize labels as final `if` block statements (#5744).
|
* Optimize labels as final `if` block statements (#5744).
|
||||||
* Optimize empty function definition bodies (#5750).
|
* Optimize empty function definition bodies (#5750).
|
||||||
* Optimize splitting trigger computation and dump (#5798). [Geza Lore]
|
* Optimize splitting trigger computation and dump (#5798). [Geza Lore]
|
||||||
|
* Optimize some DFG multiplexers (#6822). [Yangyu Chen]
|
||||||
* Fix error message when call task as a function (#3089). [Matthew Ballance]
|
* Fix error message when call task as a function (#3089). [Matthew Ballance]
|
||||||
* Fix force VPI public signal visibility (#5225). [Frédéric Requin]
|
* Fix force VPI public signal visibility (#5225). [Frédéric Requin]
|
||||||
* Fix VPI iteration over hierarchy (#5314) (#5731). [Natan Kreimer]
|
* Fix VPI iteration over hierarchy (#5314) (#5731). [Natan Kreimer]
|
||||||
@@ -5269,7 +5520,7 @@ Verilator 0.0 1994-07-08
|
|||||||
Copyright
|
Copyright
|
||||||
=========
|
=========
|
||||||
|
|
||||||
Copyright 2001-2025 by Wilson Snyder. This program is free software; you
|
Copyright 2001-2026 by Wilson Snyder. This program is free software; you
|
||||||
can redistribute it and/or modify it under the terms of either the GNU
|
can redistribute it and/or modify it under the terms of either the GNU
|
||||||
Lesser General Public License Version 3 or the Perl Artistic License
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
Version 2.0.
|
Version 2.0.
|
||||||
|
|||||||
+273
-56
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
#
|
#
|
||||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
# Copyright 2003-2026 by Wilson Snyder. This program is free software; you
|
||||||
# can redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
@@ -91,6 +91,7 @@ datarootdir = @datarootdir@
|
|||||||
# Compile options
|
# Compile options
|
||||||
CFG_WITH_CCWARN = @CFG_WITH_CCWARN@
|
CFG_WITH_CCWARN = @CFG_WITH_CCWARN@
|
||||||
CFG_WITH_DEFENV = @CFG_WITH_DEFENV@
|
CFG_WITH_DEFENV = @CFG_WITH_DEFENV@
|
||||||
|
CFG_WITH_DEV_GCOV = @CFG_WITH_DEV_GCOV@
|
||||||
CFG_WITH_LONGTESTS = @CFG_WITH_LONGTESTS@
|
CFG_WITH_LONGTESTS = @CFG_WITH_LONGTESTS@
|
||||||
CFG_WITH_SOLVER = @CFG_WITH_SOLVER@
|
CFG_WITH_SOLVER = @CFG_WITH_SOLVER@
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
@@ -185,7 +186,7 @@ test-snap test-diff:
|
|||||||
|
|
||||||
examples: all_nomsg
|
examples: all_nomsg
|
||||||
for p in $(EXAMPLES) ; do \
|
for p in $(EXAMPLES) ; do \
|
||||||
$(MAKE) -C $$p VERILATOR_ROOT=`pwd` || exit 10; \
|
$(MAKE) -C $$p VERILATOR_ROOT=`pwd` || exit 10; \
|
||||||
done
|
done
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
@@ -275,7 +276,7 @@ mkbindirs:
|
|||||||
installbin: | mkbindirs
|
installbin: | mkbindirs
|
||||||
cd $(srcdir)/bin; \
|
cd $(srcdir)/bin; \
|
||||||
for p in $(VL_INST_PUBLIC_SCRIPT_FILES) ; do \
|
for p in $(VL_INST_PUBLIC_SCRIPT_FILES) ; do \
|
||||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
|
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
|
||||||
done
|
done
|
||||||
perl -p -i -e 'use File::Spec;' \
|
perl -p -i -e 'use File::Spec;' \
|
||||||
-e' $$path = File::Spec->abs2rel("$(realpath $(DESTDIR)$(pkgdatadir))", "$(realpath $(DESTDIR)$(bindir))");' \
|
-e' $$path = File::Spec->abs2rel("$(realpath $(DESTDIR)$(pkgdatadir))", "$(realpath $(DESTDIR)$(bindir))");' \
|
||||||
@@ -283,11 +284,11 @@ installbin: | mkbindirs
|
|||||||
-- "$(DESTDIR)/$(bindir)/verilator"
|
-- "$(DESTDIR)/$(bindir)/verilator"
|
||||||
cd bin; \
|
cd bin; \
|
||||||
for p in $(VL_INST_PUBLIC_BIN_FILES) ; do \
|
for p in $(VL_INST_PUBLIC_BIN_FILES) ; do \
|
||||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
|
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
|
||||||
done
|
done
|
||||||
cd $(srcdir)/bin; \
|
cd $(srcdir)/bin; \
|
||||||
for p in $(VL_INST_PRIVATE_SCRIPT_FILES) ; do \
|
for p in $(VL_INST_PRIVATE_SCRIPT_FILES) ; do \
|
||||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkgdatadir)/bin/$$p; \
|
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkgdatadir)/bin/$$p; \
|
||||||
done
|
done
|
||||||
|
|
||||||
installredirect: installbin | mkbindirs
|
installredirect: installbin | mkbindirs
|
||||||
@@ -297,7 +298,7 @@ installredirect: installbin | mkbindirs
|
|||||||
-e 's/RELPATH.*/"$$path";/g' -- "${srcdir}/bin/redirect.tmp"
|
-e 's/RELPATH.*/"$$path";/g' -- "${srcdir}/bin/redirect.tmp"
|
||||||
cd $(srcdir)/bin; \
|
cd $(srcdir)/bin; \
|
||||||
for p in $(VL_INST_PUBLIC_SCRIPT_FILES) $(VL_INST_PUBLIC_BIN_FILES) ; do \
|
for p in $(VL_INST_PUBLIC_SCRIPT_FILES) $(VL_INST_PUBLIC_BIN_FILES) ; do \
|
||||||
$(INSTALL_PROGRAM) redirect.tmp $(DESTDIR)$(pkgdatadir)/bin/$$p; \
|
$(INSTALL_PROGRAM) redirect.tmp $(DESTDIR)$(pkgdatadir)/bin/$$p; \
|
||||||
done
|
done
|
||||||
rm ${srcdir}/bin/redirect.tmp
|
rm ${srcdir}/bin/redirect.tmp
|
||||||
|
|
||||||
@@ -306,14 +307,14 @@ installredirect: installbin | mkbindirs
|
|||||||
installman: $(VL_INST_MAN_FILES)
|
installman: $(VL_INST_MAN_FILES)
|
||||||
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
|
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
|
||||||
for p in $^ ; do \
|
for p in $^ ; do \
|
||||||
$(INSTALL_DATA) $$p $(DESTDIR)$(mandir)/man1/$$p; \
|
$(INSTALL_DATA) $$p $(DESTDIR)$(mandir)/man1/$$p; \
|
||||||
done
|
done
|
||||||
|
|
||||||
installdata:
|
installdata:
|
||||||
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/include/gtkwave
|
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/include/gtkwave
|
||||||
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/include/vltstd
|
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/include/vltstd
|
||||||
for p in $(VL_INST_INC_BLDDIR_FILES) ; do \
|
for p in $(VL_INST_INC_BLDDIR_FILES) ; do \
|
||||||
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
|
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
|
||||||
done
|
done
|
||||||
cd $(srcdir) \
|
cd $(srcdir) \
|
||||||
; for p in $(VL_INST_INC_SRCDIR_FILES) ; do \
|
; for p in $(VL_INST_INC_SRCDIR_FILES) ; do \
|
||||||
@@ -459,23 +460,19 @@ analyzer-include:
|
|||||||
-rm -rf examples/*/obj*
|
-rm -rf examples/*/obj*
|
||||||
scan-build $(MAKE) -k examples
|
scan-build $(MAKE) -k examples
|
||||||
|
|
||||||
format:
|
# Bash/sh files
|
||||||
$(MAKE) -j 5 format-c format-cmake format-exec format-py
|
BASH_FILES = \
|
||||||
|
ci/ci-install.bash \
|
||||||
CLANGFORMAT = clang-format-18
|
ci/ci-pages-notify.bash \
|
||||||
CLANGFORMAT_FLAGS = -i
|
ci/ci-pages.bash \
|
||||||
CLANGFORMAT_FILES = $(CHECK_CPP) $(CHECK_H) $(CHECK_YL) test_regress/t/*.c* test_regress/t/*.h
|
ci/ci-script.bash \
|
||||||
|
ci/docker/run/hooks/post_push \
|
||||||
format-c clang-format:
|
ci/docker/run/verilator-docker \
|
||||||
$(CLANGFORMAT) --version
|
ci/docker/run/verilator-wrap.sh \
|
||||||
@$(CLANGFORMAT) --version | fgrep 'version 18' > /dev/null \
|
nodist/fuzzer/all \
|
||||||
|| echo "*** You are not using clang-format-18, indents may differ from master's ***"
|
nodist/fuzzer/run \
|
||||||
$(CLANGFORMAT) $(CLANGFORMAT_FLAGS) $(CLANGFORMAT_FILES)
|
nodist/fuzzer/setup_root \
|
||||||
|
nodist/fuzzer/setup_user \
|
||||||
YAMLFIX = YAMLFIX_WHITELINES=1 YAMLFIX_LINE_LENGTH=130 YAMLFIX_preserve_quotes=true yamlfix
|
|
||||||
|
|
||||||
yamlfix:
|
|
||||||
$(YAMLFIX) .
|
|
||||||
|
|
||||||
# CMake files
|
# CMake files
|
||||||
CMAKE_FILES = \
|
CMAKE_FILES = \
|
||||||
@@ -494,6 +491,12 @@ MAKE_FILES = \
|
|||||||
src/Makefile*.in \
|
src/Makefile*.in \
|
||||||
test_regress/Makefile* \
|
test_regress/Makefile* \
|
||||||
|
|
||||||
|
# Perl programs
|
||||||
|
PERL_PROGRAMS = \
|
||||||
|
bin/redirect \
|
||||||
|
bin/verilator \
|
||||||
|
bin/verilator_coverage \
|
||||||
|
|
||||||
# Python programs, subject to format and lint
|
# Python programs, subject to format and lint
|
||||||
PY_PROGRAMS = \
|
PY_PROGRAMS = \
|
||||||
bin/verilator_ccache_report \
|
bin/verilator_ccache_report \
|
||||||
@@ -501,56 +504,104 @@ PY_PROGRAMS = \
|
|||||||
bin/verilator_gantt \
|
bin/verilator_gantt \
|
||||||
bin/verilator_includer \
|
bin/verilator_includer \
|
||||||
bin/verilator_profcfunc \
|
bin/verilator_profcfunc \
|
||||||
examples/json_py/vl_file_copy \
|
|
||||||
examples/json_py/vl_hier_graph \
|
|
||||||
docs/guide/conf.py \
|
|
||||||
docs/bin/vl_sphinx_extract \
|
docs/bin/vl_sphinx_extract \
|
||||||
docs/bin/vl_sphinx_fix \
|
docs/bin/vl_sphinx_fix \
|
||||||
|
docs/guide/conf.py \
|
||||||
|
examples/json_py/vl_file_copy \
|
||||||
|
examples/json_py/vl_hier_graph \
|
||||||
|
nodist/clang_check_attributes \
|
||||||
|
nodist/dot_importer \
|
||||||
|
nodist/fuzzer/actual_fail \
|
||||||
|
nodist/fuzzer/generate_dictionary \
|
||||||
|
nodist/install_test \
|
||||||
|
nodist/lint_py_test_filter \
|
||||||
|
nodist/log_changes \
|
||||||
|
nodist/uvm_pkg_packer \
|
||||||
|
nodist/verilator_saif_diff \
|
||||||
|
src/.gdbinit.py \
|
||||||
src/astgen \
|
src/astgen \
|
||||||
src/bisonpre \
|
src/bisonpre \
|
||||||
src/config_rev \
|
src/config_rev \
|
||||||
src/flexfix \
|
src/flexfix \
|
||||||
src/vlcovgen \
|
src/vlcovgen \
|
||||||
src/.gdbinit.py \
|
|
||||||
test_regress/*.py \
|
test_regress/*.py \
|
||||||
test_regress/t/*.pf \
|
test_regress/t/*.pf \
|
||||||
nodist/clang_check_attributes \
|
|
||||||
nodist/code_coverage \
|
|
||||||
nodist/dot_importer \
|
|
||||||
nodist/fuzzer/actual_fail \
|
|
||||||
nodist/fuzzer/generate_dictionary \
|
|
||||||
nodist/install_test \
|
|
||||||
nodist/log_changes \
|
|
||||||
|
|
||||||
# Python files, subject to format but not lint
|
# Python files, subject to format but not lint
|
||||||
PY_FILES = \
|
PY_FILES = \
|
||||||
$(PY_PROGRAMS) \
|
$(PY_PROGRAMS) \
|
||||||
nodist/code_coverage.dat \
|
|
||||||
test_regress/t/*.py \
|
test_regress/t/*.py \
|
||||||
|
|
||||||
# Python files, test_regress tests
|
# Python files, test_regress tests
|
||||||
PY_TEST_FILES = test_regress/t/*.py
|
PY_TEST_FILES = test_regress/t/*.py
|
||||||
|
|
||||||
YAPF = yapf3
|
# YAML files
|
||||||
|
YAML_FILES = \
|
||||||
|
.*.yaml \
|
||||||
|
.*.yml \
|
||||||
|
.github/*.yml \
|
||||||
|
.github/*/*.yml \
|
||||||
|
CITATION.cff \
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Format
|
||||||
|
|
||||||
|
format:
|
||||||
|
$(MAKE) -j 5 format-c format-cmake format-exec format-py format-yaml
|
||||||
|
|
||||||
|
BEAUTYSH = beautysh
|
||||||
|
BEAUTYSH_FLAGS = --indent-size 2
|
||||||
|
|
||||||
|
format-bash:
|
||||||
|
$(BEAUTYSH) --version
|
||||||
|
$(BEAUTYSH) $(BEAUTYSH_FLAGS) $(BASH_FILES)
|
||||||
|
|
||||||
|
CLANGFORMAT = clang-format-18
|
||||||
|
CLANGFORMAT_FLAGS = -i
|
||||||
|
CLANGFORMAT_FILES = $(CHECK_CPP) $(CHECK_H) $(CHECK_YL) test_regress/t/*.c* test_regress/t/*.h
|
||||||
|
|
||||||
|
format-c clang-format:
|
||||||
|
$(CLANGFORMAT) --version
|
||||||
|
@$(CLANGFORMAT) --version | fgrep 'version 18' > /dev/null \
|
||||||
|
|| echo "*** You are not using clang-format-18, indents may differ from master's ***"
|
||||||
|
$(CLANGFORMAT) $(CLANGFORMAT_FLAGS) $(CLANGFORMAT_FILES)
|
||||||
|
|
||||||
|
GERSEMI = gersemi
|
||||||
|
GERSEMI_FLAGS = -i --no-warn-about-unknown-commands
|
||||||
|
|
||||||
|
format-cmake:
|
||||||
|
$(GERSEMI) --version
|
||||||
|
$(GERSEMI) $(GERSEMI_FLAGS) $(CMAKE_FILES)
|
||||||
|
|
||||||
|
MBAKE = mbake
|
||||||
|
MBAKE_FLAGS = format --config ./.bake.toml
|
||||||
|
|
||||||
|
format-exec:
|
||||||
|
-chmod a+x test_regress/t/*.py
|
||||||
|
|
||||||
|
format-make mbake:
|
||||||
|
$(MBAKE) --version
|
||||||
|
$(MBAKE) $(MBAKE_FLAGS) $(MAKE_FILES)
|
||||||
|
|
||||||
|
YAPF = yapf
|
||||||
YAPF_FLAGS = -i --parallel
|
YAPF_FLAGS = -i --parallel
|
||||||
|
|
||||||
format-py yapf:
|
format-py yapf:
|
||||||
$(YAPF) --version
|
$(YAPF) --version
|
||||||
$(YAPF) $(YAPF_FLAGS) $(PY_FILES)
|
$(YAPF) $(YAPF_FLAGS) $(PY_FILES)
|
||||||
|
|
||||||
GERSEMI = gersemi
|
YAMLFIX = YAMLFIX_WHITELINES=1 YAMLFIX_LINE_LENGTH=200 YAMLFIX_preserve_quotes=true yamlfix
|
||||||
GERSEMI_FLAGS = -i --no-warn-about-unknown-commands
|
YAMLFIX_FLAGS =
|
||||||
|
|
||||||
format-cmake:
|
format-yaml yamlfix:
|
||||||
$(GERSEMI) $(GERSEMI_FLAGS) $(CMAKE_FILES)
|
$(YAMLFIX) --version
|
||||||
|
$(YAMLFIX) $(YAMLFIX_FLAGS) $(YAML_FILES)
|
||||||
|
|
||||||
MBAKE = mbake
|
######################################################################
|
||||||
MBAKE_FLAGS = format --config ./.bake.toml
|
# Lint
|
||||||
|
|
||||||
format-make:
|
MYPY = mypy
|
||||||
$(MBAKE) $(MBAKE_FLAGS) $(MAKE_FILES)
|
MYPY_FLAGS = --strict --no-error-summary
|
||||||
|
|
||||||
format-yaml: yamlfix
|
|
||||||
|
|
||||||
PYLINT = pylint
|
PYLINT = pylint
|
||||||
PYLINT_FLAGS = --recursive=n --score=n --disable=R0801
|
PYLINT_FLAGS = --recursive=n --score=n --disable=R0801
|
||||||
@@ -561,7 +612,16 @@ RUFF_FLAGS = check --ignore=E402,E501,E701
|
|||||||
|
|
||||||
# "make -k" so can see all tool result errors
|
# "make -k" so can see all tool result errors
|
||||||
lint-py:
|
lint-py:
|
||||||
$(MAKE) -k lint-py-pylint lint-py-pylint-tests lint-py-ruff
|
$(MAKE) -k lint-py-mypy lint-py-mypy-none lint-py-pylint lint-py-pylint-tests lint-py-ruff
|
||||||
|
|
||||||
|
lint-py-mypy:
|
||||||
|
for filename in `fgrep -l '# mypy' $(PY_PROGRAMS)`; do \
|
||||||
|
echo "$(MYPY) $(MYPY_FLAGS) $$filename" ; \
|
||||||
|
$(MYPY) $(MYPY_FLAGS) $$filename ; \
|
||||||
|
done
|
||||||
|
|
||||||
|
lint-py-mypy-none:
|
||||||
|
@echo "mypy not checking: " `fgrep -L '# mypy' $(PY_PROGRAMS)`
|
||||||
|
|
||||||
lint-py-pylint:
|
lint-py-pylint:
|
||||||
$(PYLINT) $(PYLINT_FLAGS) $(PY_PROGRAMS)
|
$(PYLINT) $(PYLINT_FLAGS) $(PY_PROGRAMS)
|
||||||
@@ -572,9 +632,6 @@ lint-py-pylint-tests:
|
|||||||
lint-py-ruff:
|
lint-py-ruff:
|
||||||
$(RUFF) $(RUFF_FLAGS) $(PY_PROGRAMS)
|
$(RUFF) $(RUFF_FLAGS) $(PY_PROGRAMS)
|
||||||
|
|
||||||
format-exec:
|
|
||||||
-chmod a+x test_regress/t/*.py
|
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Configure
|
# Configure
|
||||||
|
|
||||||
@@ -597,6 +654,149 @@ else
|
|||||||
autoconf
|
autoconf
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Coverage collection and reporting
|
||||||
|
|
||||||
|
COVERAGE_DIR := obj_coverage
|
||||||
|
|
||||||
|
ifeq ($(CFG_WITH_DEV_GCOV),yes)
|
||||||
|
|
||||||
|
# Figure out base and head refs for coverage report
|
||||||
|
COVERAGE_REF_BASE := $(if $(COVERAGE_BASE),$(shell git rev-parse --short $(COVERAGE_BASE)))
|
||||||
|
COVERAGE_REF_HEAD := $(shell git rev-parse --short HEAD)
|
||||||
|
override undefine COVERAGE_BASE # Use the above variabels instead
|
||||||
|
|
||||||
|
# 'fastcov' setup
|
||||||
|
FASTCOV := nodist/fastcov.py
|
||||||
|
FASTCOV_OPT := -j $(shell nproc)
|
||||||
|
FASTCOV_OPT += --lcov
|
||||||
|
FASTCOV_OPT += --process-gcno
|
||||||
|
FASTCOV_OPT += --branch-coverage
|
||||||
|
FASTCOV_OPT += --dump-statistic
|
||||||
|
# Files matching the following glob patterns will be excluded from coverage
|
||||||
|
FASTCOV_OPT += --exclude-glob
|
||||||
|
FASTCOV_OPT += '/usr/*'
|
||||||
|
FASTCOV_OPT += '*examples/*'
|
||||||
|
FASTCOV_OPT += '*include/gtkwave/*'
|
||||||
|
FASTCOV_OPT += '*src/obj_dbg/*'
|
||||||
|
FASTCOV_OPT += '*src/obj_opt/*.yy.cpp'
|
||||||
|
FASTCOV_OPT += '*src/obj_opt/V3Ast*'
|
||||||
|
FASTCOV_OPT += '*src/obj_opt/V3Dfg*'
|
||||||
|
FASTCOV_OPT += '*src/obj_opt/V3ParseBison.c'
|
||||||
|
FASTCOV_OPT += '*test_regress/*'
|
||||||
|
# Lines *containing* these substrings will be excluded from *all* coverage
|
||||||
|
FASTCOV_OPT += --custom-exclusion-marker
|
||||||
|
FASTCOV_OPT += ASTGEN_MEMBERS
|
||||||
|
FASTCOV_OPT += ERROR_RSVD_WORD
|
||||||
|
FASTCOV_OPT += LCOV_EXCL_LINE
|
||||||
|
FASTCOV_OPT += V3ERROR_NA
|
||||||
|
FASTCOV_OPT += VL_DEFINE_DEBUG_FUNCTIONS
|
||||||
|
FASTCOV_OPT += VL_FATAL
|
||||||
|
FASTCOV_OPT += VL_RTTI_IMPL
|
||||||
|
FASTCOV_OPT += VL_UNREACHABLE
|
||||||
|
FASTCOV_OPT += v3fatalSrc
|
||||||
|
# Lines *starting* with these substrings will be ecluded from *branch* coverage
|
||||||
|
FASTCOV_OPT += --exclude-br-lines-starting-with
|
||||||
|
FASTCOV_OPT += BROKEN_BASE_RTN
|
||||||
|
FASTCOV_OPT += BROKEN_RTN
|
||||||
|
FASTCOV_OPT += NUM_ASSERT
|
||||||
|
FASTCOV_OPT += SELF_CHECK
|
||||||
|
FASTCOV_OPT += UASSERT
|
||||||
|
FASTCOV_OPT += UINFO
|
||||||
|
FASTCOV_OPT += assert
|
||||||
|
FASTCOV_OPT += 'if (VL_UNCOVERABLE'
|
||||||
|
FASTCOV_OPT += '} else if (VL_UNCOVERABLE'
|
||||||
|
|
||||||
|
# 'genhtml' setup
|
||||||
|
GENHTML := genhtml
|
||||||
|
GENHTML_OPT := -j $(shell nproc)
|
||||||
|
GENHTML_OPT += --branch-coverage
|
||||||
|
GENHTML_OPT += --demangle-cpp
|
||||||
|
GENHTML_OPT += --missed
|
||||||
|
GENHTML_OPT += --rc branch_coverage=1
|
||||||
|
GENHTML_OPT += --rc genhtml_hi_limit=100
|
||||||
|
GENHTML_OPT += --ignore-errors negative
|
||||||
|
ifeq ($(COVERAGE_REF_BASE),)
|
||||||
|
GENHTML_OPT += --header-title "Code coverage for Verilator $(shell git describe --dirty)"
|
||||||
|
else
|
||||||
|
GENHTML_OPT += --header-title "Patch coverage for Verilator $(COVERAGE_REF_BASE)..$(COVERAGE_REF_HEAD)$(if $(shell git status --porcelain),-dirty)"
|
||||||
|
endif
|
||||||
|
GENHTML_OPT += --flat
|
||||||
|
GENHTML_OPT += --precision 2
|
||||||
|
GENHTML_OPT += --legend
|
||||||
|
GENHTML_OPT += --show-proportion
|
||||||
|
GENHTML_OPT += --filter brace,blank,range
|
||||||
|
|
||||||
|
# There are loads (~20k combined), but using this seems fine on modern hardware
|
||||||
|
GCNO_FILES = $(shell find . -name '*.gcno')
|
||||||
|
GCDA_FILES = $(shell find . -name '*.gcda')
|
||||||
|
|
||||||
|
# Combine all .gcda coverage date files into lcov .info file
|
||||||
|
$(COVERAGE_DIR)/verilator.info: $(GCNO_FILES) $(GCDA_FILES)
|
||||||
|
@echo "####################################################################"
|
||||||
|
@echo "# fastcov: combining all .gcda files into lcov .info"
|
||||||
|
@echo "####################################################################"
|
||||||
|
@mkdir -p $(COVERAGE_DIR)
|
||||||
|
/usr/bin/time -f "That took %E" \
|
||||||
|
$(FASTCOV) $(FASTCOV_OPT) --output $@
|
||||||
|
|
||||||
|
# Filter combined .info file for patch coverage
|
||||||
|
$(COVERAGE_DIR)/verilator-patch.info: $(COVERAGE_DIR)/verilator.info
|
||||||
|
@echo "####################################################################"
|
||||||
|
@echo "# fastcov: Filtering for patch coverage"
|
||||||
|
@echo "####################################################################"
|
||||||
|
rm -f $(COVERAGE_DIR)/empty-patch
|
||||||
|
git diff $(COVERAGE_REF_BASE) -- include src > $(COVERAGE_DIR)/filter.patch
|
||||||
|
[ -s $(COVERAGE_DIR)/filter.patch ]] || touch $(COVERAGE_DIR)/empty-patch
|
||||||
|
$(FASTCOV) -C $^ --lcov -o $@ --diff-filter $(COVERAGE_DIR)/filter.patch
|
||||||
|
|
||||||
|
# Build coverage report
|
||||||
|
$(COVERAGE_DIR)/report/index.html: $(COVERAGE_DIR)/verilator$(if $(COVERAGE_REF_BASE),-patch).info
|
||||||
|
@echo "####################################################################"
|
||||||
|
@echo "# genhtml: Generating coverage report"
|
||||||
|
@echo "####################################################################"
|
||||||
|
@rm -rf $(COVERAGE_DIR)/report
|
||||||
|
[ -f $(COVERAGE_DIR)/empty-patch ]] || /usr/bin/time -f "That took %E" \
|
||||||
|
$(GENHTML) $(GENHTML_OPT) --output-directory $(COVERAGE_DIR)/report $^ || true
|
||||||
|
@# Uncommitted changes not tracked, force rebuild on next run if patch coverage
|
||||||
|
@$(if $(COVERAGE_REF_BASE),mv $(COVERAGE_DIR)/verilator-patch.info $(COVERAGE_DIR)/verilator-patch-last.info)
|
||||||
|
|
||||||
|
# Convenience targets
|
||||||
|
.PHONY: coverage-combine
|
||||||
|
coverage-combine: $(COVERAGE_DIR)/verilator.info
|
||||||
|
|
||||||
|
# Via recursive make, so the message is always printed
|
||||||
|
.PHONY: coverage-report
|
||||||
|
coverage-report:
|
||||||
|
@$(MAKE) --no-print-directory $(COVERAGE_DIR)/report/index.html || true
|
||||||
|
@if [ -f $(COVERAGE_DIR)/report/index.html ]; then \
|
||||||
|
echo "####################################################################"; \
|
||||||
|
echo "# Coverage report is at: $(COVERAGE_DIR)/report/index.html"; \
|
||||||
|
echo "# Use 'make coverage-view' to open it in your default browser"; \
|
||||||
|
echo "####################################################################"; \
|
||||||
|
elif [ -f $(COVERAGE_DIR)/empty-patch ]; then \
|
||||||
|
echo "####################################################################"; \
|
||||||
|
echo "# Patch is empty"; \
|
||||||
|
echo "####################################################################"; \
|
||||||
|
else \
|
||||||
|
echo "####################################################################"; \
|
||||||
|
echo "# Failed to create coverage report. Maybe no data, or error?"; \
|
||||||
|
echo "####################################################################"; \
|
||||||
|
false; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Open covarage report in default web browser
|
||||||
|
.PHONY: coverage-view
|
||||||
|
coverage-view: coverage-report
|
||||||
|
@test -f $(COVERAGE_DIR)/report/index.html && open $(COVERAGE_DIR)/report/index.html || true
|
||||||
|
|
||||||
|
# Deletes all coverage data files (.gcda)
|
||||||
|
.PHONY: coverage-zero
|
||||||
|
coverage-zero: # 'rm $(GCDA_FILES)' might fail with too many args
|
||||||
|
$(FASTCOV) --zerocounters
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Clean
|
# Clean
|
||||||
|
|
||||||
@@ -607,8 +807,8 @@ maintainer-clean::
|
|||||||
|
|
||||||
clean mostlyclean distclean maintainer-clean maintainer-copy::
|
clean mostlyclean distclean maintainer-clean maintainer-copy::
|
||||||
for dir in $(SUBDIRS); do \
|
for dir in $(SUBDIRS); do \
|
||||||
echo making $@ in $$dir ; \
|
echo making $@ in $$dir ; \
|
||||||
$(MAKE) -C $$dir $@ ; \
|
$(MAKE) -C $$dir $@ ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
clean mostlyclean distclean maintainer-clean::
|
clean mostlyclean distclean maintainer-clean::
|
||||||
@@ -622,12 +822,12 @@ clean mostlyclean distclean maintainer-clean::
|
|||||||
rm -rf src/*.tidy include/*.tidy examples/*/*.tidy
|
rm -rf src/*.tidy include/*.tidy examples/*/*.tidy
|
||||||
rm -rf .ruff_cache
|
rm -rf .ruff_cache
|
||||||
rm -rf nodist/fuzzer/dictionary
|
rm -rf nodist/fuzzer/dictionary
|
||||||
rm -rf nodist/obj_dir
|
rm -rf $(COVERAGE_DIR)
|
||||||
rm -rf verilator.txt
|
rm -rf verilator.txt
|
||||||
|
|
||||||
distclean maintainer-clean::
|
distclean maintainer-clean::
|
||||||
rm -f *.info* *.1 $(INFOS) $(INFOS_OLD) $(VL_INST_MAN_FILES)
|
rm -f *.info* *.1 $(INFOS) $(INFOS_OLD) $(VL_INST_MAN_FILES)
|
||||||
rm -f Makefile config.status config.cache config.log TAGS
|
rm -f Makefile config.status config.cache config.log configure~ TAGS
|
||||||
rm -f verilator_bin* verilator_coverage_bin*
|
rm -f verilator_bin* verilator_coverage_bin*
|
||||||
rm -f bin/verilator_bin* bin/verilator_coverage_bin*
|
rm -f bin/verilator_bin* bin/verilator_coverage_bin*
|
||||||
rm -f include/verilated.mk include/verilated_config.h
|
rm -f include/verilated.mk include/verilated_config.h
|
||||||
@@ -652,3 +852,20 @@ preexist:
|
|||||||
|
|
||||||
maintainer-dist: preexist tag
|
maintainer-dist: preexist tag
|
||||||
svnorcvs release $(DISTTAGNAME)
|
svnorcvs release $(DISTTAGNAME)
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Python venv
|
||||||
|
|
||||||
|
VENV_PATH ?= .venv
|
||||||
|
|
||||||
|
.PHONY: venv
|
||||||
|
venv:
|
||||||
|
# Create virtual environment using the python3 picked up by configure
|
||||||
|
[ -e $(VENV_PATH) ] || @PYTHON3@ -m venv --system-site-packages $(VENV_PATH)
|
||||||
|
# Install python3 dependencies
|
||||||
|
$(VENV_PATH)/bin/pip3 install -r python-dev-requirements.txt
|
||||||
|
@echo
|
||||||
|
@echo "Installed Python virtual environment, in:"
|
||||||
|
@echo " $(VENV_PATH)"
|
||||||
|
@echo "To activate, run:"
|
||||||
|
@echo " source $(VENV_PATH)/bin/activate"
|
||||||
|
|||||||
+27
-23
@@ -4,19 +4,19 @@
|
|||||||
|badge1| |badge2| |badge3| |badge4| |badge5| |badge7| |badge8|
|
|badge1| |badge2| |badge3| |badge4| |badge5| |badge7| |badge8|
|
||||||
|
|
||||||
.. |badge1| image:: https://img.shields.io/badge/Website-Verilator.org-181717.svg
|
.. |badge1| image:: https://img.shields.io/badge/Website-Verilator.org-181717.svg
|
||||||
:target: https://verilator.org
|
:target: https://verilator.org
|
||||||
.. |badge2| image:: https://img.shields.io/badge/License-LGPL%20v3-blue.svg
|
.. |badge2| image:: https://img.shields.io/badge/License-LGPL%20v3-blue.svg
|
||||||
:target: https://www.gnu.org/licenses/lgpl-3.0
|
:target: https://www.gnu.org/licenses/lgpl-3.0
|
||||||
.. |badge3| image:: https://img.shields.io/badge/License-Artistic%202.0-0298c3.svg
|
.. |badge3| image:: https://img.shields.io/badge/License-Artistic%202.0-0298c3.svg
|
||||||
:target: https://opensource.org/licenses/Artistic-2.0
|
:target: https://opensource.org/licenses/Artistic-2.0
|
||||||
.. |badge4| image:: https://repology.org/badge/tiny-repos/verilator.svg?header=distro%20packages
|
.. |badge4| image:: https://repology.org/badge/tiny-repos/verilator.svg?header=distro%20packages
|
||||||
:target: https://repology.org/project/verilator/versions
|
:target: https://repology.org/project/verilator/versions
|
||||||
.. |badge5| image:: https://img.shields.io/docker/pulls/verilator/verilator
|
.. |badge5| image:: https://img.shields.io/docker/pulls/verilator/verilator
|
||||||
:target: https://hub.docker.com/r/verilator/verilator
|
:target: https://hub.docker.com/r/verilator/verilator
|
||||||
.. |badge7| image:: https://github.com/verilator/verilator/workflows/build/badge.svg
|
.. |badge7| image:: https://github.com/verilator/verilator/workflows/build/badge.svg
|
||||||
:target: https://github.com/verilator/verilator/actions?query=workflow%3Abuild
|
:target: https://github.com/verilator/verilator/actions?query=workflow%3Abuild
|
||||||
.. |badge8| image:: https://img.shields.io/github/actions/workflow/status/verilator/verilator/rtlmeter.yml?branch=master&event=schedule&label=benchmarks
|
.. |badge8| image:: https://img.shields.io/github/actions/workflow/status/verilator/verilator/rtlmeter.yml?branch=master&event=schedule&label=benchmarks
|
||||||
:target: https://verilator.github.io/verilator-rtlmeter-results
|
:target: https://verilator.github.io/verilator-rtlmeter-results
|
||||||
|
|
||||||
|
|
||||||
Welcome to Verilator
|
Welcome to Verilator
|
||||||
@@ -37,6 +37,7 @@ Welcome to Verilator
|
|||||||
* - **Widely Used**
|
* - **Widely Used**
|
||||||
* Wide industry and academic deployment
|
* Wide industry and academic deployment
|
||||||
* Out-of-the-box support from Arm and RISC-V vendor IP
|
* Out-of-the-box support from Arm and RISC-V vendor IP
|
||||||
|
* Over 700 contributors
|
||||||
- |verilator usage|
|
- |verilator usage|
|
||||||
* - |verilator community|
|
* - |verilator community|
|
||||||
- **Community Driven & Openly Licensed**
|
- **Community Driven & Openly Licensed**
|
||||||
@@ -53,7 +54,7 @@ Welcome to Verilator
|
|||||||
What Verilator Does
|
What Verilator Does
|
||||||
===================
|
===================
|
||||||
|
|
||||||
Verilator is invoked with parameters similar to GCC or Synopsys's VCS. It
|
Verilator is invoked with parameters similar to GCC or Synopsys's VCS. It
|
||||||
"Verilates" the specified Verilog or SystemVerilog code by reading it,
|
"Verilates" the specified Verilog or SystemVerilog code by reading it,
|
||||||
performing lint checks, and optionally inserting assertion checks and
|
performing lint checks, and optionally inserting assertion checks and
|
||||||
coverage-analysis points. It outputs single- or multithreaded .cpp and .h
|
coverage-analysis points. It outputs single- or multithreaded .cpp and .h
|
||||||
@@ -68,21 +69,21 @@ Verilated generated libraries, optionally encrypted, into other simulators.
|
|||||||
Verilator may not be the best choice if you are expecting a full-featured
|
Verilator may not be the best choice if you are expecting a full-featured
|
||||||
replacement for a closed-source Verilog simulator, need SDF annotation,
|
replacement for a closed-source Verilog simulator, need SDF annotation,
|
||||||
mixed-signal simulation, or are doing a quick class project (we recommend
|
mixed-signal simulation, or are doing a quick class project (we recommend
|
||||||
`Icarus Verilog`_ for classwork). However, if you are looking for a path
|
`Icarus Verilog`_ for classwork). However, if you are looking for a path to
|
||||||
to migrate SystemVerilog to C++/SystemC, or want high-speed simulation of
|
migrate SystemVerilog to C++/SystemC, or want high-speed simulation of
|
||||||
designs, Verilator is the tool for you.
|
designs, Verilator is the tool for you.
|
||||||
|
|
||||||
|
|
||||||
Performance
|
Performance
|
||||||
===========
|
===========
|
||||||
|
|
||||||
Verilator does not directly translate Verilog HDL to C++ or SystemC. Rather,
|
Verilator does not directly translate Verilog HDL to C++ or SystemC.
|
||||||
Verilator compiles your code into a much faster optimized and optionally
|
Rather, Verilator compiles your code into a much faster optimized and
|
||||||
thread-partitioned model, which is in turn wrapped inside a C++/SystemC
|
optionally thread-partitioned model, which is in turn wrapped inside a
|
||||||
module. The results are a compiled Verilog model that executes even on a
|
C++/SystemC module. The results are a compiled Verilog model that executes
|
||||||
single thread over 10x faster than standalone SystemC, and on a single
|
even on a single thread over 10x faster than standalone SystemC, and on a
|
||||||
thread is about 100 times faster than interpreted Verilog simulators such
|
single thread is about 100 times faster than interpreted Verilog simulators
|
||||||
as `Icarus Verilog`_. Another 2-10x speedup might be gained from
|
such as `Icarus Verilog`_. Another 2-10x speedup might be gained from
|
||||||
multithreading (yielding 200-1000x total over interpreted simulators).
|
multithreading (yielding 200-1000x total over interpreted simulators).
|
||||||
|
|
||||||
Verilator has typically similar or better performance versus closed-source
|
Verilator has typically similar or better performance versus closed-source
|
||||||
@@ -100,8 +101,8 @@ For more information:
|
|||||||
- `Verilator installation and package directory structure
|
- `Verilator installation and package directory structure
|
||||||
<https://verilator.org/install>`_
|
<https://verilator.org/install>`_
|
||||||
|
|
||||||
- `Verilator manual (HTML) <https://verilator.org/verilator_doc.html>`_,
|
- `Verilator manual (HTML) <https://verilator.org/verilator_doc.html>`_, or
|
||||||
or `Verilator manual (PDF) <https://verilator.org/verilator_doc.pdf>`_
|
`Verilator manual (PDF) <https://verilator.org/verilator_doc.pdf>`_
|
||||||
|
|
||||||
- `Subscribe to Verilator announcements
|
- `Subscribe to Verilator announcements
|
||||||
<https://github.com/verilator/verilator-announce>`_
|
<https://github.com/verilator/verilator-announce>`_
|
||||||
@@ -137,20 +138,23 @@ Related Projects
|
|||||||
- `Icarus Verilog`_ - Icarus is a highly-featured interpreted Verilog
|
- `Icarus Verilog`_ - Icarus is a highly-featured interpreted Verilog
|
||||||
simulator. If Verilator does not support your needs, perhaps Icarus may.
|
simulator. If Verilator does not support your needs, perhaps Icarus may.
|
||||||
|
|
||||||
|
- `Surfer <https://surfer-project.org/>`_ - Web or offline waveform viewer
|
||||||
|
for Verilator traces.
|
||||||
|
|
||||||
|
|
||||||
Open License
|
Open License
|
||||||
============
|
============
|
||||||
|
|
||||||
Verilator is Copyright 2003-2025 by Wilson Snyder. (Report bugs to
|
Verilator is Copyright 2003-2026 by Wilson Snyder. (Report bugs to
|
||||||
`Verilator Issues <https://verilator.org/issues>`_.)
|
`Verilator Issues <https://verilator.org/issues>`_.)
|
||||||
|
|
||||||
Verilator is free software; you can redistribute it and/or modify it under
|
Verilator is free software; you can redistribute it and/or modify it under
|
||||||
the terms of either the GNU Lesser General Public License Version 3 or the
|
the terms of either the GNU Lesser General Public License Version 3 or the
|
||||||
Perl Artistic License Version 2.0. See the documentation for more details.
|
Perl Artistic License Version 2.0. See the documentation for more details.
|
||||||
|
|
||||||
.. _CHIPS Alliance: https://chipsalliance.org
|
.. _chips alliance: https://chipsalliance.org
|
||||||
.. _Icarus Verilog: https://steveicarus.github.io/iverilog
|
.. _icarus verilog: https://steveicarus.github.io/iverilog
|
||||||
.. _Linux Foundation: https://www.linuxfoundation.org
|
.. _linux foundation: https://www.linuxfoundation.org
|
||||||
.. |Logo| image:: https://www.veripool.org/img/verilator_256_200_min.png
|
.. |Logo| image:: https://www.veripool.org/img/verilator_256_200_min.png
|
||||||
.. |verilator multithreaded performance| image:: https://www.veripool.org/img/verilator_multithreaded_performance_bg-min.png
|
.. |verilator multithreaded performance| image:: https://www.veripool.org/img/verilator_multithreaded_performance_bg-min.png
|
||||||
.. |verilator usage| image:: https://www.veripool.org/img/verilator_usage_400x200-min.png
|
.. |verilator usage| image:: https://www.veripool.org/img/verilator_usage_400x200-min.png
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
# Copyright 2003-2026 by Wilson Snyder. This program is free software; you
|
||||||
# can redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
|||||||
+59
-28
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
# Copyright 2003-2026 by Wilson Snyder. This program is free software; you
|
||||||
# can redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
@@ -28,6 +28,7 @@ autoflush STDOUT 1;
|
|||||||
autoflush STDERR 1;
|
autoflush STDERR 1;
|
||||||
|
|
||||||
$Debug = 0;
|
$Debug = 0;
|
||||||
|
my $opt_aslr;
|
||||||
my $opt_gdb;
|
my $opt_gdb;
|
||||||
my $opt_rr;
|
my $opt_rr;
|
||||||
my $opt_gdbbt;
|
my $opt_gdbbt;
|
||||||
@@ -41,6 +42,7 @@ if ($#ARGV < 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Insert debugging options up front
|
# Insert debugging options up front
|
||||||
|
# (VERILATOR_TEST_FLAGS is not a documented nor official supported feature)
|
||||||
push @ARGV, (split ' ', $ENV{VERILATOR_TEST_FLAGS} || "");
|
push @ARGV, (split ' ', $ENV{VERILATOR_TEST_FLAGS} || "");
|
||||||
|
|
||||||
# We sneak a look at the flags so we can do some pre-environment checks
|
# We sneak a look at the flags so we can do some pre-environment checks
|
||||||
@@ -56,6 +58,7 @@ if (! GetOptions(
|
|||||||
"debug" => \&debug,
|
"debug" => \&debug,
|
||||||
# "version!" => \&version, # Also passthru'ed
|
# "version!" => \&version, # Also passthru'ed
|
||||||
# Switches
|
# Switches
|
||||||
|
"aslr!" => \$opt_aslr,
|
||||||
"gdb!" => \$opt_gdb,
|
"gdb!" => \$opt_gdb,
|
||||||
"gdbbt!" => \$opt_gdbbt,
|
"gdbbt!" => \$opt_gdbbt,
|
||||||
"quiet!" => \$opt_quiet_exit, # As -quiet implies -quiet-exit
|
"quiet!" => \$opt_quiet_exit, # As -quiet implies -quiet-exit
|
||||||
@@ -97,7 +100,7 @@ my @quoted_sw = map { sh_escape($_) } @Opt_Verilator_Sw;
|
|||||||
if ($opt_gdb) {
|
if ($opt_gdb) {
|
||||||
# Generic GDB interactive
|
# Generic GDB interactive
|
||||||
run (ulimit_stack_unlimited()
|
run (ulimit_stack_unlimited()
|
||||||
. aslr_off()
|
. aslr(0)
|
||||||
. ($ENV{VERILATOR_GDB} || "gdb")
|
. ($ENV{VERILATOR_GDB} || "gdb")
|
||||||
. " " . verilator_bin()
|
. " " . verilator_bin()
|
||||||
# Note, uncomment to set breakpoints before running:
|
# Note, uncomment to set breakpoints before running:
|
||||||
@@ -114,13 +117,13 @@ if ($opt_gdb) {
|
|||||||
} elsif ($opt_rr) {
|
} elsif ($opt_rr) {
|
||||||
# Record with rr
|
# Record with rr
|
||||||
run (ulimit_stack_unlimited()
|
run (ulimit_stack_unlimited()
|
||||||
. aslr_off()
|
. aslr(0)
|
||||||
. "rr record " . verilator_bin()
|
. "rr record " . verilator_bin()
|
||||||
. " " . join(' ', @quoted_sw));
|
. " " . join(' ', @quoted_sw));
|
||||||
} elsif ($opt_gdbbt && $Debug) {
|
} elsif ($opt_gdbbt && $Debug) {
|
||||||
# Run under GDB to get gdbbt
|
# Run under GDB to get gdbbt
|
||||||
run (ulimit_stack_unlimited()
|
run (ulimit_stack_unlimited()
|
||||||
. aslr_off()
|
. aslr(0)
|
||||||
. "gdb"
|
. "gdb"
|
||||||
. " " . verilator_bin()
|
. " " . verilator_bin()
|
||||||
. " --batch --quiet --return-child-result"
|
. " --batch --quiet --return-child-result"
|
||||||
@@ -135,19 +138,19 @@ if ($opt_gdb) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
run (ulimit_stack_unlimited()
|
run (ulimit_stack_unlimited()
|
||||||
. aslr_off()
|
. aslr(0)
|
||||||
. $valgrind_bin
|
. $valgrind_bin
|
||||||
. " " . verilator_bin()
|
. " " . verilator_bin()
|
||||||
. " " . join(' ', @quoted_sw));
|
. " " . join(' ', @quoted_sw));
|
||||||
} elsif ($Debug) {
|
} elsif ($Debug) {
|
||||||
# Debug
|
# Debug
|
||||||
run(ulimit_stack_unlimited()
|
run(ulimit_stack_unlimited()
|
||||||
. aslr_off()
|
. aslr(0)
|
||||||
. verilator_bin()
|
. verilator_bin()
|
||||||
. " " . join(' ', @quoted_sw));
|
. " " . join(' ', @quoted_sw));
|
||||||
} else {
|
} else {
|
||||||
# Normal, non gdb
|
# Normal, non gdb
|
||||||
run(ulimit_stack_unlimited() . verilator_bin() . " " . join(' ', @quoted_sw));
|
run(ulimit_stack_unlimited() . aslr(1) . verilator_bin() . " " . join(' ', @quoted_sw));
|
||||||
}
|
}
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
@@ -192,21 +195,37 @@ sub gdb_works {
|
|||||||
return $status == 0;
|
return $status == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub aslr_off {
|
sub aslr {
|
||||||
my $ok = `setarch --addr-no-randomize echo ok 2>/dev/null` || "";
|
my $want_on = shift;
|
||||||
if ($ok =~ /ok/) {
|
$want_on = $opt_aslr if defined $opt_aslr;
|
||||||
return "setarch --addr-no-randomize ";
|
if (!$want_on) {
|
||||||
} else {
|
my $ok = `setarch --addr-no-randomize echo ok 2>/dev/null` || "";
|
||||||
return "";
|
if ($ok =~ /ok/) {
|
||||||
|
return "setarch --addr-no-randomize ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub ulimit_stack_unlimited {
|
sub ulimit_stack_unlimited {
|
||||||
return "" if !$opt_unlimited_stack;
|
return "" if !$opt_unlimited_stack;
|
||||||
system("ulimit -s unlimited 2>/dev/null");
|
my $limit = "unlimited";
|
||||||
|
# AddressSanitizer doesn't work with 'ulimit -s unlimted'
|
||||||
|
if (`${\(verilator_bin())} --get-supported DEV_ASAN` eq "1\n") {
|
||||||
|
# Use host 'physical memory / #cores / 8' instead
|
||||||
|
open(my $fh, "<", "/proc/meminfo") || die "Can't read host memory for asan";
|
||||||
|
while (<$fh>) {
|
||||||
|
if (m/MemTotal:\s+(\d+)\s+kB/) {
|
||||||
|
$limit = int(int($1)/`nproc`/8);
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close($fh);
|
||||||
|
}
|
||||||
|
system("ulimit -s $limit 2>/dev/null");
|
||||||
my $status = $?;
|
my $status = $?;
|
||||||
if ($status == 0) {
|
if ($status == 0) {
|
||||||
return "ulimit -s unlimited 2>/dev/null; exec ";
|
return "ulimit -s $limit 2>/dev/null; exec ";
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@@ -227,17 +246,18 @@ sub run {
|
|||||||
warn "%Error: export VERILATOR_ROOT=" . ($ENV{VERILATOR_ROOT} || "") . "\n";
|
warn "%Error: export VERILATOR_ROOT=" . ($ENV{VERILATOR_ROOT} || "") . "\n";
|
||||||
warn "%Error: $command\n";
|
warn "%Error: $command\n";
|
||||||
}
|
}
|
||||||
if ($status & 127) {
|
my $signal = ($status & 127);
|
||||||
if (($status & 127) == 4 # SIGILL
|
if ($signal) {
|
||||||
|| ($status & 127) == 8 # SIGFPA
|
if ($signal == 4 # SIGILL
|
||||||
|| ($status & 127) == 11) { # SIGSEGV
|
|| $signal == 8 # SIGFPA
|
||||||
|
|| $signal == 11) { # SIGSEGV
|
||||||
warn "%Error: Verilator internal fault, sorry. "
|
warn "%Error: Verilator internal fault, sorry. "
|
||||||
. "Suggest trying --debug --gdbbt\n" if !$Debug;
|
. "Suggest trying --debug --gdbbt\n" if !$Debug;
|
||||||
} elsif (($status & 127) == 6) { # SIGABRT
|
} elsif ($signal == 6) { # SIGABRT
|
||||||
warn "%Error: Verilator aborted. "
|
warn "%Error: Verilator aborted. "
|
||||||
. "Suggest trying --debug --gdbbt\n" if !$Debug;
|
. "Suggest trying --debug --gdbbt\n" if !$Debug;
|
||||||
} else {
|
} else {
|
||||||
warn "%Error: Verilator threw signal $status. "
|
warn "%Error: Verilator threw signal $signal. "
|
||||||
. "Suggest trying --debug --gdbbt\n" if !$Debug;
|
. "Suggest trying --debug --gdbbt\n" if !$Debug;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -245,8 +265,8 @@ sub run {
|
|||||||
warn "%Error: Command Failed $command\n";
|
warn "%Error: Command Failed $command\n";
|
||||||
}
|
}
|
||||||
exit $! if $!; # errno
|
exit $! if $!; # errno
|
||||||
exit $? >> 8 if $? >> 8; # child exit status
|
exit $? >> 8 if $? >> 8; # pass along child exit code
|
||||||
exit 255; # last resort
|
exit 128 + $signal; # last resort
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -311,6 +331,7 @@ detailed descriptions of these arguments.
|
|||||||
+1800-2012ext+<ext> Use SystemVerilog 2012 with file extension <ext>
|
+1800-2012ext+<ext> Use SystemVerilog 2012 with file extension <ext>
|
||||||
+1800-2017ext+<ext> Use SystemVerilog 2017 with file extension <ext>
|
+1800-2017ext+<ext> Use SystemVerilog 2017 with file extension <ext>
|
||||||
+1800-2023ext+<ext> Use SystemVerilog 2023 with file extension <ext>
|
+1800-2023ext+<ext> Use SystemVerilog 2023 with file extension <ext>
|
||||||
|
--no-aslr Disable address space layout randomization
|
||||||
--no-assert Disable all assertions
|
--no-assert Disable all assertions
|
||||||
--no-assert-case Disable unique/unique0/priority-case assertions
|
--no-assert-case Disable unique/unique0/priority-case assertions
|
||||||
--autoflush Flush streams after all $displays
|
--autoflush Flush streams after all $displays
|
||||||
@@ -322,8 +343,6 @@ detailed descriptions of these arguments.
|
|||||||
--build-jobs <jobs> Parallelism for --build
|
--build-jobs <jobs> Parallelism for --build
|
||||||
--cc Create C++ output
|
--cc Create C++ output
|
||||||
-CFLAGS <flags> C++ compiler arguments for makefile
|
-CFLAGS <flags> C++ compiler arguments for makefile
|
||||||
--clk <signal-name> Mark specified signal as clock
|
|
||||||
--no-clk <signal-name> Prevent marking specified signal as clock
|
|
||||||
--compiler <compiler-name> Tune for specified C++ compiler
|
--compiler <compiler-name> Tune for specified C++ compiler
|
||||||
--compiler-include Include additional header in the precompiled one
|
--compiler-include Include additional header in the precompiled one
|
||||||
--converge-limit <loops> Tune convergence settle time
|
--converge-limit <loops> Tune convergence settle time
|
||||||
@@ -352,6 +371,7 @@ detailed descriptions of these arguments.
|
|||||||
--dump-defines Show preprocessor defines with -E
|
--dump-defines Show preprocessor defines with -E
|
||||||
--dump-dfg Enable dumping DfgGraphs to .dot files
|
--dump-dfg Enable dumping DfgGraphs to .dot files
|
||||||
--dump-graph Enable dumping V3Graphs to .dot files
|
--dump-graph Enable dumping V3Graphs to .dot files
|
||||||
|
--dump-inputs Enable dumping preprocessed input files
|
||||||
--dump-tree Enable dumping Ast .tree files
|
--dump-tree Enable dumping Ast .tree files
|
||||||
--dump-tree-addrids Use short identifiers instead of addresses
|
--dump-tree-addrids Use short identifiers instead of addresses
|
||||||
--dump-tree-dot Enable dumping Ast .tree.dot debug files
|
--dump-tree-dot Enable dumping Ast .tree.dot debug files
|
||||||
@@ -382,11 +402,15 @@ detailed descriptions of these arguments.
|
|||||||
--getenv <var> Get environment variable with defaults
|
--getenv <var> Get environment variable with defaults
|
||||||
--help Show this help
|
--help Show this help
|
||||||
--hierarchical Enable hierarchical Verilation
|
--hierarchical Enable hierarchical Verilation
|
||||||
--hierarchical-params-file <name> Internal option that specifies parameters file for hier blocks
|
--hierarchical-block <block> Internal use only for --hierarchical
|
||||||
|
--hierarchical-child <block> Internal use only for --hierarchical
|
||||||
|
--hierarchical-params-file <name> Internal option that specifies parameters file for hier blocks
|
||||||
--hierarchical-threads <threads> Number of threads for hierarchical scheduling
|
--hierarchical-threads <threads> Number of threads for hierarchical scheduling
|
||||||
-I<dir> Directory to search for includes
|
-I<dir> Directory to search for includes
|
||||||
--if-depth <value> Tune IFDEPTH warning
|
--if-depth <value> Tune IFDEPTH warning
|
||||||
+incdir+<dir> Directory to search for includes
|
+incdir+<dir> Directory to search for includes
|
||||||
|
--inline-cfuncs <value> Inline CFuncs with <=value nodes (0=off)
|
||||||
|
--inline-cfuncs-product <value> Inline CFuncs if size*calls <= value
|
||||||
--inline-mult <value> Tune module inlining
|
--inline-mult <value> Tune module inlining
|
||||||
--instr-count-dpi <value> Assumed dynamic instruction count of DPI imports
|
--instr-count-dpi <value> Assumed dynamic instruction count of DPI imports
|
||||||
-j <jobs> Parallelism for --build-jobs/--verilate-jobs
|
-j <jobs> Parallelism for --build-jobs/--verilate-jobs
|
||||||
@@ -398,8 +422,10 @@ detailed descriptions of these arguments.
|
|||||||
--l2-name <value> Verilog scope name of the top module
|
--l2-name <value> Verilog scope name of the top module
|
||||||
--language <lang> Default language standard to parse
|
--language <lang> Default language standard to parse
|
||||||
-LDFLAGS <flags> Linker pre-object arguments for makefile
|
-LDFLAGS <flags> Linker pre-object arguments for makefile
|
||||||
|
-libmap Specify library mapping file
|
||||||
--lib-create <name> Create a DPI library
|
--lib-create <name> Create a DPI library
|
||||||
+libext+<ext>+[ext]... Extensions for finding modules
|
+libext+<ext>+[ext]... Extensions for finding modules
|
||||||
|
+librescan Ignored for compatibility
|
||||||
--lint-only Lint, but do not make output
|
--lint-only Lint, but do not make output
|
||||||
--localize-max-size <value> Tune localize optimization variable size
|
--localize-max-size <value> Tune localize optimization variable size
|
||||||
--main Generate C++ main() file
|
--main Generate C++ main() file
|
||||||
@@ -414,6 +440,8 @@ detailed descriptions of these arguments.
|
|||||||
+notimingchecks Ignored
|
+notimingchecks Ignored
|
||||||
-o <executable> Name of final executable
|
-o <executable> Name of final executable
|
||||||
-O0 Disable optimizations
|
-O0 Disable optimizations
|
||||||
|
-O1 Default optimizations
|
||||||
|
-O2 Stronger optimizations
|
||||||
-O3 High-performance optimizations
|
-O3 High-performance optimizations
|
||||||
-O<optimization-letter> Selectable optimizations
|
-O<optimization-letter> Selectable optimizations
|
||||||
--output-groups <numfiles> Group .cpp files into larger ones
|
--output-groups <numfiles> Group .cpp files into larger ones
|
||||||
@@ -429,8 +457,9 @@ detailed descriptions of these arguments.
|
|||||||
--pins-uint8 Specify types for top-level ports
|
--pins-uint8 Specify types for top-level ports
|
||||||
--no-pins64 Don't use uint64_t's for 33-64 bit sigs
|
--no-pins64 Don't use uint64_t's for 33-64 bit sigs
|
||||||
--pipe-filter <command> Filter all input through a script
|
--pipe-filter <command> Filter all input through a script
|
||||||
--pp-comments Show preprocessor comments with -E
|
|
||||||
--prefix <topname> Name of top-level class
|
--prefix <topname> Name of top-level class
|
||||||
|
--preproc-comments Include preprocessor comments in the output with -E
|
||||||
|
--preproc-defines Include preprocessor defines in the output with -E
|
||||||
--preproc-resolve Include all found modules in the output with -E
|
--preproc-resolve Include all found modules in the output with -E
|
||||||
--preproc-token-limit Maximum tokens on a line allowed by preprocessor
|
--preproc-token-limit Maximum tokens on a line allowed by preprocessor
|
||||||
--private Debugging; see docs
|
--private Debugging; see docs
|
||||||
@@ -448,6 +477,7 @@ detailed descriptions of these arguments.
|
|||||||
--public-params Mark all parameters as public_flat
|
--public-params Mark all parameters as public_flat
|
||||||
-pvalue+<name>=<value> Overwrite toplevel parameter
|
-pvalue+<name>=<value> Overwrite toplevel parameter
|
||||||
--quiet Minimize additional printing
|
--quiet Minimize additional printing
|
||||||
|
--quiet-build Don't print build progress
|
||||||
--quiet-exit Don't print the command on failure
|
--quiet-exit Don't print the command on failure
|
||||||
--quiet-stats Don't print statistics
|
--quiet-stats Don't print statistics
|
||||||
--relative-includes Resolve includes relative to current file
|
--relative-includes Resolve includes relative to current file
|
||||||
@@ -492,6 +522,7 @@ detailed descriptions of these arguments.
|
|||||||
-U<var> Undefine preprocessor define
|
-U<var> Undefine preprocessor define
|
||||||
--no-unlimited-stack Don't disable stack size limit
|
--no-unlimited-stack Don't disable stack size limit
|
||||||
--unroll-count <loops> Tune maximum loop iterations
|
--unroll-count <loops> Tune maximum loop iterations
|
||||||
|
--unroll-limit <loops> Maximum loop iterations before assuming infinite loop
|
||||||
--unroll-stmts <stmts> Tune maximum loop body size
|
--unroll-stmts <stmts> Tune maximum loop body size
|
||||||
--unused-regexp <regexp> Tune UNUSED lint signals
|
--unused-regexp <regexp> Tune UNUSED lint signals
|
||||||
-V Verbose version and config
|
-V Verbose version and config
|
||||||
@@ -553,7 +584,7 @@ description of these arguments.
|
|||||||
|
|
||||||
The latest version is available from L<https://verilator.org>.
|
The latest version is available from L<https://verilator.org>.
|
||||||
|
|
||||||
Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
|
Copyright 2003-2026 by Wilson Snyder. This program is free software; you can
|
||||||
redistribute it and/or modify the Verilator internals under the terms of
|
redistribute it and/or modify the Verilator internals under the terms of
|
||||||
either the GNU Lesser General Public License Version 3 or the Perl Artistic
|
either the GNU Lesser General Public License Version 3 or the Perl Artistic
|
||||||
License Version 2.0.
|
License Version 2.0.
|
||||||
|
|||||||
+33
-34
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# mypy: disallow-untyped-defs
|
||||||
# pylint: disable=C0103,C0114,C0115,C0116,C0123,C0209,C0301,R0902,R0913,R0914,R0912,R0915,W0621
|
# pylint: disable=C0103,C0114,C0115,C0116,C0123,C0209,C0301,R0902,R0913,R0914,R0912,R0915,W0621
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
@@ -16,18 +17,14 @@ parser = argparse.ArgumentParser(
|
|||||||
|
|
||||||
For documentation see
|
For documentation see
|
||||||
https://verilator.org/guide/latest/exe_verilator_ccache_report.html""",
|
https://verilator.org/guide/latest/exe_verilator_ccache_report.html""",
|
||||||
epilog="""Copyright 2002-2025 by Wilson Snyder. This program is free software; you
|
epilog="""Copyright 2002-2026 by Wilson Snyder. This program is free software; you
|
||||||
can redistribute it and/or modify it under the terms of either the GNU
|
can redistribute it and/or modify it under the terms of either the GNU
|
||||||
Lesser General Public License Version 3 or the Perl Artistic License
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
Version 2.0.
|
Version 2.0.
|
||||||
|
|
||||||
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")
|
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")
|
||||||
|
|
||||||
parser.add_argument('-o',
|
parser.add_argument('-o', type=pathlib.Path, metavar="OUTFILE", required=True, help='output file')
|
||||||
type=argparse.FileType('w'),
|
|
||||||
metavar="OUTFILE",
|
|
||||||
required=True,
|
|
||||||
help='output file')
|
|
||||||
parser.add_argument('logdir', type=pathlib.Path, help='log directory')
|
parser.add_argument('logdir', type=pathlib.Path, help='log directory')
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
@@ -36,7 +33,7 @@ results = {}
|
|||||||
elapsed = {}
|
elapsed = {}
|
||||||
|
|
||||||
|
|
||||||
def toDateTime(s):
|
def toDateTime(s: str) -> datetime:
|
||||||
return datetime.strptime(s, "%Y-%m-%dT%H:%M:%S.%f")
|
return datetime.strptime(s, "%Y-%m-%dT%H:%M:%S.%f")
|
||||||
|
|
||||||
|
|
||||||
@@ -53,37 +50,39 @@ for logfile in args.logdir.iterdir():
|
|||||||
match = re.match(r'\[(\S+)\s.*Result: (.*)$', line)
|
match = re.match(r'\[(\S+)\s.*Result: (.*)$', line)
|
||||||
if match:
|
if match:
|
||||||
assert obj is not None
|
assert obj is not None
|
||||||
|
assert start is not None
|
||||||
elapsed[obj] = toDateTime(match.group(1)) - start
|
elapsed[obj] = toDateTime(match.group(1)) - start
|
||||||
results[obj] = match.group(2)
|
results[obj] = match.group(2)
|
||||||
|
|
||||||
args.o.write("#" * 80 + "\n")
|
with args.o.open("w") as ofd:
|
||||||
args.o.write("ccache report (from verilator_ccache_report) :\n")
|
ofd.write("#" * 80 + "\n")
|
||||||
|
ofd.write("ccache report (from verilator_ccache_report) :\n")
|
||||||
|
|
||||||
if not results:
|
if not results:
|
||||||
args.o.write("\nAll object files up to date\n")
|
ofd.write("\nAll object files up to date\n")
|
||||||
else:
|
else:
|
||||||
args.o.write("\nCompiled object files:\n")
|
ofd.write("\nCompiled object files:\n")
|
||||||
wnames = max(len(_) for _ in results) + 1
|
wnames = max(len(_) for _ in results) + 1
|
||||||
wresults = max(len(_) for _ in results.values()) + 1
|
wresults = max(len(_) for _ in results.values()) + 1
|
||||||
for k in sorted(results.keys()):
|
for k in sorted(results.keys()):
|
||||||
args.o.write("{:{wnames}} : {:{wresults}} : {}s\n".format(k,
|
ofd.write("{:{wnames}} : {:{wresults}} : {}s\n".format(k,
|
||||||
results[k],
|
results[k],
|
||||||
elapsed[k].total_seconds(),
|
elapsed[k].total_seconds(),
|
||||||
wnames=wnames,
|
wnames=wnames,
|
||||||
wresults=wresults))
|
wresults=wresults))
|
||||||
|
|
||||||
args.o.write("\nSummary:\n")
|
ofd.write("\nSummary:\n")
|
||||||
counts = collections.Counter(_ for _ in results.values())
|
counts = collections.Counter(_ for _ in results.values())
|
||||||
total = sum(counts.values())
|
total = sum(counts.values())
|
||||||
for k in sorted(counts.keys()):
|
for k in sorted(counts.keys()):
|
||||||
c = counts[k]
|
c = counts[k]
|
||||||
args.o.write("{:{width}}| {} ({:.2%})\n".format(k, c, c / total, width=wresults))
|
ofd.write("{:{width}}| {} ({:.2%})\n".format(k, c, c / total, width=wresults))
|
||||||
|
|
||||||
args.o.write("\nLongest:\n")
|
ofd.write("\nLongest:\n")
|
||||||
longest = sorted(list(elapsed.items()), key=lambda kv: -kv[1].total_seconds())
|
longest = sorted(list(elapsed.items()), key=lambda kv: -kv[1].total_seconds())
|
||||||
for i, (k, v) in enumerate(longest):
|
for i, (k, v) in enumerate(longest):
|
||||||
args.o.write("{:{width}}| {}s\n".format(k, v.total_seconds(), width=wnames))
|
ofd.write("{:{width}}| {}s\n".format(k, v.total_seconds(), width=wnames))
|
||||||
if i > 4:
|
if i > 4:
|
||||||
break
|
break
|
||||||
|
|
||||||
args.o.write("#" * 80 + "\n")
|
ofd.write("#" * 80 + "\n")
|
||||||
|
|||||||
+11
-8
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
# Copyright 2003-2026 by Wilson Snyder. This program is free software; you
|
||||||
# can redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
@@ -118,21 +118,24 @@ sub run {
|
|||||||
warn "%Error: export VERILATOR_ROOT=" . ($ENV{VERILATOR_ROOT} || "") . "\n";
|
warn "%Error: export VERILATOR_ROOT=" . ($ENV{VERILATOR_ROOT} || "") . "\n";
|
||||||
warn "%Error: $command\n";
|
warn "%Error: $command\n";
|
||||||
}
|
}
|
||||||
if ($status & 127) {
|
my $signal = ($status & 127);
|
||||||
if (($status & 127) == 8 || ($status & 127) == 11) { # SIGFPA or SIGSEGV
|
if ($signal) {
|
||||||
|
if ($signal == 4 # SIGILL
|
||||||
|
|| $signal == 8 # SIGFPA
|
||||||
|
|| $signal == 11) { # SIGSEGV
|
||||||
warn "%Error: Verilator_coverage internal fault, sorry.\n" if !$Debug;
|
warn "%Error: Verilator_coverage internal fault, sorry.\n" if !$Debug;
|
||||||
} elsif (($status & 127) == 6) { # SIGABRT
|
} elsif ($signal == 6) { # SIGABRT
|
||||||
warn "%Error: Verilator_coverage aborted.\n" if !$Debug;
|
warn "%Error: Verilator_coverage aborted.\n" if !$Debug;
|
||||||
} else {
|
} else {
|
||||||
warn "%Error: Verilator_coverage threw signal $status.\n" if !$Debug;
|
warn "%Error: Verilator_coverage threw signal $signal.\n" if !$Debug;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($status != 256 || $Debug) { # i.e. not normal exit(1)
|
if ($status != 256 || $Debug) { # i.e. not normal exit(1)
|
||||||
warn "%Error: Command Failed $command\n";
|
warn "%Error: Command Failed $command\n";
|
||||||
}
|
}
|
||||||
exit $! if $!; # errno
|
exit $! if $!; # errno
|
||||||
exit $? >> 8 if $? >> 8; # child exit status
|
exit $? >> 8 if $? >> 8; # pass along child exit code
|
||||||
exit 255; # last resort
|
exit 128 + $signal; # last resort
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,7 +192,7 @@ L<https://verilator.org/guide/latest/exe_verilator_coverage.html>.
|
|||||||
|
|
||||||
The latest version is available from L<https://verilator.org>.
|
The latest version is available from L<https://verilator.org>.
|
||||||
|
|
||||||
Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
Copyright 2003-2026 by Wilson Snyder. This program is free software; you
|
||||||
can redistribute it and/or modify the Verilator internals under the terms
|
can redistribute it and/or modify the Verilator internals under the terms
|
||||||
of either the GNU Lesser General Public License Version 3 or the Perl
|
of either the GNU Lesser General Public License Version 3 or the Perl
|
||||||
Artistic License Version 2.0.
|
Artistic License Version 2.0.
|
||||||
|
|||||||
+27
-24
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# pylint: disable=C0103,C0114,C0116,C0209
|
# mypy: disallow-untyped-defs
|
||||||
|
# pylint: disable=C0103,C0114,C0116,C0209,W0603
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
@@ -9,25 +10,29 @@ import os.path
|
|||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
exit_code = 0
|
||||||
|
|
||||||
def diff(a, b):
|
|
||||||
|
|
||||||
|
def diff(a: str, b: str) -> None:
|
||||||
if not os.path.exists(a):
|
if not os.path.exists(a):
|
||||||
sys.exit("%Error: No old diff filename found: " + a)
|
sys.stderr.write("%Error: No old diff filename found: " + a + "\n")
|
||||||
|
sys.exit(2)
|
||||||
if not os.path.exists(b):
|
if not os.path.exists(b):
|
||||||
sys.exit("%Error: No new diff filename found: " + b)
|
sys.stderr.write("%Error: No new diff filename found: " + b + "\n")
|
||||||
|
sys.exit(2)
|
||||||
|
|
||||||
if os.path.isdir(a) and os.path.isdir(b):
|
if os.path.isdir(a) and os.path.isdir(b):
|
||||||
diff_dir(a, b)
|
diff_dir(a, b)
|
||||||
elif os.path.isfile(a) and os.path.isfile(b):
|
elif os.path.isfile(a) and os.path.isfile(b):
|
||||||
diff_file(a, b)
|
diff_file(a, b)
|
||||||
else:
|
else:
|
||||||
sys.exit("%Error: Mix of files and dirs")
|
sys.stderr.write("%Error: Mix of files and dirs")
|
||||||
|
sys.exit(2)
|
||||||
|
|
||||||
|
|
||||||
def diff_dir(a, b):
|
def diff_dir(a: str, b: str) -> None:
|
||||||
# Diff all files under two directories
|
# Diff all files under two directories
|
||||||
files = collections.defaultdict(lambda: {})
|
files: dict[str, dict[str, str]] = collections.defaultdict(lambda: {})
|
||||||
|
|
||||||
for fn in glob.glob(a + "/*.tree"):
|
for fn in glob.glob(a + "/*.tree"):
|
||||||
base = re.sub(r'.*/', '', fn)
|
base = re.sub(r'.*/', '', fn)
|
||||||
@@ -50,7 +55,9 @@ def diff_dir(a, b):
|
|||||||
sys.stderr.write("%Warning: No .tree files found that have similar base names\n")
|
sys.stderr.write("%Warning: No .tree files found that have similar base names\n")
|
||||||
|
|
||||||
|
|
||||||
def diff_file(a, b):
|
def diff_file(a: str, b: str) -> None:
|
||||||
|
global exit_code
|
||||||
|
|
||||||
# Compare the two tree files
|
# Compare the two tree files
|
||||||
short_a = re.sub(r'[^a-zA-Z0-9.]+', '_', a)
|
short_a = re.sub(r'[^a-zA-Z0-9.]+', '_', a)
|
||||||
short_b = re.sub(r'[^a-zA-Z0-9.]+', '_', b)
|
short_b = re.sub(r'[^a-zA-Z0-9.]+', '_', b)
|
||||||
@@ -65,25 +72,18 @@ def diff_file(a, b):
|
|||||||
|
|
||||||
filterf(a, tmp_a)
|
filterf(a, tmp_a)
|
||||||
filterf(b, tmp_b)
|
filterf(b, tmp_b)
|
||||||
os.system("diff -u " + tmp_a + " " + tmp_b)
|
status = os.system("diff -u " + tmp_a + " " + tmp_b)
|
||||||
os.unlink(tmp_a)
|
os.unlink(tmp_a)
|
||||||
os.unlink(tmp_b)
|
os.unlink(tmp_b)
|
||||||
|
|
||||||
|
status_exit_code = status >> 8
|
||||||
def version_from(filename):
|
if status_exit_code == 1:
|
||||||
# Return dump format
|
exit_code = 1
|
||||||
with open(filename, "r", encoding="utf8") as fh:
|
elif status_exit_code:
|
||||||
lineno = 0
|
exit_code = 2
|
||||||
for line in fh:
|
|
||||||
if lineno > 10:
|
|
||||||
break
|
|
||||||
match = re.search(r'format (0x[0-9.]+)', line)
|
|
||||||
if match:
|
|
||||||
return hex(match.group(1))
|
|
||||||
return 1.0
|
|
||||||
|
|
||||||
|
|
||||||
def filterf(fn1, fn2):
|
def filterf(fn1: str, fn2: str) -> None:
|
||||||
# Remove hex numbers before diffing
|
# Remove hex numbers before diffing
|
||||||
with open(fn1, "r", encoding="utf8") as fh1:
|
with open(fn1, "r", encoding="utf8") as fh1:
|
||||||
with open(fn2, "w", encoding="utf8") as fh2:
|
with open(fn2, "w", encoding="utf8") as fh2:
|
||||||
@@ -107,8 +107,10 @@ parser = argparse.ArgumentParser(
|
|||||||
|
|
||||||
Verilator_difftree is used for debugging Verilator tree output files.
|
Verilator_difftree is used for debugging Verilator tree output files.
|
||||||
It performs a diff between two files, or all files common between two
|
It performs a diff between two files, or all files common between two
|
||||||
directories, ignoring irrelevant pointer differences.""",
|
directories, ignoring irrelevant pointer differences.
|
||||||
epilog="""Copyright 2005-2025 by Wilson Snyder. This program is free software; you
|
|
||||||
|
Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.""",
|
||||||
|
epilog="""Copyright 2005-2026 by Wilson Snyder. This program is free software; you
|
||||||
can redistribute it and/or modify it under the terms of either the GNU
|
can redistribute it and/or modify it under the terms of either the GNU
|
||||||
Lesser General Public License Version 3 or the Perl Artistic License
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
Version 2.0.
|
Version 2.0.
|
||||||
@@ -124,6 +126,7 @@ parser.add_argument('fileb', help='input file b to diff')
|
|||||||
|
|
||||||
Args = parser.parse_args()
|
Args = parser.parse_args()
|
||||||
diff(Args.filea, Args.fileb)
|
diff(Args.filea, Args.fileb)
|
||||||
|
sys.exit(exit_code)
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
|
|||||||
+15
-10
@@ -33,7 +33,7 @@ ThreadScheduleWaitIntervals = [] # list of (start, tick, ecpu) pairs
|
|||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|
||||||
def read_data(filename):
|
def read_data(filename: str) -> None:
|
||||||
with open(filename, "r", encoding="utf8") as fh:
|
with open(filename, "r", encoding="utf8") as fh:
|
||||||
re_thread = re.compile(r'^VLPROFTHREAD (\d+)$')
|
re_thread = re.compile(r'^VLPROFTHREAD (\d+)$')
|
||||||
re_record = re.compile(r'^VLPROFEXEC (\S+) (\d+)(.*)$')
|
re_record = re.compile(r'^VLPROFEXEC (\S+) (\d+)(.*)$')
|
||||||
@@ -51,6 +51,7 @@ def read_data(filename):
|
|||||||
re_proc_dat = re.compile(r'VLPROFPROC ([a-z_ ]+)\s*:\s*(.*)$')
|
re_proc_dat = re.compile(r'VLPROFPROC ([a-z_ ]+)\s*:\s*(.*)$')
|
||||||
cpu = None
|
cpu = None
|
||||||
thread = 0
|
thread = 0
|
||||||
|
thread_last_ecpu = None
|
||||||
|
|
||||||
global LongestVcdStrValueLength
|
global LongestVcdStrValueLength
|
||||||
global ExecGraphTime
|
global ExecGraphTime
|
||||||
@@ -109,9 +110,13 @@ def read_data(filename):
|
|||||||
tick)
|
tick)
|
||||||
elif kind == "THREAD_SCHEDULE_WAIT_BEGIN":
|
elif kind == "THREAD_SCHEDULE_WAIT_BEGIN":
|
||||||
ecpu = int(re_payload_wait.match(payload).groups()[0])
|
ecpu = int(re_payload_wait.match(payload).groups()[0])
|
||||||
|
thread_last_ecpu = ecpu
|
||||||
ThreadScheduleWait[ecpu].append(tick)
|
ThreadScheduleWait[ecpu].append(tick)
|
||||||
elif kind == "THREAD_SCHEDULE_WAIT_END":
|
elif kind == "THREAD_SCHEDULE_WAIT_END":
|
||||||
ecpu = int(re_payload_wait.match(payload).groups()[0])
|
# Might have ended on different CPU then we got THREAD_SCHEDULE_WAIT_BEGIN
|
||||||
|
assert thread_last_ecpu is not None, "THREAD_SCHEDULE_WAIT_END without BEGIN"
|
||||||
|
ecpu = thread_last_ecpu
|
||||||
|
thread_last_ecpu = None
|
||||||
start = ThreadScheduleWait[ecpu].pop()
|
start = ThreadScheduleWait[ecpu].pop()
|
||||||
WaitingTime += tick - start
|
WaitingTime += tick - start
|
||||||
ThreadScheduleWaitIntervals.append((start, tick, ecpu))
|
ThreadScheduleWaitIntervals.append((start, tick, ecpu))
|
||||||
@@ -166,7 +171,7 @@ def re_match_result(regexp, line, result_to):
|
|||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|
||||||
def report():
|
def report() -> None:
|
||||||
print("Verilator Gantt report")
|
print("Verilator Gantt report")
|
||||||
|
|
||||||
print("\nArgument settings:")
|
print("\nArgument settings:")
|
||||||
@@ -215,12 +220,12 @@ def report():
|
|||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
||||||
def report_numa():
|
def report_numa() -> None:
|
||||||
print("\nNUMA assignment:")
|
print("\nNUMA assignment:")
|
||||||
print(" NUMA status = %s" % Global['info']['numa'])
|
print(" NUMA status = %s" % Global['info']['numa'])
|
||||||
|
|
||||||
|
|
||||||
def report_mtasks():
|
def report_mtasks() -> None:
|
||||||
if not Mtasks:
|
if not Mtasks:
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -337,7 +342,7 @@ def report_mtasks():
|
|||||||
print(" e ^ stddev = %0.3f" % math.exp(stddev))
|
print(" e ^ stddev = %0.3f" % math.exp(stddev))
|
||||||
|
|
||||||
|
|
||||||
def report_cpus():
|
def report_cpus() -> None:
|
||||||
print("\nCPU info:")
|
print("\nCPU info:")
|
||||||
|
|
||||||
Global['cpu_sockets'] = collections.defaultdict(lambda: 0)
|
Global['cpu_sockets'] = collections.defaultdict(lambda: 0)
|
||||||
@@ -372,14 +377,14 @@ def report_cpus():
|
|||||||
Global['cpu_socket_cores_warning'] = True
|
Global['cpu_socket_cores_warning'] = True
|
||||||
|
|
||||||
|
|
||||||
def report_sections():
|
def report_sections() -> None:
|
||||||
for thread, section in Sections.items():
|
for thread, section in Sections.items():
|
||||||
if section:
|
if section:
|
||||||
print(f"\nSection profile for thread {thread}:")
|
print(f"\nSection profile for thread {thread}:")
|
||||||
report_section(section)
|
report_section(section)
|
||||||
|
|
||||||
|
|
||||||
def report_section(section):
|
def report_section(section) -> None:
|
||||||
totalTime = collections.defaultdict(lambda: 0)
|
totalTime = collections.defaultdict(lambda: 0)
|
||||||
selfTime = collections.defaultdict(lambda: 0)
|
selfTime = collections.defaultdict(lambda: 0)
|
||||||
|
|
||||||
@@ -431,7 +436,7 @@ def report_section(section):
|
|||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|
||||||
def write_vcd(filename):
|
def write_vcd(filename: str) -> None:
|
||||||
print("Writing %s" % filename)
|
print("Writing %s" % filename)
|
||||||
with open(filename, "w", encoding="utf8") as fh:
|
with open(filename, "w", encoding="utf8") as fh:
|
||||||
# dict of dicts of hierarchy elements/signal name -> (code, width)
|
# dict of dicts of hierarchy elements/signal name -> (code, width)
|
||||||
@@ -608,7 +613,7 @@ Verilator_gantt creates a visual representation to help analyze Verilator
|
|||||||
|
|
||||||
For documentation see
|
For documentation see
|
||||||
https://verilator.org/guide/latest/exe_verilator_gantt.html""",
|
https://verilator.org/guide/latest/exe_verilator_gantt.html""",
|
||||||
epilog="""Copyright 2018-2025 by Wilson Snyder. This program is free software; you
|
epilog="""Copyright 2018-2026 by Wilson Snyder. This program is free software; you
|
||||||
can redistribute it and/or modify it under the terms of either the GNU
|
can redistribute it and/or modify it under the terms of either the GNU
|
||||||
Lesser General Public License Version 3 or the Perl Artistic License
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
Version 2.0.
|
Version 2.0.
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# mypy: disallow-untyped-defs
|
||||||
# pylint: disable=C0114,C0209
|
# pylint: disable=C0114,C0209
|
||||||
#
|
#
|
||||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
# Copyright 2003-2026 by Wilson Snyder. This program is free software; you
|
||||||
# can redistribute it and/or modify the Verilator internals under the terms
|
# can redistribute it and/or modify the Verilator internals under the terms
|
||||||
# of either the GNU Lesser General Public License Version 3 or the Perl
|
# of either the GNU Lesser General Public License Version 3 or the Perl
|
||||||
# Artistic License Version 2.0.
|
# Artistic License Version 2.0.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import re
|
|||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|
||||||
def profcfunc(filename):
|
def profcfunc(filename: str) -> None:
|
||||||
funcs = {}
|
funcs = {}
|
||||||
|
|
||||||
with open(filename, "r", encoding="utf8") as fh:
|
with open(filename, "r", encoding="utf8") as fh:
|
||||||
@@ -26,7 +26,7 @@ def profcfunc(filename):
|
|||||||
calls = float(match.group(3))
|
calls = float(match.group(3))
|
||||||
func = match.group(4)
|
func = match.group(4)
|
||||||
if func not in funcs:
|
if func not in funcs:
|
||||||
funcs[func] = {'pct': 0, 'sec': 0, 'calls': 0}
|
funcs[func] = {'pct': 0.0, 'sec': 0.0, 'calls': 0}
|
||||||
funcs[func]['pct'] += pct
|
funcs[func]['pct'] += pct
|
||||||
funcs[func]['sec'] += sec
|
funcs[func]['sec'] += sec
|
||||||
funcs[func]['calls'] += calls
|
funcs[func]['calls'] += calls
|
||||||
@@ -150,7 +150,7 @@ def profcfunc(filename):
|
|||||||
print((" time seconds seconds calls %-" + str(design_width) +
|
print((" time seconds seconds calls %-" + str(design_width) +
|
||||||
"s type filename and line number") % "design")
|
"s type filename and line number") % "design")
|
||||||
|
|
||||||
cume = 0
|
cume = 0.0
|
||||||
for func in sorted(vfuncs.keys(), key=lambda f: vfuncs[f]['sec'], reverse=True):
|
for func in sorted(vfuncs.keys(), key=lambda f: vfuncs[f]['sec'], reverse=True):
|
||||||
cume += vfuncs[func]['sec']
|
cume += vfuncs[func]['sec']
|
||||||
print(("%6.2f %9.2f %8.2f %10d %-" + str(design_width) + "s %s") %
|
print(("%6.2f %9.2f %8.2f %10d %-" + str(design_width) + "s %s") %
|
||||||
@@ -173,7 +173,7 @@ in each Verilog block.
|
|||||||
|
|
||||||
For documentation see
|
For documentation see
|
||||||
https://verilator.org/guide/latest/exe_verilator_profcfunc.html""",
|
https://verilator.org/guide/latest/exe_verilator_profcfunc.html""",
|
||||||
epilog="""Copyright 2002-2025 by Wilson Snyder. This program is free software; you
|
epilog="""Copyright 2002-2026 by Wilson Snyder. This program is free software; you
|
||||||
can redistribute it and/or modify it under the terms of either the GNU
|
can redistribute it and/or modify it under the terms of either the GNU
|
||||||
Lesser General Public License Version 3 or the Perl Artistic License
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
Version 2.0.
|
Version 2.0.
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# DESCRIPTION: Verilator: CI ccache maintenance
|
|
||||||
#
|
|
||||||
# Copyright 2020 by Geza Lore. This program is free software; you
|
|
||||||
# can redistribute it and/or modify it under the terms of either the GNU
|
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
||||||
# Version 2.0.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# This script is run in 'before_script', once ccache has been set up.
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# Show version
|
|
||||||
ccache --version
|
|
||||||
|
|
||||||
# Flush ccache if requested in commit message
|
|
||||||
COMMIT="${CI_PULL_REQUEST_SHA:-$CI_COMMIT}"
|
|
||||||
if git log --format=%B -n 1 "$COMMIT" | grep -q -i '\[CI\s\+ccache\s\+clear\]'; then
|
|
||||||
echo "Flushing ccache due to commit message"
|
|
||||||
ccache -C
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Dump stats, then zero stats
|
|
||||||
# 22.04: ccache -s -v -z
|
|
||||||
ccache -s -z
|
|
||||||
+9
-2
@@ -37,6 +37,13 @@ else
|
|||||||
fatal "Unknown os: '$CI_OS_NAME'"
|
fatal "Unknown os: '$CI_OS_NAME'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$CI_OS_NAME" = "linux" ]; then
|
||||||
|
# Avoid slow "processing triggers for man db"
|
||||||
|
echo "path-exclude /usr/share/doc/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
|
||||||
|
echo "path-exclude /usr/share/man/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
|
||||||
|
echo "path-exclude /usr/share/info/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
|
||||||
|
fi
|
||||||
|
|
||||||
install-vcddiff() {
|
install-vcddiff() {
|
||||||
TMP_DIR="$(mktemp -d)"
|
TMP_DIR="$(mktemp -d)"
|
||||||
git clone https://github.com/veripool/vcddiff "$TMP_DIR"
|
git clone https://github.com/veripool/vcddiff "$TMP_DIR"
|
||||||
@@ -70,7 +77,7 @@ if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
|
|||||||
fi
|
fi
|
||||||
elif [ "$CI_OS_NAME" = "osx" ]; then
|
elif [ "$CI_OS_NAME" = "osx" ]; then
|
||||||
brew update
|
brew update
|
||||||
brew install ccache perl gperftools
|
brew install ccache perl gperftools autoconf bison flex help2man
|
||||||
elif [ "$CI_OS_NAME" = "freebsd" ]; then
|
elif [ "$CI_OS_NAME" = "freebsd" ]; then
|
||||||
sudo pkg install -y autoconf bison ccache gmake perl5
|
sudo pkg install -y autoconf bison ccache gmake perl5
|
||||||
else
|
else
|
||||||
@@ -78,7 +85,7 @@ if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$CCACHE_DIR" ]; then
|
if [ -n "$CCACHE_DIR" ]; then
|
||||||
mkdir -p "$CCACHE_DIR" && ./ci/ci-ccache-maint.bash
|
mkdir -p "$CCACHE_DIR"
|
||||||
fi
|
fi
|
||||||
elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|||||||
Executable
+46
@@ -0,0 +1,46 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# DESCRIPTION: Verilator: CI script for 'pages.yml', notifies PRs
|
||||||
|
#
|
||||||
|
# Copyright 2025 by Geza Lore. This program is free software; you
|
||||||
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
# Version 2.0.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
# Notify PRs via comment that their coverage reports are available
|
||||||
|
|
||||||
|
# Get the current repo URL - might differ on a fork
|
||||||
|
readonly REPO_URL=$(gh repo view --json url --jq .url)
|
||||||
|
|
||||||
|
# Create artifacts root directory
|
||||||
|
ARTIFACTS_ROOT=artifacts
|
||||||
|
mkdir -p ${ARTIFACTS_ROOT}
|
||||||
|
|
||||||
|
for RUN_ID in ${COVERAGE_PR_RUN_IDS//,/ }; do
|
||||||
|
echo "@@@ Processing run ${RUN_ID}"
|
||||||
|
|
||||||
|
# Create workflow artifacts directory
|
||||||
|
ARTIFACTS_DIR=${ARTIFACTS_ROOT}/${RUN_ID}
|
||||||
|
mkdir -p ${ARTIFACTS_DIR}
|
||||||
|
|
||||||
|
# Download artifact of this run, if exists
|
||||||
|
gh run download ${RUN_ID} --name coverage-pr-notification --dir ${ARTIFACTS_DIR} || true
|
||||||
|
ls -lsha ${ARTIFACTS_DIR}
|
||||||
|
|
||||||
|
# Move on if no notification is required
|
||||||
|
if [ ! -f ${ARTIFACTS_DIR}/pr-number.txt ]; then
|
||||||
|
echo "No notification found"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
echo "Posting notification found"
|
||||||
|
|
||||||
|
cat ${ARTIFACTS_DIR}/body.txt
|
||||||
|
gh pr comment $(cat ${ARTIFACTS_DIR}/pr-number.txt) --body-file ${ARTIFACTS_DIR}/body.txt
|
||||||
|
|
||||||
|
# Get the artifact ID
|
||||||
|
ARTIFACT_ID=$(gh api "repos/{owner}/{repo}/actions/runs/${RUN_ID}/artifacts" --jq '.artifacts[] | select(.name == "coverage-pr-notification") | .id')
|
||||||
|
|
||||||
|
# Delete it, so we only notify once
|
||||||
|
gh api --method DELETE "repos/{owner}/{repo}/actions/artifacts/${ARTIFACT_ID}"
|
||||||
|
done
|
||||||
Executable
+171
@@ -0,0 +1,171 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# DESCRIPTION: Verilator: CI script for 'pages.yml', builds the GitHub Pages
|
||||||
|
#
|
||||||
|
# Copyright 2025 by Geza Lore. This program is free software; you
|
||||||
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
# Version 2.0.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
# This scipt build the content of the GitHub Pages for the repository.
|
||||||
|
# Currently this only hosts code coverage reports, but it would be possible to
|
||||||
|
# add any other contents to the page in parallel here.
|
||||||
|
|
||||||
|
# Developer note: You should be able to run this script in your local checkout
|
||||||
|
# if you have GitHub CLI (command 'gh') setup, authenticated ('gh auth login'),
|
||||||
|
# and have set a default repository ('gh repo set-default').
|
||||||
|
|
||||||
|
# Create pages root directory. The contents of this directory will be deployed
|
||||||
|
# and served via GitHubPages
|
||||||
|
readonly PAGES_ROOT=pages
|
||||||
|
mkdir -p ${PAGES_ROOT}
|
||||||
|
|
||||||
|
# Get the current repo URL - might differ on a fork
|
||||||
|
readonly REPO_URL=$(gh repo view --json url --jq .url)
|
||||||
|
|
||||||
|
# Set GITHUB_OUTPUT when run locally for testing
|
||||||
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
|
GITHUB_OUTPUT=github-output.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Populates ${PAGES_ROOT}/coverage-reports
|
||||||
|
compile_coverage_reports() {
|
||||||
|
# We will process all runs up to and including this date. This is chosen to be
|
||||||
|
# slightly less than the artifact retention period for simplicity.
|
||||||
|
local OLDEST=$(date --date="28 days ago" --iso-8601=date)
|
||||||
|
|
||||||
|
# Gather all coverage workflow runs within the time window
|
||||||
|
gh run list -w coverage.yml --limit 1000 --created ">=${OLDEST}" --json "databaseId,event,status,conclusion,createdAt,number" > recentRuns.json
|
||||||
|
echo @@@ Recent runs:
|
||||||
|
jq "." recentRuns.json
|
||||||
|
|
||||||
|
# Select completd runs that were not cancelled or skipped, sort by descending run number
|
||||||
|
jq 'sort_by(-.number) | map(select(.status == "completed" and (.conclusion == "success" or .conclusion == "failure")))' recentRuns.json > completedRuns.json
|
||||||
|
echo @@@ Completed with success or failure:
|
||||||
|
jq "." completedRuns.json
|
||||||
|
|
||||||
|
# Create artifacts root directory
|
||||||
|
local ARTIFACTS_ROOT=artifacts
|
||||||
|
mkdir -p ${ARTIFACTS_ROOT}
|
||||||
|
|
||||||
|
# Create coverage reports root directory
|
||||||
|
local COVERAGE_ROOT=${PAGES_ROOT}/coverage-reports
|
||||||
|
mkdir -p ${COVERAGE_ROOT}
|
||||||
|
|
||||||
|
# Create index page contents fragment
|
||||||
|
local CONTENTS=contents.tmp
|
||||||
|
echo > ${CONTENTS}
|
||||||
|
|
||||||
|
# Run IDs of PR jobs processed
|
||||||
|
local PR_RUN_IDS=""
|
||||||
|
|
||||||
|
# Iterate over all unique event types that triggered the workflows
|
||||||
|
for EVENT in $(jq -r 'map(.event) | sort | unique | .[]' completedRuns.json); do
|
||||||
|
echo "@@@ Processing '${EVENT}' runs"
|
||||||
|
|
||||||
|
# Emit section header if a report exists with this event type
|
||||||
|
EMIT_SECTION_HEADER=1
|
||||||
|
|
||||||
|
# For each worfklow run that was triggered by this event type
|
||||||
|
for RUN_ID in $(jq ".[] | select(.event == \"${EVENT}\") |.databaseId" completedRuns.json); do
|
||||||
|
echo "@@@ Processing run ${RUN_ID}"
|
||||||
|
|
||||||
|
# Extract the info of this run
|
||||||
|
jq ".[] | select(.databaseId == $RUN_ID)" completedRuns.json > workflow.json
|
||||||
|
jq "." workflow.json
|
||||||
|
|
||||||
|
# Record run ID of PR job
|
||||||
|
if [[ $EVENT == "pull_request" ]]; then
|
||||||
|
if [[ -z "$PR_RUN_IDS" ]]; then
|
||||||
|
PR_RUN_IDS="$RUN_ID"
|
||||||
|
else
|
||||||
|
PR_RUN_IDS="$PR_RUN_IDS,$RUN_ID"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create workflow artifacts directory
|
||||||
|
local ARTIFACTS_DIR=${ARTIFACTS_ROOT}/${RUN_ID}
|
||||||
|
mkdir -p ${ARTIFACTS_DIR}
|
||||||
|
|
||||||
|
# Download artifacts of this run, if exists
|
||||||
|
gh run download ${RUN_ID} --name coverage-report --dir ${ARTIFACTS_DIR} || true
|
||||||
|
ls -lsha ${ARTIFACTS_DIR}
|
||||||
|
|
||||||
|
# Move on if no coverage report is available
|
||||||
|
if [ ! -d ${ARTIFACTS_DIR}/report ]; then
|
||||||
|
echo "No coverage report found"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
echo "Coverage report found"
|
||||||
|
|
||||||
|
# Emit section header
|
||||||
|
if [[ -n $EMIT_SECTION_HEADER ]]; then
|
||||||
|
unset EMIT_SECTION_HEADER
|
||||||
|
if [[ $EVENT == "pull_request" ]]; then
|
||||||
|
echo "<h4>Patch coverage reports for '${EVENT}' runs:</h4>" >> ${CONTENTS}
|
||||||
|
else
|
||||||
|
echo "<h4>Code coverage reports for '${EVENT}' runs:</h4>" >> ${CONTENTS}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create pages subdirectory
|
||||||
|
mv ${ARTIFACTS_DIR}/report ${COVERAGE_ROOT}/${RUN_ID}
|
||||||
|
|
||||||
|
# Add index page content
|
||||||
|
local WORKFLOW_CREATED=$(jq -r '.createdAt' workflow.json)
|
||||||
|
local WOFKRLOW_NUMBER=$(jq -r '.number' workflow.json)
|
||||||
|
cat >> ${CONTENTS} <<CONTENTS_TEMPLATE
|
||||||
|
Run <a href="${RUN_ID}/index.html">#${WOFKRLOW_NUMBER}</a>
|
||||||
|
| GitHub: <a href="${REPO_URL}/actions/runs/${RUN_ID}">${RUN_ID}</a>
|
||||||
|
| started at: ${WORKFLOW_CREATED}
|
||||||
|
CONTENTS_TEMPLATE
|
||||||
|
if [ -e ${ARTIFACTS_DIR}/pr-number.txt ]; then
|
||||||
|
local PRNUMBER=$(cat ${ARTIFACTS_DIR}/pr-number.txt)
|
||||||
|
echo " | Pull request: <a href=\"${REPO_URL}/pull/${PRNUMBER}\">#${PRNUMBER}</a>" >> ${CONTENTS}
|
||||||
|
fi
|
||||||
|
echo "<br>" >> ${CONTENTS}
|
||||||
|
done
|
||||||
|
|
||||||
|
# Section break
|
||||||
|
if [[ -z "$EMIT_SECTION_HEADER" ]]; then
|
||||||
|
echo "<hr>" >> ${CONTENTS}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Write coverage report index.html
|
||||||
|
cat > ${COVERAGE_ROOT}/index.html <<INDEX_TEMPLATE
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Verilator CI coverage reports</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: courier, serif;
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
a {
|
||||||
|
color: #008fd7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
$(cat ${CONTENTS})
|
||||||
|
<h4>Assembled $(date --iso-8601=minutes --utc)</h1>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
INDEX_TEMPLATE
|
||||||
|
|
||||||
|
# Report size
|
||||||
|
du -shc ${COVERAGE_ROOT}/*
|
||||||
|
|
||||||
|
# Set output
|
||||||
|
echo "coverage-pr-run-ids=${PR_RUN_IDS}" >> $GITHUB_OUTPUT
|
||||||
|
}
|
||||||
|
|
||||||
|
# Compilie coverage reports
|
||||||
|
compile_coverage_reports;
|
||||||
|
|
||||||
|
# You can build any other content here to be put under ${PAGES_ROOT}
|
||||||
+60
-60
@@ -27,6 +27,8 @@ if [ "$CI_OS_NAME" = "linux" ]; then
|
|||||||
elif [ "$CI_OS_NAME" = "osx" ]; then
|
elif [ "$CI_OS_NAME" = "osx" ]; then
|
||||||
export MAKE=make
|
export MAKE=make
|
||||||
NPROC=$(sysctl -n hw.logicalcpu)
|
NPROC=$(sysctl -n hw.logicalcpu)
|
||||||
|
# Disable ccache, doesn't always work in GitHub Actions
|
||||||
|
export OBJCACHE=
|
||||||
elif [ "$CI_OS_NAME" = "freebsd" ]; then
|
elif [ "$CI_OS_NAME" = "freebsd" ]; then
|
||||||
export MAKE=gmake
|
export MAKE=gmake
|
||||||
NPROC=$(sysctl -n hw.ncpu)
|
NPROC=$(sysctl -n hw.ncpu)
|
||||||
@@ -39,23 +41,27 @@ if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
# Build verilator
|
# Build verilator
|
||||||
|
|
||||||
if [ "$COVERAGE" != 1 ]; then
|
autoconf
|
||||||
autoconf
|
CONFIGURE_ARGS="--enable-longtests --enable-ccwarn"
|
||||||
./configure --enable-longtests --enable-ccwarn --prefix="$INSTALL_DIR"
|
if [ "$CI_DEV_ASAN" = 1 ]; then
|
||||||
ccache -z
|
CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-dev-asan"
|
||||||
"$MAKE" -j "$NPROC" -k
|
CXX="$CXX -DVL_LEAK_CHECKS"
|
||||||
# 22.04: ccache -s -v
|
fi
|
||||||
ccache -s
|
if [ "$CI_DEV_GCOV" = 1 ]; then
|
||||||
if [ "$CI_OS_NAME" = "osx" ]; then
|
CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-dev-gcov"
|
||||||
file bin/verilator_bin
|
fi
|
||||||
file bin/verilator_bin_dbg
|
./configure $CONFIGURE_ARGS --prefix="$INSTALL_DIR"
|
||||||
md5 bin/verilator_bin
|
ccache -z
|
||||||
md5 bin/verilator_bin_dbg
|
"$MAKE" -j "$NPROC" -k
|
||||||
stat bin/verilator_bin
|
# 22.04: ccache -s -v
|
||||||
stat bin/verilator_bin_dbg
|
ccache -s
|
||||||
fi
|
if [ "$CI_OS_NAME" = "osx" ]; then
|
||||||
else
|
file bin/verilator_bin
|
||||||
nodist/code_coverage --stages 0-2
|
file bin/verilator_bin_dbg
|
||||||
|
md5 bin/verilator_bin
|
||||||
|
md5 bin/verilator_bin_dbg
|
||||||
|
stat bin/verilator_bin
|
||||||
|
stat bin/verilator_bin_dbg
|
||||||
fi
|
fi
|
||||||
elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@@ -86,39 +92,36 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
|||||||
export VERILATOR_TEST_NO_GPROF=1 # gprof is a bit different on FreeBSD, disable
|
export VERILATOR_TEST_NO_GPROF=1 # gprof is a bit different on FreeBSD, disable
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run sanitize on Ubuntu 22.04 only
|
|
||||||
( [[ "$CI_RUNS_ON" =~ 'ubuntu-22.04' ]] || [[ "$CI_RUNS_ON" =~ 'ubuntu-24.04' ]] ) && sanitize='--sanitize' || sanitize=''
|
|
||||||
|
|
||||||
TEST_REGRESS=test_regress
|
TEST_REGRESS=test_regress
|
||||||
if [ "$CI_RELOC" == 1 ]; then
|
if [ "$CI_RELOC" == 1 ]; then
|
||||||
# Testing that the installation is relocatable.
|
# Testing that the installation is relocatable.
|
||||||
"$MAKE" install
|
"$MAKE" install
|
||||||
mkdir -p "$RELOC_DIR"
|
mkdir -p "$RELOC_DIR"
|
||||||
mv "$INSTALL_DIR" "$RELOC_DIR/relocated-install"
|
mv "$INSTALL_DIR" "$RELOC_DIR/relocated-install"
|
||||||
export VERILATOR_ROOT="$RELOC_DIR/relocated-install/share/verilator"
|
export VERILATOR_ROOT="$RELOC_DIR/relocated-install/share/verilator"
|
||||||
TEST_REGRESS="$RELOC_DIR/test_regress"
|
TEST_REGRESS="$RELOC_DIR/test_regress"
|
||||||
mv test_regress "$TEST_REGRESS"
|
mv test_regress "$TEST_REGRESS"
|
||||||
NODIST="$RELOC_DIR/nodist"
|
NODIST="$RELOC_DIR/nodist"
|
||||||
mv nodist "$NODIST"
|
mv nodist "$NODIST"
|
||||||
# Feeling brave?
|
# Feeling brave?
|
||||||
find . -delete
|
find . -delete
|
||||||
ls -la .
|
ls -la .
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run the specified test
|
# Run the specified test
|
||||||
ccache -z
|
ccache -z
|
||||||
case $TESTS in
|
case $TESTS in
|
||||||
dist-vlt-0)
|
dist-vlt-0)
|
||||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean $sanitize" DRIVER_HASHSET=--hashset=0/4
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=0/4
|
||||||
;;
|
;;
|
||||||
dist-vlt-1)
|
dist-vlt-1)
|
||||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean $sanitize" DRIVER_HASHSET=--hashset=1/4
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=1/4
|
||||||
;;
|
;;
|
||||||
dist-vlt-2)
|
dist-vlt-2)
|
||||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean $sanitize" DRIVER_HASHSET=--hashset=2/4
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=2/4
|
||||||
;;
|
;;
|
||||||
dist-vlt-3)
|
dist-vlt-3)
|
||||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean $sanitize" DRIVER_HASHSET=--hashset=3/4
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=3/4
|
||||||
;;
|
;;
|
||||||
vltmt-0)
|
vltmt-0)
|
||||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt --driver-clean" DRIVER_HASHSET=--hashset=0/3
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt --driver-clean" DRIVER_HASHSET=--hashset=0/3
|
||||||
@@ -129,71 +132,68 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
|||||||
vltmt-2)
|
vltmt-2)
|
||||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt --driver-clean" DRIVER_HASHSET=--hashset=2/3
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt --driver-clean" DRIVER_HASHSET=--hashset=2/3
|
||||||
;;
|
;;
|
||||||
coverage-all)
|
|
||||||
nodist/code_coverage --stages 1-
|
|
||||||
;;
|
|
||||||
coverage-dist)
|
coverage-dist)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--dist
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist"
|
||||||
;;
|
;;
|
||||||
coverage-vlt-0)
|
coverage-vlt-0)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=0/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=0/10
|
||||||
;;
|
;;
|
||||||
coverage-vlt-1)
|
coverage-vlt-1)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=1/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=1/10
|
||||||
;;
|
;;
|
||||||
coverage-vlt-2)
|
coverage-vlt-2)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=2/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=2/10
|
||||||
;;
|
;;
|
||||||
coverage-vlt-3)
|
coverage-vlt-3)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=3/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=3/10
|
||||||
;;
|
;;
|
||||||
coverage-vlt-4)
|
coverage-vlt-4)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=4/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=4/10
|
||||||
;;
|
;;
|
||||||
coverage-vlt-5)
|
coverage-vlt-5)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=5/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=5/10
|
||||||
;;
|
;;
|
||||||
coverage-vlt-6)
|
coverage-vlt-6)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=6/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=6/10
|
||||||
;;
|
;;
|
||||||
coverage-vlt-7)
|
coverage-vlt-7)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=7/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=7/10
|
||||||
;;
|
;;
|
||||||
coverage-vlt-8)
|
coverage-vlt-8)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=8/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=8/10
|
||||||
;;
|
;;
|
||||||
coverage-vlt-9)
|
coverage-vlt-9)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=9/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=9/10
|
||||||
;;
|
;;
|
||||||
coverage-vltmt-0)
|
coverage-vltmt-0)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=0/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=0/10
|
||||||
;;
|
;;
|
||||||
coverage-vltmt-1)
|
coverage-vltmt-1)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=1/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=1/10
|
||||||
;;
|
;;
|
||||||
coverage-vltmt-2)
|
coverage-vltmt-2)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=2/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=2/10
|
||||||
;;
|
;;
|
||||||
coverage-vltmt-3)
|
coverage-vltmt-3)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=3/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=3/10
|
||||||
;;
|
;;
|
||||||
coverage-vltmt-4)
|
coverage-vltmt-4)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=4/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=4/10
|
||||||
;;
|
;;
|
||||||
coverage-vltmt-5)
|
coverage-vltmt-5)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=5/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=5/10
|
||||||
;;
|
;;
|
||||||
coverage-vltmt-6)
|
coverage-vltmt-6)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=6/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=6/10
|
||||||
;;
|
;;
|
||||||
coverage-vltmt-7)
|
coverage-vltmt-7)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=7/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=7/10
|
||||||
;;
|
;;
|
||||||
coverage-vltmt-8)
|
coverage-vltmt-8)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=8/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=8/10
|
||||||
;;
|
;;
|
||||||
coverage-vltmt-9)
|
coverage-vltmt-9)
|
||||||
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=9/10
|
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=9/10
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
fatal "Unknown test: $TESTS"
|
fatal "Unknown test: $TESTS"
|
||||||
|
|||||||
BIN
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
.. Copyright 2003-2025 by Wilson Snyder.
|
.. Copyright 2003-2026 by Wilson Snyder.
|
||||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
.. _Verilator Build Docker Container:
|
.. _verilator build docker container:
|
||||||
|
|
||||||
Verilator Build Docker Container
|
Verilator Build Docker Container
|
||||||
================================
|
================================
|
||||||
@@ -9,11 +9,11 @@ Verilator Build Docker Container
|
|||||||
This Verilator Build Docker Container is set up to compile and test a
|
This Verilator Build Docker Container is set up to compile and test a
|
||||||
Verilator build. It uses the following parameters:
|
Verilator build. It uses the following parameters:
|
||||||
|
|
||||||
- Source repository (default: https://github.com/verilator/verilator)
|
- Source repository (default: https://github.com/verilator/verilator)
|
||||||
|
|
||||||
- Source revision (default: master)
|
- Source revision (default: master)
|
||||||
|
|
||||||
- Compiler (GCC 13.3.0, clang 18.1.3, default: 13.3.0)
|
- Compiler (GCC 13.3.0, clang 18.1.3, default: 13.3.0)
|
||||||
|
|
||||||
The container is published as ``verilator/verilator-buildenv`` on `docker
|
The container is published as ``verilator/verilator-buildenv`` on `docker
|
||||||
hub
|
hub
|
||||||
@@ -35,10 +35,11 @@ To change the compiler use the `-e` switch to pass environment variables:
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
docker run -ti -e CC=clang-18 -e CXX=clang++-18 verilator/verilator-buildenv test
|
docker run -ti -e CXX=clang++-18 verilator/verilator-buildenv test
|
||||||
|
|
||||||
The tests, that involve numactl are not working due to security restrictions.
|
The tests, that involve numactl are not working due to security
|
||||||
To run those too, add the CAP_SYS_NICE capability during the start of the container:
|
restrictions. To run those too, add the CAP_SYS_NICE capability during the
|
||||||
|
start of the container:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
: "${REPO:=https://github.com/verilator/verilator}"
|
: "${REPO:=https://github.com/verilator/verilator}"
|
||||||
: "${REV:=master}"
|
: "${REV:=master}"
|
||||||
: "${CC:=gcc}"
|
|
||||||
: "${CXX:=g++}"
|
: "${CXX:=g++}"
|
||||||
|
|
||||||
SRCS=$PWD/verilator
|
SRCS=$PWD/verilator
|
||||||
|
|||||||
+11
-11
@@ -1,4 +1,4 @@
|
|||||||
.. Copyright 2003-2025 by Wilson Snyder.
|
.. Copyright 2003-2026 by Wilson Snyder.
|
||||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
Verilator Executable Docker Container
|
Verilator Executable Docker Container
|
||||||
@@ -11,12 +11,12 @@ easily as a docker image, e.g.:
|
|||||||
|
|
||||||
docker run -ti verilator/verilator:latest --version
|
docker run -ti verilator/verilator:latest --version
|
||||||
|
|
||||||
This will pull the container from `docker hub
|
This will pull the container from `Docker Hub
|
||||||
<https://hub.docker.com/r/verilator/verilator>`_, run the latest Verilator and print
|
<https://hub.docker.com/r/verilator/verilator>`_, run the latest Verilator
|
||||||
Verilator's version.
|
and print Verilator's version.
|
||||||
|
|
||||||
Containers are automatically built and pushed to docker hub for all released versions, so you may
|
Containers are automatically built and pushed to docker hub for all
|
||||||
easily compare results across versions, e.g.:
|
released versions, so you may easily compare results across versions, e.g.:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ or
|
|||||||
./verilator-docker 4.030 --cc test.v
|
./verilator-docker 4.030 --cc test.v
|
||||||
|
|
||||||
If you prefer not to use ``verilator-docker`` you must give the container
|
If you prefer not to use ``verilator-docker`` you must give the container
|
||||||
access to your files as a volume with appropriate user rights. For example
|
access to your files as a volume with appropriate user rights. For example
|
||||||
to Verilate test.v:
|
to Verilate test.v:
|
||||||
|
|
||||||
::
|
::
|
||||||
@@ -68,9 +68,9 @@ Internals
|
|||||||
The Dockerfile builds Verilator and removes the tree when completed to
|
The Dockerfile builds Verilator and removes the tree when completed to
|
||||||
reduce the image size. The entrypoint is a wrapper script
|
reduce the image size. The entrypoint is a wrapper script
|
||||||
(``verilator-wrap.sh``). That script 1. calls Verilator, and 2. copies the
|
(``verilator-wrap.sh``). That script 1. calls Verilator, and 2. copies the
|
||||||
Verilated runtime files to the ``obj_dir`` or the ``-Mdir``
|
Verilated runtime files to the ``obj_dir`` or the ``-Mdir`` respectively.
|
||||||
respectively. This allows the user to have the files to they may later
|
This allows the user to have the files to they may later build the C++
|
||||||
build the C++ output with the matching runtime files. The wrapper also
|
output with the matching runtime files. The wrapper also patches the
|
||||||
patches the Verilated Makefile accordingly.
|
Verilated Makefile accordingly.
|
||||||
|
|
||||||
A hook is also defined and run by Docker Hub via automated builds.
|
A hook is also defined and run by Docker Hub via automated builds.
|
||||||
|
|||||||
@@ -8,6 +8,6 @@
|
|||||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
if [ "$SOURCE_BRANCH"="stable" ]; then
|
if [ "$SOURCE_BRANCH"="stable" ]; then
|
||||||
docker tag $IMAGE_NAME $DOCKER_REPO:latest
|
docker tag $IMAGE_NAME $DOCKER_REPO:latest
|
||||||
docker push $DOCKER_REPO:latest
|
docker push $DOCKER_REPO:latest
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -11,21 +11,21 @@
|
|||||||
perl /usr/local/bin/verilator "$@"
|
perl /usr/local/bin/verilator "$@"
|
||||||
status=$?
|
status=$?
|
||||||
if [ $status -ne 0 ]; then
|
if [ $status -ne 0 ]; then
|
||||||
exit $status
|
exit $status
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if user set an obj_dir
|
# Check if user set an obj_dir
|
||||||
obj_dir=$(echo " $@" | grep -oP '\s--Mdir\s*\K\S+')
|
obj_dir=$(echo " $@" | grep -oP '\s--Mdir\s*\K\S+')
|
||||||
if [ "$obj_dir" == "" ]; then
|
if [ "$obj_dir" == "" ]; then
|
||||||
obj_dir="obj_dir"
|
obj_dir="obj_dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If the run was successful: Copy required files to allow build without this container
|
# If the run was successful: Copy required files to allow build without this container
|
||||||
if [ -e ${obj_dir} ]; then
|
if [ -e ${obj_dir} ]; then
|
||||||
# Copy files required for the build
|
# Copy files required for the build
|
||||||
mkdir -p ${obj_dir}/vlt
|
mkdir -p ${obj_dir}/vlt
|
||||||
cp -r /usr/local/share/verilator/bin ${obj_dir}/vlt
|
cp -r /usr/local/share/verilator/bin ${obj_dir}/vlt
|
||||||
cp -r /usr/local/share/verilator/include ${obj_dir}/vlt
|
cp -r /usr/local/share/verilator/include ${obj_dir}/vlt
|
||||||
# Point Makefile to that folder
|
# Point Makefile to that folder
|
||||||
sed -i 's/VERILATOR_ROOT = \/usr\/local\/share\/verilator/VERILATOR_ROOT = vlt/g' ${obj_dir}/*.mk
|
sed -i 's/VERILATOR_ROOT = \/usr\/local\/share\/verilator/VERILATOR_ROOT = vlt/g' ${obj_dir}/*.mk
|
||||||
fi
|
fi
|
||||||
|
|||||||
-36
@@ -1,36 +0,0 @@
|
|||||||
---
|
|
||||||
# DESCRIPTION: codecov.io config
|
|
||||||
#
|
|
||||||
# Copyright 2020-2025 by Wilson Snyder. This program is free software; you
|
|
||||||
# can redistribute it and/or modify it under the terms of either the GNU
|
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
||||||
# Version 2.0.
|
|
||||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
|
||||||
####################
|
|
||||||
# Validate:
|
|
||||||
# curl --data-binary @codecov.yml https://codecov.io/validate
|
|
||||||
#
|
|
||||||
codecov:
|
|
||||||
require_ci_to_pass: false
|
|
||||||
coverage:
|
|
||||||
precision: 2
|
|
||||||
round: down
|
|
||||||
range: 50...100
|
|
||||||
ignore:
|
|
||||||
- "ci" #
|
|
||||||
- "docs" #
|
|
||||||
- "examples" #
|
|
||||||
- "include/gtkwave" #
|
|
||||||
- "include/vltstd" #
|
|
||||||
- "test_regress" #
|
|
||||||
parsers:
|
|
||||||
gcov:
|
|
||||||
branch_detection:
|
|
||||||
conditional: true
|
|
||||||
loop: true
|
|
||||||
method: false
|
|
||||||
macro: false
|
|
||||||
comment:
|
|
||||||
layout: "reach,diff,flags,tree"
|
|
||||||
behavior: default
|
|
||||||
require_changes: true
|
|
||||||
+76
-34
@@ -1,6 +1,6 @@
|
|||||||
# DESCRIPTION: Process this file with autoconf to produce a configure script.
|
# DESCRIPTION: Process this file with autoconf to produce a configure script.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2025 by Wilson Snyder. Verilator is free software; you
|
# Copyright 2003-2026 by Wilson Snyder. Verilator is free software; you
|
||||||
# can redistribute it and/or modify it under the terms of either the GNU Lesser
|
# can redistribute it and/or modify it under the terms of either the GNU Lesser
|
||||||
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
# Then 'make maintainer-dist'
|
# Then 'make maintainer-dist'
|
||||||
#AC_INIT([Verilator],[#.### YYYY-MM-DD])
|
#AC_INIT([Verilator],[#.### YYYY-MM-DD])
|
||||||
#AC_INIT([Verilator],[#.### devel])
|
#AC_INIT([Verilator],[#.### devel])
|
||||||
AC_INIT([Verilator],[5.040 2025-08-30],
|
AC_INIT([Verilator],[5.044 2026-01-01],
|
||||||
[https://verilator.org],
|
[https://verilator.org],
|
||||||
[verilator],[https://verilator.org])
|
[verilator],[https://verilator.org])
|
||||||
|
|
||||||
@@ -57,6 +57,22 @@ AC_ARG_ENABLE([partial-static],
|
|||||||
CFG_ENABLE_PARTIAL_STATIC=yes)
|
CFG_ENABLE_PARTIAL_STATIC=yes)
|
||||||
AC_MSG_RESULT($CFG_ENABLE_PARTIAL_STATIC)
|
AC_MSG_RESULT($CFG_ENABLE_PARTIAL_STATIC)
|
||||||
|
|
||||||
|
# Flag to enable compiling with AddressSanitizer
|
||||||
|
AC_MSG_CHECKING(whether to use AddressSanitizer)
|
||||||
|
AC_ARG_ENABLE([dev-asan],
|
||||||
|
[AS_HELP_STRING([--enable-dev-asan],
|
||||||
|
[Enable compiling Verilator with ASAN
|
||||||
|
AddressSanitizer for memory error detection.
|
||||||
|
This disables tcmalloc. Does not affect
|
||||||
|
Verilated models using ASAN.])],
|
||||||
|
[case "${enableval}" in
|
||||||
|
yes) CFG_WITH_DEV_ASAN=yes ;;
|
||||||
|
no) CFG_WITH_DEV_ASAN=no ;;
|
||||||
|
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-dev-asan]) ;;
|
||||||
|
esac],
|
||||||
|
CFG_WITH_DEV_ASAN=no)
|
||||||
|
AC_MSG_RESULT($CFG_WITH_DEV_ASAN)
|
||||||
|
|
||||||
# Flag to enable linking Verilator with tcmalloc if available
|
# Flag to enable linking Verilator with tcmalloc if available
|
||||||
AC_MSG_CHECKING(whether to use tcmalloc)
|
AC_MSG_CHECKING(whether to use tcmalloc)
|
||||||
AC_ARG_ENABLE([tcmalloc],
|
AC_ARG_ENABLE([tcmalloc],
|
||||||
@@ -69,22 +85,27 @@ AC_ARG_ENABLE([tcmalloc],
|
|||||||
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-tcmalloc]) ;;
|
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-tcmalloc]) ;;
|
||||||
esac],
|
esac],
|
||||||
[CFG_WITH_TCMALLOC=check;])
|
[CFG_WITH_TCMALLOC=check;])
|
||||||
AC_SUBST(CFG_WITH_TCMALLOC)
|
if test "$CFG_WITH_DEV_ASAN" = "yes"; then
|
||||||
AC_MSG_RESULT($CFG_WITH_TCMALLOC)
|
CFG_WITH_TCMALLOC=no
|
||||||
|
AC_MSG_RESULT("disabled by --enable-dev-asan")
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT($CFG_WITH_TCMALLOC)
|
||||||
|
fi
|
||||||
|
|
||||||
# Flag to enable coverage build
|
# Flag to enable code coverage build with gcov
|
||||||
AC_MSG_CHECKING(whether to build for coverage collection)
|
AC_MSG_CHECKING(whether to build for gcov code coverage collection)
|
||||||
AC_ARG_ENABLE([coverage],
|
AC_ARG_ENABLE([dev-gcov],
|
||||||
[AS_HELP_STRING([--enable-coverage],
|
[AS_HELP_STRING([--enable-dev-gcov],
|
||||||
[Build Verilator for code coverage collection.
|
[Build Verilator for code coverage collection with gcov.
|
||||||
For developers only.])],
|
For developers only.])],
|
||||||
[case "${enableval}" in
|
[case "${enableval}" in
|
||||||
yes) CFG_ENABLE_COVERAGE=yes ;;
|
yes) CFG_WITH_DEV_GCOV=yes ;;
|
||||||
no) CFG_ENABLE_COVERAGE=no ;;
|
no) CFG_WITH_DEV_GCOV=no ;;
|
||||||
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-coverage]) ;;
|
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-dev-gcov]) ;;
|
||||||
esac],
|
esac],
|
||||||
CFG_ENABLE_COVERAGE=no)
|
CFG_WITH_DEV_GCOV=no)
|
||||||
AC_MSG_RESULT($CFG_ENABLE_COVERAGE)
|
AC_SUBST(CFG_WITH_DEV_GCOV)
|
||||||
|
AC_MSG_RESULT($CFG_WITH_DEV_GCOV)
|
||||||
|
|
||||||
# Special Substitutions - CFG_WITH_DEFENV
|
# Special Substitutions - CFG_WITH_DEFENV
|
||||||
AC_MSG_CHECKING(whether to use hardcoded paths)
|
AC_MSG_CHECKING(whether to use hardcoded paths)
|
||||||
@@ -379,7 +400,7 @@ AC_DEFUN([_MY_LDLIBS_CHECK_OPT],
|
|||||||
])
|
])
|
||||||
|
|
||||||
# Add the coverage flags early as they influence later checks.
|
# Add the coverage flags early as they influence later checks.
|
||||||
if test "$CFG_ENABLE_COVERAGE" = "yes"; then
|
if test "$CFG_WITH_DEV_GCOV" = "yes"; then
|
||||||
_MY_CXX_CHECK_OPT(CXX,--coverage)
|
_MY_CXX_CHECK_OPT(CXX,--coverage)
|
||||||
# Otherwise inline may not show as uncovered
|
# Otherwise inline may not show as uncovered
|
||||||
# If we use this then e.g. verilated.h functions properly show up
|
# If we use this then e.g. verilated.h functions properly show up
|
||||||
@@ -391,11 +412,19 @@ if test "$CFG_ENABLE_COVERAGE" = "yes"; then
|
|||||||
# _MY_CXX_CHECK_OPT(CXX,-fkeep-inline-functions)
|
# _MY_CXX_CHECK_OPT(CXX,-fkeep-inline-functions)
|
||||||
# Otherwise static may not show as uncovered
|
# Otherwise static may not show as uncovered
|
||||||
_MY_CXX_CHECK_OPT(CXX,-fkeep-static-functions)
|
_MY_CXX_CHECK_OPT(CXX,-fkeep-static-functions)
|
||||||
# Exceptions can pollute the branch coverage data
|
# Similarly for inline functions. - This is too slow. See Makefile_obj instead.
|
||||||
_MY_CXX_CHECK_OPT(CXX,-fno-exceptions)
|
#_MY_CXX_CHECK_OPT(CXX,-fkeep-inline-functions)
|
||||||
# Define-out some impossible stuff
|
# Make sure profiling is thread-safe
|
||||||
|
_MY_CXX_CHECK_OPT(CXX,-fprofile-update=atomic)
|
||||||
|
# Ensure data files can be written from parallel runs
|
||||||
|
_MY_CXX_CHECK_OPT(CXX,-fprofile-reproducible=parallel-runs)
|
||||||
|
# Save source files as absolute paths in gcno files
|
||||||
|
_MY_CXX_CHECK_OPT(CXX,-fprofile-abs-path)
|
||||||
|
# Define so compiled code can know
|
||||||
_MY_CXX_CHECK_OPT(CXX,-DVL_GCOV)
|
_MY_CXX_CHECK_OPT(CXX,-DVL_GCOV)
|
||||||
|
AC_DEFINE([HAVE_DEV_GCOV],[1],[Defined if compiled with code coverage collection for gcov])]
|
||||||
fi
|
fi
|
||||||
|
AC_SUBST(HAVE_DEV_GCOV)
|
||||||
|
|
||||||
# Compiler flags to enable profiling
|
# Compiler flags to enable profiling
|
||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_PROFILE,-pg)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_PROFILE,-pg)
|
||||||
@@ -433,11 +462,20 @@ AC_SUBST(CFG_CXXFLAGS_COROUTINES)
|
|||||||
AC_SUBST(HAVE_COROUTINES)
|
AC_SUBST(HAVE_COROUTINES)
|
||||||
|
|
||||||
# Flags for compiling Verilator internals including parser always
|
# Flags for compiling Verilator internals including parser always
|
||||||
|
if test "$CFG_WITH_DEV_ASAN" = "yes"; then
|
||||||
|
_MY_CXX_CHECK_IFELSE(-fsanitize=address -DVL_ASAN,
|
||||||
|
[CFG_CXXFLAGS_SRC="$CFG_CXXFLAGS_SRC -fsanitize=address -DVL_ASAN"
|
||||||
|
CFG_LDFLAGS_SRC="$CFG_LDFLAGS_SRC -fsanitize=address"
|
||||||
|
AC_DEFINE([HAVE_DEV_ASAN],[1],[Defined if built with AddresSanitizer])]
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
AC_SUBST(HAVE_DEV_ASAN)
|
||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Qunused-arguments)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Qunused-arguments)
|
||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-shadow)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-shadow)
|
||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-unused-parameter)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-unused-parameter)
|
||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Xclang -fno-pch-timestamp)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Xclang -fno-pch-timestamp)
|
||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-faligned-new)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-faligned-new)
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-exceptions)
|
||||||
AC_SUBST(CFG_CXXFLAGS_SRC)
|
AC_SUBST(CFG_CXXFLAGS_SRC)
|
||||||
|
|
||||||
# Flags for compiling Verilator parser always (in addition to above CFG_CXXFLAGS_SRC)
|
# Flags for compiling Verilator parser always (in addition to above CFG_CXXFLAGS_SRC)
|
||||||
@@ -448,16 +486,22 @@ _MY_CXX_CHECK_OPT(CFG_CXXFLAGS_PARSER,-Wno-unused)
|
|||||||
AC_SUBST(CFG_CXXFLAGS_PARSER)
|
AC_SUBST(CFG_CXXFLAGS_PARSER)
|
||||||
|
|
||||||
# Flags for compiling the debug version of Verilator (in addition to above CFG_CXXFLAGS_SRC)
|
# Flags for compiling the debug version of Verilator (in addition to above CFG_CXXFLAGS_SRC)
|
||||||
if test "$CFG_ENABLE_COVERAGE" = "no"; then # Do not optimize for the coverage build
|
if test "$CFG_WITH_DEV_GCOV" = "no"; then # Do not optimize for the coverage build
|
||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DEBUG,-Og)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DBG,-Og)
|
||||||
fi
|
fi
|
||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DEBUG,-ggdb)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DBG,-ggdb)
|
||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DEBUG,-gz)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DBG,-gz)
|
||||||
AC_SUBST(CFG_CXXFLAGS_DEBUG)
|
AC_SUBST(CFG_CXXFLAGS_DBG)
|
||||||
|
|
||||||
# Flags for linking the debug version of Verilator (in addition to above CFG_LDFLAGS_SRC)
|
# Flags for linking the debug version of Verilator (in addition to above CFG_LDFLAGS_SRC)
|
||||||
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_DEBUG,-gz)
|
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_DBG,-gz)
|
||||||
AC_SUBST(CFG_LDFLAGS_DEBUG)
|
AC_SUBST(CFG_LDFLAGS_DBG)
|
||||||
|
|
||||||
|
# Flags for compiling the optimized version of Verilator (in addition to above CFG_CXXFLAGS_SRC)
|
||||||
|
if test "$CFG_WITH_DEV_GCOV" = "no"; then # Do not optimize for the coverage build
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_OPT,-O3)
|
||||||
|
fi
|
||||||
|
AC_SUBST(CFG_CXXFLAGS_OPT)
|
||||||
|
|
||||||
# Flags for Verilated makefile
|
# Flags for Verilated makefile
|
||||||
# For example, -Wno-div-by-zero isn't in 4.1.2
|
# For example, -Wno-div-by-zero isn't in 4.1.2
|
||||||
@@ -490,7 +534,8 @@ m4_foreach([cflag],[
|
|||||||
[-Wno-unused-but-set-parameter],
|
[-Wno-unused-but-set-parameter],
|
||||||
[-Wno-unused-but-set-variable],
|
[-Wno-unused-but-set-variable],
|
||||||
[-Wno-unused-parameter],
|
[-Wno-unused-parameter],
|
||||||
[-Wno-unused-variable]],[
|
[-Wno-unused-variable],
|
||||||
|
[-Wno-vla-cxx-extension]],[
|
||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,cflag)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,cflag)
|
||||||
# CMake will test what flags work itself, so pass all flags through to it
|
# CMake will test what flags work itself, so pass all flags through to it
|
||||||
CFG_CXX_FLAGS_CMAKE="$CFG_CXX_FLAGS_CMAKE cflag"
|
CFG_CXX_FLAGS_CMAKE="$CFG_CXX_FLAGS_CMAKE cflag"
|
||||||
@@ -562,18 +607,15 @@ AC_SUBST(CFG_LIBS)
|
|||||||
AC_DEFUN([_MY_CXX_CHECK_CXX_VER],
|
AC_DEFUN([_MY_CXX_CHECK_CXX_VER],
|
||||||
[# _MY_CXX_CHECK_CXX_VER(flag) -- Check if compiler runs C++14
|
[# _MY_CXX_CHECK_CXX_VER(flag) -- Check if compiler runs C++14
|
||||||
# Set $_my_result
|
# Set $_my_result
|
||||||
AC_LINK_IFELSE(
|
AC_RUN_IFELSE(
|
||||||
[AC_LANG_PROGRAM([#include <thread>
|
[AC_LANG_PROGRAM([#include <thread>
|
||||||
#if (__cplusplus < 201402L)
|
#if (__cplusplus < 201402L)
|
||||||
# error "Too old"
|
# error "Too old"
|
||||||
#endif
|
#endif
|
||||||
], [[ ]])],
|
], [[
|
||||||
[_my_result=yes
|
]])],
|
||||||
if test -s conftest.err; then
|
[_my_result=yes],
|
||||||
if grep -e "$1" conftest.err >/dev/null; then
|
[_my_result=no],
|
||||||
_my_result=no
|
|
||||||
fi
|
|
||||||
fi],
|
|
||||||
[_my_result=no])
|
[_my_result=no])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
+14
-14
@@ -23,8 +23,8 @@ Did you find a Verilator bug?
|
|||||||
demonstrating the bug and expected behavior that is not occurring.
|
demonstrating the bug and expected behavior that is not occurring.
|
||||||
|
|
||||||
- The ideal example works against other simulators, and is in the
|
- The ideal example works against other simulators, and is in the
|
||||||
test_regress/t test format, as described in
|
test_regress/t test format, as described in `Verilator Internals
|
||||||
`Verilator Internals Documentation
|
Documentation
|
||||||
<https://github.com/verilator/verilator/blob/master/docs/internals.rst>`__.
|
<https://github.com/verilator/verilator/blob/master/docs/internals.rst>`__.
|
||||||
|
|
||||||
|
|
||||||
@@ -38,18 +38,18 @@ Did you write a patch that fixes a Verilator bug?
|
|||||||
<https://github.com/verilator/verilator/pulls>`__.
|
<https://github.com/verilator/verilator/pulls>`__.
|
||||||
|
|
||||||
- See the coding conventions, and other developer information in
|
- See the coding conventions, and other developer information in
|
||||||
``docs/internals.rst`` in the distribution, or as rendered at
|
``docs/internals.rst`` in the distribution, or as rendered at `Verilator
|
||||||
`Verilator Internals Documentation
|
Internals Documentation
|
||||||
<https://github.com/verilator/verilator/blob/master/docs/internals.rst>`__.
|
<https://github.com/verilator/verilator/blob/master/docs/internals.rst>`__.
|
||||||
|
|
||||||
- Verilator uses GitHub Actions to provide continuous integration. You
|
- Verilator uses GitHub Actions to provide continuous integration. You may
|
||||||
may want to enable Actions on your GitHub branch to ensure your changes
|
want to enable Actions on your GitHub branch to ensure your changes keep
|
||||||
keep the tests passing.
|
the tests passing.
|
||||||
|
|
||||||
- Your source-code contributions must be certified as open source,
|
- Your source-code contributions must be certified as open source, under
|
||||||
under the `Developer Certificate of
|
the `Developer Certificate of Origin
|
||||||
Origin <https://developercertificate.org/>`__. On your first
|
<https://developercertificate.org/>`__. On your first contribution, you
|
||||||
contribution, you must either:
|
must either:
|
||||||
|
|
||||||
- Have your patch include the addition of your name to `docs/CONTRIBUTORS
|
- Have your patch include the addition of your name to `docs/CONTRIBUTORS
|
||||||
<CONTRIBUTORS>`__ (preferred).
|
<CONTRIBUTORS>`__ (preferred).
|
||||||
@@ -75,9 +75,9 @@ Did you write a patch that fixes a Verilator bug?
|
|||||||
Do you have questions on Verilator?
|
Do you have questions on Verilator?
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
- Please see FAQ section and rest of the `Verilator
|
- Please see FAQ section and rest of the `Verilator manual
|
||||||
manual <https://verilator.org/verilator_doc.html>`__, or `Verilator
|
<https://verilator.org/verilator_doc.html>`__, or `Verilator manual (PDF)
|
||||||
manual (PDF) <https://verilator.org/verilator_doc.pdf>`__.
|
<https://verilator.org/verilator_doc.pdf>`__.
|
||||||
|
|
||||||
- Ask any question in the `Verilator forum
|
- Ask any question in the `Verilator forum
|
||||||
<https://verilator.org/forum>`__.
|
<https://verilator.org/forum>`__.
|
||||||
|
|||||||
+17
-4
@@ -7,7 +7,7 @@ Please see the Verilator manual for 200+ additional contributors. Thanks to all.
|
|||||||
Adam Bagley
|
Adam Bagley
|
||||||
Adrian Sampson
|
Adrian Sampson
|
||||||
Adrien Le Masle
|
Adrien Le Masle
|
||||||
Ahmed El-Mahmoudy
|
أحمد المحمودي (Ahmed El-Mahmoudy)
|
||||||
Aidan McNay
|
Aidan McNay
|
||||||
Aleksander Kiryk
|
Aleksander Kiryk
|
||||||
Alex Chadwick
|
Alex Chadwick
|
||||||
@@ -32,14 +32,15 @@ Cameron Kirk
|
|||||||
Chih-Mao Chen
|
Chih-Mao Chen
|
||||||
Chris Bachhuber
|
Chris Bachhuber
|
||||||
Chris Randall
|
Chris Randall
|
||||||
|
Christian Hecken
|
||||||
Christopher Taylor
|
Christopher Taylor
|
||||||
Chuxuan Wang
|
Chuxuan Wang
|
||||||
Chykon
|
Chykon
|
||||||
Congcong Cai
|
Congcong Cai
|
||||||
Conor McCullough
|
Conor McCullough
|
||||||
Dan Petrisko
|
Dan Ruelas-Petrisko
|
||||||
Danny Oler
|
|
||||||
Daniel Bates
|
Daniel Bates
|
||||||
|
Danny Oler
|
||||||
Dave Sargeant
|
Dave Sargeant
|
||||||
David Horton
|
David Horton
|
||||||
David Ledger
|
David Ledger
|
||||||
@@ -58,7 +59,7 @@ Eric Müller
|
|||||||
Eric Rippey
|
Eric Rippey
|
||||||
Ethan Sifferman
|
Ethan Sifferman
|
||||||
Eyck Jentzsch
|
Eyck Jentzsch
|
||||||
Fabian Keßler
|
Fabian Keßler-Schulz
|
||||||
Fan Shupei
|
Fan Shupei
|
||||||
Felix Neumärker
|
Felix Neumärker
|
||||||
Felix Yan
|
Felix Yan
|
||||||
@@ -94,6 +95,7 @@ Iru Cai
|
|||||||
Ivan Vnučec
|
Ivan Vnučec
|
||||||
Iztok Jeras
|
Iztok Jeras
|
||||||
Jake Merdich
|
Jake Merdich
|
||||||
|
Jakub Wasilewski
|
||||||
James Bailey
|
James Bailey
|
||||||
James Hanlon
|
James Hanlon
|
||||||
James Hutchinson
|
James Hutchinson
|
||||||
@@ -103,6 +105,8 @@ Jamey Hicks
|
|||||||
Jamie Iles
|
Jamie Iles
|
||||||
Jan Van Winkel
|
Jan Van Winkel
|
||||||
Jean Berniolles
|
Jean Berniolles
|
||||||
|
Jean-Nicolas Strauss
|
||||||
|
Jens Yuechao Liu
|
||||||
Jeremy Bennett
|
Jeremy Bennett
|
||||||
Jesse Taube
|
Jesse Taube
|
||||||
Jevin Sweval
|
Jevin Sweval
|
||||||
@@ -121,6 +125,7 @@ John Wehle
|
|||||||
Jonathan Drolet
|
Jonathan Drolet
|
||||||
Jonathan Schröter
|
Jonathan Schröter
|
||||||
Jordan McConnon
|
Jordan McConnon
|
||||||
|
Jose Drowne
|
||||||
Jose Loyola
|
Jose Loyola
|
||||||
Josep Sans
|
Josep Sans
|
||||||
Joseph Nwabueze
|
Joseph Nwabueze
|
||||||
@@ -144,6 +149,7 @@ Krzysztof Obłonczek
|
|||||||
Krzysztof Starecki
|
Krzysztof Starecki
|
||||||
Krzysztof Sychla
|
Krzysztof Sychla
|
||||||
Kuba Ober
|
Kuba Ober
|
||||||
|
Lan Zongwei
|
||||||
Larry Doolittle
|
Larry Doolittle
|
||||||
Liam Braun
|
Liam Braun
|
||||||
Luca Colagrande
|
Luca Colagrande
|
||||||
@@ -160,6 +166,7 @@ Marshal Qiao
|
|||||||
Martin Schmidt
|
Martin Schmidt
|
||||||
Martin Stadler
|
Martin Stadler
|
||||||
Mateusz Gancarz
|
Mateusz Gancarz
|
||||||
|
Matt Stroud
|
||||||
Matthew Ballance
|
Matthew Ballance
|
||||||
Max Wipfli
|
Max Wipfli
|
||||||
Michael Bedford Taylor
|
Michael Bedford Taylor
|
||||||
@@ -186,6 +193,7 @@ Paul Bowen-Huggett
|
|||||||
Paul Swirhun
|
Paul Swirhun
|
||||||
Paul Wright
|
Paul Wright
|
||||||
Pawel Jewstafjew
|
Pawel Jewstafjew
|
||||||
|
Pawel Kojma
|
||||||
Pawel Sagan
|
Pawel Sagan
|
||||||
Pengcheng Xu
|
Pengcheng Xu
|
||||||
Peter Birch
|
Peter Birch
|
||||||
@@ -226,6 +234,8 @@ Steven Hugg
|
|||||||
Szymon Gizler
|
Szymon Gizler
|
||||||
Sören Tempel
|
Sören Tempel
|
||||||
Teng Huang
|
Teng Huang
|
||||||
|
Thomas Aldrian
|
||||||
|
Thomas Dybdahl Ahle
|
||||||
Tim Hutt
|
Tim Hutt
|
||||||
Tim Snyder
|
Tim Snyder
|
||||||
Tobias Jensen
|
Tobias Jensen
|
||||||
@@ -266,7 +276,10 @@ Zhen Yan
|
|||||||
Zhou Shen
|
Zhou Shen
|
||||||
Zhouyi Shen
|
Zhouyi Shen
|
||||||
Zixi Li
|
Zixi Li
|
||||||
|
apocelipes
|
||||||
|
dependabot[bot]
|
||||||
february cozzocrea
|
february cozzocrea
|
||||||
sumpster
|
sumpster
|
||||||
|
em2machine
|
||||||
Àlex Torregrosa
|
Àlex Torregrosa
|
||||||
Ícaro Lima
|
Ícaro Lima
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# Code available from: https://verilator.org
|
# Code available from: https://verilator.org
|
||||||
#
|
#
|
||||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
# Copyright 2003-2026 by Wilson Snyder. This program is free software; you
|
||||||
# can redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
|||||||
+2
-2
@@ -10,8 +10,8 @@ For formatted documentation see:
|
|||||||
- `Verilator installation and package directory structure
|
- `Verilator installation and package directory structure
|
||||||
<https://verilator.org/install>`_
|
<https://verilator.org/install>`_
|
||||||
|
|
||||||
- `Verilator manual (HTML) <https://verilator.org/verilator_doc.html>`_,
|
- `Verilator manual (HTML) <https://verilator.org/verilator_doc.html>`_, or
|
||||||
or `Verilator manual (PDF) <https://verilator.org/verilator_doc.pdf>`_
|
`Verilator manual (PDF) <https://verilator.org/verilator_doc.pdf>`_
|
||||||
|
|
||||||
- `Subscribe to Verilator announcements
|
- `Subscribe to Verilator announcements
|
||||||
<https://github.com/verilator/verilator-announce>`_
|
<https://github.com/verilator/verilator-announce>`_
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# mypy: disallow-untyped-defs
|
||||||
# pylint: disable=C0112,C0114,C0115,C0116,C0209,C0301,R0903
|
# pylint: disable=C0112,C0114,C0115,C0116,C0209,C0301,R0903
|
||||||
# -*- Python -*- See copyright, etc below
|
# -*- Python -*- See copyright, etc below
|
||||||
######################################################################
|
######################################################################
|
||||||
@@ -11,9 +12,8 @@ import re
|
|||||||
|
|
||||||
class VlSphinxExtract:
|
class VlSphinxExtract:
|
||||||
debug = 0
|
debug = 0
|
||||||
SkipBasenames = {}
|
|
||||||
|
|
||||||
def process(self, filename):
|
def process(self, filename: str) -> None:
|
||||||
with open(filename, "r", encoding="utf8") as fhr:
|
with open(filename, "r", encoding="utf8") as fhr:
|
||||||
fhw = None
|
fhw = None
|
||||||
for line in fhr:
|
for line in fhr:
|
||||||
@@ -37,7 +37,7 @@ parser = argparse.ArgumentParser(
|
|||||||
allow_abbrev=False,
|
allow_abbrev=False,
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
description="""Read a file and extract documentation data.""",
|
description="""Read a file and extract documentation data.""",
|
||||||
epilog=""" Copyright 2021-2025 by Wilson Snyder. This package is free software;
|
epilog=""" Copyright 2021-2026 by Wilson Snyder. This package is free software;
|
||||||
you can redistribute it and/or modify it under the terms of either the GNU
|
you can redistribute it and/or modify it under the terms of either the GNU
|
||||||
Lesser General Public License Version 3 or the Perl Artistic License
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
Version 2.0.
|
Version 2.0.
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# mypy: disallow-untyped-defs
|
||||||
# pylint: disable=C0112,C0114,C0115,C0116,C0209,C0301,R0903
|
# pylint: disable=C0112,C0114,C0115,C0116,C0209,C0301,R0903
|
||||||
# -*- Python -*- See copyright, etc below
|
# -*- Python -*- See copyright, etc below
|
||||||
######################################################################
|
######################################################################
|
||||||
@@ -12,19 +13,17 @@ import re
|
|||||||
|
|
||||||
class VlSphinxFix:
|
class VlSphinxFix:
|
||||||
debug = 0
|
debug = 0
|
||||||
SkipBasenames = {}
|
|
||||||
|
|
||||||
def process(self, path):
|
def process(self, path: str) -> None:
|
||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
for basefile in os.listdir(path):
|
for basefile in os.listdir(path):
|
||||||
file = os.path.join(path, basefile)
|
file = os.path.join(path, basefile)
|
||||||
if ((basefile != ".") and (basefile != "..") and basefile not in self.SkipBasenames
|
if ((basefile != ".") and (basefile != "..") and not os.path.islink(file)):
|
||||||
and not os.path.islink(file)):
|
|
||||||
self.process(file)
|
self.process(file)
|
||||||
elif re.search(r'\.(html|tex)$', path):
|
elif re.search(r'\.(html|tex)$', path):
|
||||||
self._edit(path)
|
self._edit(path)
|
||||||
|
|
||||||
def _edit(self, filename):
|
def _edit(self, filename: str) -> None:
|
||||||
is_html = re.search(r'\.(html)$', filename)
|
is_html = re.search(r'\.(html)$', filename)
|
||||||
with open(filename, "r", encoding="utf8") as fhr:
|
with open(filename, "r", encoding="utf8") as fhr:
|
||||||
origfile = fhr.read()
|
origfile = fhr.read()
|
||||||
@@ -53,7 +52,7 @@ parser = argparse.ArgumentParser(
|
|||||||
allow_abbrev=False,
|
allow_abbrev=False,
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
description="""Post-process Sphinx HTML.""",
|
description="""Post-process Sphinx HTML.""",
|
||||||
epilog=""" Copyright 2021-2025 by Wilson Snyder. This package is free software;
|
epilog=""" Copyright 2021-2026 by Wilson Snyder. This package is free software;
|
||||||
you can redistribute it and/or modify it under the terms of either the GNU
|
you can redistribute it and/or modify it under the terms of either the GNU
|
||||||
Lesser General Public License Version 3 or the Perl Artistic License
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
Version 2.0.
|
Version 2.0.
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
.. comment: generated by t_lint_assigneqexpr_bad
|
||||||
|
.. code-block:: sv
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
output logic c_o,
|
||||||
|
output logic d_o
|
||||||
|
);
|
||||||
|
assign c_o = (a_i != 0) ? 1 : 0;
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
.. comment: generated by t_lint_assigneqexpr_bad
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
%Warning-ASSIGNEQEXPR: example.v:1:11 Assignment '=' inside expression
|
||||||
|
: ... Was a '==' intended, or suggest use a separate statement
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
.. code-block:: sv
|
.. code-block:: sv
|
||||||
:emphasize-lines: 1
|
:emphasize-lines: 1
|
||||||
|
|
||||||
// verilator lintt_off WIDTH //<--- Warning (lint_off misspelled)
|
// verilator lintt_off WIDTH //<--- Warning (lint_off misspelled)
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
.. code-block::
|
.. code-block::
|
||||||
:emphasize-lines: 1,2
|
:emphasize-lines: 1,2
|
||||||
|
|
||||||
%Error-BADVLTPRAGMA: example.v:1:4 Unknown verilator comment: '/*verilator lintt_off WIDTH <--- Warning (lint_off misspelled)*/'
|
%Error-BADVLTPRAGMA: example.v:1:3 Unknown verilator comment: '/*verilator lintt_off WIDTH <--- Warning (lint_off misspelled)*/'
|
||||||
7 | /*verilator lintt_off WIDTH <--- Warning (lint_off misspelled)*/
|
7 | /*verilator lintt_off WIDTH <--- Warning (lint_off misspelled)*/
|
||||||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
.. code-block:: sv
|
.. code-block:: sv
|
||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
always_comb b = ~a;
|
always_comb b = ~a;
|
||||||
always_comb a = b;
|
always_comb a = b;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
.. comment: generated by t_lint_didnotconverge_bad
|
.. comment: generated by t_lint_didnotconverge_bad
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
-V{t#,#} 'stl' region trigger index 1 is active: @([hybrid] b)
|
-V{t#,#} 'stl' region trigger index 0 is active: @([hybrid] a)
|
||||||
%Error: t/t_lint_didnotconverge_bad.v:7: Settle region did not converge.
|
%Error: t/t_lint_didnotconverge_bad.v:7: Settle region did not converge after 100 tries
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.. comment: generated by t_lint_didnotconverge_nodbg_bad
|
.. comment: generated by t_lint_didnotconverge_nodbg_bad
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
%Error: t/t_lint_didnotconverge_bad.v:7: Settle region did not converge.
|
%Error: t/t_lint_didnotconverge_bad.v:7: Settle region did not converge after 100 tries
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
.. comment: generated by t_lint_functimectl_bad
|
||||||
|
.. code-block:: sv
|
||||||
|
:linenos:
|
||||||
|
:emphasize-lines: 2
|
||||||
|
|
||||||
|
function void calls_timing_ctl;
|
||||||
|
@e; // <--- Bad IEEE 1800-2023 13.4 time-controlling
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.. comment: generated by t_lint_functimectl_bad
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
%Error-FUNCTIMECTL: example.v:1:5 Functions cannot contain time-controlling statements (IEEE 1800-2023 13.4)
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
.. comment: generated by t_param_hier_bad
|
||||||
|
.. code-block:: sv
|
||||||
|
:linenos:
|
||||||
|
:emphasize-lines: 3
|
||||||
|
|
||||||
|
sub #(.X(MY_X)) u_sub ();
|
||||||
|
|
||||||
|
localparam int SUB_Y = u_sub.Y; // <--- BAD: IEEE 1800-2023 6.20.2 no hierarchical
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
.. comment: generated by t_param_hier_bad
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
%Error-HIERPARAM: example.v:1:32 Parameter values cannot use hierarchical values (IEEE 1800-2023 6.20.2)
|
||||||
|
: ... note: In instance 't'
|
||||||
|
36 | localparam int SUB_Y = u_sub.Y;
|
||||||
|
| ^
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
:linenos:
|
:linenos:
|
||||||
:emphasize-lines: 2,5
|
:emphasize-lines: 2,5
|
||||||
|
|
||||||
always @(posedge clk) begin
|
always @(posedge clk) begin
|
||||||
out2[7:0] <= d0; // <--- Warning
|
out2[7:0] <= d0; // <--- Warning
|
||||||
end
|
end
|
||||||
always @(negedge clk) begin
|
always @(negedge clk) begin
|
||||||
out2[15:8] <= d0; // <--- Warning
|
out2[15:8] <= d0; // <--- Warning
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. comment: generated by t_lint_multidriven_bad
|
.. comment: generated by t_lint_multidriven_bad
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
%Warning-MULTIDRIVEN: example.v:1:22 Signal has multiple driving blocks with different clocking: 'out2'
|
%Warning-MULTIDRIVEN: example.v:1:21 Signal has multiple driving blocks with different clocking: 'out2'
|
||||||
example.v:1:7 ... Location of first driving block
|
example.v:1:5 ... Location of first driving block
|
||||||
example.v:1:7 ... Location of other driving block
|
example.v:1:5 ... Location of other driving block
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
.. comment: generated by t_lint_noreturn_bad
|
||||||
|
.. code-block:: sv
|
||||||
|
:linenos:
|
||||||
|
:emphasize-lines: 1
|
||||||
|
|
||||||
|
function int no_rtn(); // <--- Warning: No return
|
||||||
|
endfunction
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.. comment: generated by t_lint_noreturn_bad
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
%Warning-NORETURN: example.v:1:16 Non-void function 'no_rtn' has no return value
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
:linenos:
|
:linenos:
|
||||||
:emphasize-lines: 1,5
|
:emphasize-lines: 1,5
|
||||||
|
|
||||||
logic flop_out = 1; // <--- Warning
|
logic flop_out = 1; // <--- Warning
|
||||||
|
|
||||||
always @(posedge clk, negedge reset_l) begin
|
always @(posedge clk, negedge reset_l) begin
|
||||||
if (enable) begin
|
if (enable) begin
|
||||||
flop_out <= ~in; // <--- Use of initialized
|
flop_out <= ~in; // <--- Use of initialized
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
:linenos:
|
:linenos:
|
||||||
:emphasize-lines: 5
|
:emphasize-lines: 5
|
||||||
|
|
||||||
logic flop2_out;
|
logic flop2_out;
|
||||||
|
|
||||||
always @(posedge clk, negedge reset_l) begin
|
always @(posedge clk, negedge reset_l) begin
|
||||||
if (!reset_l) begin
|
if (!reset_l) begin
|
||||||
flop2_out <= '1; // <--- Added reset init
|
flop2_out <= '1; // <--- Added reset init
|
||||||
end
|
end
|
||||||
else if (enable) begin
|
else if (enable) begin
|
||||||
flop2_out <= ~in;
|
flop2_out <= ~in;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
.. comment: generated by t_lint_procassinit_bad
|
.. comment: generated by t_lint_procassinit_bad
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
%Warning-PROCASSINIT: example.v:1:21 Procedural assignment to declaration with initial value: 'flop_out'
|
%Warning-PROCASSINIT: example.v:1:20 Procedural assignment to declaration with initial value: 'flop_out'
|
||||||
: ... note: In instance 't'
|
: ... note: In instance 't'
|
||||||
: ... Location of variable initialization
|
: ... Location of variable initialization
|
||||||
26 | logic flop_out = 1;
|
26 | logic flop_out = 1;
|
||||||
| ^
|
| ^
|
||||||
example.v:1:10 ... Location of variable process write
|
example.v:1:7 ... Location of variable process write
|
||||||
: ... Perhaps should initialize instead using a reset in this process
|
: ... Perhaps should initialize instead using a reset in this process
|
||||||
30 | flop_out <= ~in;
|
30 | flop_out <= ~in;
|
||||||
| ^~~~~~~~
|
| ^~~~~~~~
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
.. code-block:: sv
|
.. code-block:: sv
|
||||||
:emphasize-lines: 1
|
:emphasize-lines: 1
|
||||||
|
|
||||||
#100 $finish; //<--- Warning
|
#100 $finish; //<--- Warning
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.. comment: generated by t_lint_stmtdly_bad
|
.. comment: generated by t_lint_stmtdly_bad
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
%Warning-STMTDLY: example.v:1:7 Ignoring delay on this statement due to --no-timing
|
%Warning-STMTDLY: example.v:1:5 Ignoring delay on this statement due to --no-timing
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
.. comment: generated by t_class_new_supernfirst_bad
|
||||||
|
.. code-block:: sv
|
||||||
|
:linenos:
|
||||||
|
:emphasize-lines: 3
|
||||||
|
|
||||||
|
function new();
|
||||||
|
int x = $random();
|
||||||
|
super.new(build_coverage(x), x); // <--- BAD, must be first statement
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.. comment: generated by t_class_new_supernfirst_bad
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
%Error-SUPERNFIRST: example.v:1:11 'super.new' must be first statement in a 'function new' (IEEE 1800-2023 8.15)
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
.. comment: generated by t_assert_comp_bad
|
.. comment: generated by t_assert_comp_bad
|
||||||
.. code-block:: sv
|
.. code-block:: sv
|
||||||
|
|
||||||
$error("User elaboration-time error");
|
$error("User elaboration-time error");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.. comment: generated by t_assert_comp_bad
|
.. comment: generated by t_assert_comp_bad
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
%Warning-USERERROR: example.v:1:7 User elaboration-time error
|
%Warning-USERERROR: example.v:1:5 User elaboration-time error
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.. comment: generated by t_assert_comp_bad
|
.. comment: generated by t_assert_comp_bad
|
||||||
.. code-block:: sv
|
.. code-block:: sv
|
||||||
|
|
||||||
$fatal(0, "User elaboration-time fatal");
|
$fatal(0, "User elaboration-time fatal");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.. comment: generated by t_assert_comp_bad
|
.. comment: generated by t_assert_comp_bad
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
%Warning-USERFATAL: example.v:1:7 User elaboration-time fatal
|
%Warning-USERFATAL: example.v:1:5 User elaboration-time fatal
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.. comment: generated by t_assert_comp_bad
|
.. comment: generated by t_assert_comp_bad
|
||||||
.. code-block:: sv
|
.. code-block:: sv
|
||||||
|
|
||||||
$info("User elaboration-time info");
|
$info("User elaboration-time info");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.. comment: generated by t_assert_comp_bad
|
.. comment: generated by t_assert_comp_bad
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
-Info: example.v:1:7 User elaboration-time info
|
-Info: example.v:1:5 User elaboration-time info
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.. comment: generated by t_assert_comp_bad
|
.. comment: generated by t_assert_comp_bad
|
||||||
.. code-block:: sv
|
.. code-block:: sv
|
||||||
|
|
||||||
$warning("User elaboration-time warning");
|
$warning("User elaboration-time warning");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.. comment: generated by t_assert_comp_bad
|
.. comment: generated by t_assert_comp_bad
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
%Warning-USERWARN: example.v:1:7 User elaboration-time warning
|
%Warning-USERWARN: example.v:1:5 User elaboration-time warning
|
||||||
|
|||||||
@@ -4,5 +4,5 @@
|
|||||||
:emphasize-lines: 2
|
:emphasize-lines: 2
|
||||||
|
|
||||||
module t;
|
module t;
|
||||||
integer t; //<--- Warning ('t' hidden by module 't')
|
integer t; //<--- Warning ('t' hidden by module 't')
|
||||||
endmodule
|
endmodule
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
.. comment: generated by t_var_bad_hide_docs
|
.. comment: generated by t_var_bad_hide_docs
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
%Warning-VARHIDDEN: example.v:2:12 Declaration of signal hides declaration in upper scope: 't'
|
%Warning-VARHIDDEN: example.v:2:11 Declaration of signal hides declaration in upper scope: 't'
|
||||||
example.v:1:8 ... Location of original declaration
|
example.v:1:8 ... Location of original declaration
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
.. Copyright 2003-2025 by Wilson Snyder.
|
.. Copyright 2003-2026 by Wilson Snyder.
|
||||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
****************
|
****************
|
||||||
Revision History
|
Revision History
|
||||||
****************
|
****************
|
||||||
|
|
||||||
.. COMMENT above header must use ### so there is an extra level of headers
|
..
|
||||||
|
COMMENT above header must use *** so there is an extra level of headers
|
||||||
here so the index won't show the huge list of revisions when clicking on
|
here so the index won't show the huge list of revisions when clicking on
|
||||||
"Revision History" in the sidebar.
|
"Revision History" in the sidebar.
|
||||||
|
|
||||||
Changes are contained in the :file:`Changes` file of the distribution, and
|
Changes are contained in the :file:`Changes` file of the distribution, and
|
||||||
also summarized below. To subscribe to new versions, see `Verilator
|
also summarized below. To subscribe to new versions, see `Verilator
|
||||||
Announcements <https://github.com/verilator/verilator-announce>`_.
|
Announcements <https://github.com/verilator/verilator-announce>`_.
|
||||||
|
|
||||||
.. include:: ../_build/gen/Changes
|
.. include:: ../_build/gen/Changes
|
||||||
|
|||||||
+12
-3
@@ -1,7 +1,7 @@
|
|||||||
# pylint: disable=C0103,C0114,C0116,C0301,E0402,W0622
|
# pylint: disable=C0103,C0114,C0116,C0301,E0402,W0622
|
||||||
#
|
#
|
||||||
# Configuration file for Verilator's Sphinx documentation builder.
|
# Configuration file for Verilator's Sphinx documentation builder.
|
||||||
# Copyright 2003-2025 by Wilson Snyder.
|
# Copyright 2003-2026 by Wilson Snyder.
|
||||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
# This file only contains overridden options. For a full list:
|
# This file only contains overridden options. For a full list:
|
||||||
@@ -63,12 +63,19 @@ rst_prolog = """
|
|||||||
# Add any Sphinx extension module names here, as strings. They can be
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
# ones.
|
# ones.
|
||||||
|
#
|
||||||
# To install:
|
# To install:
|
||||||
# sudo install enchant
|
# sudo install enchant
|
||||||
# sudo pip3 install sphinx sphinx_rtd_theme breathe sphinxcontrib-spelling
|
# python3 -m venv --system-site-packages ~/.verilator_pyenv
|
||||||
# We keep this list empty for now to avoid needing dependencies
|
# source ~/.verilator_pyenv/bin/activate
|
||||||
|
# pip3 install sphinx sphinx_rtd_theme sphinxcontrib-spelling breathe
|
||||||
|
#
|
||||||
|
# We keep this extensions list empty for now to avoid needing dependencies
|
||||||
extensions = []
|
extensions = []
|
||||||
# extensions = ['breathe', 'sphinxcontrib.spelling']
|
# extensions = ['breathe', 'sphinxcontrib.spelling']
|
||||||
|
# For website builds, this will add sphinxcontrib.jquery
|
||||||
|
if 'VERILATOR_SPHINX_EXTENSIONS' in os.environ:
|
||||||
|
extensions.extend(os.environ.get('VERILATOR_SPHINX_EXTENSIONS', '').split(':'))
|
||||||
|
|
||||||
# List of patterns, relative to source directory, that match files and
|
# List of patterns, relative to source directory, that match files and
|
||||||
# directories to ignore when looking for source files.
|
# directories to ignore when looking for source files.
|
||||||
@@ -110,6 +117,8 @@ html_domain_indices = False
|
|||||||
html_logo = "../_static/verilator_192_150_min.png"
|
html_logo = "../_static/verilator_192_150_min.png"
|
||||||
|
|
||||||
html_theme = 'sphinx_rtd_theme'
|
html_theme = 'sphinx_rtd_theme'
|
||||||
|
# Despite a 'WARNING: Calling get_html_theme_path is deprecated'
|
||||||
|
# the HTML output is different without this line
|
||||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||||
|
|
||||||
html_theme_options = {
|
html_theme_options = {
|
||||||
|
|||||||
+221
-225
@@ -1,7 +1,7 @@
|
|||||||
.. Copyright 2003-2025 by Wilson Snyder.
|
.. Copyright 2003-2026 by Wilson Snyder.
|
||||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
.. _Connecting:
|
.. _connecting:
|
||||||
|
|
||||||
******************************
|
******************************
|
||||||
Connecting to Verilated Models
|
Connecting to Verilated Models
|
||||||
@@ -11,13 +11,13 @@ Structure of the Verilated Model
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
Verilator outputs a :file:`{prefix}.h` header file which defines a class
|
Verilator outputs a :file:`{prefix}.h` header file which defines a class
|
||||||
named :code:`{prefix}` which represents the generated model the user is
|
named ``{prefix}`` which represents the generated model the user is
|
||||||
supposed to instantiate. This model class defines the interface of the
|
supposed to instantiate. This model class defines the interface of the
|
||||||
Verilated model.
|
Verilated model.
|
||||||
|
|
||||||
Verilator will additionally create a :file:`{prefix}.cpp` file, together
|
Verilator will additionally create a :file:`{prefix}.cpp` file, together
|
||||||
with additional .h and .cpp files for internals. See the :file:`examples`
|
with additional .h and .cpp files for internals. See the :file:`examples`
|
||||||
directory in the kit for examples. See :ref:`Files Read/Written` for
|
directory in the kit for examples. See :ref:`Files Read/Written` for
|
||||||
information on all the files Verilator might output.
|
information on all the files Verilator might output.
|
||||||
|
|
||||||
The output of Verilator will contain a :file:`{prefix}.mk` file that may be
|
The output of Verilator will contain a :file:`{prefix}.mk` file that may be
|
||||||
@@ -32,91 +32,89 @@ model:
|
|||||||
equivalents.
|
equivalents.
|
||||||
|
|
||||||
* Public top level module instances are exposed as pointers to allow access
|
* Public top level module instances are exposed as pointers to allow access
|
||||||
to :code:`/* verilator public */` items.
|
to ``/* verilator public */`` items.
|
||||||
|
|
||||||
* The root of the design hierarchy (as in SystemVerilog :code:`$root`) is
|
* The root of the design hierarchy (as in SystemVerilog ``$root``) is
|
||||||
exposed via the :code:`rootp` member pointer to allow access to model
|
exposed via the ``rootp`` member pointer to allow access to model
|
||||||
internals, including :code:`/* verilator public_flat */` items.
|
internals, including ``/* verilator public_flat */`` items.
|
||||||
|
|
||||||
|
|
||||||
.. _Porting from pre 4.210:
|
.. _porting from pre 4.210:
|
||||||
|
|
||||||
Model interface changes in version 4.210
|
Model interface changes in version 4.210
|
||||||
------------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
Starting from version 4.210, the model class is an interface object.
|
Starting from version 4.210, the model class is an interface object.
|
||||||
|
|
||||||
Up until Verilator version 4.204 inclusive, the generated model class was
|
Up until Verilator version 4.204 inclusive, the generated model class was
|
||||||
also the instance of the top level instance in the design hierarchy (what
|
also the instance of the top level instance in the design hierarchy (what
|
||||||
you would refer to with :code:`$root` in SystemVerilog). This meant that
|
you would refer to with ``$root`` in SystemVerilog). This meant that all
|
||||||
all internal variables that were implemented by Verilator in the root scope
|
internal variables that were implemented by Verilator in the root scope
|
||||||
were accessible as members of the model class itself. Note there were often
|
were accessible as members of the model class itself. Note there were often
|
||||||
many such variable due to module inlining, including
|
many such variable due to module inlining, including ``/* verilator
|
||||||
:code:`/* verilator public_flat */` items.
|
public_flat */`` items.
|
||||||
|
|
||||||
This means that user code that accesses internal signals in the model
|
This means that user code that accesses internal signals in the model
|
||||||
(likely including :code:`/* verilator public_flat */` signals, as they are
|
(likely including ``/* verilator public_flat */`` signals, as they are
|
||||||
often inlined into the root scope) will need to be updated as follows:
|
often inlined into the root scope) will need to be updated as follows:
|
||||||
|
|
||||||
* No change required for accessing top level IO signals. These are directly
|
* No change required for accessing top level IO signals. These are directly
|
||||||
accessible in the model class via references.
|
accessible in the model class via references.
|
||||||
|
|
||||||
* No change required for accessing :code:`/* verilator public */` items.
|
* No change required for accessing ``/* verilator public */`` items. These
|
||||||
These are directly accessible via sub-module pointers in the model class.
|
are directly accessible via sub-module pointers in the model class.
|
||||||
|
|
||||||
* Accessing any other internal members, including
|
* Accessing any other internal members, including
|
||||||
:code:`/* verilator public_flat */` items requires the following changes:
|
``/* verilator public_flat */`` items requires the following changes:
|
||||||
|
|
||||||
* Additionally include :file:`{prefix}___024root.h`. This header defines
|
* Additionally include :file:`{prefix}___024root.h`. This header defines
|
||||||
type of the :code:`rootp` pointer within the model class. Note the
|
type of the ``rootp`` pointer within the model class. Note the
|
||||||
:code:`__024` substring is the Verilator escape sequence for the
|
``__024`` substring is the Verilator escape sequence for the ``$``
|
||||||
:code:`$` character, i.e.: :code:`rootp` points to the Verilated
|
character, i.e.: ``rootp`` points to the Verilated SystemVerilog
|
||||||
SystemVerilog :code:`$root` scope.
|
``$root`` scope.
|
||||||
|
|
||||||
* Replace :code:`modelp->internal->member` references with
|
* Replace ``modelp->internal->member`` references with
|
||||||
:code:`modelp->rootp->internal->member` references, which
|
``modelp->rootp->internal->member`` references, which contain one
|
||||||
contain one additional indirection via the :code:`rootp` pointer.
|
additional indirection via the ``rootp`` pointer.
|
||||||
|
|
||||||
|
|
||||||
.. _Connecting to C++:
|
.. _connecting to c++:
|
||||||
|
|
||||||
Connecting to C++
|
Connecting to C++
|
||||||
=================
|
=================
|
||||||
|
|
||||||
In C++ output mode (:vlopt:`--cc`), the Verilator generated model class is a
|
In C++ output mode (:vlopt:`--cc`), the Verilator generated model class is
|
||||||
simple C++ class. The user must write a C++ wrapper and main loop for the
|
a simple C++ class. The user must write a C++ wrapper and main loop for the
|
||||||
simulation, which instantiates the model class, and link with the Verilated
|
simulation, which instantiates the model class, and link with the Verilated
|
||||||
model.
|
model.
|
||||||
|
|
||||||
Refer to ``examples/make_tracing_c`` in the distribution for a detailed
|
Refer to ``examples/make_tracing_c`` in the distribution for a detailed
|
||||||
commented example.
|
commented example.
|
||||||
|
|
||||||
Top level IO signals are read and written as members of the model. You
|
Top level IO signals are read and written as members of the model. You call
|
||||||
call the model's :code:`eval()` method to evaluate the model. When the
|
the model's ``eval()`` method to evaluate the model. When the simulation is
|
||||||
simulation is complete call the model's :code:`final()` method to execute
|
complete call the model's ``final()`` method to execute any SystemVerilog
|
||||||
any SystemVerilog final blocks, and complete any assertions. If using
|
final blocks, and complete any assertions. If using :vlopt:`--timing`,
|
||||||
:vlopt:`--timing`, there are two additional functions for checking if
|
there are two additional functions for checking if there are any events
|
||||||
there are any events pending in the simulation due to delays, and for
|
pending in the simulation due to delays, and for retrieving the simulation
|
||||||
retrieving the simulation time of the next delayed event. See
|
time of the next delayed event. See :ref:`Evaluation Loop`.
|
||||||
:ref:`Evaluation Loop`.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Connecting to SystemC
|
Connecting to SystemC
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
In SystemC output mode (:vlopt:`--sc`), the Verilator generated model class
|
In SystemC output mode (:vlopt:`--sc`), the Verilator generated model class
|
||||||
is a SystemC SC_MODULE. This module will attach directly into a SystemC
|
is a SystemC SC_MODULE. This module will attach directly into a SystemC
|
||||||
netlist as an instantiation.
|
netlist as an instantiation.
|
||||||
|
|
||||||
The SC_MODULE gets the same pinout as the Verilog module, with the
|
The SC_MODULE gets the same pinout as the Verilog module, with the
|
||||||
following type conversions: Pins of a single bit become bool. Pins 2-32
|
following type conversions: Pins of a single bit become bool. Pins 2-32
|
||||||
bits wide become uint32_t's. Pins 33-64 bits wide become sc_bv's or
|
bits wide become uint32_t's. Pins 33-64 bits wide become sc_bv's or
|
||||||
uint64_t's depending on the :vlopt:`--no-pins64` option. Wider pins
|
uint64_t's depending on the :vlopt:`--no-pins64` option. Wider pins become
|
||||||
become sc_bv's. (Uints simulate the fastest so are used where possible.)
|
sc_bv's. (Uints simulate the fastest so are used where possible.)
|
||||||
|
|
||||||
Model internals, including lower level sub-modules are not pure SystemC
|
Model internals, including lower level sub-modules are not pure SystemC
|
||||||
code. This is a feature, as using the SystemC pin interconnect scheme
|
code. This is a feature, as using the SystemC pin interconnect scheme
|
||||||
everywhere would reduce performance by an order of magnitude.
|
everywhere would reduce performance by an order of magnitude.
|
||||||
|
|
||||||
|
|
||||||
@@ -124,41 +122,42 @@ Verilated API
|
|||||||
=============
|
=============
|
||||||
|
|
||||||
The API to a Verilated model is the C++ headers in the include/ directory
|
The API to a Verilated model is the C++ headers in the include/ directory
|
||||||
in the distribution. These headers use Doxygen comments, `///` and `//<`,
|
in the distribution. These headers use Doxygen comments, `///` and `//<`,
|
||||||
to indicate and document those functions that are part of the Verilated
|
to indicate and document those functions that are part of the Verilated
|
||||||
public API.
|
public API.
|
||||||
|
|
||||||
Process-Level Clone APIs
|
Process-Level Clone APIs
|
||||||
--------------------------
|
------------------------
|
||||||
|
|
||||||
Modern operating systems support process-level clone (a.k.a copying, forking)
|
Modern operating systems support process-level clone (a.k.a copying,
|
||||||
with system call interfaces in C/C++, e.g., :code:`fork()` in Linux.
|
forking) with system call interfaces in C/C++, e.g., ``fork()`` in Linux.
|
||||||
|
|
||||||
However, after cloning a parent process, some resources cannot be inherited
|
However, after cloning a parent process, some resources cannot be inherited
|
||||||
in the child process. For example, in POSIX systems, when you fork a process,
|
in the child process. For example, in POSIX systems, when you fork a
|
||||||
the child process inherits all the memory of the parent process. However,
|
process, the child process inherits all the memory of the parent process.
|
||||||
only the thread that called fork is replicated in the child process. Other
|
However, only the thread that called fork is replicated in the child
|
||||||
threads are not.
|
process. Other threads are not.
|
||||||
|
|
||||||
Therefore, to support the process-level clone mechanisms, Verilator supports
|
Therefore, to support the process-level clone mechanisms, Verilator
|
||||||
:code:`prepareClone()` and :code:`atClone()` APIs to allow the user to manually
|
supports ``prepareClone()`` and ``atClone()`` APIs to allow the user to
|
||||||
re-construct the model in the child process. The two APIs handle all necessary
|
manually re-construct the model in the child process. The two APIs handle
|
||||||
resources required for releasing and re-initializing before and after cloning.
|
all necessary resources required for releasing and re-initializing before
|
||||||
|
and after cloning.
|
||||||
|
|
||||||
The two APIs are supported in the verilated models. Here is an example of usage
|
The two APIs are supported in the verilated models. Here is an example of
|
||||||
with Linux :code:`fork()` and :code:`pthread_atfork` APIs:
|
usage with Linux ``fork()`` and ``pthread_atfork`` APIs:
|
||||||
|
|
||||||
.. code-block:: C++
|
.. code-block:: C++
|
||||||
|
|
||||||
// static function pointers to fit pthread_atfork
|
// static function pointers to fit pthread_atfork
|
||||||
static auto prepareClone = [](){ topp->prepareClone(); };
|
static auto prepareClone = [](){ topp->prepareClone(); };
|
||||||
static auto atClone = [](){ topp->atClone(); };
|
static auto atClone = [](){ topp->atClone(); };
|
||||||
|
|
||||||
// in main function, register the handlers:
|
// in main function, register the handlers:
|
||||||
pthread_atfork(prepareClone, atClone, atClone);
|
pthread_atfork(prepareClone, atClone, atClone);
|
||||||
|
|
||||||
For better flexibility, you can also manually call the handlers before and
|
For better flexibility, you can also manually call the handlers before and
|
||||||
after :code:`fork()`.
|
after ``fork()``.
|
||||||
|
|
||||||
With the process-level clone APIs, users can create process-level snapshots
|
With the process-level clone APIs, users can create process-level snapshots
|
||||||
for the verilated models. While the Verilator save/restore option provides
|
for the verilated models. While the Verilator save/restore option provides
|
||||||
@@ -170,7 +169,7 @@ Direct Programming Interface (DPI)
|
|||||||
==================================
|
==================================
|
||||||
|
|
||||||
Verilator supports SystemVerilog Direct Programming Interface import and
|
Verilator supports SystemVerilog Direct Programming Interface import and
|
||||||
export statements. Only the SystemVerilog form ("DPI-C") is supported, not
|
export statements. Only the SystemVerilog form ("DPI-C") is supported, not
|
||||||
the original Synopsys-only DPI.
|
the original Synopsys-only DPI.
|
||||||
|
|
||||||
DPI Example
|
DPI Example
|
||||||
@@ -181,76 +180,76 @@ Verilog, put in our.v:
|
|||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
import "DPI-C" function int add (input int a, input int b);
|
import "DPI-C" function int add (input int a, input int b);
|
||||||
|
|
||||||
initial begin
|
initial begin
|
||||||
$display("%x + %x = %x", 1, 2, add(1,2));
|
$display("%x + %x = %x", 1, 2, add(1,2));
|
||||||
endtask
|
endtask
|
||||||
|
|
||||||
Then after Verilating, Verilator will create a file Vour__Dpi.h with the
|
Then after Verilating, Verilator will create a file Vour__Dpi.h with the
|
||||||
prototype to call this function:
|
prototype to call this function:
|
||||||
|
|
||||||
.. code-block:: C++
|
.. code-block:: C++
|
||||||
|
|
||||||
extern int add(int a, int b);
|
extern int add(int a, int b);
|
||||||
|
|
||||||
From the sc_main.cpp file (or another .cpp file passed to the Verilator
|
From the sc_main.cpp file (or another .cpp file passed to the Verilator
|
||||||
command line, or the link), you'd then:
|
command line, or the link), you'd then:
|
||||||
|
|
||||||
.. code-block:: C++
|
.. code-block:: C++
|
||||||
|
|
||||||
#include "svdpi.h"
|
#include "svdpi.h"
|
||||||
#include "Vour__Dpi.h"
|
#include "Vour__Dpi.h"
|
||||||
int add(int a, int b) { return a+b; }
|
int add(int a, int b) { return a+b; }
|
||||||
|
|
||||||
|
|
||||||
DPI System Task/Functions
|
DPI System Task/Functions
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
Verilator extends the DPI format to allow using the same scheme to
|
Verilator extends the DPI format to allow using the same scheme to
|
||||||
efficiently add system functions. Use a dollar-sign prefixed system
|
efficiently add system functions. Use a dollar-sign prefixed system
|
||||||
function name for the import, but note it must be escaped.
|
function name for the import, but note it must be escaped.
|
||||||
|
|
||||||
.. code-block:: sv
|
.. code-block:: sv
|
||||||
|
|
||||||
export "DPI-C" function integer \$myRand;
|
export "DPI-C" function integer \$myRand;
|
||||||
|
|
||||||
initial $display("myRand=%d", $myRand());
|
initial $display("myRand=%d", $myRand());
|
||||||
|
|
||||||
Going the other direction, you can export Verilog tasks so they can be
|
Going the other direction, you can export Verilog tasks so they can be
|
||||||
called from C++:
|
called from C++:
|
||||||
|
|
||||||
.. code-block:: sv
|
.. code-block:: sv
|
||||||
|
|
||||||
export "DPI-C" task publicSetBool;
|
export "DPI-C" task publicSetBool;
|
||||||
|
|
||||||
task publicSetBool;
|
task publicSetBool;
|
||||||
input bit in_bool;
|
input bit in_bool;
|
||||||
var_bool = in_bool;
|
var_bool = in_bool;
|
||||||
endtask
|
endtask
|
||||||
|
|
||||||
Then after Verilating, Verilator will create a file Vour__Dpi.h with the
|
Then after Verilating, Verilator will create a file Vour__Dpi.h with the
|
||||||
prototype to call this function:
|
prototype to call this function:
|
||||||
|
|
||||||
.. code-block:: C++
|
.. code-block:: C++
|
||||||
|
|
||||||
extern void publicSetBool(svBit in_bool);
|
extern void publicSetBool(svBit in_bool);
|
||||||
|
|
||||||
From the sc_main.cpp file, you'd then:
|
From the sc_main.cpp file, you'd then:
|
||||||
|
|
||||||
.. code-block:: C++
|
.. code-block:: C++
|
||||||
|
|
||||||
#include "Vour__Dpi.h"
|
#include "Vour__Dpi.h"
|
||||||
publicSetBool(value);
|
publicSetBool(value);
|
||||||
|
|
||||||
Or, alternatively, call the function under the design class. This isn't
|
Or, alternatively, call the function under the design class. This isn't DPI
|
||||||
DPI compatible but is easier to read and better supports multiple designs.
|
compatible but is easier to read and better supports multiple designs.
|
||||||
|
|
||||||
.. code-block:: C++
|
.. code-block:: C++
|
||||||
|
|
||||||
#include "Vour__Dpi.h"
|
#include "Vour__Dpi.h"
|
||||||
Vour::publicSetBool(value);
|
Vour::publicSetBool(value);
|
||||||
// or top->publicSetBool(value);
|
// or top->publicSetBool(value);
|
||||||
|
|
||||||
Note that if the DPI task or function accesses any register or net within
|
Note that if the DPI task or function accesses any register or net within
|
||||||
the RTL, it will require a scope to be set. This can be done using the
|
the RTL, it will require a scope to be set. This can be done using the
|
||||||
@@ -263,11 +262,11 @@ with respect to that top level module, then the scope could be set with
|
|||||||
|
|
||||||
.. code-block:: C++
|
.. code-block:: C++
|
||||||
|
|
||||||
#include "svdpi.h"
|
#include "svdpi.h"
|
||||||
...
|
...
|
||||||
const svScope scope = svGetScopeFromName("TOP.dut");
|
const svScope scope = svGetScopeFromName("TOP.dut");
|
||||||
assert(scope); // Check for nullptr if scope not found
|
assert(scope); // Check for nullptr if scope not found
|
||||||
svSetScope(scope);
|
svSetScope(scope);
|
||||||
|
|
||||||
(Remember that Verilator adds a "TOP" to the top of the module hierarchy.)
|
(Remember that Verilator adds a "TOP" to the top of the module hierarchy.)
|
||||||
|
|
||||||
@@ -282,24 +281,24 @@ DPI Imports that access signals
|
|||||||
|
|
||||||
If a DPI import accesses a signal through the VPI Verilator will not be
|
If a DPI import accesses a signal through the VPI Verilator will not be
|
||||||
able to know what variables are accessed and may schedule the code
|
able to know what variables are accessed and may schedule the code
|
||||||
inappropriately. Ideally pass the values as inputs/outputs so the VPI is
|
inappropriately. Ideally pass the values as inputs/outputs so the VPI is
|
||||||
not required. Alternatively a workaround is to use a non-inlined task as a
|
not required. Alternatively a workaround is to use a non-inlined task as a
|
||||||
wrapper:
|
wrapper:
|
||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
logic din;
|
logic din;
|
||||||
|
|
||||||
// This DPI function will read "din"
|
// This DPI function will read "din"
|
||||||
import "DPI-C" context function void dpi_that_accesses_din();
|
import "DPI-C" context function void dpi_that_accesses_din();
|
||||||
|
|
||||||
always @(...)
|
always @(...)
|
||||||
dpi_din_args(din);
|
dpi_din_args(din);
|
||||||
|
|
||||||
task dpi_din_args(input din);
|
task dpi_din_args(input din);
|
||||||
/* verilator no_inline_task */
|
// verilator no_inline_task
|
||||||
dpi_that_accesses_din();
|
dpi_that_accesses_din();
|
||||||
endtask
|
endtask
|
||||||
|
|
||||||
|
|
||||||
DPI Display Functions
|
DPI Display Functions
|
||||||
@@ -309,8 +308,8 @@ Verilator allows writing $display like functions using this syntax:
|
|||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
import "DPI-C" function void
|
import "DPI-C" function void
|
||||||
\$my_display(input string formatted /*verilator sformat*/ );
|
\$my_display(input string formatted /*verilator sformat*/ );
|
||||||
|
|
||||||
The :option:`/*verilator&32;sformat*/` metacomment indicates that this
|
The :option:`/*verilator&32;sformat*/` metacomment indicates that this
|
||||||
function accepts a $display like format specifier followed by any number of
|
function accepts a $display like format specifier followed by any number of
|
||||||
@@ -320,14 +319,14 @@ arguments to satisfy the format.
|
|||||||
DPI Context Functions
|
DPI Context Functions
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
Verilator supports IEEE DPI Context Functions. Context imports pass the
|
Verilator supports IEEE DPI Context Functions. Context imports pass the
|
||||||
simulator context, including calling scope name, and filename and line
|
simulator context, including calling scope name, and filename and line
|
||||||
number to the C code. For example, in Verilog:
|
number to the C code. For example, in Verilog:
|
||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
import "DPI-C" context function int dpic_line();
|
import "DPI-C" context function int dpic_line();
|
||||||
initial $display("This is line %d, again, line %d\n", `line, dpic_line());
|
initial $display("This is line %d, again, line %d\n", `line, dpic_line());
|
||||||
|
|
||||||
This will call C++ code which may then use the svGet\* functions to read
|
This will call C++ code which may then use the svGet\* functions to read
|
||||||
information, in this case the line number of the Verilog statement that
|
information, in this case the line number of the Verilog statement that
|
||||||
@@ -335,22 +334,22 @@ invoked the dpic_line function:
|
|||||||
|
|
||||||
.. code-block:: C++
|
.. code-block:: C++
|
||||||
|
|
||||||
int dpic_line() {
|
int dpic_line() {
|
||||||
// Get a scope: svScope scope = svGetScope();
|
// Get a scope: svScope scope = svGetScope();
|
||||||
|
|
||||||
const char* scopenamep = svGetNameFromScope(scope);
|
const char* scopenamep = svGetNameFromScope(scope);
|
||||||
assert(scopenamep);
|
assert(scopenamep);
|
||||||
|
|
||||||
const char* filenamep = "";
|
const char* filenamep = "";
|
||||||
int lineno = 0;
|
int lineno = 0;
|
||||||
if (svGetCallerInfo(&filenamep, &lineno)) {
|
if (svGetCallerInfo(&filenamep, &lineno)) {
|
||||||
printf("dpic_line called from scope %s on line %d\n",
|
printf("dpic_line called from scope %s on line %d\n",
|
||||||
scopenamep, lineno);
|
scopenamep, lineno);
|
||||||
return lineno;
|
return lineno;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
See the IEEE Standard for more information.
|
See the IEEE Standard for more information.
|
||||||
|
|
||||||
@@ -359,13 +358,12 @@ DPI Header Isolation
|
|||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
Verilator places the IEEE standard header files such as svdpi.h into a
|
Verilator places the IEEE standard header files such as svdpi.h into a
|
||||||
separate include directory, vltstd (VeriLaTor STandarD). When compiling
|
separate include directory, vltstd (VeriLaTor STandarD). When compiling
|
||||||
most applications $VERILATOR_ROOT/include/vltstd would be in the include
|
most applications $VERILATOR_ROOT/include/vltstd would be in the include
|
||||||
path along with the normal $VERILATOR_ROOT/include. However, when
|
path along with the normal $VERILATOR_ROOT/include. However, when compiling
|
||||||
compiling Verilated models into other simulators which have their own
|
Verilated models into other simulators which have their own svdpi.h and
|
||||||
svdpi.h and similar standard files with different contents, the vltstd
|
similar standard files with different contents, the vltstd directory should
|
||||||
directory should not be included to prevent picking up incompatible
|
not be included to prevent picking up incompatible definitions.
|
||||||
definitions.
|
|
||||||
|
|
||||||
|
|
||||||
Public Functions
|
Public Functions
|
||||||
@@ -378,24 +376,23 @@ are slightly faster, but less compatible.
|
|||||||
Verification Procedural Interface (VPI)
|
Verification Procedural Interface (VPI)
|
||||||
=======================================
|
=======================================
|
||||||
|
|
||||||
Verilator supports a limited subset of the VPI. This subset allows
|
Verilator supports a limited subset of the VPI. This subset allows
|
||||||
inspection, examination, value change callbacks, and depositing of values
|
inspection, examination, value change callbacks, and depositing of values
|
||||||
to public signals only.
|
to public signals only.
|
||||||
|
|
||||||
VPI is enabled with the Verilator :vlopt:`--vpi` option.
|
VPI is enabled with the Verilator :vlopt:`--vpi` option.
|
||||||
|
|
||||||
To access signals via the VPI, Verilator must be told exactly which signals
|
To access signals via the VPI, Verilator must be told exactly which signals
|
||||||
are to be accessed. This is done using the Verilator public pragmas
|
are to be accessed. This is done using the Verilator public pragmas
|
||||||
documented below.
|
documented below.
|
||||||
|
|
||||||
Verilator has an important difference from an event based simulator; signal
|
Verilator has an important difference from an event based simulator; signal
|
||||||
values that are changed by the VPI will not immediately propagate their
|
values that are changed by the VPI will not immediately propagate their
|
||||||
values, instead the top level header file's :code:`eval()` method must be
|
values, instead the top level header file's ``eval()`` method must be
|
||||||
called. Normally this would be part of the normal evaluation (i.e. the
|
called. Normally this would be part of the normal evaluation (i.e. the next
|
||||||
next clock edge), not as part of the value change. This makes the
|
clock edge), not as part of the value change. This makes the performance of
|
||||||
performance of VPI routines extremely fast compared to event based
|
VPI routines extremely fast compared to event based simulators, but can
|
||||||
simulators, but can confuse some test-benches that expect immediate
|
confuse some test-benches that expect immediate propagation.
|
||||||
propagation.
|
|
||||||
|
|
||||||
Note the VPI by its specified implementation will always be much slower
|
Note the VPI by its specified implementation will always be much slower
|
||||||
than accessing the Verilator values by direct reference
|
than accessing the Verilator values by direct reference
|
||||||
@@ -405,132 +402,131 @@ while the direct references are evaluated by the compiler and result in
|
|||||||
only a couple of instructions.
|
only a couple of instructions.
|
||||||
|
|
||||||
For signal callbacks to work the main loop of the program must call
|
For signal callbacks to work the main loop of the program must call
|
||||||
:code:`VerilatedVpi::callValueCbs()`.
|
``VerilatedVpi::callValueCbs()``.
|
||||||
|
|
||||||
Verilator also tracks when the model state has been modified via the VPI with
|
Verilator also tracks when the model state has been modified via the VPI
|
||||||
an :code:`evalNeeded` flag. This flag can be checked with :code:`VerilatedVpi::evalNeeded()`
|
with an ``evalNeeded`` flag. This flag can be checked with
|
||||||
and it can be cleared with :code:`VerilatedVpi::clearEvalNeeded()`. Used together
|
``VerilatedVpi::evalNeeded()`` and it can be cleared with
|
||||||
it is possible to skip :code:`eval()` calls if no model state has been changed
|
``VerilatedVpi::clearEvalNeeded()``. Used together it is possible to skip
|
||||||
since the last :code:`eval()`.
|
``eval()`` calls if no model state has been changed since the last
|
||||||
|
``eval()``.
|
||||||
|
|
||||||
Any data written via :code:`vpi_put_value` with :code:`vpiInertialDelay` will
|
Any data written via ``vpi_put_value`` with ``vpiInertialDelay`` will be
|
||||||
be deferred for later. These delayed values can be flushed to the model with
|
deferred for later. These delayed values can be flushed to the model with
|
||||||
:code:`VerilatedVpi::doInertialPuts()`.
|
``VerilatedVpi::doInertialPuts()``.
|
||||||
|
|
||||||
|
|
||||||
.. _VPI Example:
|
.. _vpi example:
|
||||||
|
|
||||||
VPI Example
|
VPI Example
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
In the below example, we have readme marked read-only, and writeme which if
|
In the below example, we have readme marked read-only, and writeme marked
|
||||||
written from outside the model will have the same semantics as if it
|
read-write which if written from outside the model will have the same
|
||||||
changed on the specified clock edge.
|
semantics as if it was a top level input.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
cat >our.v <<'EOF'
|
cat >our.v <<'EOF'
|
||||||
module our #(
|
module our #(
|
||||||
parameter WIDTH /*verilator public_flat_rd*/ = 32
|
parameter WIDTH /*verilator public_flat_rd*/ = 32
|
||||||
) (input clk);
|
) (input clk);
|
||||||
reg [WIDTH-1:0] readme /*verilator public_flat_rd*/;
|
reg [WIDTH-1:0] readme /*verilator public_flat_rd*/;
|
||||||
reg [WIDTH-1:0] writeme /*verilator public_flat_rw @(posedge clk) */;
|
reg [WIDTH-1:0] writeme /*verilator public_flat_rw*/;
|
||||||
initial $finish;
|
initial $finish;
|
||||||
endmodule
|
endmodule
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
There are many online tutorials and books on the VPI, but an example that
|
There are many online tutorials and books on the VPI, but an example that
|
||||||
accesses the above signal "readme" would be:
|
accesses the above signal "readme" would be:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
cat >sim_main.cpp <<'EOF'
|
cat >sim_main.cpp <<'EOF'
|
||||||
#include "Vour.h"
|
#include "Vour.h"
|
||||||
#include "verilated.h"
|
#include "verilated.h"
|
||||||
#include "verilated_vpi.h" // Required to get definitions
|
#include "verilated_vpi.h" // Required to get definitions
|
||||||
|
|
||||||
uint64_t main_time = 0; // See comments in first example
|
uint64_t main_time = 0; // See comments in first example
|
||||||
double sc_time_stamp() { return main_time; }
|
double sc_time_stamp() { return main_time; }
|
||||||
|
|
||||||
void read_and_check() {
|
void read_and_check() {
|
||||||
vpiHandle vh1 = vpi_handle_by_name((PLI_BYTE8*)"TOP.our.readme", NULL);
|
vpiHandle vh1 = vpi_handle_by_name((PLI_BYTE8*)"TOP.our.readme", NULL);
|
||||||
if (!vh1) vl_fatal(__FILE__, __LINE__, "sim_main", "No handle found");
|
if (!vh1) vl_fatal(__FILE__, __LINE__, "sim_main", "No handle found");
|
||||||
const char* name = vpi_get_str(vpiName, vh1);
|
const char* name = vpi_get_str(vpiName, vh1);
|
||||||
const char* type = vpi_get_str(vpiType, vh1);
|
const char* type = vpi_get_str(vpiType, vh1);
|
||||||
const int size = vpi_get(vpiSize, vh1);
|
const int size = vpi_get(vpiSize, vh1);
|
||||||
printf("register name: %s, type: %s, size: %d\n", name, type, size); // Prints "register name: readme, type: vpiReg, size: 32"
|
printf("register name: %s, type: %s, size: %d\n", name, type, size); // Prints "register name: readme, type: vpiReg, size: 32"
|
||||||
|
|
||||||
s_vpi_value v;
|
s_vpi_value v;
|
||||||
v.format = vpiIntVal;
|
v.format = vpiIntVal;
|
||||||
vpi_get_value(vh1, &v);
|
vpi_get_value(vh1, &v);
|
||||||
printf("Value of %s: %d\n", name, v.value.integer); // Prints "Value of readme: 0"
|
printf("Value of %s: %d\n", name, v.value.integer); // Prints "Value of readme: 0"
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
Verilated::commandArgs(argc, argv);
|
Verilated::commandArgs(argc, argv);
|
||||||
const std::unique_ptr<VerilatedContext> contextp{new VerilatedContext};
|
const std::unique_ptr<VerilatedContext> contextp{new VerilatedContext};
|
||||||
const std::unique_ptr<Vour> top{new Vour{contextp.get()}};
|
const std::unique_ptr<Vour> top{new Vour{contextp.get()}};
|
||||||
|
|
||||||
contextp->internalsDump(); // See scopes to help debug
|
contextp->internalsDump(); // See scopes to help debug
|
||||||
while (!contextp->gotFinish()) {
|
while (!contextp->gotFinish()) {
|
||||||
top->eval();
|
top->eval();
|
||||||
VerilatedVpi::callValueCbs(); // For signal callbacks
|
VerilatedVpi::callValueCbs(); // For signal callbacks
|
||||||
read_and_check();
|
read_and_check();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
.. _Evaluation Loop:
|
.. _evaluation loop:
|
||||||
|
|
||||||
Wrappers and Model Evaluation Loop
|
Wrappers and Model Evaluation Loop
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
When using SystemC, evaluation of the Verilated model is managed by the
|
When using SystemC, evaluation of the Verilated model is managed by the
|
||||||
SystemC kernel, and for the most part can be ignored. When using C++, the
|
SystemC kernel, and for the most part can be ignored. When using C++, the
|
||||||
user must call :code:`eval()`, or :code:`eval_step()` and
|
user must call ``eval()``, or ``eval_step()`` and ``eval_end_step()``.
|
||||||
:code:`eval_end_step()`.
|
|
||||||
|
|
||||||
1. When there is a single design instantiated at the C++ level that needs
|
1. When there is a single design instantiated at the C++ level that needs
|
||||||
to evaluate within a given context, call :code:`designp->eval()`.
|
to evaluate within a given context, call ``designp->eval()``.
|
||||||
|
|
||||||
2. When there are multiple designs instantiated at the C++ level that need
|
2. When there are multiple designs instantiated at the C++ level that need
|
||||||
to evaluate within a context, call :code:`first_designp->eval_step()` then
|
to evaluate within a context, call ``first_designp->eval_step()`` then
|
||||||
:code:`->eval_step()` on all other designs. Then call
|
``->eval_step()`` on all other designs. Then call ``->eval_end_step()`` on
|
||||||
:code:`->eval_end_step()` on the first design then all other designs. If
|
the first design then all other designs. If there is only a single design,
|
||||||
there is only a single design, you would call :code:`eval_step()` then
|
you would call ``eval_step()`` then ``eval_end_step()``; in fact ``eval()``
|
||||||
:code:`eval_end_step()`; in fact :code:`eval()` described above is just a
|
described above is just a wrapper which calls these two functions.
|
||||||
wrapper which calls these two functions.
|
|
||||||
|
|
||||||
3. If using delays and :vlopt:`--timing`, there are two additional methods
|
3. If using delays and :vlopt:`--timing`, there are two additional methods
|
||||||
the user should call:
|
the user should call:
|
||||||
|
|
||||||
* :code:`designp->eventsPending()`, which returns :code:`true` if there are
|
* ``designp->eventsPending()``, which returns ``true`` if there are any
|
||||||
any delayed events pending,
|
delayed events pending,
|
||||||
* :code:`designp->nextTimeSlot()`, which returns the simulation time of the
|
* ``designp->nextTimeSlot()``, which returns the simulation time of the
|
||||||
next delayed event. This method can only be called if
|
next delayed event. This method can only be called if
|
||||||
:code:`designp->eventsPending()` returned :code:`true`.
|
``designp->eventsPending()`` returned ``true``.
|
||||||
|
|
||||||
Call :code:`eventsPending()` to check if you should continue with the
|
Call ``eventsPending()`` to check if you should continue with the
|
||||||
simulation, and then :code:`nextTimeSlot()` to move simulation time forward.
|
simulation, and then ``nextTimeSlot()`` to move simulation time forward.
|
||||||
:vlopt:`--main` can be used with :vlopt:`--timing` to generate a basic example
|
:vlopt:`--main` can be used with :vlopt:`--timing` to generate a basic
|
||||||
of a timing-enabled eval loop.
|
example of a timing-enabled eval loop.
|
||||||
|
|
||||||
When :code:`eval()` (or :code:`eval_step()`) is called Verilator looks for
|
When ``eval()`` (or ``eval_step()``) is called Verilator looks for changes
|
||||||
changes in clock signals and evaluates related sequential always blocks,
|
in clock signals and evaluates related sequential always blocks, such as
|
||||||
such as computing always_ff @ (posedge...) outputs. With :vlopt:`--timing`, it
|
computing always_ff @ (posedge...) outputs. With :vlopt:`--timing`, it
|
||||||
resumes any delayed processes awaiting the current simulation time. Then
|
resumes any delayed processes awaiting the current simulation time. Then
|
||||||
Verilator evaluates combinational logic.
|
Verilator evaluates combinational logic.
|
||||||
|
|
||||||
Note combinatorial logic is not computed before sequential always blocks
|
Note combinatorial logic is not computed before sequential always blocks
|
||||||
are computed (for speed reasons). Therefore it is best to set any non-clock
|
are computed (for speed reasons). Therefore it is best to set any non-clock
|
||||||
inputs up with a separate :code:`eval()` call before changing clocks.
|
inputs up with a separate ``eval()`` call before changing clocks.
|
||||||
|
|
||||||
Alternatively, if all always_ff statements use only the posedge of clocks,
|
Alternatively, if all always_ff statements use only the posedge of clocks,
|
||||||
or all inputs go directly to always_ff statements, as is typical, then you
|
or all inputs go directly to always_ff statements, as is typical, then you
|
||||||
can change non-clock inputs on the negative edge of the input clock, which
|
can change non-clock inputs on the negative edge of the input clock, which
|
||||||
will be faster as there will be fewer :code:`eval()` calls.
|
will be faster as there will be fewer ``eval()`` calls.
|
||||||
|
|
||||||
For more information on evaluation, see :file:`docs/internals.rst` in the
|
For more information on evaluation, see :file:`docs/internals.rst` in the
|
||||||
distribution.
|
distribution.
|
||||||
@@ -540,18 +536,18 @@ Verilated and VerilatedContext
|
|||||||
==============================
|
==============================
|
||||||
|
|
||||||
Multiple C++ Verilated models may be part of the same simulation context,
|
Multiple C++ Verilated models may be part of the same simulation context,
|
||||||
that is share a VPI interface, sense of time, and common settings. This
|
that is share a VPI interface, sense of time, and common settings. This
|
||||||
common simulation context information is stored in a ``VerilatedContext``
|
common simulation context information is stored in a ``VerilatedContext``
|
||||||
structure. If a ``VerilatedContext`` is not created prior to creating a
|
structure. If a ``VerilatedContext`` is not created prior to creating a
|
||||||
model, a default global one is created automatically. SystemC requires
|
model, a default global one is created automatically. SystemC requires
|
||||||
using only the single, default VerilatedContext.
|
using only the single, default VerilatedContext.
|
||||||
|
|
||||||
The ``Verilated::`` methods, including the ``Verilated::commandArgs`` call
|
The ``Verilated::`` methods, including the ``Verilated::commandArgs`` call
|
||||||
shown above, call VerilatedContext methods using the default global
|
shown above, call VerilatedContext methods using the default global
|
||||||
VerilatedContext. (Technically they operate on the last one used by a
|
VerilatedContext. (Technically they operate on the last one used by a given
|
||||||
given thread.) If you are using multiple simulation contexts you should
|
thread.) If you are using multiple simulation contexts you should not use
|
||||||
not use the Verilated:: methods, and instead always use VerilatedContext
|
the Verilated:: methods, and instead always use VerilatedContext methods
|
||||||
methods called on the appropriate VerilatedContext object.
|
called on the appropriate VerilatedContext object.
|
||||||
|
|
||||||
For methods available under Verilated and VerilatedContext see
|
For methods available under Verilated and VerilatedContext see
|
||||||
:file:`include/verilated.h` in the distribution.
|
:file:`include/verilated.h` in the distribution.
|
||||||
|
|||||||
+27
-25
@@ -1,4 +1,4 @@
|
|||||||
.. Copyright 2003-2025 by Wilson Snyder.
|
.. Copyright 2003-2026 by Wilson Snyder.
|
||||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
*******************************
|
*******************************
|
||||||
@@ -19,50 +19,50 @@ Reporting Bugs
|
|||||||
|
|
||||||
First, check the :ref:`Language Limitations` section.
|
First, check the :ref:`Language Limitations` section.
|
||||||
|
|
||||||
Next, try the :vlopt:`--debug` option. This will enable additional
|
Next, try the :vlopt:`--debug` option. This will enable additional internal
|
||||||
internal assertions, and may help identify the problem.
|
assertions, and may help identify the problem.
|
||||||
|
|
||||||
Finally, reduce your code to the smallest possible routine that exhibits
|
Finally, reduce your code to the smallest possible routine that exhibits
|
||||||
the bug (see: :ref:`Minimizing bug-inducing code`). Even better, create
|
the bug (see: :ref:`Minimizing bug-inducing code`). Even better, create a
|
||||||
a test in the :file:`test_regress/t` directory, as follows:
|
test in the :file:`test_regress/t` directory, as follows:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
cd test_regress
|
cd test_regress
|
||||||
cp -p t/t_EXAMPLE.py t/t_BUG.py
|
cp -p t/t_EXAMPLE.py t/t_BUG.py
|
||||||
cp -p t/t_EXAMPLE.v t/t_BUG.v
|
cp -p t/t_EXAMPLE.v t/t_BUG.v
|
||||||
|
|
||||||
There are many hints on how to write a good test in the
|
There are many hints on how to write a good test in the
|
||||||
:file:`test_regress/driver.py` documentation which can be seen by running:
|
:file:`test_regress/driver.py` documentation which can be seen by running:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
cd $VERILATOR_ROOT # Need the original distribution kit
|
cd $VERILATOR_ROOT # Need the original distribution kit
|
||||||
test_regress/driver.py --help
|
test_regress/driver.py --help
|
||||||
|
|
||||||
Edit :file:`t/t_BUG.py` to suit your example; you can do anything you want
|
Edit :file:`t/t_BUG.py` to suit your example; you can do anything you want
|
||||||
in the Verilog code there; just make sure it retains the single clk input
|
in the Verilog code there; just make sure it retains the single clk input
|
||||||
and no outputs. Now, the following should fail:
|
and no outputs. Now, the following should fail:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
cd $VERILATOR_ROOT # Need the original distribution kit
|
cd $VERILATOR_ROOT # Need the original distribution kit
|
||||||
cd test_regress
|
cd test_regress
|
||||||
t/t_BUG.py # Run on Verilator
|
t/t_BUG.py # Run on Verilator
|
||||||
t/t_BUG.py --debug # Run on Verilator, passing --debug to Verilator
|
t/t_BUG.py --debug # Run on Verilator, passing --debug to Verilator
|
||||||
t/t_BUG.py --vcs # Run on VCS simulator
|
t/t_BUG.py --vcs # Run on VCS simulator
|
||||||
t/t_BUG.py --nc|--iv|--ghdl # Likewise on other simulators
|
t/t_BUG.py --nc|--iv|--ghdl # Likewise on other simulators
|
||||||
|
|
||||||
The test driver accepts a number of options, many of which mirror the main
|
The test driver accepts a number of options, many of which mirror the main
|
||||||
Verilator options. For example the previous test could have been run with
|
Verilator options. For example the previous test could have been run with
|
||||||
debugging enabled. The full set of test options can be seen by running
|
debugging enabled. The full set of test options can be seen by running
|
||||||
:command:`driver.py --help` as shown above.
|
:command:`driver.py --help` as shown above.
|
||||||
|
|
||||||
Finally, report the bug at `Verilator Issues
|
Finally, report the bug at `Verilator Issues
|
||||||
<https://verilator.org/issues>`_. The bug will become publicly visible; if
|
<https://verilator.org/issues>`_. The bug will become publicly visible; if
|
||||||
this is unacceptable, mail the bug report to ``[email protected]``.
|
this is unacceptable, mail the bug report to ``[email protected]``.
|
||||||
|
|
||||||
.. _Minimizing bug-inducing code:
|
.. _minimizing bug-inducing code:
|
||||||
|
|
||||||
Minimizing bug-inducing code
|
Minimizing bug-inducing code
|
||||||
============================
|
============================
|
||||||
@@ -73,13 +73,14 @@ caused by a complex interaction of many parts of the design, and it is not
|
|||||||
clear which parts are necessary to reproduce the bug. In these cases, an
|
clear which parts are necessary to reproduce the bug. In these cases, an
|
||||||
Open Source tool called `sv-bugpoint
|
Open Source tool called `sv-bugpoint
|
||||||
<https://github.com/antmicro/sv-bugpoint>`_ can be used to automatically
|
<https://github.com/antmicro/sv-bugpoint>`_ can be used to automatically
|
||||||
reduce a SystemVerilog design to the smallest possible reproducer.
|
reduce a SystemVerilog design to the smallest possible reproducer. It can
|
||||||
It can be used to automatically reduce a design with hundreds of thousands of
|
be used to automatically reduce a design with hundreds of thousands of
|
||||||
lines to a minimal test case while preserving the bug-inducing behavior.
|
lines to a minimal test case while preserving the bug-inducing behavior.
|
||||||
|
|
||||||
With :vlopt:`--debug`, Verilator will write a *{prefix}*\ __inputs\ .vpp
|
With :vlopt:`--debug` or :vlopt:`--dump-inputs`, Verilator will write a
|
||||||
file which has all of the individual input files combined and
|
*{prefix}*\ __inputs.vpp file which has all of the individual input files
|
||||||
pre-processed, this is often useful as the input design into `sv-bugpoint`.
|
combined and pre-processed, this is often useful as the input design into
|
||||||
|
`sv-bugpoint`.
|
||||||
|
|
||||||
Please refer to `sv-bugpoint README
|
Please refer to `sv-bugpoint README
|
||||||
<https://github.com/antmicro/sv-bugpoint/blob/main/README.md>`_ for more
|
<https://github.com/antmicro/sv-bugpoint/blob/main/README.md>`_ for more
|
||||||
@@ -87,4 +88,5 @@ information on how to use `sv-bugpoint`.
|
|||||||
|
|
||||||
.. Contributing
|
.. Contributing
|
||||||
.. ============
|
.. ============
|
||||||
|
|
||||||
.. include:: ../CONTRIBUTING.rst
|
.. include:: ../CONTRIBUTING.rst
|
||||||
|
|||||||
+166
-140
@@ -1,4 +1,4 @@
|
|||||||
.. Copyright 2003-2025 by Wilson Snyder.
|
.. Copyright 2003-2026 by Wilson Snyder.
|
||||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
************************
|
************************
|
||||||
@@ -13,8 +13,8 @@ When possible, please instead report bugs at `Verilator Issues
|
|||||||
|
|
||||||
The primary author is Wilson Snyder <[email protected]>.
|
The primary author is Wilson Snyder <[email protected]>.
|
||||||
|
|
||||||
Major concepts by Paul Wasson, Duane Galbi, John Coiner, Geza Lore, Yutetsu
|
Major concepts by Krzysztof Bieganski, John Coiner, Duane Galbi, Geza Lore,
|
||||||
Takatsukasa, and Jie Xu.
|
Ryszard Rozak, Yutetsu Takatsukasa, Paul Wasson, and Jie Xu.
|
||||||
|
|
||||||
|
|
||||||
Contributors
|
Contributors
|
||||||
@@ -28,10 +28,11 @@ Alliance <https://chipsalliance.org>`_, and `Antmicro Ltd
|
|||||||
|
|
||||||
Previous major corporate sponsors of Verilator, by providing significant
|
Previous major corporate sponsors of Verilator, by providing significant
|
||||||
contributions of time or funds include: Antmicro Ltd., Atmel Corporation,
|
contributions of time or funds include: Antmicro Ltd., Atmel Corporation,
|
||||||
Compaq Corporation, Digital Equipment Corporation, Embecosm Ltd., Hicamp
|
Compaq Corporation, Digital Equipment Corporation, Embecosm Ltd., Fractile
|
||||||
Systems, Intel Corporation, Marvell Inc., Mindspeed Technologies Inc.,
|
Ltd., Hicamp Systems, Intel Corporation, Marvell Inc., Mindspeed
|
||||||
MicroTune Inc., picoChip Designs Ltd., Sun Microsystems Inc., Nauticus
|
Technologies Inc., MicroTune Inc., picoChip Designs Ltd., Sun Microsystems
|
||||||
Networks Inc., SiCortex Inc, Shunyao CAD, and Western Digital Inc.
|
Inc., Nauticus Networks Inc., SiCortex Inc, Shunyao CAD, and Western
|
||||||
|
Digital Inc.
|
||||||
|
|
||||||
The contributors of major functionality are: Jeremy Bennett, Krzysztof
|
The contributors of major functionality are: Jeremy Bennett, Krzysztof
|
||||||
Bieganski, Byron Bradley, Lane Brooks, John Coiner, Duane Galbi, Arkadiusz
|
Bieganski, Byron Bradley, Lane Brooks, John Coiner, Duane Galbi, Arkadiusz
|
||||||
@@ -41,133 +42,158 @@ Paul Wasson, Jie Xu, and Wilson Snyder.
|
|||||||
Some of the people who have provided ideas, and feedback for Verilator
|
Some of the people who have provided ideas, and feedback for Verilator
|
||||||
include:
|
include:
|
||||||
|
|
||||||
David Addison, Tariq B. Ahmad, Nikana Anastasiadis, John David Anglin,
|
Gilberto Abram, David Addison, Joey Ah-kiow, Thomas Dybdahl Ahle, Tariq B.
|
||||||
Frederic Antonin, Hans Van Antwerpen, Vasu Arasanipalai, Jens Arm, Rohan
|
Ahmad, Thomas Aldrian, Omar Alkhatib, Amal Araweelo Almis, Nikana
|
||||||
Arshid, Valentin Atepalikhin, Philip Axer, Gökçe Aydos, Chris Bachhuber,
|
Anastasiadis, John David Anglin, Frederic Antonin, Hans Van Antwerpen, Vasu
|
||||||
Filip Badáň, Adam Bagley, Sharad Bagri, James Bailey, Robert Balas, Marco
|
Arasanipalai, Jens Arm, Rohan Arshid, Valentin Atepalikhin, Philip Axer,
|
||||||
Balboni, Matthew Ballance, Ricardo Barbedo, Andrew Bardsley, Ilya Barkov,
|
Gökçe Aydos, Chris Bachhuber, Filip Badáň, Adam Bagley, Sharad Bagri, James
|
||||||
Matthew Barr, Geoff Barrett, Kaleb Barrett, Daniel Bates, Julius Baxter,
|
Bailey, Robert Balas, Marco Balboni, Matthew Ballance, Ricardo Barbedo,
|
||||||
Michael Berman, Jean Berniolles, Victor Besyakov, Narayan Bhagavatula,
|
Andrew Bardsley, Ilya Barkov, Matthew Barr, Geoff Barrett, Kaleb Barrett,
|
||||||
Moinak Bhattacharyya, Kritik Bhimani, David Biancolin, Krzysztof Bieganski,
|
Daniel Bates, Julius Baxter, Jeremy Bennett, Michael Berman, Jean
|
||||||
Michael Bikovitsky, David Binderman, Piotr Binkowski, Johan Björk, David
|
Berniolles, Victor Besyakov, Narayan Bhagavatula, Moinak Bhattacharyya,
|
||||||
Black, Tymoteusz Blazejczyk, Scott Bleiweiss, David van der Bokke, Daniel
|
Kritik Bhimani, David Biancolin, Krzysztof Bieganski, Artur Bieniek,
|
||||||
Bone, Guy Bonneau, Krzysztof Boroński, Gregg Bouchard, Christopher
|
Michael Bikovitsky, David Binderman, Piotr Binkowski, Peter Birch, Johan
|
||||||
Boumenot, Paul Bowen-Huggett, Nick Bowler, Bryan Brady, Maarten De
|
Björk, David Black, Tymoteusz Blazejczyk, Scott Bleiweiss, Joel Bodenmann,
|
||||||
Braekeleer, Liam Braun, Charlie Brej, J Briquet, John Brownlee, KC
|
David van der Bokke, Daniel Bone, Guy Bonneau, Pierre-Yves Le Borgne,
|
||||||
Buckenmaier, Gijs Burghoorn, Jeff Bush, Lawrence Butcher, Tony Bybell, Iru
|
Krzysztof Boroński, Gregg Bouchard, Christopher Boumenot, Paul
|
||||||
Cai, Ted Campbell, Anthony Campos, Chris Candler, Lauren Carlson, Gregory
|
Bowen-Huggett, Nick Bowler, Byron Bradley, Bryan Brady, Maarten De
|
||||||
Carver, Donal Casey, Sebastien Van Cauwenberghe, Alex Chadwick, Greg
|
Braekeleer, Liam Braun, Charlie Brej, Nick Brereton, J Briquet, Lane
|
||||||
Chadwick, Marcel Chang, Aliaksei Chapyzhenka, Chih-Mao Chen, Guokai Chen,
|
Brooks, John Brownlee, KC Buckenmaier, Gijs Burghoorn, Jeff Bush, Lawrence
|
||||||
Kefa Chen, Terry Chen, Yangyu Chen, Yi-Chung Chen, Yurii Cherkasov,
|
Butcher, Tony Bybell, Congcong Cai, Iru Cai, Ted Campbell, Anthony Campos,
|
||||||
Hennadii Chernyshchyk, Enzo Chi, Bartłomiej Chmiel, Robert A. Clark, Ryan
|
Chris Candler, Lauren Carlson, Gregory Carver, Donal Casey, Sebastien Van
|
||||||
Clarke, Allan Cochrane, Keith Colbert, Quentin Corradi, Nassim Corteggiani,
|
Cauwenberghe, Alex Chadwick, Greg Chadwick, Marcel Chang, Aliaksei
|
||||||
Gianfranco Costamagna, February Cozzocrea, Sean Cross, George Cuan, Michal
|
Chapyzhenka, Chih-Mao Chen, Guokai Chen, Kefa Chen, Terry Chen, Yangyu
|
||||||
Czyz, Joe DErrico, Jim Dai, Lukasz Dalek, Laurens van Dam, Gunter
|
Chen, Yi-Chung Chen, Yurii Cherkasov, Hennadii Chernyshchyk, Enzo Chi,
|
||||||
Dannoritzer, Ashutosh Das, Julian Daube, Greg Davill, Bernard Deadman,
|
Bartłomiej Chmiel, Sergey Chusov, Robert A. Clark, Ryan Clarke, Allan
|
||||||
Peter Debacker, Josse Van Delm, John Demme, Mike Denio, John Deroo, Philip
|
Cochrane, John Coiner, Luca Colagrande, Keith Colbert, Quentin Corradi,
|
||||||
Derrick, Aadi Desai, John Dickol, Ruben Diez, Danny Ding, Jacko Dirks, Ivan
|
Nassim Corteggiani, Gianfranco Costamagna, February Cozzocrea, Sean Cross,
|
||||||
Djordjevic, Brad Dobbie, Paul Donahue, Jonathon Donaldson, Anthony Donlon,
|
George Cuan, RJ Cunningham, Michal Czyz, Joe DErrico, Jim Dai, Lukasz
|
||||||
Caleb Donovick, Larry Doolittle, Leendert van Doorn, Sebastian Dressler,
|
Dalek, Laurens van Dam, Gunter Dannoritzer, Ashutosh Das, Julian Daube,
|
||||||
Jonathan Drolet, Justin Yao Du, Maciej Dudek, Alex Duller, Jeff Dutton,
|
Greg Davill, Bernard Deadman, Peter Debacker, Josse Van Delm, John Demme,
|
||||||
Tomas Dzetkulic, Usuario Eda, Charles Eddleston, Chandan Egbert, Joe Eiler,
|
Mike Denio, John Deroo, Philip Derrick, Aadi Desai, John Dickol, Ruben
|
||||||
Ahmed El-Mahmoudy, Trevor Elbourne, Mats Engstrom, Robert Farrell, Julien
|
Diez, Danny Ding, Jacko Dirks, Ivan Djordjevic, Brad Dobbie, Paul Donahue,
|
||||||
Faucher, Olivier Faure, Eugene Feinberg, Eugen Fekete, Fabrizio Ferrandi,
|
Jonathon Donaldson, Anthony Donlon, Caleb Donovick, Larry Doolittle,
|
||||||
Udi Finkelstein, Brian Flachs, Bill Flynn, Andrea Foletto, Alex Forencich,
|
Leendert van Doorn, Sebastian Dressler, Connor Driscoll, Jonathan Drolet,
|
||||||
Aurelien Francillon, Bob Fredieu, Manuel Freiberger, Mostafa Gamal, Vito
|
Jose Drowne, Justin Yao Du, Maciej Dudek, Alex Duller, Jeff Dutton, Tomas
|
||||||
Gamberini, Mostafa Garnal, Benjamin Gartner, Christian Gelinek, Richard E
|
Dzetkulic, Usuario Eda, Charles Eddleston, Chandan Egbert, Joe Eiler, Ahmed
|
||||||
George, Peter Gerst, Glen Gibb, Michael Gielda, Barbara Gigerl, Nimrod
|
El-Mahmoudy, Trevor Elbourne, Schuyler Eldridge, Ahmed Elzeftawi, Mats
|
||||||
Gileadi, Shankar Giri, Dan Gisselquist, Szymon Gizler, Petr Gladkikh, Sam
|
Engstrom, Augustin Fabre, Robert Farrell, Julien Faucher, Olivier Faure,
|
||||||
Gladstone, Mariusz Glebocki, Embedded Go, Andrew Goessling, Amir Gonnen,
|
Sergey Fedorov, Eugene Feinberg, Eugen Fekete, Fabrizio Ferrandi, Adrian
|
||||||
Chitlesh Goorah, Tomasz Gorochowik, Kai Gossner, Tarik Graba, Sergi
|
Fiergolski, Udi Finkelstein, Brian Flachs, Bill Flynn, Andrea Foletto,
|
||||||
Granell, Al Grant, Nathan Graybeal, Alexander Grobman, Qian Gu, Xuan Guo,
|
Maxim Fonarev, Alex Forencich, Aurelien Francillon, Marco Frank, Bob
|
||||||
Prabhat Gupta, Deniz Güzel, Driss Hafdi, Abdul Hameed, Neil Hamilton, James
|
Fredieu, Manuel Freiberger, Stephane Gagnon, Duane Galbi, Mostafa Gamal,
|
||||||
Hanlon, Tang Haojin, Øyvind Harboe, Jannis Harder, David Harris, Junji
|
Vito Gamberini, Mateusz Gancarz, Mostafa Garnal, Benjamin Gartner,
|
||||||
Hashimoto, Thomas Hawkins, Mitch Hayenga, Harald Heckmann, Robert Henry,
|
Christian Gelinek, Richard E George, Peter Gerst, Glen Gibb, Michael
|
||||||
Stephen Henry, Sebastian Hesselbarth, David Hewson, Jamey Hicks, Joel
|
Gielda, Barbara Gigerl, Nimrod Gileadi, Shankar Giri, Dan Gisselquist,
|
||||||
Holdsworth, Andrew Holme, Peter Holmes, Hiroki Honda, Alex Hornung,
|
Szymon Gizler, Petr Gladkikh, Sam Gladstone, Mariusz Glebocki, Embedded Go,
|
||||||
Pierre-Henri Horrein, David Horton, Peter Horvath, Jae Hossell, Kuoping
|
Andrew Goessling, Emil Goh, Amir Gonnen, Chitlesh Goorah, Tomasz
|
||||||
Hsu, Shou-Li Hsu, Teng Huang, Steven Hugg, Alan Hunter, James Hutchinson,
|
Gorochowik, Kai Gossner, Toshiki Goto, Tarik Graba, Sergi Granell, Al
|
||||||
Tim Hutt, Ehab Ibrahim, Edgar E. Iglesias, Shahid Ikram, Jamie Iles, Fuad
|
Grant, Nathan Graybeal, Alexander Grobman, Dominick Grochowina, Qian Gu,
|
||||||
Ismail, Vighnesh Iyer, Ben Jackson, Daniel Jacques, Shareef Jalloq, Marlon
|
Karol Gugala, Xuan Guo, Prabhat Gupta, Oscar Gustafsson, Deniz Güzel, Driss
|
||||||
James, Krzysztof Jankowski, Eyck Jentzsch, HyungKi Jeong, Iztok Jeras,
|
Hafdi, Abdul Hameed, Neil Hamilton, Ali Hammoud, James Hanlon, Tang Haojin,
|
||||||
Pawel Jewstafjew, Alexandre Joannou, James Johnson, Christophe Joly, Justin
|
Øyvind Harboe, Jannis Harder, David Harris, Junji Hashimoto, Thomas
|
||||||
Jones, William D. Jones, Abe Jordan, Larry Darryl Lee Jr., Franck Jullien,
|
Hawkins, Mitch Hayenga, Christian Hecken, Harald Heckmann, Robin Heinemann,
|
||||||
James Jung, Mike Kagen, Arthur Kahlich, Kaalia Kahn, Guy-Armand Kamendje,
|
Robert Henry, Stephen Henry, Sebastian Hesselbarth, David Hewson, Jamey
|
||||||
Vasu Kandadi, Yoshitomo Kaneda, Kanad Kanhere, Patricio Kaplan, Pieter
|
Hicks, Joel Holdsworth, Andrew Holme, Peter Holmes, Hiroki Honda, Steve
|
||||||
Kapsenberg, Rafal Kapuscik, Ralf Karge, Per Karlsson, Dan Katz, Sol
|
Hoover, Alex Hornung, Pierre-Henri Horrein, David Horton, Peter Horvath,
|
||||||
Katzman, Ian Kennedy, Ami Keren, Fabian Keßler, Michael Killough, Sun Kim,
|
Jae Hossell, Kuoping Hsu, Shou-Li Hsu, Teng Huang, Steven Hugg, Alan
|
||||||
Jonathan Kimmitt, Olof Kindgren, Kevin Kiningham, Cameron Kirk, Dan
|
Hunter, James Hutchinson, Tim Hutt, Ehab Ibrahim, Edgar E. Iglesias, Shahid
|
||||||
Kirkham, Aleksander Kiryk, Sobhan Klnv, Gernot Koch, Jack Koenig, Soon Koh,
|
Ikram, Jamie Iles, Ondrej Ille, Ron K. Irvine, Fuad Ismail, Vighnesh Iyer,
|
||||||
Nathan Kohagen, Steve Kolecki, Brett Koonce, Will Korteland, Andrei
|
Ben Jackson, Daniel Jacques, Shareef Jalloq, Marlon James, Krzysztof
|
||||||
Kostovski, Wojciech Koszek, Varun Koyyalagunta, Arkadiusz Kozdra, Markus
|
Jankowski, Moubarak Jeje, Tobias Jensen, Eyck Jentzsch, HyungKi Jeong,
|
||||||
Krause, David Kravitz, Adam Krolnik, Roland Kruse, Mahesh Kumashikar,
|
Iztok Jeras, Pawel Jewstafjew, Aditya Ranjan Jha, Xie Jiacheng, Alexandre
|
||||||
Andreas Kuster, Sergey Kvachonok, Charles Eric LaForest, Kevin Laeufer, Ed
|
Joannou, James Johnson, Christophe Joly, Justin Jones, William D. Jones,
|
||||||
Lander, Steve Lang, Pierre Laroche, Stephane Laurent, Walter Lavino,
|
Kees Jongenburger, Abe Jordan, Larry Darryl Lee Jr., Franck Jullien, James
|
||||||
Christian Leber, David Ledger, Alex Lee, Larry Lee, Yoda Lee, Michaël
|
Jung, Yoshitomo KANEDA, Mike Kagen, Arthur Kahlich, Kaalia Kahn, G-A.
|
||||||
Lefebvre, Dag Lem, Igor Lesik, John Li, Kay Li, Zixi Li, Davide Libenzi,
|
Kamendje, Guy-Armand Kamendje, Vasu Kandadi, Kanad Kanhere, Patricio
|
||||||
Nandor Licker, Eivind Liland, Ícaro Lima, Kevin Lin, Yu-Sheng Lin, Charlie
|
Kaplan, Pieter Kapsenberg, Rafal Kapuscik, Ralf Karge, Per Karlsson, Dan
|
||||||
Lind, Andrew Ling, Jiuyang Liu, Joey Liu, Paul Liu, Derek Lockhart, Jake
|
Katz, Sol Katzman, Amirreza Kazemi, Ian Kennedy, Ami Keren, Fabian
|
||||||
Longo, Geza Lore, Arthur Low, Jose Loyola, Stefan Ludwig, Dan Lussier,
|
Keßler-Schulz, John Khoo, Michael Killough, Sun Kim, Jonathan Kimmitt, Olof
|
||||||
Konstantin Lübeck, Fred Ma, Liwei Ma, Duraid Madina, Oleh Maksymenko, Affe
|
Kindgren, Kevin Kiningham, Cameron Kirk, Dan Kirkham, Aleksander Kiryk,
|
||||||
Mao, Julien Margetts, Chick Markley, Alexis Marquet, Mark Marshall, Alfonso
|
Sobhan Klnv, Gernot Koch, Jack Koenig, Soon Koh, Nathan Kohagen, Pawel
|
||||||
Martinez, Unai Martinez-Corral, Adrien Le Masle, Yves Mathieu, Vladimir
|
Kojma, Steve Kolecki, Brett Koonce, Will Korteland, Andrei Kostovski,
|
||||||
Matveyenko, Patrick Maupin, Stan Mayer, Jordan McConnon, Conor McCullough,
|
Wojciech Koszek, Varun Koyyalagunta, Arkadiusz Kozdra, Markus Krause, David
|
||||||
Jason McMullan, Elliot Mednick, Yuan Mei, Andy Meier, Luiza de Melo,
|
Kravitz, Natan Kreimer, Adam Krolnik, Roland Kruse, Jan Kubalek, Mahesh
|
||||||
Rodrigo A. Melo, Benjamin Menküc, Jake Merdich, David Metz, Wim Michiels,
|
Kumashikar, Andreas Kuster, Sergey Kvachonok, Charles Eric LaForest, Kevin
|
||||||
|
Laeufer, Ed Lander, Steve Lang, Pierre Laroche, Stephane Laurent, Walter
|
||||||
|
Lavino, Christian Leber, David Ledger, Alex Lee, Larry Lee, Yoda Lee,
|
||||||
|
Michaël Lefebvre, Dag Lem, Igor Lesik, Brian Li, John Li, Kay Li, Zixi Li,
|
||||||
|
Davide Libenzi, Matt Liberty, Nandor Licker, Eivind Liland, Ícaro Lima,
|
||||||
|
Jian Nan Lin, Kevin Lin, Yu-Sheng Lin, Charlie Lind, Andrew Ling, Jens
|
||||||
|
Yuechao Liu, Jiuyang Liu, Joey Liu, Paul Liu, Derek Lockhart, Jake Longo,
|
||||||
|
Geza Lore, Arthur Low, Jose Loyola, Stefan Ludwig, Martin Lueker-Boden, Dan
|
||||||
|
Lussier, Konstantin Lübeck, Fred Ma, Liwei Ma, Duraid Madina, Oleh
|
||||||
|
Maksymenko, Alexander Mann, Affe Mao, Rémi Marche, Julien Margetts, Chick
|
||||||
|
Markley, Alexis Marquet, Mark Marshall, Alfonso Martinez, Unai
|
||||||
|
Martinez-Corral, Adrien Le Masle, Yves Mathieu, Vladimir Matveyenko,
|
||||||
|
Patrick Maupin, Stan Mayer, Jordan McConnon, Conor McCullough, Jason
|
||||||
|
McMullan, Elliot Mednick, Yuan Mei, Andy Meier, Luiza de Melo, Rodrigo A.
|
||||||
|
Melo, Benjamin Menküc, Niraj Menon, Jake Merdich, David Metz, Wim Michiels,
|
||||||
Miodrag Milanović, Darryl Miles, Kevin Millis, Andrew Miloradovsky, David
|
Miodrag Milanović, Darryl Miles, Kevin Millis, Andrew Miloradovsky, David
|
||||||
Moberg, Wai Sum Mong, Peter Monsson, Anthony Moore, Sean Moore, Stuart
|
Moberg, Wai Sum Mong, Peter Monsson, Anthony Moore, Sean Moore, Javier
|
||||||
Morris, Dennis Muhlestein, John Murphy, Matt Myers, Nathan Myers, Richard
|
Mora, Rodrigo Batista de Moraes, Stuart Morris, Dennis Muhlestein, John
|
||||||
Myers, Alex Mykyta, Eric Müller, Dimitris Nalbantis, Peter Nelson, Felix
|
Murphy, Matt Myers, Nathan Myers, Richard Myers, Alex Mykyta, Shivaram
|
||||||
Neumärker, Bob Newgard, Cong Van Nguyen, Rachit Nigam, Toru Niina, Paul
|
Mysore, Eric Müller, Dimitris Nalbantis, Jitesh Nayak, Peter Nelson, Yuri
|
||||||
Nitza, Yossi Nivin, Pete Nixon, Lisa Noack, Mark Nodine, Michael Nolan,
|
Nenakhov, Felix Neumärker, Bob Newgard, Cong Van Nguyen, Trung Nguyen,
|
||||||
Andrew Nolte, Joseph Nwabueze, Kevin Nygaard, Kuba Ober, Krzysztof
|
Rachit Nigam, Toru Niina, Paul Nitza, Yossi Nivin, Pete Nixon, Lisa Noack,
|
||||||
Obłonczek, Andreas Olofsson, Baltazar Ortiz, Aleksander Osman, Don Owen,
|
Mark Nodine, Petr Nohavica, Michael Nolan, Andrew Nolte, Mateusz
|
||||||
Tim Paine, Deepa Palaniappan, James Pallister, Vassilis Papaefstathiou,
|
Nurczyński, Joseph Nwabueze, Kevin Nygaard, Thomas O'Keeffe, Kuba Ober,
|
||||||
Sanggyu Park, Brad Parker, Risto Pejašinović, Seth Pellegrino, Morten Borup
|
Krzysztof Obłonczek, Danny Oler, Andreas Olofsson, Baltazar Ortiz,
|
||||||
Petersen, Dan Petrisko, Wesley Piard, Maciej Piechotka, David Pierce, Cody
|
Aleksander Osman, Don Owen, Tim Paine, Deepa Palaniappan, James Pallister,
|
||||||
Piersall, T. Platz, Michael Platzer, Dominic Plunkett, Nolan Poe, David
|
Vassilis Papaefstathiou, Sanggyu Park, Brad Parker, Risto Pejašinović, Seth
|
||||||
Poole, Michael Popoloski, Roman Popov, Aylon Chaim Porat, Oron Port, Rich
|
Pellegrino, Joel Peltonen, Morten Borup Petersen, Dan Petrisko, Thanh Tung
|
||||||
Porter, Rick Porter, Stefan Post, Niranjan Prabhu, Damien Pretet, Harald
|
Pham, Wesley Piard, Maciej Piechotka, David Pierce, Cody Piersall,
|
||||||
Pretl, Bill Pringlemeir, Usha Priyadharshini, Mark Jackson Pulver, Prateek
|
T. Platz, Michael Platzer, Dominic Plunkett, Nolan Poe, Tuomas Poikela,
|
||||||
Puri, Han Qi, Jiacheng Qian, Marshal Qiao, Raynard Qiao, Yujia Qiao, Jasen
|
George Polack, David Poole, Michael Popoloski, Roman Popov, Aylon Chaim
|
||||||
Qin, Frank Qiu, Nandu Raj, Kamil Rakoczy, Danilo Ramos, Drew Ranck, Chris
|
Porat, Oron Port, Rich Porter, Rick Porter, Stefan Post, Niranjan Prabhu,
|
||||||
Randall, Anton Rapp, Josh Redford, Odd Magne Reitan, Frédéric Requin,
|
Damien Pretet, Harald Pretl, Bill Pringlemeir, Usha Priyadharshini, Mark
|
||||||
Dustin Richmond, Samuel Riedel, Alberto Del Rio, Eric Rippey, Narcis Rodas,
|
Jackson Pulver, Prateek Puri, Nikolay Puzanov, Han Qi, Jiacheng Qian,
|
||||||
Oleg Rodionov, Ludwig Rogiers, Paul Rolfe, Michail Rontionov, Arjen
|
Marshal Qiao, Raynard Qiao, Yujia Qiao, Jasen Qin, Frank Qiu, Nandu Raj,
|
||||||
Roodselaar, Arthur Rosa, Tobias Rosenkranz, Yernagula Roshit, Ryszard
|
Kamil Rakoczy, Danilo Ramos, Drew Ranck, Chris Randall, Anton Rapp, Josh
|
||||||
Rozak, Huang Rui, Graham Rushton, Jan Egil Ruud, Denis Rystsov, Pawel
|
Redford, Odd Magne Reitan, Frédéric Requin, Wajahat Riaz, Dustin Richmond,
|
||||||
Sagan, Robert Sammelson, Adrian Sampson, John Sanguinetti, Josep Sans, Luca
|
Samuel Riedel, Alberto Del Rio, Eric Rippey, Narcis Rodas, Oleg Rodionov,
|
||||||
Sasselli, Martin Scharrer, Martin Schmidt, Jonathan Schröter, Julie
|
Ludwig Rogiers, Paul Rolfe, Michail Rontionov, Arjen Roodselaar, Arthur
|
||||||
|
Rosa, Tobias Rosenkranz, Yernagula Roshit, Diego Roux, Ryszard Rozak, Dan
|
||||||
|
Ruelas-Petrisko, Luca Rufer, Huang Rui, Graham Rushton, Jan Egil Ruud,
|
||||||
|
Denis Rystsov, Pawel Sagan, Robert Sammelson, Adrian Sampson, John
|
||||||
|
Sanguinetti, Josep Sans, Dave Sargeant, Luca Sasselli, Philippe Sauter,
|
||||||
|
Martin Scharrer, Parker Schless, Martin Schmidt, Jonathan Schröter, Julie
|
||||||
Schwartz, Galen Seitz, Sam Shahrestani, Joseph Shaker, Mark Shaw, Salman
|
Schwartz, Galen Seitz, Sam Shahrestani, Joseph Shaker, Mark Shaw, Salman
|
||||||
Sheikh, Zhou Shen, Hao Shi, James Shi, Michael Shinkarovsky, Rafael
|
Sheikh, Zhou Shen, Zhouyi Shen, Hao Shi, James Shi, Michael Shinkarovsky,
|
||||||
Shirakawa, Jeffrey Short, S Shuba, Fan Shupei, Ethan Sifferman, Anderson
|
Rafael Shirakawa, Jeffrey Short, S Shuba, Fan Shupei, Ethan Sifferman,
|
||||||
Ignacio da Silva, Rodney Sinclair, Ameya Vikram Singh, Sanjay Singh, Frans
|
Anderson Ignacio da Silva, Rodney Sinclair, Ameya Vikram Singh, Sanjay
|
||||||
Skarman, Nate Slager, Steven Slatter, Mladen Slijepcevic, Brian Small,
|
Singh, Frans Skarman, Nate Slager, Steven Slatter, Mladen Slijepcevic,
|
||||||
Garrett Smith, Gus Smith, Tim Snyder, Maciej Sobkowski, Stan Sokorac, Alex
|
Brian Small, Garrett Smith, Gus Smith, Rachel Smith, Tim Snyder, Maciej
|
||||||
Solomatnikov, Flavien Solt, Wei Song, Trefor Southwell, Martin Stadler, Art
|
Sobkowski, Stan Sokorac, Alex Solomatnikov, Flavien Solt, Wei Song, Trefor
|
||||||
Stamness, David Stanford, Krzysztof Starecki, Baruch Sterin, John
|
Southwell, Martin Stadler, Art Stamness, David Stanford, Krzysztof
|
||||||
Stevenson, Pete Stevenson, Patrick Stewart, Rob Stoddard, Tood Strader,
|
Starecki, Baruch Sterin, John Stevenson, Pete Stevenson, Patrick Stewart,
|
||||||
John Stroebel, Ray Strouble, Sven Stucki, Howard Su, Udaya Raj Subedi,
|
Rob Stoddard, Tood Strader, Jean-Nicolas Strauss, John Stroebel, Ray
|
||||||
Emerson Suguimoto, Gene Sullivan, Qingyao Sun, Renga Sundararajan, Kuba
|
Strouble, Matt Stroud, Sven Stucki, Howard Su, Udaya Raj Subedi, Emerson
|
||||||
|
Suguimoto, Gene Sullivan, Qingyao Sun, Renga Sundararajan, Kuba
|
||||||
Sunderland-Ober, Gustav Svensk, Rupert Swarbrick, Jevin Sweval, Paul
|
Sunderland-Ober, Gustav Svensk, Rupert Swarbrick, Jevin Sweval, Paul
|
||||||
Swirhun, Shinya T-Y, Thierry Tambe, Jesse Taube, Drew Taussig, Christopher
|
Swirhun, Krzysztof Sychla, Shinya T-Y, Yutetsu Takatsukasa, Thierry Tambe,
|
||||||
Taylor, Greg Taylor, Jose Tejada, Sören Tempel, Peter Tengstrand, Wesley
|
Jesse Taube, Drew Taussig, Christopher Taylor, David Taylor, Greg Taylor,
|
||||||
|
Michael Bedford Taylor, Jose Tejada, Sören Tempel, Peter Tengstrand, Wesley
|
||||||
Terpstra, Rui Terra, Stefan Thiede, Justin Thiel, Gary Thomas, Ian
|
Terpstra, Rui Terra, Stefan Thiede, Justin Thiel, Gary Thomas, Ian
|
||||||
Thompson, Kevin Thompson, Mike Thyer, Hans Tichelaar, Tudor Timi, Viktor
|
Thompson, Kevin Thompson, Mike Thyer, Jerry Tianchen, Hans Tichelaar, Tudor
|
||||||
Tomov, Steve Tong, Topa Topino, Àlex Torregrosa, Topa Tota, Michael
|
Timi, Viktor Tomov, Steve Tong, Topa Topino, Àlex Torregrosa, Topa Tota,
|
||||||
Tresidder, Lenny Truong, David Turner, Neil Turton, Hideto Ueno, Mike
|
Michael Tresidder, Lenny Truong, David Turner, Neil Turton, Hideto Ueno,
|
||||||
Urbach, Joel Vandergriendt, Srini Vemuri, Srinivasan Venkataramanan, Yuri
|
Ethan Uppal, Mike Urbach, Joel Vandergriendt, Srini Vemuri, Srinivasan
|
||||||
Victorovich, Ivan Vnučec, Bogdan Vukobratovic, Holger Waechtler, Philipp
|
Venkataramanan, Yuri Victorovich, Ivan Vnučec, Andrew Voznytsa, Bogdan
|
||||||
Wagner, Stefan Wallentowitz, Johannes Walter, CY Wang, Chuxuan Wang, Shawn
|
Vukobratovic, Holger Waechtler, Justin Wagner, Philipp Wagner, Stefan
|
||||||
Wang, Yilou Wang, Zhanglei Wang, Greg Waters, Thomas Watts, Eugene Weber,
|
Wallentowitz, Johannes Walter, CY Wang, Chuxuan Wang, Shawn Wang, Yilou
|
||||||
John Wehle, Tianrui Wei, David Welch, Thomas J Whatson, Martin Whitaker,
|
Wang, Zhanglei Wang, Jakub Wasilewski, Paul Wasson, Greg Waters, Thomas
|
||||||
Marco Widmer, Leon Wildman, Daniel S. Wilkerson, Daniel Wilkerson, Gerald
|
Watts, Eugene Weber, John Wehle, Tianrui Wei, Yin Weijie, David Welch,
|
||||||
Williams, Trevor Williams, Don Williamson, Jan Van Winkel, Jeff Winston,
|
Thomas J Whatson, Martin Whitaker, Marco Widmer, Leon Wildman, Daniel S.
|
||||||
Joshua Wise, Clifford Wolf, Johan Wouters, Paul Wright, Tobias Wölfel,
|
Wilkerson, Daniel Wilkerson, Gerald Williams, Trevor Williams, Don
|
||||||
Junyi Xi, Ding Xiaoliang, Liu Xiaoyi, Jinyan Xu, Mandy Xu, Pengcheng Xu,
|
Williamson, Jan Van Winkel, Jeff Winston, Max Wipfli, Joshua Wise, Clifford
|
||||||
Shanshan Xu, Yan Xu, Yinan Xu, SU YANG, Felix Yan, Jiaxun Yang, Luke Yang,
|
Wolf, Johan Wouters, Paul Wright, Tobias Wölfel, Domenic Wüthrich, Junyi
|
||||||
Amir Yazdanbakhsh, Chentai (Seven) Yuan, Florian Zaruba, Mat Zeno, Keyi
|
Xi, Ding Xiaoliang, Liu Xiaoyi, Jie Xu, Jinyan Xu, Mandy Xu, Pengcheng Xu,
|
||||||
Zhang, Xi Zhang, Huanghuang Zhou, Yike Zhou, Jiamin Zhu, Ryan Ziegler.
|
Shanshan Xu, Yan Xu, Yinan Xu, Felix Yan, Zhen Yan, Jiaxun Yang, Luke Yang,
|
||||||
|
Su Yang, Amir Yazdanbakhsh, Law Heng Yi, Ibrahim Burak Yorulmaz, Chentai
|
||||||
|
(Seven) Yuan, Florian Zaruba, Igor Zaworski, Mat Zeno, Keyi Zhang, Xi
|
||||||
|
Zhang, Alex Zhou, Huanghuang Zhou, Yike Zhou, Jiamin Zhu, Ryan Ziegler, Lan
|
||||||
|
Zongwei.
|
||||||
|
|
||||||
Thanks to them, and all those we've missed mentioning above, and to those
|
Thanks to them, and all those we've missed mentioning above, and to those
|
||||||
whom have wished to remain anonymous.
|
whom have wished to remain anonymous.
|
||||||
@@ -177,24 +203,24 @@ Historical Origins
|
|||||||
==================
|
==================
|
||||||
|
|
||||||
Verilator was conceived in 1994 by Paul Wasson at the Core Logic Group at
|
Verilator was conceived in 1994 by Paul Wasson at the Core Logic Group at
|
||||||
Digital Equipment Corporation. The Verilog code that was converted to C
|
Digital Equipment Corporation. The Verilog code that was converted to C was
|
||||||
was then merged with a C-based CPU model of the Alpha processor and
|
then merged with a C-based CPU model of the Alpha processor and simulated
|
||||||
simulated in a C-based environment called CCLI.
|
in a C-based environment called CCLI.
|
||||||
|
|
||||||
In 1995 Verilator started being used for Multimedia and Network Processor
|
In 1995 Verilator started being used for Multimedia and Network Processor
|
||||||
development inside Digital. Duane Galbi took over the active development
|
development inside Digital. Duane Galbi took over the active development of
|
||||||
of Verilator, and added several performance enhancements, and CCLI was
|
Verilator, and added several performance enhancements, and CCLI was still
|
||||||
still being used as the shell.
|
being used as the shell.
|
||||||
|
|
||||||
In 1998, through the efforts of existing DECies, mainly Duane Galbi,
|
In 1998, through the efforts of existing DECies, mainly Duane Galbi,
|
||||||
Digital graciously agreed to release the source code. (Subject to the code
|
Digital graciously agreed to release the source code. (Subject to the code
|
||||||
not being resold, which is compatible with the GNU Public License.)
|
not being resold, which is compatible with the GNU Public License.)
|
||||||
|
|
||||||
In 2001, Wilson Snyder took the kit, added a SystemC mode, and called
|
In 2001, Wilson Snyder took the kit, added a SystemC mode, and called it
|
||||||
it Verilator2. This was the first packaged public release.
|
Verilator2. This was the first packaged public release.
|
||||||
|
|
||||||
In 2002, Wilson Snyder created Verilator 3.000 by rewriting Verilator from
|
In 2002, Wilson Snyder created Verilator 3.000 by rewriting Verilator from
|
||||||
scratch in C++. This added many optimizations, yielding about a 2-5x
|
scratch in C++. This added many optimizations, yielding about a 2-5x
|
||||||
performance gain.
|
performance gain.
|
||||||
|
|
||||||
In 2009, major SystemVerilog and DPI language support was added.
|
In 2009, major SystemVerilog and DPI language support was added.
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
.. Copyright 2003-2025 by Wilson Snyder.
|
.. Copyright 2003-2026 by Wilson Snyder.
|
||||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
*********
|
*********
|
||||||
Copyright
|
Copyright
|
||||||
*********
|
*********
|
||||||
|
|
||||||
The latest version of Verilator is available from `https://verilator.org
|
The latest version of Verilator is available from https://verilator.org.
|
||||||
<https://verilator.org>`_.
|
|
||||||
|
|
||||||
Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
Copyright 2003-2026 by Wilson Snyder. This program is free software; you
|
||||||
can redistribute it and/or modify the Verilator internals under the terms
|
can redistribute it and/or modify the Verilator internals under the terms
|
||||||
of either the GNU Lesser General Public License Version 3 or the Perl
|
of either the GNU Lesser General Public License Version 3 or the Perl
|
||||||
Artistic License Version 2.0.
|
Artistic License Version 2.0.
|
||||||
|
|||||||
+18
-11
@@ -1,4 +1,4 @@
|
|||||||
.. Copyright 2003-2025 by Wilson Snyder.
|
.. Copyright 2003-2026 by Wilson Snyder.
|
||||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
Deprecations
|
Deprecations
|
||||||
@@ -7,16 +7,23 @@ Deprecations
|
|||||||
The following deprecated items are scheduled for future removal:
|
The following deprecated items are scheduled for future removal:
|
||||||
|
|
||||||
C++14 compiler support
|
C++14 compiler support
|
||||||
Verilator currently requires a C++20 or newer compiler for timing, and a
|
Verilator currently requires a C++20 or newer compiler for timing, and a
|
||||||
C++14 or newer compiler for both compiling Verilator and compiling
|
C++14 or newer compiler for both compiling Verilator and compiling
|
||||||
Verilated models with --no-timing.
|
Verilated models with --no-timing.
|
||||||
|
|
||||||
Verilator will require C++20 or newer compilers for both compiling
|
Verilator will require C++20 or newer compilers for both compiling
|
||||||
Verilator and compiling all Verilated models no sooner than May 2025.
|
Verilator and compiling all Verilated models no sooner than May 2025.
|
||||||
(Likely to be removed shortly after GitHub removes Ubuntu 20.04
|
(Although this date has expired, this change is currently on hold until
|
||||||
continuous-integration action runners, which are used to test the older
|
the Ubuntu LTS versions of GCC and clang use C++20 by default, estimated
|
||||||
C++ standard).
|
May 2028.)
|
||||||
|
|
||||||
XML output
|
XML output
|
||||||
Verilator currently supports XML parser output (enabled with `--xml-only`).
|
Verilator currently supports XML parser output (enabled with
|
||||||
Support for `--xml-*` options will be deprecated no sooner than January 2026.
|
`--xml-only`). Support for `--xml-*` options will be deprecated no
|
||||||
|
sooner than January 2026.
|
||||||
|
|
||||||
|
`--make cmake`
|
||||||
|
The `--make cmake` options is deprecated and will be removed no sooner
|
||||||
|
than January 2026. Use `--make json` instead. Note that the CMake
|
||||||
|
integration shipping with Verilator (verilator-config.mk) already uses
|
||||||
|
`--make json` so no changes are necessary if using that.
|
||||||
|
|||||||
+34
-32
@@ -1,4 +1,4 @@
|
|||||||
.. Copyright 2003-2025 by Wilson Snyder.
|
.. Copyright 2003-2026 by Wilson Snyder.
|
||||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
Environment
|
Environment
|
||||||
@@ -10,14 +10,14 @@ associated programs.
|
|||||||
.. option:: LD_LIBRARY_PATH
|
.. option:: LD_LIBRARY_PATH
|
||||||
|
|
||||||
A generic Linux/OS variable specifying what directories have shared
|
A generic Linux/OS variable specifying what directories have shared
|
||||||
object (.so) files. This path should include SystemC and other
|
object (.so) files. This path should include SystemC and other shared
|
||||||
shared objects needed at simulation runtime.
|
objects needed at simulation runtime.
|
||||||
|
|
||||||
.. option:: MAKE
|
.. option:: MAKE
|
||||||
|
|
||||||
Names the executable of the make command invoked when using the
|
Names the executable of the make command invoked when using the
|
||||||
:vlopt:`--build` option. Some operating systems may require "gmake" to
|
:vlopt:`--build` option. Some operating systems may require "gmake" to
|
||||||
this variable to launch GNU make. If this variable is not specified,
|
this variable to launch GNU make. If this variable is not specified,
|
||||||
"make" is used.
|
"make" is used.
|
||||||
|
|
||||||
.. option:: MAKEFLAGS
|
.. option:: MAKEFLAGS
|
||||||
@@ -29,33 +29,33 @@ associated programs.
|
|||||||
.. option:: OBJCACHE
|
.. option:: OBJCACHE
|
||||||
|
|
||||||
Optionally specifies a caching or distribution program to place in front
|
Optionally specifies a caching or distribution program to place in front
|
||||||
of all runs of the C++ compiler. For example, "ccache" or "sccache". If using
|
of all runs of the C++ compiler. For example, "ccache" or "sccache". If
|
||||||
:command:`distcc` or :command:`icecc`/:command:`icecream`, they would
|
using :command:`distcc` or :command:`icecc`/:command:`icecream`, they
|
||||||
generally be run under :command:`ccache`; see the documentation for
|
would generally be run under :command:`ccache`; see the documentation
|
||||||
those programs. If OBJCACHE is not set, and at configure time ccache
|
for those programs. If OBJCACHE is not set, and at configure time ccache
|
||||||
was present, ccache will be used as a default.
|
was present, ccache will be used as a default.
|
||||||
|
|
||||||
.. option:: SYSTEMC
|
.. option:: SYSTEMC
|
||||||
|
|
||||||
Deprecated. Used only if :option:`SYSTEMC_INCLUDE` or
|
Deprecated. Used only if :option:`SYSTEMC_INCLUDE` or
|
||||||
:option:`SYSTEMC_LIBDIR` is not set. If set, specifies the directory
|
:option:`SYSTEMC_LIBDIR` is not set. If set, specifies the directory
|
||||||
containing the SystemC distribution. If not specified, it will come
|
containing the SystemC distribution. If not specified, it will come from
|
||||||
from a default optionally specified at configure time (before Verilator
|
a default optionally specified at configure time (before Verilator was
|
||||||
was compiled).
|
compiled).
|
||||||
|
|
||||||
.. option:: SYSTEMC_ARCH
|
.. option:: SYSTEMC_ARCH
|
||||||
|
|
||||||
Deprecated. Used only if :option:`SYSTEMC_LIBDIR` is not set.
|
Deprecated. Used only if :option:`SYSTEMC_LIBDIR` is not set. Specifies
|
||||||
Specifies the architecture name used by the SystemC kit. This is the
|
the architecture name used by the SystemC kit. This is the part after
|
||||||
part after the dash in the "lib-{...}" directory name created by a
|
the dash in the "lib-{...}" directory name created by a :command:`make`
|
||||||
:command:`make` in the SystemC distribution. If not set, Verilator will
|
in the SystemC distribution. If not set, Verilator will try to intuit
|
||||||
try to intuit the proper setting, or use the default optionally
|
the proper setting, or use the default optionally specified at configure
|
||||||
specified at configure time (before Verilator was compiled).
|
time (before Verilator was compiled).
|
||||||
|
|
||||||
.. option:: SYSTEMC_CXX_FLAGS
|
.. option:: SYSTEMC_CXX_FLAGS
|
||||||
|
|
||||||
Specifies additional flags that are required to be passed to GCC when
|
Specifies additional flags that are required to be passed to GCC when
|
||||||
building the SystemC model. System 2.3.0 may need this set to
|
building the SystemC model. System 2.3.0 may need this set to
|
||||||
"-pthread".
|
"-pthread".
|
||||||
|
|
||||||
.. option:: SYSTEMC_INCLUDE
|
.. option:: SYSTEMC_INCLUDE
|
||||||
@@ -67,27 +67,27 @@ associated programs.
|
|||||||
|
|
||||||
.. option:: SYSTEMC_LIBDIR
|
.. option:: SYSTEMC_LIBDIR
|
||||||
|
|
||||||
If set, specifies the directory containing the libsystemc.a library. If
|
If set, specifies the directory containing the libsystemc.a library. If
|
||||||
not specified, it will come from a default optionally specified at
|
not specified, it will come from a default optionally specified at
|
||||||
configure time (before Verilator was compiled), or computed from
|
configure time (before Verilator was compiled), or computed from
|
||||||
SYSTEMC/lib-SYSTEMC_ARCH.
|
SYSTEMC/lib-SYSTEMC_ARCH.
|
||||||
|
|
||||||
.. option:: VERILATOR_BIN
|
.. option:: VERILATOR_BIN
|
||||||
|
|
||||||
If set, specifies an alternative name of the ``verilator`` binary. May
|
If set, specifies an alternative name of the ``verilator`` binary. May
|
||||||
be used for debugging and selecting between multiple operating system
|
be used for debugging and selecting between multiple operating system
|
||||||
builds.
|
builds.
|
||||||
|
|
||||||
.. option:: VERILATOR_COVERAGE_BIN
|
.. option:: VERILATOR_COVERAGE_BIN
|
||||||
|
|
||||||
If set, specifies an alternative name of the ``verilator_coverage``
|
If set, specifies an alternative name of the ``verilator_coverage``
|
||||||
binary. May be used for debugging and selecting between multiple
|
binary. May be used for debugging and selecting between multiple
|
||||||
operating system builds.
|
operating system builds.
|
||||||
|
|
||||||
.. option:: VERILATOR_GDB
|
.. option:: VERILATOR_GDB
|
||||||
|
|
||||||
If set, the command to run when using the :vlopt:`--gdb` option, such as
|
If set, the command to run when using the :vlopt:`--gdb` option, such as
|
||||||
"ddd". If not specified, it will use "gdb".
|
"ddd". If not specified, it will use "gdb".
|
||||||
|
|
||||||
.. option:: VERILATOR_ROOT
|
.. option:: VERILATOR_ROOT
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ associated programs.
|
|||||||
|
|
||||||
If you are using a pre-compiled Verilator package, you should not need
|
If you are using a pre-compiled Verilator package, you should not need
|
||||||
to set ``VERILATOR_ROOT`` - the value embedded in the binary should be
|
to set ``VERILATOR_ROOT`` - the value embedded in the binary should be
|
||||||
correct. In fact this option *does not work* with Verilator packages
|
correct. In fact this option *does not work* with Verilator packages
|
||||||
that have been installed with ``make install``. If a Verilator package
|
that have been installed with ``make install``. If a Verilator package
|
||||||
has been installed using ``./configure --prefix=/some/path && make
|
has been installed using ``./configure --prefix=/some/path && make
|
||||||
install`` and then moved to another location, you cannot use
|
install`` and then moved to another location, you cannot use
|
||||||
@@ -121,13 +121,15 @@ associated programs.
|
|||||||
.. option:: VERILATOR_SOLVER
|
.. option:: VERILATOR_SOLVER
|
||||||
|
|
||||||
If set, the command to run as a constrained randomization backend, such
|
If set, the command to run as a constrained randomization backend, such
|
||||||
as :command:`cvc4 --lang=smt2 --incremental`. If not specified, it will use
|
as :command:`cvc4 --lang=smt2 --incremental`. If not specified, it will
|
||||||
the one supplied or found during configure, or :command:`z3 --in` if empty.
|
use the one supplied or found during configure, or :command:`z3 --in` if
|
||||||
|
empty.
|
||||||
|
|
||||||
.. option:: VERILATOR_VALGRIND
|
.. option:: VERILATOR_VALGRIND
|
||||||
|
|
||||||
If set, the command to run when using the :vlopt:`--valgrind` option, such as
|
If set, the command to run when using the :vlopt:`--valgrind` option,
|
||||||
"valgrind --tool=callgrind". If not specified, it will use "valgrind".
|
such as "valgrind --tool=callgrind". If not specified, it will use
|
||||||
|
"valgrind".
|
||||||
|
|
||||||
|
|
||||||
Make Variables
|
Make Variables
|
||||||
@@ -146,7 +148,7 @@ set by passing them to make e.g. ``make CXX=my-gcc ...``.
|
|||||||
|
|
||||||
Optionally overrides the default compiler binary used by the Verilated
|
Optionally overrides the default compiler binary used by the Verilated
|
||||||
makefiles. If CXX is not set, the version found at configure time is
|
makefiles. If CXX is not set, the version found at configure time is
|
||||||
used. Note the default flags passed to the compiler are determined at
|
used. Note the default flags passed to the compiler are determined at
|
||||||
configuration time, so changing the CXX compiler version using this
|
configuration time, so changing the CXX compiler version using this
|
||||||
variable, as opposed to passing it at configuration time, may not give
|
variable, as opposed to passing it at configuration time, may not give
|
||||||
desired results.
|
desired results.
|
||||||
@@ -155,7 +157,7 @@ set by passing them to make e.g. ``make CXX=my-gcc ...``.
|
|||||||
|
|
||||||
Optionally overrides the default linker binary used by the Verilated
|
Optionally overrides the default linker binary used by the Verilated
|
||||||
makefiles. If LINK is not set, the version found at configure time is
|
makefiles. If LINK is not set, the version found at configure time is
|
||||||
used. Note the default flags passed to the linker are determined at
|
used. Note the default flags passed to the linker are determined at
|
||||||
configuration time, so changing the LINK version using this variable, as
|
configuration time, so changing the LINK version using this variable, as
|
||||||
opposed to passing it at configuration time, may not give desired
|
opposed to passing it at configuration time, may not give desired
|
||||||
results.
|
results.
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
.. Copyright 2003-2025 by Wilson Snyder.
|
.. Copyright 2003-2026 by Wilson Snyder.
|
||||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
.. _Example Create-Binary Execution:
|
.. _example create-binary execution:
|
||||||
|
|
||||||
Example Create-Binary Execution
|
Example Create-Binary Execution
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
We'll compile this SystemVerilog example into a Verilated simulation binary. For
|
We'll compile this SystemVerilog example into a Verilated simulation
|
||||||
an example that discusses the next level of detail see :ref:`Example C++
|
binary. For an example that discusses the next level of detail see
|
||||||
Execution`.
|
:ref:`Example C++ Execution`.
|
||||||
|
|
||||||
.. include:: example_common_install.rst
|
.. include:: example_common_install.rst
|
||||||
|
|
||||||
@@ -16,20 +16,20 @@ Now, let's create an example Verilog file:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
mkdir test_our
|
mkdir test_our
|
||||||
cd test_our
|
cd test_our
|
||||||
|
|
||||||
cat >our.v <<'EOF'
|
cat >our.v <<'EOF'
|
||||||
module our;
|
module our;
|
||||||
initial begin $display("Hello World"); $finish; end
|
initial begin $display("Hello World"); $finish; end
|
||||||
endmodule
|
endmodule
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
Now we run Verilator on our little example.
|
Now we run Verilator on our little example.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
verilator --binary -j 0 -Wall our.v
|
verilator --binary -j 0 -Wall our.v
|
||||||
|
|
||||||
Breaking this command down:
|
Breaking this command down:
|
||||||
|
|
||||||
@@ -39,8 +39,7 @@ Breaking this command down:
|
|||||||
#. :vlopt:`-j` `0` to Verilate using use as many CPU threads as the machine
|
#. :vlopt:`-j` `0` to Verilate using use as many CPU threads as the machine
|
||||||
has.
|
has.
|
||||||
|
|
||||||
#. :vlopt:`-Wall` so Verilator has stronger lint warnings
|
#. :vlopt:`-Wall` so Verilator has stronger lint warnings enabled.
|
||||||
enabled.
|
|
||||||
|
|
||||||
#. An finally, :command:`our.v`, which is our SystemVerilog design file.
|
#. An finally, :command:`our.v`, which is our SystemVerilog design file.
|
||||||
|
|
||||||
@@ -48,16 +47,16 @@ And now we run it:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
obj_dir/Vour
|
obj_dir/Vour
|
||||||
|
|
||||||
And we get as output:
|
And we get as output:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
Hello World
|
Hello World
|
||||||
- our.v:2: Verilog $finish
|
- our.v:2: Verilog $finish
|
||||||
|
|
||||||
You're better off using a Makefile to run the steps for you, so when your
|
You're better off using a Makefile to run the steps for you, so when your
|
||||||
source changes, it will automatically run all of the appropriate steps. To
|
source changes, it will automatically run all of the appropriate steps. To
|
||||||
aid this, Verilator can create a makefile dependency file. For examples
|
aid this, Verilator can create a makefile dependency file. For examples
|
||||||
that do this, see the :file:`examples` directory in the distribution.
|
that do this, see the :file:`examples` directory in the distribution.
|
||||||
|
|||||||
+31
-32
@@ -1,12 +1,12 @@
|
|||||||
.. Copyright 2003-2025 by Wilson Snyder.
|
.. Copyright 2003-2026 by Wilson Snyder.
|
||||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
.. _Example C++ Execution:
|
.. _example c++ execution:
|
||||||
|
|
||||||
Example C++ Execution
|
Example C++ Execution
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
We'll compile this example into C++. For an extended and commented version
|
We'll compile this example into C++. For an extended and commented version
|
||||||
of what this C++ code is doing, see
|
of what this C++ code is doing, see
|
||||||
:file:`examples/make_tracing_c/sim_main.cpp` in the distribution.
|
:file:`examples/make_tracing_c/sim_main.cpp` in the distribution.
|
||||||
|
|
||||||
@@ -16,34 +16,34 @@ Now, let's create an example Verilog and C++ wrapper file:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
mkdir test_our
|
mkdir test_our
|
||||||
cd test_our
|
cd test_our
|
||||||
|
|
||||||
cat >our.v <<'EOF'
|
cat >our.v <<'EOF'
|
||||||
module our;
|
module our;
|
||||||
initial begin $display("Hello World"); $finish; end
|
initial begin $display("Hello World"); $finish; end
|
||||||
endmodule
|
endmodule
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat >sim_main.cpp <<'EOF'
|
cat >sim_main.cpp <<'EOF'
|
||||||
#include "Vour.h"
|
#include "Vour.h"
|
||||||
#include "verilated.h"
|
#include "verilated.h"
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
VerilatedContext* contextp = new VerilatedContext;
|
VerilatedContext* contextp = new VerilatedContext;
|
||||||
contextp->commandArgs(argc, argv);
|
contextp->commandArgs(argc, argv);
|
||||||
Vour* top = new Vour{contextp};
|
Vour* top = new Vour{contextp};
|
||||||
while (!contextp->gotFinish()) { top->eval(); }
|
while (!contextp->gotFinish()) { top->eval(); }
|
||||||
delete top;
|
delete top;
|
||||||
delete contextp;
|
delete contextp;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
Now we run Verilator on our little example;
|
Now we run Verilator on our little example;
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
verilator --cc --exe --build -j 0 -Wall sim_main.cpp our.v
|
verilator --cc --exe --build -j 0 -Wall sim_main.cpp our.v
|
||||||
|
|
||||||
Breaking this command down:
|
Breaking this command down:
|
||||||
|
|
||||||
@@ -60,8 +60,7 @@ Breaking this command down:
|
|||||||
#. :vlopt:`-j 0 <-j>` to Verilate using use as many CPU threads as the
|
#. :vlopt:`-j 0 <-j>` to Verilate using use as many CPU threads as the
|
||||||
machine has.
|
machine has.
|
||||||
|
|
||||||
#. :vlopt:`-Wall` so Verilator has stronger lint warnings
|
#. :vlopt:`-Wall` so Verilator has stronger lint warnings enabled.
|
||||||
enabled.
|
|
||||||
|
|
||||||
#. And finally, :command:`our.v` which is our SystemVerilog design file.
|
#. And finally, :command:`our.v` which is our SystemVerilog design file.
|
||||||
|
|
||||||
@@ -70,7 +69,7 @@ Once Verilator completes we can see the generated C++ code under the
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
ls -l obj_dir
|
ls -l obj_dir
|
||||||
|
|
||||||
(See :ref:`Files Read/Written` for descriptions of some of the files that
|
(See :ref:`Files Read/Written` for descriptions of some of the files that
|
||||||
were created.)
|
were created.)
|
||||||
@@ -79,16 +78,16 @@ And now we run it:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
obj_dir/Vour
|
obj_dir/Vour
|
||||||
|
|
||||||
And we get as output:
|
And we get as output:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
Hello World
|
Hello World
|
||||||
- our.v:2: Verilog $finish
|
- our.v:2: Verilog $finish
|
||||||
|
|
||||||
You're better off using a Makefile to run the steps for you, so when your
|
You're better off using a Makefile to run the steps for you, so when your
|
||||||
source changes, it will automatically run all of the appropriate steps. To
|
source changes, it will automatically run all of the appropriate steps. To
|
||||||
aid this, Verilator can create a makefile dependency file. For examples
|
aid this, Verilator can create a makefile dependency file. For examples
|
||||||
that do this, see the :file:`examples` directory in the distribution.
|
that do this, see the :file:`examples` directory in the distribution.
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
.. Copyright 2003-2025 by Wilson Snyder.
|
.. Copyright 2003-2026 by Wilson Snyder.
|
||||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
First you need Verilator installed, see :ref:`Installation`. In brief, if
|
First you need Verilator installed, see :ref:`Installation`. In brief, if
|
||||||
you installed Verilator using the package manager of your operating system,
|
you installed Verilator using the package manager of your operating system,
|
||||||
or did a :command:`make install` to place Verilator into your default path,
|
or did a :command:`make install` to place Verilator into your default path,
|
||||||
you do not need anything special in your environment, and should not have
|
you do not need anything special in your environment, and should not have
|
||||||
VERILATOR_ROOT set. However, if you installed Verilator from sources and
|
VERILATOR_ROOT set. However, if you installed Verilator from sources and
|
||||||
want to run Verilator out of where you compiled Verilator, you need to
|
want to run Verilator out of where you compiled Verilator, you need to
|
||||||
point to the kit:
|
point to the kit:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# See above; don't do this if using an OS-distributed Verilator
|
# See above; don't do this if using an OS-distributed Verilator
|
||||||
export VERILATOR_ROOT=/path/to/where/verilator/was/installed
|
export VERILATOR_ROOT=/path/to/where/verilator/was/installed
|
||||||
export PATH=$VERILATOR_ROOT/bin:$PATH
|
export PATH=$VERILATOR_ROOT/bin:$PATH
|
||||||
|
|||||||
@@ -1,42 +1,52 @@
|
|||||||
.. Copyright 2003-2025 by Wilson Snyder.
|
.. Copyright 2003-2026 by Wilson Snyder.
|
||||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
.. _Examples in the Distribution:
|
.. _examples in the distribution:
|
||||||
|
|
||||||
Examples in the Distribution
|
Examples in the Distribution
|
||||||
============================
|
============================
|
||||||
|
|
||||||
See the ``examples/`` directory that is part of the distribution, and
|
See the ``examples/`` directory that is part of the distribution, and is
|
||||||
is installed (in an OS-specific place, often in e.g.
|
installed (in an OS-specific place, often in e.g.
|
||||||
``/usr/local/share/verilator/examples``). These examples include:
|
``/usr/local/share/verilator/examples``). These examples include:
|
||||||
|
|
||||||
examples/make_hello_binary
|
examples/make_hello_binary
|
||||||
Example GNU-make simple Verilog->binary conversion
|
Example GNU-make simple Verilog->binary conversion
|
||||||
|
|
||||||
examples/make_hello_c
|
examples/make_hello_c
|
||||||
Example GNU-make simple Verilog->C++ conversion
|
Example GNU-make simple Verilog->C++ conversion
|
||||||
|
|
||||||
examples/make_hello_sc
|
examples/make_hello_sc
|
||||||
Example GNU-make simple Verilog->SystemC conversion
|
Example GNU-make simple Verilog->SystemC conversion
|
||||||
|
|
||||||
examples/make_tracing_c
|
examples/make_tracing_c
|
||||||
Example GNU-make Verilog->C++ with tracing
|
Example GNU-make Verilog->C++ with tracing
|
||||||
|
|
||||||
examples/make_tracing_sc
|
examples/make_tracing_sc
|
||||||
Example GNU-make Verilog->SystemC with tracing
|
Example GNU-make Verilog->SystemC with tracing
|
||||||
|
|
||||||
examples/make_protect_lib
|
examples/make_protect_lib
|
||||||
Example using --protect-lib
|
Example using --protect-lib
|
||||||
|
|
||||||
examples/cmake_hello_c
|
examples/cmake_hello_c
|
||||||
Example building make_hello_c with CMake
|
Example building make_hello_c with CMake
|
||||||
|
|
||||||
examples/cmake_hello_sc
|
examples/cmake_hello_sc
|
||||||
Example building make_hello_sc with CMake
|
Example building make_hello_sc with CMake
|
||||||
|
|
||||||
examples/cmake_tracing_c
|
examples/cmake_tracing_c
|
||||||
Example building make_tracing_c with CMake
|
Example building make_tracing_c with CMake
|
||||||
|
|
||||||
examples/cmake_tracing_sc
|
examples/cmake_tracing_sc
|
||||||
Example building make_tracing_sc with CMake
|
Example building make_tracing_sc with CMake
|
||||||
|
|
||||||
examples/cmake_protect_lib
|
examples/cmake_protect_lib
|
||||||
Example building make_protect_lib with CMake
|
Example building make_protect_lib with CMake
|
||||||
|
|
||||||
To run an example copy the example to a new directory and run it.
|
To run an example copy the example to a new directory and run it.
|
||||||
|
|
||||||
::
|
.. code-block:: bash
|
||||||
|
|
||||||
cp -rp {path_to}/examples/make_hello_c make_hello_c
|
cp -rp {path_to}/examples/make_hello_c make_hello_c
|
||||||
cd make_hello_c
|
cd make_hello_c
|
||||||
make
|
make
|
||||||
|
|||||||
+30
-30
@@ -1,7 +1,7 @@
|
|||||||
.. Copyright 2003-2025 by Wilson Snyder.
|
.. Copyright 2003-2026 by Wilson Snyder.
|
||||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
.. _Example SystemC Execution:
|
.. _example systemc execution:
|
||||||
|
|
||||||
Example SystemC Execution
|
Example SystemC Execution
|
||||||
=========================
|
=========================
|
||||||
@@ -15,58 +15,58 @@ Now, let's create an example Verilog, and SystemC wrapper file:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
mkdir test_our_sc
|
mkdir test_our_sc
|
||||||
cd test_our_sc
|
cd test_our_sc
|
||||||
|
|
||||||
cat >our.v <<'EOF'
|
cat >our.v <<'EOF'
|
||||||
module our (clk);
|
module our (clk);
|
||||||
input clk; // Clock is required to get initial activation
|
input clk; // Clock is required to get initial activation
|
||||||
always @(posedge clk)
|
always @(posedge clk)
|
||||||
begin $display("Hello World"); $finish; end
|
begin $display("Hello World"); $finish; end
|
||||||
endmodule
|
endmodule
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat >sc_main.cpp <<'EOF'
|
cat >sc_main.cpp <<'EOF'
|
||||||
#include "Vour.h"
|
#include "Vour.h"
|
||||||
using namespace sc_core;
|
using namespace sc_core;
|
||||||
int sc_main(int argc, char** argv) {
|
int sc_main(int argc, char** argv) {
|
||||||
Verilated::commandArgs(argc, argv);
|
Verilated::commandArgs(argc, argv);
|
||||||
sc_clock clk{"clk", 10, SC_NS, 0.5, 3, SC_NS, true};
|
sc_clock clk{"clk", 10, SC_NS, 0.5, 3, SC_NS, true};
|
||||||
Vour* top = new Vour{"top"};
|
Vour* top = new Vour{"top"};
|
||||||
top->clk(clk);
|
top->clk(clk);
|
||||||
while (!Verilated::gotFinish()) { sc_start(1, SC_NS); }
|
while (!Verilated::gotFinish()) { sc_start(1, SC_NS); }
|
||||||
delete top;
|
delete top;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
Now we run Verilator on our little example:
|
Now we run Verilator on our little example:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
verilator --sc --exe -Wall sc_main.cpp our.v
|
verilator --sc --exe -Wall sc_main.cpp our.v
|
||||||
|
|
||||||
This example does not use --build, therefore we need to explicitly compile
|
This example does not use --build, therefore we need to explicitly compile
|
||||||
it:
|
it:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
make -j -C obj_dir -f Vour.mk Vour
|
make -j -C obj_dir -f Vour.mk Vour
|
||||||
|
|
||||||
And now we run it:
|
And now we run it:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
obj_dir/Vour
|
obj_dir/Vour
|
||||||
|
|
||||||
And we get, after the SystemC banner, the same output as the C++ example:
|
And we get, after the SystemC banner, the same output as the C++ example:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
SystemC 2.3.3-Accellera
|
SystemC 2.3.3-Accellera
|
||||||
|
|
||||||
Hello World
|
Hello World
|
||||||
- our.v:4: Verilog $finish
|
- our.v:4: Verilog $finish
|
||||||
|
|
||||||
Really, you're better off using a Makefile to run the steps for you so when
|
Really, you're better off using a Makefile to run the steps for you so when
|
||||||
your source changes it will automatically run all of the appropriate steps.
|
your source changes it will automatically run all of the appropriate steps.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.. Copyright 2003-2025 by Wilson Snyder.
|
.. Copyright 2003-2026 by Wilson Snyder.
|
||||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
.. _Examples:
|
.. _examples:
|
||||||
|
|
||||||
========
|
========
|
||||||
Examples
|
Examples
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user